My adventures with a Raspberry Pi and Arduino programming

There are many ways to save power on the Arduino board itself. I summarise these with power consumption numbers…

I’ve read a few posts. The best power series I’ve found is by Donal Morrissey on his blog. The series is called ‘Sleeping Arduino‘ and covers the modes available and provides sample code for testing.

I used the standard blink programme and then tested Donal’s code for each mode on my 3.3V (NOT 5V) Arduino Pro Mini from Sparkfun. I also tested with and without the FTDI module. This FTDI module was never connected to the computer during measurements – I just noticed it drew power when not in use and thought the numbers may be interesting to someone!

I powered my Arduino from a Lithium Ion battery via the Arduino’s RAW and GND plugs, and via a SparkFun Li-Poly/Ion charger circuit. This uses the Arduino’s voltage regulator. A necessary step with batteries whose voltage can change, but where for some applications you can remove to save further power. (The SparkFun charger circuit does not include its own voltage regulator).

In many posts people mention removing the power LEDs and voltage regulator. I decided not to for my tests – I may need them in future for other projects, and I guess this is true of many other people’s projects too.

My test board does though have an LCD screen attached to it, but this was not powered on. All the same it will be drawing some power. Your figures on a plain Arduino Pro Mini should easily beat mine.

Power saving modes

Below is a table of the different power modes, and tests carried out with and without an FTDI module attached, and showing power usage when on and in the power saving mode.

Power mode With FTDI module Without FTDI module
LED on LED off LED on LED off
 Normal blink programme with delay(10s) 7.90 mA  4.18 mA  7.83 mA 4.13 mA
 SLEEP_MODE_IDLE  7.85 mA  3.981 mA  7.63mA 3.981 mA
 SLEEP_MODE_ADC  4.78 mA  1.058 mA 4.72 mA 1.004 mA
 SLEEP_MODE_PWR_SAVE 4.65 mA 0.939 mA 4.61 mA 0.890 mA
 SLEEP_MODE_STANDBY 4.45 mA 0.730 mA 4.38 mA 0.668 mA
 SLEEP_MODE_PWR_DOWN 4.27 mA 0.555 mA 4.21 mA  0.497 mA 

As you can see from the table above, we go from 7.90 mA when powered down to 4.21 mA, and when asleep from 4.18 mA to 0.497 mA. This is a 46% power saving when powered, and a whopping 87% power saving when in PWR_DOWN sleep mode!

Of course the power mode you can lower yourself to will depend upon the devices you need to keep powered during sleep. These are detailed in table 9.1 in Part 1 of Donal’s series. (Full reference is section 9 of the AtMega datasheet)

The benefits of using a sleep mode can even be seen in the most active setting – IDLE. Here the only thing unpowered is the Flash and CPU clocks, but even this results in up to 0.2 mA in power savings.

What does this mean for a real project?

As I’ve previously calculated in my radio tracker project, I had the following power consumption:-

Test GPS seek Radio transmit delay Average
Standard Arduino tracker 42s @ 65.13mA 7s @ 32.13mA 30s @ 4.13mA 79s @ 39.87 mA => 50.16 hrs = 2.09 days
– 5 min delay 349s @ 12.11 mA => 165.26 hrs = 6.88 days
– no delay 49s @ 60.42 mA => 33.10 hrs = 1.3 days
Power down for 30s 22s @ 65.13mA 7s @ 32.13mA 30s @ 0.497mA 59s @ 28.35 mA => 70.54 hrs = 2.93 days
Power down for 5 mins 22s @ 65.13mA 7s @ 32.13mA 300s @ 0.497mA 329s @ 5.49 mA => 364.16 hrs = 15.17 days
Power down for 2 mins 22s @ 65.13mA 7s @ 32.13mA 120s @ 0.497mA 149s @ 11.52 mA => 173.51 hrs = 7.22 days

Note I’ve started trusting the GPS more thanks to using the battery back up mode. The underlined numbers show that I’m taking less readings because of the accuracy.

Given the amount of time the whole tracker will be in sleep mode / powered down, it is possible to stretch the battery life to over 15 days!!!

I think given this I’ll take the opportunity to increase the contact time – 20 readings an hour, one every 2.5 minutes (2 minutes of sleep time). Hence the last row in the table. This then gives me 7.22 days of operation! Perfect for D of E Gold with an acclimatisation day and 5 full expedition days, with some margin for error in case the cold or radio interference affects the battery life.

Comments on: "Arduino Pro Mini power saving modes" (1)

Leave a comment