Flickering Tealight LED Candle Remix 3d model
Warning. This content is not moderated and could be offensive.
smoke
3dmdb logo
Thingiverse
Flickering Tealight LED Candle Remix

Flickering Tealight LED Candle Remix

by Thingiverse
Last crawled date: 4 years, 3 months ago
Changelog:
Added new 3D-models of my current testbed.
Added photos of the new built.
The pcb was assembled by pinching the small cylinders with the soldering iron. Not elegant but easy and working :-).
Next up is a pcb-design and then the final 3D-models.
I used black PLA as filament as it was already mounted in the printer. I am going to print the diffuser in white :-).
I found the original solution by bobthechemist very interesting but it lacked some features I wanted to have. So I took the code and added a timer and voltage control to protect accus from undervoltage. There will also be a slightly modified design of the printed candle but it is not ready yet. So credits go to bobthechemist for the flicker-code it is really great-looking. You will find the layout of the circuit on the original thing as I had no time yet to make a sketch by myself :-).
There are three individual variables (somewhere at the beginning of the code) to set:
Vwarn: When the accu reaches this voltage the brightness will be reduced by half. This is clearly visible and should be understood as "Please charge the accu as soon as possible".
Vsleep: When reaching this voltage the whole system will go to "deep" sleep to protect the accu.
Runtime_hrs: How many hours from connecting the accu the LED will remain active. The rest of the day the system will sleep.
You can also change the intensity and the flicker there but I found it good as it is.
Pre-entered values are for a single-cell LiPo-accu (3.7 V, 150 mAh) and a runtime of 6 hours. I'm still testing the code but it looks as if it works.
Please keep in mind that the code is for an Attiny85 with 1 Mhz clock frequency. Another Attiny-version might need a different programming of the registers and the flickering might look different on other frequencies.
The code is some kind of alpha version as there are some lines left for serial communication. And it is not "nice" as it is my first coding attempt after decades of being "off the keyboard" :-).
With the current circuit and a adafruit sequin LED the system draws around 3 mAh when active and around 0,3 mAh when not active. So with 6 hours runtime it is around 1 mAh per hour so my 150 mAh LiPo-cell might be enough for 4-6 days. Still testing... :-).
The txt-file should work with PlatformIO as .cpp or as .ino in ArduinoIDE. I added two pictures of my breadboard testbed with the multimeter measuring the current.

Tags