Entries into the Circuit Sculpture Contest tend to be pretty minimalist by nature, and this LED candle by [Amal Mathew] is a perfect example. The idea here was to recreate the slim and uncomplicated nature of a real candle but with a digital twist, and we think he’s pulled it off nicely with a bare minimum part count and exaggerated wire length that gives it the look of a thin pillar candle.
To give the LED a fading effect, [Amal] uses a ATtiny85 programmed with the Arduino IDE. His code uses the analogWrite() in a loop to gradually increase and then decrease the PWM frequency. With the LED connected directly to one of the pins on the ATtiny85, the simple program achieves the fading effect without needing any additional components.
On the opposite side of the candle, connected by long copper wires, is the single CR2032 which provides power for the circuit. In a nice touch, [Amal] has turned the battery 90 degrees relative to the rest of the circuit, so it can serve as a weighted base. We imagine getting it to stand up might be a little fiddly from the looks of it, but once it’s up and merrily fading in and out, it really helps sell the candle idea.
The finished product might look fairly straight-forward, but in his write-up on Hackaday.io, [Amal] gives detailed instructions on how to build your own version if you’re not a bare microcontroller wizard. This includes direction on how to program the ATtiny85 using an Arduino Uno; a neat trick to know even if you aren’t planning on making any candles in the near future. The next logical step is making it so you can “blow out” the LED, which should only take the addition of a resistor and some updated code.
Regular readers may recall we recently covered a neat Arduino trick that allowed you to “blow out” an LED as if it was a candle. The idea was that the LED itself could be used as a rudimentary temperature sensor, and the Arduino code would turn the LED on and off when a change was detected in its forward voltage drop. You need to oversample the Arduino’s ADC to detect the few millivolt change reliably, but overall it’s pretty simple once you understand the principle.
Not to say it’s easy to replicate the original Arduino project with a 555, or that it’s even practical. [Andrzej] simply wanted to show it was possible, which is something we always respect around these parts. He goes into great detail on how he developed and tested the circuit, even including oscilloscope screenshots showing how the different components work together in real-time. But the short version is that a MOSFET is used to turn the LED on and off, a comparator detects change in the LED’s voltage drop, and the 555 is used to control how long the LED stays off for.
We’d seen it done with buttons, switches, gestures, capacitive touch, and IR remote, but never like this. [electron_plumber] made an LED that can be blown out like a candle, and amazingly it requires no added sensors. The project uses an Arduino to demonstrate turning a tiny LED on and off in response to being blown on, and the only components are the LED and a resistor.
How is this done? [electron_plumber] uses an interesting property of diodes (which are the “D” in LED) to use the LED itself as a temperature sensor. A diode’s voltage drop depends on two things: the current that is being driven through the diode, and the temperature. If the current is held constant, then the forward voltage drop changes reliably in response to temperature. Turning the LED on warms it up and blowing on it cools it off, causing measurable changes in the voltage drop across the device. The change isn’t much — only a handful of millivolts — but the effect is consistent and can be measured. This is a principle [Elliot Williams] recently covered in depth: using diodes as temperature sensors.
It’s a clever demo with a two important details to make it work. The first is the LED itself; [electron_plumber] uses a tiny 0402 LED that is mounted on two wires in order to maximize the temperature change caused by blowing on it. The second is the method for detecting changes of only a few millivolts more reliably. By oversampling the Arduino’s ADC, an effectively higher resolution is obtained without adding any hardware or altering the voltage reference. Instead of reading the ADC once, the code reads the ADC 256 times and sums the readings. By working with the larger number, cumulative changes that would not register reliably on a single read can be captured and acted upon. More details are available from [electron_plumber]’s GitHub repository for LEDs as Sensors.
Embedded below is a video that is as wonderful as it is brief. It demonstrates the project in action, takes a “show, don’t tell” approach, and is no longer than it needs to be.