Pages: [1]   Go Down
Author Topic: Attinys frying  (Read 1588 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi guys and gals.
I am working on a project using an Attiny85, and the arduino-tiny software package for the Arduino environment. I'm running into a serious problem and I haven't been able to find any info online. I'm hoping someone might have a suggestion.

I have gotten the software to work with Attiny85 chips from Digikey. I am programming the chips with an Arduino Duemilanove as an ISP. Once I connect a new chip, I can upload software (I've been using "Fade" for testing, setting pin 0 as output).  After uploading, I can read pin 0 with my oscilloscope and see the PWM signal sweeping as it's supposed to.

However, if I leave the chip connected to power, it will fail within 1-2 minutes. I can see the output on the oscilloscope getting noisy and jittery, and I can even hear the chip itself crackling and buzzing.  This gets worse and worse, until it stops responding to programming (via arduino IDE or avrdude from command line), stops producing the PWM signal, and is completely dead as far as I can tell.  I've tried chip after chip, and every one fails after a couple minutes of use.

I'm running them off of the 5V pin on the duemilanove. I have it wired exactly as shown on the High-Low Tech blog for using an Arduino as an ISP. I have checked and rechecked the supply voltage. It reads 4.95V with my oscilloscope and DMM.  There is no appreciable noise on the line.  The duemilanove is powered directly from the USB hub of my laptop.

If I run Vcc from the 3.3v pin instead, the chip will not respond to the programmer at all. I've found that if I program the chip at 5V and quickly switch it over to 3.3V before it stops responding, it will run overnight without burning up.  It seems stable. But as soon as I switch it back over to 5V, it is instantly destroyed.

I'm using the 8-SOIC package version of the attiny.  The chips are soldered onto a breakout board that I printed. The only purpose of the board is to break out the chip into male headers so I can use jumpers to connect it to the duemilanove. The application I am working on requires the surface mount version. Additionally, the application requires the chip to run at 4.8V.

I've tried two batches of 10 chips from digikey. They have slightly different part numbers, but they are both ATTiny85s with voltage range 2.7-5.5V.

I have tried "burning the bootloader" for 1mhz and 8mhz, and using the stock configuration. It successfully changes the frequency, but the chip still burns up in minutes either way.


What could possibly be happening? I'm nearly at my wits end.


Thanks in advance for your help,
Matt
Logged

USA
Offline Offline
Newbie
*
Karma: 0
Posts: 33
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Can we get a photo, drawing, or description of your breakout board?

All the attiny needs to function are:

1. a pin from the 3.3V or 5V to the Vcc pin on attiny
2. a pin from GND to the GND pin on attiny
3. optional reset pin to GND

If you're going to do a lot of projects with Arduino and attiny, let me suggest you get the AVRisp MKii from Atmel. You can buy it from digikey. It does wonders!
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 212
Posts: 13072
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


Other than the oscilloscope, what is connected to pin 0?

Is the target (the ATtiny) also powered from USB?

Very very carefully check your circuit board for shorts / solder bridges.
« Last Edit: June 30, 2013, 01:07:42 am by Coding Badly » Logged

Denmark
Offline Offline
Edison Member
*
Karma: 37
Posts: 1095
Happy Hobbyist
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I would suggest a 10 kohm resistor from reset to VCC, and a 100nF capacitor from VCC to Grnd.

Without the resistor, the Attiny could be auto-restting.
Logged

vermont
Offline Offline
Sr. Member
****
Karma: 8
Posts: 316
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

im convinced the best thing to connect to reset is absolutely nothing. certainly nothing to do with the chip "crackling and buzzing" or "frying". is there heat and smoke? if so then overvoltage on some pin is certainly the cause.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 639
Posts: 34724
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Are you wiring up an LED without a current limiting resistor?
That would fit everything you describe.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the replies.

After reading your responses, I believe I've narrowed down the problem.

My test program set pin 0 to fade. Pin 0 is used for programming, and is thus connected to pin 11 on the duemilanove. I think the duemilanove was holding pin 0 to LOW after programming was complete. This was causing too much current to be sourced from the tiny though pin 0, immediately after programming and before disconnecting the duemilanove.

I switched to using "Blink" on pin 3 which is unused for programming. It seemed like the frying issue was solved, but the output was still jittering and dropping out randomly. Then I put a 10k resistor between Vcc and RESET as suggested, and the jittering was reduced, but not eliminated. Finally, I shorted RESET directly to Vcc and the chip has been stable for 6 hours on 5V.

Now my question is this...Is it possible to program pins 0 and 1 as outputs without ruining the chip before the programmer is disconnected? My application requires pin 0 to be set to HIGH on bootup, but this will fry the chip immediately after the program is uploaded. Can the Arduino ISP program be easily changed to hold RESET to ground after programming ends? Would this keep the attiny from booting up and potentially solve this problem?

The board is wired exactly as shown here.

I'm definitely open to using another type of programmer, if that would get around this issue.

Thanks again for your input, as finding answers to your questions got me thinking about it in a completely different way.


* Screen Shot 2013-06-30 at 12.38.24 PM.png (16.79 KB, 723x514 - viewed 28 times.)
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 639
Posts: 34724
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
The board is wired exactly as shown here.
I notice a total lack of decoupling capacitors on the chip. This often causes erratic behavior like this.
http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html
« Last Edit: July 03, 2013, 03:27:40 pm by Coding Badly » Logged

Leeds, UK
Offline Offline
Edison Member
*
Karma: 80
Posts: 1730
Once the magic blue smoke is released, it won't go back in!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Put a 1k resistor in series with all connections between the duemilanove and the attiny. That will prevent excess currents flowing if they are each trying to drive the pin in opposite directions whilst still allowing programming to be done.
Logged

~Tom~

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 212
Posts: 13072
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I think the duemilanove was holding pin 0 to LOW after programming was complete.

Are you using the ArduinoISP sketch that comes with the Arduino IDE?

Quote
I switched to using "Blink" on pin 3 which is unused for programming. It seemed like the frying issue was solved, but the output was still jittering and dropping out randomly. Then I put a 10k resistor between Vcc and RESET as suggested, and the jittering was reduced, but not eliminated.

That sounds like a loose connection.  Unless you have an electrically noisy environment, a 10K resistor should work flawlessly.

Quote
Now my question is this...Is it possible to program pins 0 and 1 as outputs without ruining the chip before the programmer is disconnected?

I do it all the time (using this variation of the ArduinoISP sketch: https://github.com/Coding-Badly/TinyISP ).  The ArduinoISP sketch is supposed to change the SPI pins (the three pins used for programming) to INPUTs before releasing RESET.  It is possible you have crossed paths with a bug that keeps the SPI pins configured as OUTPUTs.

Quote
Can the Arduino ISP program be easily changed to hold RESET to ground after programming ends?

TinyISP supports that.

Quote
Would this keep the attiny from booting up and potentially solve this problem?

Unless there's a bug in ArduinoISP or you failed to correctly wire the programmer to RESET it should not make any difference.

Quote
I'm definitely open to using another type of programmer, if that would get around this issue.

This will help more than changing programmers...
http://forum.arduino.cc/index.php?topic=174842.msg1298837#msg1298837
Logged

Pages: [1]   Go Up
Jump to: