A few years ago I received a nice little LED lamp as a bonus in an online order. The lamp had one issue, the circuit was optimized for costs not for lifetime of the LEDs.
After around of 10 hours of accumulated operation, the LEDs started to flicker. The reason was, that the LEDs were not safely supplied by a certain constant supply current. Instead, the circuit supplied the voltage of three AAA cells directly to the LEDs.
I used the LM3410 – a Constant Current Boost and SEPIC LED Driver with Internal Compensation – from Texas Instruments. Here you can find further information: http://www.ti.com/product/LM3410/description
Schematic examples can be found in the datasheet as well.
I set the constant current to 20mA.
Building a new enclosure
The LM3410 LED driver on the small PCB didn’t fit into the old enclosure, so I had to design a new one. I used the tool DesignSpark Mechanical 2.0, the little brother of the MCAD tool Spaceclaim Engineer.
Here you can see the final result, the enclosure – consisting of three printed parts: the outer shell, the sliding center part and the cover panel. The center part is carrying the LED driver PCB and the battery compartment.