Learn to increase your projects' efficiency by reducing power consumption through these tips!
Arduino Uno and Pro Mini are not powered efficiently in situations when you have to run them on batteries. In such situations, every milliampere of current counts. Arduino Uno draws a minimum of 15mA of current which doesn't sound like much but in certain situations quickly adds up.
Arduino Uno is a development board built with several different circuits including a USB-serial converter, regulators, indicators, processors, a short circuit protection circuit, damage control circuits, etc. It uses more power than the minimum necessary.
In this article, we will look at different ways we can reduce the power consumption of an Arduino by changing some hardware or using code.
Low Power Arduino Libraries
Arduino’s official website provides low power libraries for Arduinos to enable low power features.
Let’s look at two useful codes.
1. External Wake-Up: Using this code, your Arduino will wake up from sleep when an external button is pressed. You can use this code to wake up your Arduino using a sensor.
2. Timed Wake-up: This code wakes up the Arduino after a set amount of sleep.
The above sleep modes reduce the continuous idle power usage of an Arduino Uno. However, they are almost useless because everything other than the MCU on the board is still active and continues to consume power. I have tested this mode and haven’t got down from 50mA consumption; it’s the minimum number one can get in this mode.
Deep Sleep Mode
Deep sleep mode helps an Arduino consume a lot less power than sleep mode. It puts the MCU in deep sleep and everything except the RTC peripheral is stopped. The CPU can be woken up using the RTC or any interrupt in code.
Current drawn by a Pro Mini in deep sleep can drop from 25mA to 0.57mA.
Slowing Down Arduino Clock Speed
The clock speed in your Arduino board determines how many operations it can perform per second. Most Arduino boards run at 16MHz of clock speed. Reducing this to 8MHz can drop the current needed from 12mA to 8.5mA. In the long run, it can cut off much of the power consumption and extend battery life.
So, when you don’t need to execute a large number of instructions in a short amount of time, it’s meaningful to reduce your clock speed if you want to save power and also perform some operations. However, this method is not very convenient in most cases and if you can put your board in deep sleep, this method is far more inefficient.
Note: Changing clock speed can cause boot loader issues and your Arduino may get damaged.
Arduino Clock Speed Code
#include <avr/power.h>
void setup() {
if(F_CPU == 8000000) clock_prescale_set(clock_div_2);
if(F_CPU == 4000000) clock_prescale_set(clock_div_4);
if(F_CPU == 2000000) clock_prescale_set(clock_div_8);
if(F_CPU == 1000000) clock_prescale_set(clock_div_16);
}
Replacing or Neglecting Power Consuming Components
The on-board voltage regulator limits the input voltage to the DC input jack. The regulator is not very efficient and around 58% of the input energy is lost in the form of heat or used for internal supply. It is better to replace this component with more efficient DC-DC step down converters. Some DC-DC step converters or buck converters can be as efficient as 92%.
Arduino Uno uses a small linear voltage regulator in a TO223 SMD package. A Traco TSRN1 chip is a great option for the package available on Arduino Uno.
Powering a 5V regulated voltage via 7805 IC externally is a far more efficient way. It's a better option to remove the on-board regulator for highly reduced power consumption. Without a voltage regulator, around 2.7mA of current is shaved off.
The power LED is ON all the time to indicate that the board is getting enough power. Removing the power LED can shave 2.85mA of current in normal mode. In sleep mode, without the LED, the power consumption of Arduino UNO is just 30.8uA.
Lowering the Voltage Supply to an Arduino
One of the very easy ways to reduce the power consumption of the Arduino board is to lower the supply voltage. Arduinos can work at a low voltage of 3.3V and by dropping the supply voltage from 5V to 3.3V, current drawn drops from 4mA to less than 1mA.
At 3.3V, the recommended maximum frequency is around 13MHz according to the ATmega 328’s datasheet. So, lowering voltage too much without reducing clock speed makes the microcontroller behave strangely. A clock speed of 8MHz is the best option here.
How to Make Your Own Arduino
If making these changes to your Arduino or working with SMD components doesn't suit you or you fear to damage the board then making your own Arduino could be the best option. No power-hungry components and just the MCU to perform a task is what our main goal is here.
The circuit is built around an ATmega IC. You can use ATmega 8/328 or any blank programmable microcontroller for this, along with a crystal and a reset button. You can add a 7805 voltage regulator for your convenience.
Here's how I use this circuit:
- Prepare the circuit on a general-purpose board or breadboard, but use the 40 pin IC socket for the IC.
- Upload the code you require on the Arduino board.
- Remove the IC from the Arduino and attach it in your circuit and you’re good to go!
This way is easy and you don’t need any external boot-loader for uploading tasks.
So Many Power Consumption Reduction Options!
To summarize what we have discussed so far, the power consumption of an Arduino can be reduced by the following methods:
- Using sleep mode and deep sleep mode
- Reducing the clock speed
- Replacing or removing unneeded components
- Lowering the voltage supply to the board
- Making your own Arduino
Among these methods, some of them work like magic and some are for specific situations. To further reduce the power consumption of your Arduino-based projects, turn off external devices like SD cards with the help of a MOSFET when not in use. Also, don't use unnecessary backlit or indicating displays!