Go Down

Topic: Lowest Arduino Power consumption (Read 3437 times) previous topic - next topic

point5

Hi,

I am just looking at Arduino power consumption for a bettery operated device might be and wondering what the best possible target might be in sleep mode.  Tests here so far suggest 600uA and wondering if this can be improved upon?

Any thoughts on if this can be improved upon welcome :-)

dhenry

Quote
Tests here so far suggest 600uA


That's about 500us too high. It is definitely possible to go below 100us, and south of 50ua.

point5

Thanks, thats a big improvement.  Do you know where I can find some code examples to look at and test?

Far-seeker

Nick Gammon has done a great job putting together information on ATmega power management over at his own set of forums.

Nick Gammon

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


Under the right circumstances you can get to around 0.35 uA (350 nA).


(edit) Ninja'd by Far-seeker! Yes, that's the place. ;)
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

Jack Christensen

The ATmega328 datasheet says 0.1µA in Power-Down mode and indeed this can be done.

Note however, that ATmega328 power consumption and Arduino power consumption are two different things. Parts of an Arduino continue to draw current regardless of what the microcontroller is doing.
MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

dhenry

Quote
Do you know where I can find some code examples to look at and test?


BoD usually are some of the biggest current consumers.

all pins to  output high;

disable watch dog;

use internal rc oscillator at the lowest frequency;

disable as much as you can;

go into power saving modes as deep as you can;

...


point5

#7
Oct 20, 2012, 01:57 pm Last Edit: Oct 20, 2012, 02:00 pm by point5 Reason: 1
Hi, Thanks for all the great info folks, very interesting.

Using Nick's code below I was able to get down to 400uA with everything unlugged which suggests the rest is down to the board peripherals?

The board I'm using is this one:  http://www.seeedstudio.com/wiki/Seeeduino_Stalker_v2.1 which is a great product but as it is designed for low energy battery use I'm surprised that I cannot get the power consumption down a bit more.  I will keep tinkering now I'm much better informed thanks to you folks :-)


Code: [Select]
#include <avr/sleep.h>
#include <avr/wdt.h>

const byte LED = 9;

void flash ()
 {
 pinMode (LED, OUTPUT);
 for (byte i = 0; i < 10; i++)
   {
   digitalWrite (LED, HIGH);
   delay (50);
   digitalWrite (LED, LOW);
   delay (50);
   }
   
 pinMode (LED, INPUT);
   
 }  // end of flash
 
// watchdog interrupt
ISR (WDT_vect)
{
  wdt_disable();  // disable watchdog
}  // end of WDT_vect

void setup () { }

void loop ()
{

 flash ();
 
 // disable ADC
 ADCSRA = 0;  

 // clear various "reset" flags
 MCUSR = 0;    
 // allow changes, disable reset
 WDTCSR = _BV (WDCE) | _BV (WDE);
 // set interrupt mode and an interval
 WDTCSR = _BV (WDIE) | _BV (WDP3) | _BV (WDP0);    // set WDIE, and 8 seconds delay
 wdt_reset();  // pat the dog
 
 set_sleep_mode (SLEEP_MODE_PWR_DOWN);  
 sleep_enable();

 // turn off brown-out enable in software
 MCUCR = _BV (BODS) | _BV (BODSE);
 MCUCR = _BV (BODS);
 sleep_cpu ();  
 
 // cancel sleep as a precaution
 sleep_disable();
 
 } // end of loop

Nick Gammon

Looking at that board I can't help thinking the other devices are likely to consume power.



The clock, the charge controller, the Xbee (if inserted), and the SD card (if inserted).

I would look at the datasheets for each of those devices and work out what they are likely to consume.
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

tim7


Using Nick's code below I was able to get down to 400uA with everything unlugged which suggests the rest is down to the board peripherals?


That much could easily be drawn by the voltage regulators, even if you are injecting power downstream from the regulators' output.  In addition the RTC spec shows that it draws 100-200uA.  The simplest solution for ultra-low power would be a standalone '328 chip.  Myself I like to use Sparkfun's Pro-Micro because you don't need a chip socket or PCB, but it requires some minor surgery to cut the trace from the voltage regulator.

simplex

Current drawn by an Atmega328p with external 16 MHz Crystal = 13 mA

I did a test. I run the code from here:
http://arduino.cc/forum/index.php/topic,125248.msg962251.html#msg962251
on a breadboard having, on it, just an Atmega328p connected with a 16 MHz Crystal and two 22 pF capacitors.
The circuit draws 13 mA from the 5V power source.


tim7


Current drawn by an Atmega328p with external 16 MHz Crystal = 13 mA


That sounds reasonable if you are not using any power-saving techniques.  Using code similar to Nick's demo linked above, I could get a 16MHz 5V Arduino down to approx 1uA.  My multimeter is not good enough to read these very low currents with any accuracy, so I cannot say if the real current was less than that.  The datasheet claims 0.1uA at 3V, and I've no reason to doubt that.

MarkT

Once you get to a few uA your battery's internal self-discharge will be the dominant factor (and the duty cycle at which you pull higher currents).  1uA ~= 9mAh/year
[ I won't respond to messages, use the forum please ]

Nick Gammon

#13
Oct 21, 2012, 02:36 am Last Edit: Oct 21, 2012, 02:38 am by Nick Gammon Reason: 1
Exactly. I have a table on the page I linked above. Here it is:

Code: [Select]

Type        Capacity mAH  Discharge %/month   Self discharge (uA)

CR1212            18              1                  0.250
CR1620            68              1                  0.950
CR2032           210              1                  3
NiCD AAA         350             20                 98
NiMH AAA         900             30                375
NiCd AA         1000             20                270
Alkaline AAA    1250              2                 35
NiMH AA         2400             30               1000
Alkaline AA     2890              2                 80
Li-Ion          4400             10                600


These are approximations but the general idea is that you don't need to get excited about using less than 1 uA because the battery is going to self-discharge much faster than that, particularly NiMH batteries.

To confirm MarkT's figure, if you use 1 uA then over a year that would be:

Code: [Select]

0.000001 * 24 * 365 = 0.00876 = 8.76 mAh
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

I got 8mA with Nick's power sketch J with the same setup sans coin cell (broke, new holder next week).  I think that that the Xbee 3v3 regulator is costing an order of magnitude.  There are two leds, but I am sure they only cost 10-15mA.  I will investigate if they can be disabled other than scrapping.  Considering the LiPo and solar option, I am not sure what we are discussing unless the unit is north/south of 80 degrees.

With an internal clock and no regulator/LEDs, I replicated Nick's sleep tutorial +5% of 0.35uA with a breadboard setup.  I have not tried just the watchdog, which this SeeedStudio Stalker is capable of (Interrupt traces cut to enable).  I am not sure why the Narcoleptic library does not shut the ADC down.

Properly optimized, the coin cell will die before the LiPo gives out.
http://www.spcomputing.com

Go Up