Pages: [1]   Go Down
Author Topic: Arduino Idle Current draw?  (Read 3208 times)
0 Members and 1 Guest are viewing this topic.
Long Island, NY
Offline Offline
Newbie
*
Karma: 0
Posts: 48
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello everyone,

I'm curious as to how much current the Arduino Uno Rev3 is expected to draw when resting at idle as well as when stuck in a small and simple loop. I'm looking to connect the Arduino to a battery source that will be recharged from time to time and so I want to make sure that I'm not causing so much of a draw that it kills the battery before it's next recharge.

So far, my program will cause the Arduino to not really rest (idle state), but rather to monitor the state of a specific pin (using a loop) and not continue to the rest of the program until the pin meets the program's requirements. In other words, from the beginning, my program will leave the Arduino in an endless loop monitoring the pin's condition. Once the condition has been met the program falls through and continues.

Does anyone know what the nominal current draw is with the Arduino on running without a program as well as on but stuck in a loop.

Thanks in advance!
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17262
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

An arduino board is based on a AVR microcontroller chip and when the board with nothing wired or attached to it consumes around 80ma of 5 volt current, and that includes the 8U2 USB chip, the power on led, and other components on the board. The AVR chip is clocking at 16Mhz continuously no matter what the code is doing, it never 'halts' so it's current consumption is basically independent of the code you have it execute. Only if you put the AVR chip into one of it's 'sleep modes' can you halt code execution and drastically cut current consumption for the AVR chip, however the rest of the other components on the Uno will continue to draw their normal current consumption. Also the Arduino does not provide any 'sleep mode' examples so you will have to look for other user supplied coding example or read the AVR datasheet and figure out how to do it on your own.

Lefty
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 474
Posts: 18696
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

For a lot of detail about power consumption see:

http://www.gammon.com.au/power
Logged

Long Island, NY
Offline Offline
Newbie
*
Karma: 0
Posts: 48
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

An arduino board is based on a AVR microcontroller chip and when the board with nothing wired or attached to it consumes around 80ma of 5 volt current, and that includes the 8U2 USB chip, the power on led, and other components on the board. The AVR chip is clocking at 16Mhz continuously no matter what the code is doing, it never 'halts' so it's current consumption is basically independent of the code you have it execute. Only if you put the AVR chip into one of it's 'sleep modes' can you halt code execution and drastically cut current consumption for the AVR chip, however the rest of the other components on the Uno will continue to draw their normal current consumption. Also the Arduino does not provide any 'sleep mode' examples so you will have to look for other user supplied coding example or read the AVR datasheet and figure out how to do it on your own.

Lefty

hm... may end up using a pulse timer relay to hold power to the Arduino for a set time once the main power source is removed. This way I can get it to continue and finish out its last functions before powering down itself.

For a lot of detail about power consumption see:

http://www.gammon.com.au/power


wow! time to make myself a barebones board once the dev board build proves to work.

Thanks a bunch guys!
Logged

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I'm not causing so much of a draw that it kills the battery before it's next recharge.

The simplest approach to reduce current consumption would be to put a mcu into sleep / idle.

The benefits of sleeping, however, maybe offset by frequent waking up. In that case, think of using a rc filter and a few mcu pins to dynamically throttle the clock speed.
Logged

Long Island, NY
Offline Offline
Newbie
*
Karma: 0
Posts: 48
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I'm not causing so much of a draw that it kills the battery before it's next recharge.

The simplest approach to reduce current consumption would be to put a mcu into sleep / idle.

The benefits of sleeping, however, maybe offset by frequent waking up. In that case, think of using a rc filter and a few mcu pins to dynamically throttle the clock speed.


That's also not a bad idea.

I'm going to try one of two things:

1 - build a barebones board powered off of an LM7805. My input voltage is +12V so the quiescent current should be about 6mA. Along with the barebones board running at about 15-20mA I should be able to keep the overall current under 30mA. Once the power source turns on and the mains is running off of a charger instead of the battery the current draw is an "unnecessary worry."

2 - Power up the arduino dependant on an external signal. Once on, a pulse-timer relay will energize providing power to the arduino along with the main power source (diode isolating the two from each other). Once the external signal goes away, the pulse-timer relay will keep the Arduino powered for a set time allowing it to finish out it's program and then fully shut down. At this point the process starts over again.

fyi - My 'power source' is a car, hence the 12V application and concern about current draw.
Logged

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 92
Posts: 3955
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The simplest approach to reduce current consumption would be to put a mcu into sleep / idle.

The benefits of sleeping, however, maybe offset by frequent waking up.

Really? There is little overhead involved in sleeping the CPU and waking it again.

Quote
In that case, think of using a rc filter and a few mcu pins to dynamically throttle the clock speed.

Have you done this, or can you reference such a circuit? Sounds dubious, or at best a lot of trouble, I might just adjust the CLKPR register if I wanted to slow things down.
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 92
Posts: 3955
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

An arduino board is based on a AVR microcontroller chip and when the board with nothing wired or attached to it consumes around 80ma of 5 volt current, and that includes the 8U2 USB chip, the power on led, and other components on the board.

A while back, I measured an Uno (but not an R3) at 42mA. I wasn't aware if there were changes with the R3 that might have increased that significantly. Just curious.
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 474
Posts: 18696
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The OP wanted to monitor a pin and do something if it changed. Using a pin change interrupt, I showed in another thread you can get the current drain down to 100 nA without fiddling with the clock speed. I suspect the battery will self-discharge at a much higher rate than that, so I wouldn't get too excited about more complex solutions.
Logged

Pages: [1]   Go Up
Jump to: