Experiments to reduce current consumption of the Arduino-compatible Pro Mini.

By Julian

Youtuber, shed dweller, solar charge controller aficionado

18 thoughts on “Arduino power saving tutorial: clock pre-scale and sleep”
  1. Avataaar/Circle Created with python_avatars Jeremy Cook says:

    Thanks so much. Great idea for lower power consumption in less demanding applications without having to deal with waking up etc.
    Of course, I suppose you'd want to actually use sleep modes if you've gone that far, but definitely a good programming time/power savings ratio!

  2. Avataaar/Circle Created with python_avatars gary white says:

    I always thought it was mad to include a deep sleep function that requires a physical interrupt to bring it back to life. Why not just deepsleep(1Hour)? Anyway, best way to do this is by removing the power completely to the Arduino with a TPL5110 power timer breakout chip – really easy to use. The only downside is it can only delay by 2 hours max. Data sheet for TPL5110 says 35nA when timing. In reality it is 20uA, which is pretty good!

  3. Avataaar/Circle Created with python_avatars Ian Tcroft says:

    Julian, have you produced a video on how to lower the brown out detector to 1.8 volts? Can you use another arduino to reset the bod or do you have to use programmer?
    Thanks.

  4. Avataaar/Circle Created with python_avatars Programming Tips says:

    Could you also disable the ADC to lower the power requirement?

  5. Avataaar/Circle Created with python_avatars Srinivas s says:

    Great video!! Have you tried waking up the mini with an interrupt using wd ? I am trying similar but having issues with configuration of wd with nano the nano just crashes

  6. Avataaar/Circle Created with python_avatars LipWoon says:

    Does it makes any sense to put a (NodeMCU-8266 + MAX7219) project into Sleep mode if the display time is only updating every 1 minute?

  7. Avataaar/Circle Created with python_avatars Tony Sicily says:

    Can the clock frequency be changed dynamically? Or can it only be changed at start up?

    Ie, can I use this to reduce power consumption during ‘down time’ but speed it up during other times ?

  8. Avataaar/Circle Created with python_avatars bun_zees says:

    Now that's a vedio worth subscribing

  9. Avataaar/Circle Created with python_avatars ᑕᒪOᑌᗪ says:

    IQ +10 Thank you.

  10. Avataaar/Circle Created with python_avatars Phino K.M. says:

    You can also use inline assembly for the sleep instruction. After setting up the registers just write the following line:
    _asm_ __volatile__("sleep");
    Ok, unfortunately youtube makes the "asm" italic and removes two underscores. It's two underscores before and after asm.
    Also, if you wanna save power you should probably start with the simple stuff, like setting all your pins high or low, so they are not floating (as that causes the ATmega and many other microcontrollers to draw a little more power) and disabling peripherals like the ADC, UART and/or timers that aren't needed etc. (keep in mind that timer0 is used by millis, delay etc.) then if you wanna save even more power you can put the ATmega to sleep and get the current under 1 microamp if needed.

  11. Avataaar/Circle Created with python_avatars Persoana a 3-a says:

    I also disabled the ADC and Brown-Out and got the board down to 22uA.
    I had trouble with the onboard Linear Regulator. Mine was a SOT23 L05 (3 Legs), yours is a SOT23-5 LG50. (5 Legs)
    It was drawing 2.2mA at start, but current draw kept increasing as time went by.
    I tried powering the board from 12V initially, but then I powered everything from 5V and I got the same 2.2mA current draw.
    So I started removing components from the board (Crystal, Linear Regulator, Resistors, Capacitors)
    I started looking into 7805 datasheets and I saw a Typical Quiescent Current of 3.2mA.
    So be aware of cheap Chinese boards if your are looking into Low Power stuff.

  12. Avataaar/Circle Created with python_avatars Kenan Senagic says:

    Great video 😉

  13. Avataaar/Circle Created with python_avatars Super Cables says:

    you are setting CLKPR to two different values. Why?

  14. Avataaar/Circle Created with python_avatars Super Cables says:

    try OBS screen capture or uploading you source code

  15. Avataaar/Circle Created with python_avatars Frank Paris Magician says:

    Not for nothing but you do not show the power source hookup for us newbies so I give you one star

  16. Avataaar/Circle Created with python_avatars Danny Tuppeny says:

    Great video – is there a way to sleep for a duration (eg. if you wanted to wake up and do something every 5 minutes)?

  17. Avataaar/Circle Created with python_avatars DIY IN THE GHETTO says:

    hello Julian i have tried this many times and one problem i have is that when in sleep mode i can not get below 2.06 ma no matter what i do.

  18. Avataaar/Circle Created with python_avatars Anima says:

    Could you clockdown the processor on a wemos d1 mini pro although it has not an atmel chip?

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.