Tim Bartlett says he’s always wanted to create a small light with realistic fire (flickering) animation. Enter Bartlett’s LED candle in a jar – just in time for the winter holiday season.
“Its brain is a programmable microcontroller, running a smart RGB LED via a single data pin, housed in the lid of a jar,” Bartlett explains. “I used Adafruit’s [Atmel-powered] Trinket — a tiny, inexpensive board available in 3.3V or 5V flavors. ”
Thus far, Bartlett has created three prototypes:
- A self-contained 3.3V candle with a single Atmel-based Flora NeoPixel, powered by a tiny rechargeable 150mAh lipo battery inside the lid, with a pushbutton toggle power switch hot glued to the outside of the lid.
- A 5V single-pixel candle, with Trinket on the outside for powering via USB, plus an extra 2.1mm socket for external wall or battery power.
- A 5V 8-pixel candle using Adafruit’s 8 NeoPixel Stick, with all electronics inside the lid and a 2.1mm power socket on top.
“The jars have a white paper disc at the bottom and a tracing paper tube running the jar’s height. I plan on replacing them with some theatrical lighting diffusion so nothing bursts into flame — probably not a risk, but you never know,” says Bartlett.
“The Arduino code runs a basic fade on the green pixel, causing it to dip down and back every 120 milliseconds, roughly 8 times per second. When the green dips, the light gets dimmer and redder, as if it’s losing oxygen. An RGB mix of 255, 100, 10 (on a scale of 0 – 255) looks like a pretty good candle flame yellow to me.”
Interested in learning more? You can check out the project’s official page here and the full code on Github here.