Pages: [1]   Go Down
Author Topic: error that makes pin 13 blink rapidly?  (Read 557 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 76
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

To be clear, this is NOT about running the Blink example.

I've had an issue with a Duemilanove. The ATmega is apparently fried, or half-fried, or something. It has stopped running the code I've loaded onto it, and instead just blinks pin 13 pretty quickly, and I can't upload new code. If I try, I get "avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding".

I'm not really asking for a fix, I'm just wondering what the blinking is caused by. Is it an error message of some kind? Whatever it is, it wasn't in the code I uploaded to the board.

I found one other thread where a couple people reported something similar. They found a work around (that hasn't work for me), but they never explained why the blinking happens. Does anyone know?
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1248528012/6#6
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1248528012/14#14

One clue: On the troubleshooting page it points out that the bootloader blinks pin 13 once on startup. (3 times for NG board, and apparently 3 for the Uno as well.) Maybe it's stuck repeating that startup sequence for some reason?
Logged

Austin, TX
Offline Offline
Faraday Member
**
Karma: 64
Posts: 6055
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Remove the ATmega and perform the loopback test.

Post your code.  Maybe something in your code is causing the ATmega to reset.
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 76
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Loopback test was successful. Code is attached.

I take it this isn't some known way for the Arduino or ATmega to scream for help or something?

* thirtySteppers_0011.zip (6.98 KB - downloaded 5 times.)
Logged

Austin, TX
Offline Offline
Faraday Member
**
Karma: 64
Posts: 6055
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thirty Steppers?

You aren't trying to power thirty (or even 1) steppers from the Duemilanove directly, are you?
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 76
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, with Vin though, not the 5V.
Logged

Austin, TX
Offline Offline
Faraday Member
**
Karma: 64
Posts: 6055
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

How much current do your motors draw and how much does your supply provide?

Motors draw lots of current, usually a good idea to power them (physically) separate from the logic stuff.
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 76
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I know. I thought the ULN2803's would be isolation enough, but they apparently weren't. They worked fine for quite a while, then started acting up. I've ordered some optocoupler arrays to give it another go.

But back to the topic at hand. With no motors or anything attached, pin 13 is blinking when nobody told it to. Pin 13 is never mentioned in the code. Does anyone know what that's all about? Atmega death rattle?
Logged

Austin, TX
Offline Offline
Faraday Member
**
Karma: 64
Posts: 6055
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

If no other hardware is connected and Pin 13 is flashing, it is likely something is causing the chip to reset repeatedly.
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 76
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That makes sense. I managed to recover the chip by popping it into a different board and programming it. It even works in the original board now.

I'm mainly rambling now, in case this is useful for anyone who comes across this problem. (You may not have bricked the Atmega after all.) It seems related to this: http://arduinology.blogspot.com/2012/02/repeated-resets-on-webtime.html

I may have taken up too much memory at some point with an earlier draft of the code. Or maybe the motors created some kind of electrical noise.

Anyway, thanks!
Logged

Pages: [1]   Go Up
Jump to: