It has been a while since we last added new device support for the Arduino compatible Low Power Library. Beta copies of the library were tested by quite a number of willing people and the result is super amazing! We are very glad that people are finding the library very useful.

In this version, we added support for ATMega168, ATMega1280, ATMega2560, and ATMega32U4. Please take note that none of these added devices falls under the Atmel’s picoPower® device range. Therefore, the BOD functionality is not configurable on the fly through firmware.

Bugs report are welcomed!

Take care and happy tinkering!

14 replies
  1. ThiruS
    ThiruS says:

    A question, please.
    This library can be used in a “ATmega328” or only “ATmega328P”.
    Looking at the code, not “idle”mode defined for this microcontroller.
    Although not a device “Atmel’s picoPower ®”. and the BOD is not configurable.
    Define the status of the other peripherals, like a “ATmega168”.

    Greetings. thanks

    Reply
  2. ThiruS
    ThiruS says:

    Hello
    I use a lot the library “Narcoleptic” to sleep the Arduino. But this seems to me most comprehensive library.

    I would introduce a major improvement. Able to define a specific time in a state. For example 30 seconds PWR_MODE and the library automatically determine how many times use the Watchog .. etc. .. etc …

    As Narcolecptic.class do with this simple function:

    NarcolepticClass :: void delay (int milliseconds) {
    while (milliseconds> = 8000) {sleep (WDTO_8S); milliseconds – = 8000;}
    if (milliseconds> = 4000) {sleep (WDTO_4S); milliseconds – = 4000;}
    if (milliseconds> = 2000) {sleep (WDTO_2S); milliseconds – = 2000;}
    if (milliseconds> = 1000) {sleep (WDTO_1S); milliseconds – = 1000;}
    if (milliseconds> = 500) {sleep (WDTO_500MS); milliseconds – = 500;}
    if (milliseconds> = 250) {sleep (WDTO_250MS); milliseconds – = 250;}
    if (milliseconds> = 125) {sleep (WDTO_120MS); milliseconds – = 120;}
    if (milliseconds> = 64) {sleep (WDTO_60MS); milliseconds – = 60;}
    if (milliseconds> = 32) {sleep (WDTO_30MS); milliseconds – = 30;}
    if (milliseconds> = 16) {sleep (WDTO_15MS); milliseconds – = 15;}
    }

    Easy simple and very useful.

    Greetings. I hope you have made​​, I will introduce this change if you want when you have sent it.

    Reply
    • Administrator
      Administrator says:

      Hi ThiruS,

      I’m trying to keep the library as simple as possible. A simpler approach would be allowing the user to select the sleep period in seconds resolution. But, I think I will add an example to the library instead of providing a wrapper function as I don’t think the watchdog timer accuracy and it’s drift over time is something we can really rely on.

      But, it’s great to see what you did. Great job. 🙂

      Reply
  3. Ryan OHara
    Ryan OHara says:

    I am just curious but I am running one of the examples with an Atmega 32U4 and the lowest power draw I can get is about 4 mA using the standard example code. Do you have any current draw reports for what should be expected with an ATmega32U4 or Leonardo board?

    Reply
    • Administrator
      Administrator says:

      Hi Ryan,

      It really depends on how you are powering the board. Most guys used them on custom boards as the Leonardo board consumes some mA on the power circuitry itself. You should be getting somewhere uA range.

      By the way, love your stencil!

      Reply
  4. Matt
    Matt says:

    Does
    LowPower.powerDown(SLEEP_FOREVER, ADC_OFF, BOD_OFF);
    give maximum power save state? It only needs to wake up to a reset. It works as intended but I cannot messure powerusage. I have a barebone 328

    Reply

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *