For a quick and dirty project, what are some of the simplest ways to reduce the power use of an Arduino?

Imagine the following setup:

A typical Arduino Nano, hooked up to a pair of DS18B20s and one of the mini OLED screens. Power comes from a cellphone battery hooked to a TP4056 board, which then runs to a small 0.9V >> 5V boost board, both common eBay items.

The idea is to make a basic platform, to which additional functionality will be slowly added, such as a wireless link and data-logging. For now, though, the situation is as described above.

The obvious start would no doubt be killing off unnecessary LEDS , or at least, tacking on extra resistance to make them fainter. Maybe finding how to reduce the brightness of the OLED screen would also be an obvious step, and that green LED next to the ON switch isn't necessary...

But beyond this, what simple steps could be done in coding or hardware load-out could help get more battery time?

(This question relates to a specific level of embedded system enthusiast, namely, the intermediate level, someone who isn't yet confident enough to dive into the depths of the AVR assembly language, but rather someone who already grasps the basics of how electronics and embedded devices are put together in a system (In other words, myself..). There are differences compared to the How can I get my atmega328 to run for a year on batteries? question, and more specific to the actions I practically can take.)

  • \$\begingroup\$ There's another dupe target which ended up migrated on Arduino SE. \$\endgroup\$ Jan 29 '18 at 8:15
  • 1
    \$\begingroup\$ Do you need the OLED screens permanently on? Can they be put behind a switch so they're only on when there's someone looking at them? \$\endgroup\$
    – Mast
    Jan 29 '18 at 11:01
  • \$\begingroup\$ You might consider an epaper display. Also, you can use a transistor on an I/O line to switch a higher current supply to a device that you're controlling its duty cycle rather than powering it directly from the I/O line. \$\endgroup\$ Jan 29 '18 at 18:03
  • \$\begingroup\$ Power saving techniques for Arduino write-up by Nick Gammon. \$\endgroup\$ Jan 29 '18 at 23:35

My first step would be to identify what is using most of the power/current and address that.

I often see these questions about reducing power consumption / increasing battery life on this site they often mention the general solution you already list and which are listed in other answers.

For example I agree that reducing the supply voltage of a microcontroller reduces power consumption. However, if the uC is mostly in sleep mode and only active 1% of the time then reducing the consumed power is only of relevance if the uC takes a significant (for example more than 20%) of the total power budget.

If for example your temperature sensors are on continuously at 1 mA each that's 2 mA total at 100%. Compare that to a uC being active 1% of the time at 10 mA gives an average of 1% * 10 mA = 0.1 mA so 20 times less.

So the conclusion there would be to duty cycle the temperature sensors. Make the uC switch them on/off (or their supply, perhaps you can simply supply the Vdd of the temp. sensors from an I/O pin on the uC). Even if the temp sensors are only stable after having a supply voltage for 5 seconds that would still help significantly if you do a temperature measurement once per minute.

I usually make a table with time active (in %, so basically that is the duty cycle), current consumption and the effective average current (which is simply the product of those two). That helps me identify where the current/power is going and that tells me how I can improve it.

Concerning the step-up converter: you might not need it if all components can also run on 3.5 - 4.2 V. The ATmega chip can, some can even work at 1.8 V (you might have to change the "Brown Out" voltage in the fuse settings though). Some step up converters have a low quiescent current (current drain when the current at 5 V is zero) but not all do.

Most circuit designers like to have a stable supply voltage, say 3.3 V. However, most chips actually don't care! As long as it is in their usable range. For high accuracy / low noise things might be different of course. My point: you don't always need a stable/regulated supply voltage. Removing that LDO / step up converter can save a bit of current.

  • \$\begingroup\$ Your fifth paragraph - duty cycle - was an eye-opener. I could even do the same for the OLED screen, assuming the current draw is okay for the Arduino's pins. OLEDs seem to have a startup delay of a about two seconds while they gather their thoughts, but duty cycling the sensors is a great idea. As for the power supply, it might be worth a try to see how low the thing will go directly linked to a draining 3.7V battery. I had a nagging feeling the converter might not be terribly efficient, but if it could just be ripped out, that would be pretty awesome. \$\endgroup\$
    – Hoets
    Jan 29 '18 at 14:31
  • \$\begingroup\$ Excellent, indeed the duty-cycle is what many designers forget about but it is crucial. If your display is only on when someone presses a button, that should give you a low duty-cycle and extend battery life. \$\endgroup\$ Jan 29 '18 at 14:32

Reduce the voltage. The ATmega can run at less than 5V, or 3.3V. The less you need to boost the voltage to, the lower your power draw. But you should also look at the regulator efficiency at different input to output voltages.

Remove the leds. The OLED screen may be significantly power conservative enough to not need changing.

Use sleep states. Put the device to the lowest sleep state you can as often as possible.

Remove the Arduino code, as it isn't exactly ideal for this, use the direct code for the microcontroller. All those libraries add overhead that increase your on time and processing power.

  • 2
    \$\begingroup\$ I like your answer, broadly. +1. But the elephant in the room is the Arduino. Cripes, it's just a couple of temp sensors (which I've used a long time ago) and a display? Easiest big reduction in power is to ditch the Arduino and replace it (with anything else; better if an msp430.) The display would then be the only remaining problem child, and with other problems out of the way it becomes a lot easier to focus on that one issue to get the total to a minimum. It isn't simple. Oh well. \$\endgroup\$
    – jonk
    Jan 29 '18 at 7:20
  • 2
    \$\begingroup\$ @jonk Well I somewhat agree that it's the elephant in the room, but the OP actually wants to ride on that elephant! Therefore you are compelled to "design around that elephant" :-) \$\endgroup\$ Jan 29 '18 at 7:48
  • 1
    \$\begingroup\$ (+1) especially for mentioning sleep states. This is one of the stumbling blocks for newbies in MCU programming: they don't always realize that in a circuit designed around an MCU this latter doesn't need to be always awake! \$\endgroup\$ Jan 29 '18 at 7:50
  • 2
    \$\begingroup\$ I would also like to add that with some hacks an Arduino can be used also as a very low power uC. Sleep mode is of course mandatory, besides that I remove the 3.3V regulator and feed 3 V (from the battery) directly to the uC. The ATmega can be low power, it just needs a little help. \$\endgroup\$ Jan 29 '18 at 8:00
  • 2
    \$\begingroup\$ @jonk Exactly the point I want to make in my answer: get an overview of where the power goes. And it isn't always the Arduino. I have an Arduino based gadget here with a flashing LED on 2 AA batteries. Runs for many months on one set of batteries. It can be done, even with an Arduino, you just need to know how to do it. \$\endgroup\$ Jan 29 '18 at 8:04

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