Pages: [1]   Go Down
Author Topic: Arduino MEGA reboots with digital pin 5 set to high  (Read 451 times)
0 Members and 1 Guest are viewing this topic.
USA, OH
Offline Offline
Jr. Member
**
Karma: 0
Posts: 56
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am totally lost.
I placed  a button on digital 5, with pull-down resistor, when button pressed it gets +5v.
I also have somewhat complicated sketch which on first button press reads sensor data into attached QuadRAM board, then (on next button press) copies RAM into SD file; it also communicates some data (file name, storage progress etc) on serial LCD.
SD card is located on Adafruit datalogger board.
Libraries loaded are SD, I2cMaster.

Sometimes (without changing anything!) it stops working: when I press the button, the board just  reboots; moreover, it reboots with _power shortage_ (!!) - I can see it when LCD backlight blinks. If I just keep the button pressed, all LEDs are down.

When the board gets into that strange mode - it stays there even if I upload some other simple sketch, even with switching power off and on several times. Then, after a while (I still cannot figure after what actions) it gets to normal.

From  my experience when any device  behaves that strange, it is most probably hardware problem.

But still, - can anybody come up with at least a hint, what could it be (besides faulty board)?

I have  a feeling there is some "gray area" related to bootloader issues, when it switches to permanent reset loop or something. Can it be somehow related?

I do understand my description sounds very poor and messy and indeterminate. But so is the problem - it is intermittent and very unstable.



Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 212
Posts: 8974
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If something has shorted the pull-down resistor, when you press the button you will have a high current draw on the 5V line.  This might also happen if pin 5 is accidentally set as a LOW OUTPUT.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Fort Lauderdale, FL
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6144
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Maybe draw a schematic showing how your button is connected.
Logged

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

USA, OH
Offline Offline
Jr. Member
**
Karma: 0
Posts: 56
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Solved. Initial assumption was correct - in case of intmittent and strange issues - this is a faulty hardware.
But that was really nasty one: I disconnected _everything from the button soldered on Adafruit datalogger board, pull-dopwn resistor, pin connection  - I only had Vcc on one pin and nothing at all on all other 3 pins - and it still effectively short-cut power when pushed.
I just removed the button and re-soldered it at different location, further away from the very edge -  and everything works now. My suggestion - Datalogger PCB micro-cracks, faulty middle-layer, or, it probably might be - some parasitic feedback effect.
Logged

Pages: [1]   Go Up
Jump to: