DIY Projects

Digital Candle: ESP32-S3 and a 3,545-Parameter AI Flame

Digital Candle: ESP32-S3 and a 3,545-Parameter AI Flame

Build it yourself: a 9×16 flame in one evening

You can fake the core of this project on a breadboard. Grab an ESP32-S3 board, an IS31FL3731 LED matrix driver breakout, and a 9×16 grid of amber LEDs, then wire the driver to the ESP32 over I2C (SDA and SCL, plus 3.3 V and ground). That gives you 144 pixels, each with 256 brightness steps, which is enough to draw a flame. Hackster covered the finished version in this write-up.

What Kevin Bates built

Bates, the creator of the Arduboy handheld, designed the Digital Candle as a tall PCB about 10 inches by 1 inch. The amber LED matrix sits at the top, the IS31FL3731 drives it, and an ESP32-S3 does the thinking. Power comes through USB-C, and a small dock holds the board upright. The price is $149, so treat it as a reference design to learn from rather than a parts-bin shortcut.

How the flame is generated

Instead of looping a recorded animation, Bates trained a small convolutional neural network on video of a real candle, shrunk to the same 144-pixel grid. The model has only 3,545 parameters and tracks 8 variables that describe the flame. Eight damped oscillators with a dash of randomness push those variables around, and a convolutional decoder turns them into LED brightness values at 30 frames per second. Because each ESP32-S3 has a unique hardware address, that address seeds the starting flame, so no two candles flicker alike.

Where to take it next

The gotcha for students is that a network this small fits in ESP32 memory and runs with no Wi-Fi at all, which is exactly the edge-AI skill thesis panels ask about. Try a hand-built version with a plain random-walk brightness first, then compare it against a damped-oscillator version and watch how much more natural the second one looks. If your LED matrix is 8×8 instead of 9×16, change the frame buffer size in your code snippet and keep the same math. Parts like the ESP32 boards and I2C LED drivers are on circuit.rocks, and the original project details are at Hackster.

Frequently Asked Questions

What chips does the Digital Candle use?

An ESP32-S3 runs the neural network, and an IS31FL3731 driver controls a 9×16 matrix of 144 amber LEDs, powered over USB-C.

How big is the AI model and does it need internet?

The convolutional network has 3,545 parameters and 8 flame variables, runs at 30 frames per second, and works fully offline on the ESP32-S3.

What will I learn if I build this?

You will practice I2C wiring to an LED driver, frame buffer math for a 144-pixel display, and the basics of running a tiny neural network on a microcontroller, all useful for edge-AI thesis topics.

This article was inspired by reporting from Hackster. Find the parts and modules to build it at Circuitrocks.

// written by Ann Arandia

Ann Arandia covers community projects and maker events for the Circuitrocks blog. She writes about local workshops, kid-friendly electronics, and the Philippine maker scene — the people, the meet-ups, the projects that come out of them.