Go Down

Topic: Duemilanove consistently expires after around 60 seconds? (Read 603 times) previous topic - next topic

guano_jim

This is a head scratcher for me.

I have a little robot connected to a Duemilanove.

Here's the odd thing: when running under battery power, the robot stops moving after about 60 seconds. When connected via USB the robot will happily hum along for as long as I send commands to it.

Pressing the reset button on the arduino allows the bot to move again for another 60 seconds or so.

I'm using the 9V battery plug to power the arduino. I'm powering an H-Bridge (to move the motors) and an RF receiver from the 5V pin on the arduino. The two DC motors on the bot are powered by 4 AA batteries.

My suspicion is that powering the arduino and the H-bridge and the RF receiver might be causing the voltage in to the board to drop, and that's causing it to shut down. This is just a guess.

But... the bot's still receiving and processing commands, so it's not completely asleep! I can tell because I have an LED on pin 13 that I can blink with a remote command, and that still works. It's just not sending commands to the H-bridge anymore.

Any ideas? This is all very voodoo to me. The weird thing is that it consistently times out after about 60 seconds. I can send one command a second, or one command every 30 seconds, and the results are the same.

CrossRoads

Next time it stops, take some voltage measurements.
The Arduino will continueto work at 16MHz down to ~3.9V and maybe farther (with perhaps odd behavior exhibited.
No enough data is provided on the RF Rx and H-bridge to say what would happen if their supply voltage or control signals dropped.

Are any parts feeling hot to the touch when it stops?
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

retrolefty

If you are using one of those wimpy small 9 volt batteries then you are probably just exceeding the current draw capacity of the battery. Those small 9 volt batteries should be outlawed for use with an arduino, they are just so expensive for the small amount of enegy they can supply. Get a proper battery source for the arduino. A quick check is to read the 9volt battery voltage while the 'bot' is in it's failed condition, If it's lower then around 7.5vdc the arduino board will just drop off due to the auto-voltage selection circuit.

Lefty


guano_jim

Hey guys! Thanks for the quick responses!

Nothing on the board seems hot to the touch when the bot dies.

As far as I can tell, voltage seems consistent. I'm not seeing a drop anywhere. Here's how I'm testing:

(bear in mind I'm just some dope with a voltmeter and not an EE or anything)

1. I'm attaching my red alligator clip on my meter to 5V and the black one to ground. Reading stays constant around 5V, even after the robot stops moving.

2. I'm holding one clip to the metal tab on the inside of the 9V barrel plug, and keeping the other attached to ground. Reading is constant around 6V, whether the bot has stopped or not.

Sooooo.... according to this: http://www.arduino.cc/en/Main/ArduinoBoardDuemilanove

Quote
The board can operate on an external supply of 6 to 20 volts. If supplied with less than 7V, however, the 5V pin may supply less than five volts and the board may be unstable. If using more than 12V, the voltage regulator may overheat and damage the board. The recommended range is 7 to 12 volts.


...my bot is running right on the edge of reliable board behavior voltage. Does that seem correct to you guys?


CrossRoads

You may have some motor current surges that are causing the arduino to reset - can you connect a serial port and add some print statements so you can determine where the code is when it stops? If not, maybe blink an LED or something?
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

guano_jim

Quote
can you connect a serial port and add some print statements so you can determine where the code is when it stops?


That's the interesting bit to me... it doesn't seem like the entire board shuts down. I can still blink an LED on pin 13 even after the bot stops moving.

Which means the Rx is still working and the code is still running, since I'm sending my robot commands from another Arduino across the room.

It's almost like the pins controlling the motor go to sleep, but nothing else does.

I'm going to try and supply the board with more power and see if that helps.

Grumpy_Mike

Quote
I'm holding one clip to the metal tab on the inside of the 9V barrel plug, and keeping the other attached to ground. Reading is constant around 6V, whether the bot has stopped or not.

That shows you 9V battery is producing only 6.7V which means it is shot.

guano_jim

Ok, I finally had a chance to work on this one a little bit.

I ditched the 9V battery plug and put 2 9V batteries in series, so now I've got 18V going into Vin. Above recommended voltage, I know, but desperate times and all that. Plus that was all I had laying around.

The bot *still* stops after around 60 seconds. My meter says I'm at 10V.

Is there an auto-sleep setting on the Duemilanove that I'm unaware of?

AWOL

Quote
Is there an auto-sleep setting on the Duemilanove that I'm unaware of?

No, there is no auto-sleep, but there is a continuous thread of advice that says "don't use 9V batteries, they are expensive wastes of space"
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

James C4S

Quote
I'm holding one clip to the metal tab on the inside of the 9V barrel plug, and keeping the other attached to ground. Reading is constant around 6V

Either your battery is dead or you are drawing too much current from the battery.  Given how little current a 9V can supply, this isn't a surprise.

Quote
I ditched the 9V battery plug and put 2 9V batteries in series, so now I've got 18V going into Vin.

You'd be better off putting them in parallel, doubling the current capacity of your supply.  Doubling the voltage isn't going to fix the problem.  You probably need to look at a different battery system.  9Vs are lousy.  They are exceptionally lousy for motors.  

Try calculating (and measuring) the amount of current your system is using.
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Go Up