Driving a low current LED of a 18650 cell for a candlelight

PeterFH

Newly Enlightened
Joined
Sep 23, 2016
Messages
60
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
 

nickelflipper

Newly Enlightened
Joined
Sep 27, 2010
Messages
82
Location
NE Oregon, USA
Add mini 5V pv panel (6v open circuit <$2) and tp4056 (<$1)module for battery charging circuit for the gift that keeps on giving. PV panel voltage is good for day/night sensor.
 

DIWdiver

Flashlight Enthusiast
Joined
Jan 27, 2010
Messages
2,725
Location
Connecticut, USA
I think you have a very good plan. You should be able to run the PWM fast enough that it's not perceptible to humans. 500 Hz is overkill. 200 Hz is enough for all but the most sensitive humans.

If you do the calculations and the programming correctly, there's no reason you can't achieve exactly what you want.

If you want to improve the efficiency to over 90%, that's possible with a few extra components and some more programming skill. I'd be happy to help you with that if you want.
 

Lynx_Arc

Flashaholic
Joined
Oct 1, 2004
Messages
11,212
Location
Tulsa,OK
If you wanted to skip all the trouble and pay a few dollars each you can buy 1 cell power banks (metal colors) for about $1.50 or less and a 6xsmd usb LED dimmable board for around 1.25. these boards run about 500uA or so at the minimum light level and put out decent light. These dimmable boards will run for weeks even months I have one lighting my keyboard using a 90 degree USB adapter that costs about 1.00. The nice thing is when you dim them to the lowest setting one touch turns them off and another right back on again and you can ramp them up to a decent level of light plus the power bank circuit boosts it to 5v until the battery is depleted then shuts off.
 

PeterFH

Newly Enlightened
Joined
Sep 23, 2016
Messages
60
Hello and thank you for your reply!

I think you have a very good plan. You should be able to run the PWM fast enough that it's not perceptible to humans.
Thanks! :)
If you want to improve the efficiency to over 90%, that's possible with a few extra components and some more programming skill. I'd be happy to help you with that if you want.

I want to keep the parts count as low as possible but i would be interested.
A simple buck regulator with a diode, inductor and feedback resistor that drives the comparator of the AVR and feeds into a timer that regulates the output via PWM on the inductor?

I would like to hear more about it! :)

Greetings,
Peter
 

PeterFH

Newly Enlightened
Joined
Sep 23, 2016
Messages
60
If you wanted to skip all the trouble and pay a few dollars each you can buy 1 cell power banks (metal colors) for about $1.50 or less and a 6xsmd usb LED dimmable board for around 1.25.

Thank you very much for the suggestion!
I forgot about these, i saw a video review about them some time ago but can not find it again, that is a really good idea for something different i had in mind, definately will keep that in mind.

Found it, was searching on the wrong channel:
https://www.youtube.com/watch?v=kNT2FlL7w0I

Greetings,
Peter
 
Last edited:

Lynx_Arc

Flashaholic
Joined
Oct 1, 2004
Messages
11,212
Location
Tulsa,OK
Thank you very much for the suggestion!
I forgot about these, i saw a video review about them some time ago but can not find it again, that is a really good idea for something different i had in mind, definately will keep that in mind.

Found it, was searching on the wrong channel:
https://www.youtube.com/watch?v=kNT2FlL7w0I
Greetings,
Peter


Yes that is the one, and it comes in two "flavors", one that is cool white like that model and one that looks "oranger" in the LED color and is somewhat yellow in output (warm white). The one issue I've had with them is the very low current requirements at the lowest dimming level is right at or below the shutoff threshold of most power banks such that you plug one in and get it going and dim it down to the lowest output and seconds later it shuts off or "blinks" on and off in some cases and you have to unplug it and plug it back in to get it to work again. I've found very few power banks work with the lowest level most that have a "power" button to turn them on or check the battery level don't support the lowest level well.
 
Top