Lowest Arduino Power consumption

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 :slight_smile:

Tests here so far suggest 600uA

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

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

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

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. :wink:

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.

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;

...

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 :slight_smile:

#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

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.

point5:
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.

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

I did a test. I run the code from here:

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.

simplex:
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.

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

Exactly. I have a table on the page I linked above. Here it is:

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:

0.000001 * 24 * 365 = 0.00876 = 8.76 mAh

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.

I took a quick look at some datasheets for a few 3V lithium coin cells. The ones I looked at quoted self-discharge rates around 0.1uA.

Duracell claim a self-discharge rate equivalent to 10uA in their Alkaline AA cells.

For low self discharge NiMHs, check out Eneloops. They're the only AA and AAA cells I use anymore.

For a cell that you want to last at least several years, the lithium primary ones are probably the way to go.

I could get a 16MHz 5V Arduino down to approx 1uA.

If you could get the avr to run on a 16Mhz crystal with less than 1ua, you should contact Atmel, :slight_smile:

Getting an avr to run below 50ua is easy, even on a crystal. Getting it to run below 10ua on a crystal is difficult. Getting it to run below 1ua on a crystal is out of this world.

Shouldn't those numbers include time? 0.1 uA per second / day / year?

:slight_smile:

Should those numbers include time?

They already do include time.