Author Topic: Fried DigiSpark?  (Read 7615 times)

EMk

  • Newbie
  • *
  • Posts: 13
Fried DigiSpark?
« on: August 28, 2013, 03:45:47 pm »
Hi,


I'm trying to get the DigiSpark (with DigiUSB2LCD sketch) working on my Ubuntu (13.04) box.  I can't get it to recognize on the Ubuntu box(sometimes the boot up, black bars on top does not go away at all), as I was downloading sketches with debug code from my win7 box, the computer is no longer able to recognize that I am plugging in the digiSpark.


I tried different ports to no avail, HOWEVER, when I tried a different DigiSpark, it works, so it seems like I've scrambled/fried the bootloader portion of a digiSpark.


Is there a way for me to burn the bootloader?  the wiki mentioned it was unstable so I figured I'd ask a question on the forum first.


Thanks in advance

Bluebie

  • Sr. Member
  • ****
  • Posts: 486
Re: Fried DigiSpark?
« Reply #1 on: August 28, 2013, 06:19:36 pm »
what makes you think the bootloader is corrupt? does the usb connection still work otherwise? (digiusb in the sketch) Did you ever use the upgrade files to switch to the 'jumper' bootloader, or switch between versions of bootloader, or use the Burn Bootloader feature to update the bootloader on your digispark to install the clock speed fixes, back when it was working?


If the bootloader really is corrupt (seems unlikely, unless your program was writing things to flash memory "PROGMEM" to store data, or something went wrong with the upgrade program) the only way to fix it is to either use a HVSP device to upload micronucleus again, or use a fuse resetter (you can make one out of the working digispark, a 12v battery, and a transistor and resistor and stuff - there's a recipe somewhere on these forums) and then use an ISP programmer to upload micronucleus. For the ISP programmer part you can actually load Micronucleus on to it then stack the broken and working sparks together like a shield and just plug the working spark in to a usb port then select the USBtinyISP programmer in the Tools menu, then choose Burn Bootloader. After that the bootloader will have been replaced with a current version with the clock speed fixes and stuff.


I'd be surprised if the bootloader went corrupt when you weren't messing with progmem. More likely I think the USB hardware has stuffed up somehow. Maybe the zenner diodes or pullup resistor got knocked off or burnt out somehow, or if your broken spark isn't working at all (the power LED doesn't even light up when powered from a USB port) then you have a power supply problem and likely need to replace or short circuit the diode which connects power from the usb port in to the 5v pin.

EMk

  • Newbie
  • *
  • Posts: 13
Re: Fried DigiSpark?
« Reply #2 on: August 28, 2013, 06:45:14 pm »
Usually when I plug the digispark in windows, I hear and see the USB popup detecting a device, followed by a disconnect sound ~5seconds later.  This particular digiSpark, I get nothing - no notifications(audio/visual) of any kind.  I tried different ports, all same.


I tried a DIFFERENT digiSpark, and everything works - the audio/visual notification from the PC.


I'm not doing anything other than use the DigiUSB2LCD sketch, and tried some code to add a button by connecting a 1k resistor between GND and p1 and p1 to switch, switch to 5V. 


It used to work when I connected directly to a USB power source(Adafruit's MintyBoost kit), and now the digiSpark doesn't work - the Green led lights up but it isn't recognized by the PC(I can't download a new sketch) and connecting to the MintyBoost just leaves it on, but the original sketch doesn't work either.




EMk

  • Newbie
  • *
  • Posts: 13
Re: Fried DigiSpark?
« Reply #3 on: August 28, 2013, 06:46:58 pm »
I should add, I didn't do any jumper modifications or firmware upgrades - everything worked fine, so I used Digi-Arduino to download the sketch and tried to get it to work on Ubuntu when this happened.


Thanks

Bluebie

  • Sr. Member
  • ****
  • Posts: 486
Re: Fried DigiSpark?
« Reply #4 on: August 29, 2013, 09:07:19 am »
From the sounds of it I think it is unlikely to be a bootloader problem. I am more suspicious of hardware - in particular the power supply to the microcontroller, or possibly ESD death. Anyway, not my field. Maybe @digispark has some thoughts?

digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
Re: Fried DigiSpark?
« Reply #5 on: August 29, 2013, 11:04:16 am »
@EMk - this sounds like the D1 Schottky Diode was fired - this can happen if the Digispark is momentarily shorted out. Are you using the LCD shield or a homemade hook-up?

EMk

  • Newbie
  • *
  • Posts: 13
Re: Fried DigiSpark?
« Reply #6 on: August 29, 2013, 01:17:11 pm »
Hi digistump,


I am using the digispark LCD shield - but I added


GND->1K Resistor->P1
P1-> switch
switch->Vin


What I am trying to do is, connect USB -> DigiSpark->DigiSparkLCD->Button, and by using Send/Receive in Ubuntu, Have PC data printed on the LCD when the button is pressed.

Right now, I have 2 issues(really 1.5)
1 - I can't get Ubuntu to recognize DigiSpark(I suspect this is a DigiUSB/udev issue)
2 - I seemed to have fried the DigiSpark(even though plugging it into USB makes the green LED light up, I can't get it to register on Ubuntu/Windows.

Technically I can work around #2 by using another DigiSpark, but I want to know if there are any diagnostics I can perform and repair this one.

Thanks in advance


digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
Re: Fried DigiSpark?
« Reply #7 on: August 29, 2013, 06:34:29 pm »
Re: Ubuntu - I'm at a loss of ideas there - the other ideas suggested already are the same suggestions I would make - it works perfect with my install of 12.04 and others have reported it working with 13.04


Re: Your modification: the switch should connect to 5v not Vin.


Re: The broken Digispark - you could remove D1 (see other posts on it like this: http://digistump.com/board/index.php/topic,188.html) and short out those to pins - if it was the diode that would solve it, but if something with your modified shield caused it to fail then it would still short out the Digispark and cause the next part to fail.
Have you tested it with another Digispark? - or alternatively checked it for shorts with a multimeter?

EMk

  • Newbie
  • *
  • Posts: 13
Re: Fried DigiSpark?
« Reply #8 on: August 29, 2013, 09:47:46 pm »
hey digistump,


Re: Ubuntu - according to the wiki, it's just to copying udev files so that's that and it's not working... am currently double checking the libusb-0.1 and libusb-1.0 installations.


Re: Modifications - You're right, I've made the modifications to connect to 5V.  Would connecting to Vin have caused this short?  I figured even I tapped into Vin, since the whole thing is powered via USB port, Vin and 5V would both be 5V from the PC?




digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
Re: Fried DigiSpark?
« Reply #9 on: August 29, 2013, 10:19:04 pm »
When using USB power VIN is about 3.6 volts because it is being back fed through the regulator diodes (which is why it is labeled Voltage In - it is only meant to be an input) - this could cause unpredictable issues - I wouldn't think so but I would rule it out - especially if P1 mistakenly was set to be an output instead of an input. My approach would be to check the voltage on the 5V pin now when running on USB - if it is under 4.5v then it might be the diode and that is easy enough to remove and short out.


libusb-compat (sudo apt get libusb-compat) should be all you need, libusb 1.0 is only needed for Bluebie's ruby library. As bluebie advised in the other thread you should try running the command lines programs with "sudo" - as that will troubleshoot any permissions issue.









EMk

  • Newbie
  • *
  • Posts: 13
Re: Fried DigiSpark?
« Reply #10 on: August 29, 2013, 10:59:47 pm »
Hey digistump,


I'm gonna call it a night(2AM here in NY) - I have libusb-1.0-0/libusb-1.0-0-dev/libusb-0.1-4 via apt-get and libusb-compat-0.1.5 from source. 

apt-get install libusb-compat returns with "E: Unable to locate package libusb-compat".




Thanks for all the help so far.

digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
Re: Fried DigiSpark?
« Reply #11 on: August 29, 2013, 11:27:57 pm »
looks like libusb-0.1-4 (no compat on ubuntu packages) should do it - so it must not be a libusb problem - I think the list of questions in the other thread should help figure it out