Yeah, I’m not kidding!
What I’m about to tell you will increase by 3000% the battery life of your Arduino project if you are using LEDs.
I want to give you an example:
If you turn ON a lamp it will consume tot watts – for example 100 Watts. Now, if you turn ON your lamp one minute ON and one minute OFF, in an hour you have powered the lamp only for half the time and you saved half of the power, consuming only 50 Watts.
Naturally it’s not a good Idea because you will have your room illuminated only for one minute on two.
Now, if you decrease the time period in which the lamp is ON or OFF, for example 10 milliseconds, in an hour you even safe the half power and your room is still illuminated, this because our eyes can’t detect that the lamp is turned OFF in this small time period.
Naturally the brightness of the lamp can’t be the same as an other lamp illuminated for all the time.
What you did, the way you switched the lamp ON and OFF, is called PWM – Pulse-Width Modulation – with a 50% of duty-cicle.
If you are using Charlieplexing – that’s the way to drive many LEDs with only few pins – you do it unconsciously because, in Charlieplexing, you turn ON only one LEDs at a time.
Now we take the example of KeyChainino where we have 30 LEDs.
Since we turn ON 1 LED every 30 LEDs, using Charlieplexing, we have a DutyCicle 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 consuming 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 previously DutyCicle of 3,33%, we have a power consuming 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, that it’s 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 easy and fast way, checkout KeyChainino here: