Hardware · KeyChainino
How I have increased the battery life of my Arduino project by 3000%
Yeah, I’m not kidding!
What I’m about to tell you will increase the battery life of your Arduino project by 3000%, if you are using LEDs.
I want to give you an example:
If you turn ON a lamp, it consumes some watts – for example 100 Watts. Now, if you keep your lamp one minute ON and one minute OFF, in an hour you have powered it only half the time and saved half of the power, consuming only 50 Watts.
Naturally it’s not a good idea, because your room will be lit only one minute out of two.
Now, if you shorten the time the lamp is ON or OFF, for example to 10 milliseconds, in an hour you still save half the power and your room is still lit. That’s because our eyes can’t see that the lamp is OFF for such a short time.
Naturally the lamp can’t be as bright as another lamp that stays on all the time.
What you did, the way you switched the lamp ON and OFF, is called PWM – Pulse-Width Modulation – with a 50% duty cycle.
If you are using Charlieplexing – that’s the way to drive many LEDs with only few pins – you do it without knowing, because in Charlieplexing you turn ON only one LED at a time.
Let’s take the example of KeyChainino, where we have 30 LEDs.
Since we turn ON 1 LED out of 30, using Charlieplexing, we have a duty cycle of
(1/30)*100 = 3,33%.
Now if we turn ON all the 30 LEDs at the same time, without Charlieplexing, we have a power consumption of about 10mA per LED and so 300mA in total.
By using a standard CR2032 battery we have about 225mAh of battery capacity. It means that, if we’re NOT using Charlieplexing, we have to handle 300mA and – I’m not taking into consideration that maybe the battery would fail to handle this peak current – the battery life will be
225/300 = 0,75 hours.
If instead we turn all the 30 LEDs ON using Charlieplexing, with the previous duty cycle of 3,33%, we have a power consumption of 300mA*3,33%, about 10mA! So the battery life will be
225/10 = 22,5 hours!!!
We have increased our battery life by
22,5h/0,75h = 30 times, which means 3000% more!
Obviously we have also decreased the brightness of the LEDs, but you can’t have everything in life, can you? 🙂
Now, if in your Arduino projects you are using many LEDs and you don’t care about brightness, use Charlieplexing to save power and pins 😉
If you want to learn and try how Charlieplexing works in an easy and fast way, check out KeyChainino here: