Improved Electronic Birthday Candles Provide Better "Blow Out" Simulation

Oct. 8, 2009
An earlier Idea for Design described LED “candles” that you could blow out just like normal birthday candles. This update provides a better "blow-out" simulation and increases the maximum number of candles to 20. Happy birthday to you...

An earlier Idea for Design described LED “candles” that you could blow out just like normal birthday candles (Electronic Birthday Candles ‘Blow Out’ One At A Time). A thermistor and heating resistor combination detected air blown over the thermistor. The control circuit incorporated an 8-bit shift register, a quad op amp, and driver transistors, allowing up to eight candles. For each gust of air blown at the thermistor, one LED was turned off, thereby mimicking the action of normal candles.

The improved circuit described here offers a more realistic behavior of the candles. It uses a simpler circuit that increases the number of candles allowed to 20.

To reduce complexity, we used an inexpensive microcontroller. Lots of options are available. We chose a device with one of the smallest footprints available—an ATtiny45 in an eight-pin package. Among other things, modern microcontrollers offer digital I/O and on-chip ADC channels. Both of these features are useful for this project. Although the limited number of I/O pins on the eight-pin package restricts the number of LEDs that can be controlled, an improved LED multiplexing scheme called Charlieplexing alleviates that problem (Eight-Pin Microcontroller Handles Two-Digit Display With Multiple LEDs).

The revised circuit is similar to the previous version in that a 47-O resistor is used to heat a 150-O thermistor (see the figure). A resistor divider network formed by the thermistor and a 100-O resistor monitors the ambient temperature. When air blows over the thermistor, it cools the thermistor, increasing the voltage at the junction (the node labeled Temp). The voltage at this junction is monitored continuously by the MCU’s ADC channel0. The rest of the five I/O pins control the 20 5-mm LEDs. We chose LEDs of different colors to serve as our birthday candles.

At power up, all of the LEDs glow. The microcontroller controls the LEDs with four levels of intensity that vary the LED light output randomly to provide the appearance of a flickering candle. The MCU continuously monitors the thermistor’s temperature, and when the ADC count increases a few counts (a variation of five in the ADC count works well), the LEDs are turned off randomly. Not only is the sequence of LEDs being turned off random, but also the number of LEDs that go out at one time is random.

We chose that count to be between zero and three LEDs at a time. Thus, the LEDs blow out much more realistically. Also, if the candles are to be used for a birthday cake and it’s desired that all but one candle be blown out, the control software can easily be modified to do that.

Four rechargeable batteries (NiCD or NiMH) with a terminal voltage of about 1.2 V power the system. A freshly charged battery terminal voltage is about 1.3 V. Even at that value, the combined voltage of the four batteries is well within the operating voltage range of the ATtiny45.

The control software for the candles is written in C using the AVRGCC C compiler under a Windows operating system. The compiled code, which is about 2500 bytes.

We built the candle circuit on two printed-circuit boards (PCBs) separated by spacers. The component side of the top PCB held the LEDs, the switch, the thermistor, and the heating resistor. The solder side held the microcontroller and other components. The bottom PCB held the batteries.

Sponsored Recommendations

Board-Mount DC/DC Converters in Medical Applications

March 27, 2024
AC/DC or board-mount DC/DC converters provide power for medical devices. This article explains why isolation might be needed and which safety standards apply.

Highly Integrated 20A Digital Power Module for High Current Applications

March 20, 2024
Renesas latest power module delivers the highest efficiency (up to 94% peak) and fast time-to-market solution in an extremely small footprint. The RRM12120 is ideal for space...

Empowering Innovation: Your Power Partner for Tomorrow's Challenges

March 20, 2024
Discover how innovation, quality, and reliability are embedded into every aspect of Renesas' power products.

Article: Meeting the challenges of power conversion in e-bikes

March 18, 2024
Managing electrical noise in a compact and lightweight vehicle is a perpetual obstacle

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!