A flickering LED candle in a jar with Adafruit’s Trinket



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.

2 thoughts on “A flickering LED candle in a jar with Adafruit’s Trinket



  1. Pingback: Building a Trinket-powered (ATtiny 85) rover | Bits & Pieces from the Embedded Design World

  2. Pingback: How much you can hang off a Trinket (ATtiny85)? | Bits & Pieces from the Embedded Design World

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s