LED string with timer and printed case by Stemer114 3d model
3dmdb logo
Thingiverse
LED string with timer and printed case by Stemer114

LED string with timer and printed case by Stemer114

by Thingiverse
Last crawled date: 3 years, 1 month ago
Christmas is coming soon. Take one of these simple battery operated led strings. Mine was from IKEA. You get a nice red battery case, a power switch, a resistor, and a string of 10 red leds with cabling. No way you could source alle these components on your own for less or quicker - unless you are planning to build a 3 digit number of these and break it down.
Anyway, I didn't like the simple on/off switch. Sure, I can switch it on in the evening, but I can't be bothered to remind myself to switch it off before going to bed. A timer was needed.
Nowadays, everything is powered by microcontrollers, why not a simple battery led string as well...
The timer circuit is an ATtiny45 microcontroller, which is cheap, doesn't need many external components and was what I had at hand. See the last picture for the schematic.
The timer circuit does not have an on/off switch. The reset button starts the operation (timer function). After a programmable amount of time (see config.h - anything from seconds to multiple hours, mine is programmed for 6 hours), the led string is switched off and the controller goes to power-down sleep mode (power consumption approx. 0.4uA at 3V). No need for an on/off switch. Pressing the reset button again starts anew. Pressing the second button while the string is active switches to power-down mode immediately. The firmware is in the files.
Because the circuit did not fit into the battery housing, I printed a simple case which houses the strip board with the controller and the two buttons. The size can be adjusted (see params in scad file).
One more thing: You can power this led string easily with used AA batteries. I usually collect used batteries over the year (from toys, alarm clock etc.) - and use them again here. A good re-use for used batteries before giving them into the recycling bin.
The last picture shows a version with 20 leds and 3 AA batteries, where the circuit fits into the battery case.

Tags