Hello!
My notebook died, so i have six 18650 cells in good condition and a few Nichia Superflux LEDs left over.
I got a few china protection and charging boards for the cells.
All that needs to be put to good use so i want to build about 6 very low cost and every low power led candles as a gift.
I might be be using a ATmega328P since they sell dirt cheap on ebay and run it on the internal clock at 128khz and put an LDR on it with a timer so they are somewhat "intelligent" and turn on when the sun goes down.
That should cost me about 500µA active current for the logic says the datasheet.
There are other ways but i allready got a few microcontrollers and i like programming more then analog electronics.
There are better µC for this but they cost more then the china arduino boards i can get for a buck.
The LEDs should run at about 5mA to 10mA and i measured the forward current at 2.7 to 2.8V at these currents.
I need a proper way to drive the LEDs, that does not add too much cost.
My idea is to just use a simple current limit resistor, somewere between 100Ohm and 300Ohm.
But that does not give me a constant brightness/current output and then i had an idea.
I use the µC and measure the Battery voltage, use PWM to dimm the LED and scale the duty cycle accordingly to the battery voltage.
That should get me about 70% efficiency if i dit the math right and is perfectly reasonable i think and a somewhat constant brightness the lower the cell voltage goes.
What do you think about that? The PWM might be a bit slow and flickering might be an issue.
I appreciate any feedback!
Greetings,
Peter
My notebook died, so i have six 18650 cells in good condition and a few Nichia Superflux LEDs left over.
I got a few china protection and charging boards for the cells.
All that needs to be put to good use so i want to build about 6 very low cost and every low power led candles as a gift.
I might be be using a ATmega328P since they sell dirt cheap on ebay and run it on the internal clock at 128khz and put an LDR on it with a timer so they are somewhat "intelligent" and turn on when the sun goes down.
That should cost me about 500µA active current for the logic says the datasheet.
There are other ways but i allready got a few microcontrollers and i like programming more then analog electronics.
There are better µC for this but they cost more then the china arduino boards i can get for a buck.
The LEDs should run at about 5mA to 10mA and i measured the forward current at 2.7 to 2.8V at these currents.
I need a proper way to drive the LEDs, that does not add too much cost.
My idea is to just use a simple current limit resistor, somewere between 100Ohm and 300Ohm.
But that does not give me a constant brightness/current output and then i had an idea.
I use the µC and measure the Battery voltage, use PWM to dimm the LED and scale the duty cycle accordingly to the battery voltage.
That should get me about 70% efficiency if i dit the math right and is perfectly reasonable i think and a somewhat constant brightness the lower the cell voltage goes.
What do you think about that? The PWM might be a bit slow and flickering might be an issue.
I appreciate any feedback!
Greetings,
Peter