Persistence of vision (POV) candle
By Phil King. Posted
Tea-light candles are ideal for mood lighting, but naked flames can be dangerous – and those off-the-shelf artificial LED versions aren’t very convincing.
Taking a different approach, Tim Jacobs’s POV candle spins an LED matrix at high speed to create the illusion of a hovering 3D flame.
“There was a discussion at a pub meet-up about electronic candles, of which there are many different types,” recalls Tim. “I was specifically trying to think of a design that would look right from any angle. I’m not sure if I’ve achieved that yet, but this is only the first prototype!”
His solution was to make use of persistence of vision (POV) – the brief retention of a visual impression on the eye’s retina that creates the illusion of a moving image in film and television.
Shine a light
While the general consensus was that POV displays require too much in the way of supporting machinery to make them work, such as bearings and slip rings, Tim had the bright idea of getting a whole tiny device, including battery and motor, to spin.
He quickly threw together an LED matrix board design. “It took about a week for the matrix PCB to arrive,” he says, “which gave me a little time to think about how it was going to go together, but once I had all the parts building the whole thing only took a couple of hours.

For the brains of the device, he looked at using Raspberry Pi Pico, but eventually opted for a Waveshare RP2040-tiny partly due to its smaller size (about half that of Pico).
“Aside from the low cost and easy availability, one of the nice things about the RP2040 is that you can set, or get, all of the GPIO pins in a single clock cycle,” he notes. “This makes implementing a custom matrix very easy. The software [for the project] does very little at all: it just steps through an array of numbers to send to the GPIO port.”
The flame effect is an animation based on volumetric data and rendered in the open-source Blender 3D modelling application. Tim first experimented with a rotating cube and fluid simulation. “Getting the software to work and generating those animations took maybe a couple of days of experimenting.”
Spinning around
The candle is spun around by a Mabuchi RF-410CA motor Tim had to hand. This can rotate at up to 5900rpm, but for a 30fps animation he used PWM to reduce it to around 1800rpm.

Power for the project is supplied by a LIR2450 coin cell housed in a custom 3D-printed battery holder. “The amount of current a battery can deliver is related to its capacity,” says Tim, “so it’s not just about making the battery last as long as possible, it’s also that a smaller battery might not be able to drive the motor at all.”
From this initial prototype, “the next step is to make a circuit board out of the hand-wired mess it is currently, and then increase the resolution of the display. We can roughly double the number of LEDs without changing the design, but beyond that we’ll need to rethink how the display is driven.”
When not editing books and contributing to The MagPi, Phil enjoys playing the piano (badly), astronomy, and watching classic sitcoms.
Subscribe to Raspberry Pi Official Magazine
Save up to 37% off the cover price and get a FREE Raspberry Pi Pico 2 W with a subscription to Raspberry Pi Official Magazine.
More articles
Make your RAM go further – Raspberry Pi OS memory optimisation tips
In issue 164 of Raspberry Pi Official Magazine we have been playing around with the new Raspberry Pi 5 1GB RAM. While the RAM shortage caused by the demands of AI infrastructure is annoying beyond belief, this has been a great chance for us to really get to grips with RAM. Generating images in Stable […]
Read more →
Mighty Projects – 1GB Computer in Raspberry Pi Official Magazine 164
It’s normal for computers to get faster and more pwerful, but the new-ish Raspberry Pi 5 1GB is a step in the other direction: it has all the processing power and the same GPIO pins of its more costly siblings, but with only 1GB of RAM it’s at a price that’s friendlier on the wallet […]
Read more →
Win one of five 256GB Raspberry Pi Flash Drives
If you’ve been around long enough, you know that every Raspberry Pi accessory is top quality, and the latest Flash Drive is no different. Fancy a big one? We have five up for grabs, and you can enter below… Win 1 of 5 256GB Raspberry Pi Flash Drives
Read more →