bremenfallturm
- 81
- 13
- TL;DR Summary
- My question is basically if someone can confirm that my pessimistic power consumption calculations are done correctly (I have rudimentary electronics knowledge), so I can realize that I should reconsider my design :)
Hi!
I am trying to create a circuit which can individually turn on and control 12 LEDs from 4 pins, since I am trying to adapt it to a tiny microcontroller (the Attiny85, which does not have enough pins to drive the LEDs)
For this, I am using a method called Charlieplexing. You can for example read about how it works on Wikipedia, which has a better explanation than what I can come up with. I have posted about this project in another thread, see here: https://www.physicsforums.com/threads/charlieplexing-leds-have-different-brightness.1078255
The schematics I am using can be found below, where JP1-4 are GPIOs on the microcontroller I will be using:
My plan is to use Charlieplexing to (in the worst case), light up all of the 12 LEDs, with the last one blinking, like this:
To make the LEDs appear to be all on at the same time, I'll basically have to pulse through 12 different microcontroller pin states to light each of the individual LEDs very quickly.
I originally wanted to drive my microcontroller from a CR2032 battery, but I realize that it might not be enough to power it for a long time... (this is going to be part of a battery-powered bar-chart timer which I'd probably be using for 13 hours a day, so...)
My question is basically if someone can confirm that my pessimistic power consumption calculations are done correctly (I have rudimentary electronics knowledge), so I can realize that I should reconsider my design :)
Each LED is when lit, basically equivalent to this circuit
(note that 300Ohm equivalent resistance was an accident from my side - when prototyping I used 150Ohm resistors instead of my intended 75Ohms. But the LEDs are as bright as I want...)
I measured my new CR2032 battery to about 3.2 volts. My LED is rated ##V_f=2V## typical.
##V_R=3.2-2=1.2V##
If ##R=300\Omega## I am feeding through ##I=\frac{1.2}{300}=4\text{mA}## over each of the LEDs.
Making the pessimistic assumption that all LEDs are on simultaneously, the LEDs draw the total current ##4\cdot 12=48mA##. My CR2032 is rated at 220mAh.
The capacity over the current:
$$
\frac{220\text{mAh}}{48\text{mA}}\approx 4\text{ hours }34\text{ minutes}
$$
If I make the pessimistic assumption that all LEDs are on simultaneously, are my calculations correct? (If so I shall look for another alternative...)
I am trying to create a circuit which can individually turn on and control 12 LEDs from 4 pins, since I am trying to adapt it to a tiny microcontroller (the Attiny85, which does not have enough pins to drive the LEDs)
For this, I am using a method called Charlieplexing. You can for example read about how it works on Wikipedia, which has a better explanation than what I can come up with. I have posted about this project in another thread, see here: https://www.physicsforums.com/threads/charlieplexing-leds-have-different-brightness.1078255
The schematics I am using can be found below, where JP1-4 are GPIOs on the microcontroller I will be using:
My plan is to use Charlieplexing to (in the worst case), light up all of the 12 LEDs, with the last one blinking, like this:
To make the LEDs appear to be all on at the same time, I'll basically have to pulse through 12 different microcontroller pin states to light each of the individual LEDs very quickly.
I originally wanted to drive my microcontroller from a CR2032 battery, but I realize that it might not be enough to power it for a long time... (this is going to be part of a battery-powered bar-chart timer which I'd probably be using for 13 hours a day, so...)
My question is basically if someone can confirm that my pessimistic power consumption calculations are done correctly (I have rudimentary electronics knowledge), so I can realize that I should reconsider my design :)
Each LED is when lit, basically equivalent to this circuit
(note that 300Ohm equivalent resistance was an accident from my side - when prototyping I used 150Ohm resistors instead of my intended 75Ohms. But the LEDs are as bright as I want...)
I measured my new CR2032 battery to about 3.2 volts. My LED is rated ##V_f=2V## typical.
##V_R=3.2-2=1.2V##
If ##R=300\Omega## I am feeding through ##I=\frac{1.2}{300}=4\text{mA}## over each of the LEDs.
Making the pessimistic assumption that all LEDs are on simultaneously, the LEDs draw the total current ##4\cdot 12=48mA##. My CR2032 is rated at 220mAh.
The capacity over the current:
$$
\frac{220\text{mAh}}{48\text{mA}}\approx 4\text{ hours }34\text{ minutes}
$$
If I make the pessimistic assumption that all LEDs are on simultaneously, are my calculations correct? (If so I shall look for another alternative...)