In context of getting the MCU on Pro Mini and ATMega2560 (chip is ATmega328 and ATMega 2560) to sleep and power down modes, so as to run on one set of battery for months, appreciate idea and comment.

Initially, I looked at web postings and get the following general idea. Did I miss anything?

Is sleep mode done via ATMel factory library, Arduino-level user contributed library, or the Arduino IDE? Many web posting are along the line of getting it partially working but only at half expected current reduction, etc. That is, current do reduced, but, not enough.

Are there several such library?

How are they?

Which one is better support and more functions? (no need for easy to use, can do registers programming, when needed)

Many thanks in advance

  • "Seems like sleep mode is done via user contributed library, instead of core 'official' IDE." Wat. The API is in avr/sleep.h, which is even more "core" than the IDE. Commented Aug 20, 2014 at 4:26
  • Followed your lead, got nongnu.org/avr-libc/user-manual/group__avr__sleep.html and look like this is one of the several lib mentioned on web postings.
    – EEd
    Commented Aug 20, 2014 at 5:26
  • Yeah, why do it the simple way when you can add 5 files and 10kB of code :/ Commented Aug 20, 2014 at 5:27
  • @IgnacioVazquez-Abrams 5 files and 10kB of code? Commented Aug 20, 2014 at 11:51
  • @geometrikal: A slight exaggeration. But all the functionality required is built into AVR Libc already. Commented Aug 20, 2014 at 14:50

3 Answers 3


Have a read through the Jeelabs blog which documents the author's very successful attempt at making a very low power wireless sensor node that can run for months off coin cells.


There is also a library based on this project called Jeelib:


Jeelib contains a class called Sleepy that allows for easy sleeping.

Rocketscream did a thorough test of the current consumptions with the different modes here:


According to them, you can get the ATMega328P down to 1.7uA.

Unless you do something about the power supply on a normal Arduino board you won't be able to extend the battery life by much at all. See my answer here for some more details:

Arduino powering from 9V battery

  • +1 for resourceful pointers to rich sources of info. Edit the question on the power supply regulator chip. Some chip are uA rated while other are traditional higher power consumption.
    – EEd
    Commented Aug 20, 2014 at 14:40
  • You also should desolder the power-led on the boards. I prefer to skip the voltage regulator and get a battery pack that has the right voltage. E.g. three AA (3 x 1.5V = 4.5V). Most AVR chips have quite a range in acceptable voltages. Also running the chip without the crystal reduces the power use a bit I've heard. I never used crystals on my own homemade boards. Just read chapter 9 of the datasheet, especially 9.10!
    – Gerben
    Commented Aug 20, 2014 at 16:18

I could reproduce these power requirements - main thing is to get rid of the Arduino board and start with a Bareduino or sth similar. (find a detailed description here)

  • Another way is to use Pro Mini board. First, de-solder the power on LED light as it takes about 3mA. Battery feeds to the 5V pin without using the regulator. The LDO voltage regulator on my board takes up about 20 micro ampere in this un-used mode (likely, different brand/model of that chip has different current consumption). De-solder if necessary.
    – EEd
    Commented Jan 29, 2015 at 18:37

As a rule-of-thumb, you should be able to achieve 100 nA of current consumption, and still be "alive" and able to respond to external events, like button-presses (eg. a calculator or TV remote). To wake periodically (without an external event) takes more current, because you need the watch-dog timer to be active, but that can still be as low as 6 µA.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.