Author Topic: Attiny85 on a non-digispark board  (Read 7046 times)

albercook

  • Newbie
  • *
  • Posts: 33
Attiny85 on a non-digispark board
« on: July 24, 2013, 06:58:29 pm »
I'm designing a PCB for an indoor drone. I start with a co-axial S-107 helicopter and remove all but the drive train. Next a use my own PCB and two Sharp distance sensors ( one looking down and one looking forward).


As you might imagine weight is critical. I have started by removing some components from the Digispark. I'm reading the supply voltage internally to the Attiny to adjust the power going the the motors to compensate for dropping battery voltage. As a result I don't want the ATtiny to run on the USB voltage when it is plugged into the use port. I did this by removing D3 from one of my Digisparks. I did get some very strange behavior with this device. 


Now I want to build my own board. I have only made a few PCBs so I want to build it on a breadboard first. I have taken the ATtiny from a Digispark and put it on a carrier board. I also have added D1, D2 and R1,2 and 3. provide VCC from a battery (Lipoly) and it runs fine. Next I tried to download and I get device not recognized error. I tried removing the battery and connecting VCC directly to the USB port. same error.  Now that port will not recognize any Digispark but it does recognize other usb devices and other ports recognize unmodified Digisparks.


Is it possible to mess up the drive on only one USB port?

albercook

  • Newbie
  • *
  • Posts: 33
Re: Attiny85 on a non-digispark board
« Reply #1 on: July 24, 2013, 10:33:00 pm »

This is strange. I have moved a Attiny from a working Digispark onto a carrier board. I have moved D1 and D2 onto a micro USB breakout board. I have included the pull-up resistor and D3. I have a 4.7uF and .1uF cap across power (not shown in picture). I'm using a powered hub which works fine on another digispark. But when I plug in my partially breadboarded digispark I get "USB device not recognized" if I click on the error I find that there is no drive. I go to >Digispark>WindowsDriver. But I get "Windows could not find a better match. Can not continue"




I have not bricked the Attiny because it still run blink.




I have included a link to my google plus page with a picture. I hope it works.




https://plus.google.com/u/0/104216798386870275356/posts




This is the second time I have done this with the same results. Last time I did use throughhole zener diodes.


I have reinstalled drivers, deleted .inf files, tried a different computer, am using a powered hub.


Any help would be greatly appreciated.

digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
Re: Attiny85 on a non-digispark board
« Reply #2 on: July 25, 2013, 12:31:36 am »
this could be simple case of breadboards and high speed/sensitive signals not mixing well - breadboards introduce all kinds of unknown impedance, resistance, etc - in fact I almost never use them for that reason and because prototype PCBs from places like OSHPark are so cheap - anything with USB I'd recommend designing a prototype board or several modular ones or at the very least using a solder prototype board instead of a breadboard

albercook

  • Newbie
  • *
  • Posts: 33
Re: Attiny85 on a non-digispark board
« Reply #3 on: July 25, 2013, 12:11:09 pm »
I will remove it from the breadboard and solder the part together. Will let you know how it worked later tonight.  Thank you so much for helping me with such a non-standard application.


Regards,
George

albercook

  • Newbie
  • *
  • Posts: 33
Re: Attiny85 on a non-digispark board
« Reply #4 on: July 25, 2013, 07:09:06 pm »
Problem Solved. Almost.


I had D+ and D- on the USB breakout board switched.


Here is the way it is supposed to be.


USB PIN                                                                  Attiny85 PIN
1  VCC                                                                               
2  D -     ------(D1 to GND)-------(R3 to 5V)------ R1--------   2
3  D +    ----- (D2 to GND)--------------------------R2--------   3
4 ID
5 GND                                                                               


Thank you Erik for all your support. Hope this helps someone else who has the same problem.


BTW I plugged it back into the breadboard and it still works.


Now for the interesting failure. One port of my netbook still fails to recognize a DigiSpark unless it is plugged in through a powered hub. This port used to work and the Digispark works on other ports.  The port works for a wireless mouse and with a powered hub. I tried deleting the .inf and .pnf files and reinstalling the windows drivers but no change. Maybe I crippled but did not kill that port before I was using a powered hub.


Thanks again. I have learned so much from other posts I hope that this can save someone time and frustration.


Regards,
George


Bluebie

  • Sr. Member
  • ****
  • Posts: 486
Re: Attiny85 on a non-digispark board
« Reply #5 on: July 25, 2013, 08:00:44 pm »
I make V-USB circuits including digispark analogs on breadboards all the time and I've never had any trouble with it..

gogol

  • Sr. Member
  • ****
  • Posts: 398
Re: Attiny85 on a non-digispark board
« Reply #6 on: July 26, 2013, 04:19:31 am »
Having no trouble on breadboards as well:
I use an USB-cable from an old mouse (keyboard, whats-o-ever) and have soldered that to a small laboratory PCB. On that PCB I have the diode, the zeners and the resistors and finally arranged 4 pins in that way, that GND and both USB-pins are connecting immediately to the row with pin 2-4 of the attiny in the breadboard. 

digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
Re: Attiny85 on a non-digispark board
« Reply #7 on: July 26, 2013, 10:45:36 am »
You folks must have better bread boards then I do! I'm might just not have the patience for them or a touchier computer.


Albercook - glad it worked - I've switched D- and D+ many times!

gogol

  • Sr. Member
  • ****
  • Posts: 398
Re: Attiny85 on a non-digispark board
« Reply #8 on: July 29, 2013, 01:04:01 am »
Yesterday I came up with another way, connecting my attiny in a bread-board to USB:

I took a fried digispark and removed the on-board attiny with a scalpel.  It has headers on the six data-pads, which i can plugin to my bread-boards and cables to the three pads for GND, 5V and Vin, to plug them as needed.
I can now uses this adapter USB-Only connecting only GND, 5V and D-/D+, or using the on-Board-LED as well for a simple blink-test or using it as a regulated power source for a more compley bread-board layout using the power-regulator.

With this adapter also my ten year old laboratory notebook accepted the bread-board digispark immediately. The cause may be, that I used in my own connector 500mW Zeners (as I could not get smaller ones as through-the-hole) while the smd-ones are for sure smaller.  Its reported, that the bigger zeners have higher capacity and therefore are known as a culprit for some trouble.


gogol