Next week, Trinculo’s Attic launches our first in-house developed product. We’re calling it the Juliet Candle*. It’s a tiny 1/2″ diameter board with an LED mounted atop it.
The first prototype was a bit bigger (although skinnier):
Scale may be hard to grasp, but the LED is about 5mm (1/4″) wide, the overall board is 3/8″ wide. This has all the parts the final board has on it, but is a bit easier to program, since it has a standard programming port on it.
The LED is connected, via resistor, to one of the PWM ports on the board. This allows us to very easily set the brightness of this LED, since we’re simply writing a value to a register instead of trying to manually turn the LED on and off.
We’d previously implemented LED candles with three LEDs. One LED is kept on, the other two flicker randomly on different frequencies, causing the light output to be nice and flickery. The only problem with this is that it doesn’t look very much like a real candle. Side by side with a real candle, it’s far too consistent. We set about doing some studies about what different candles really do. We set up this little rig:
This is a little circuit that measures the brightness of a candle, on about 1000 samples per second, and outputs the data into the computer. It’s built using an Arduino, one resistor, and a CdS photocell with a bit of blackwrap around it to mask other light. We put another piece of blackwrap behind the candle to give us a very strong signal. Here’s what we found:
The dataset is dense, but we found that candles tend to float around to different levels, with periods of relative calm and periods of heavy flickering. We also discovered that the candle flicker had a “resonance frequency” of around 5Hz when it was flickering, while it’s amplitude changed throughout:
We mulled around different ways of implementing this in software. We considered using Fourier Transforms to dig out the overlapping frequency data. On a walk up to get some coffee, one of our team (Sarah) said “Why not just play back the data?”
Turns out that works, and amazingly well. We resampled and normalized the data (bringing it down to about 50 frames per second). We found we had two basic modes of operation: high flicker (a pillar candle) and low flicker (a tea light). The tea light actually was incredibly steady, but we took a segment of the data in which a lot was going on, since a theatrical candle needs to be a little dramatic. The tea light is the first graph above, the pillar candle is the second.
After proving the concept on the first prototype board, we then shrunk it. We decided a round board would be nice, since you can fit it into things designed to take a candle, or into a candle itself. The smallest board you can fit the microcontroller on is a 1/2″ diameter circle. We might have been able to shrink it a tiny bit more, but the size was nice. We had the boards produced really thin — 0.020″ instead of the standard 0.0625″, and with a black soldermask instead of a green one. The finished board is pictured above, and in plan view below (with a standard tea light for size reference):
So now we have a lovely little candle. The LED circuit uses one of six available pins, so there are 5 pins on the microcontroller available. The simplest use is that one of the pins can be tied to ground, which will switch the candle from low-flicker into high-flicker mode. This serves as a really simple way to change up how the candle reacts.
The second use is that the microcontroller can read analog voltages, so we’ve implemented two more things (which will be shipping shortly after the candle does):
- Light detector: the candle will go out when in darkness. This allows you a basic way to turn off the candles in a blackout.
- Motion detector: when left alone, the candle will be in low flicker mode. When moved, the candle will shift into high flicker mode. Multiple candles can be wired together to a single motion detector, allowing you to control a whole candelabra from a single motion detector
Using LEDs and microcontrollers also reduces our power needs. Any 3V-3.6V power supply can be used, including two AAA batteries, a single lithium coin cell, or an AC adapter. Each candle pulls 50mA, and we can supply an AC adapter that’ll run up to 20 of them with no problem.
Look for the big announcement next week: the first in our Thing-A-Week product launches between now and USITT in March. (They won’t be quite Thing-A-Week, but pretty close).
* “But, soft! what light through yonder window breaks?
It is the east, and Juliet is the sun.” — R&J, Act II, Sc 2.