Disclaimer: I’m an engineer, not a pro film maker. Be advised.

Disclaimer: I’m an engineer, not a pro film maker. Be advised.


It’s Arduino’s birthday on May 12th. Our favorite development board is now in its rebellious years, and having it’s Quinceañera ─ 15 years old!

For the special day, I wanted to put together an intermediate project featuring the staple of birthdays, candles. I wanted digital candles that you could also blow out like their analog counterparts.


The project by sections:


Illuminating LEDs with an Arduino is nothing new. But, how to turn them off was a different story.


Here were the requirements and how I got past them:

- I wanted each candle to be individually controlled. So, the birthday kid would have to get all the candles, like in real life. To conquer that issue, I used an Arduino Mega 2560. It had more than enough inputs to handle all the candles.

Using a concept I discuss in my forthcoming book, The Troublemaker’s Handbook, I used an electret microphone as the way to sense wind blowing across the candle. On each ADC line the “candle” assemble is connected to, I see values around 500. When the value jump very high, then the LED is turned off.

Technically, yelling really loud, and other loud noises could hypothetically turn off the candles too.


- I needed 15 candles. That’s a lot of power. Around 300mA, depending on the color of the candle.

In the datasheet for the Arduino Mega, it’s mentioned that the regulator can handle up to 1.5A at 5V. However, if you run the Mega on USB power only, then a max of 400mA can be expected. Run off of an external power supply, 900mA. There is a thermal shutoff if it draws too much current, don’t worry.


- Once the candles are all off, how do I turn them all back of again.

A giant reset button! I added that – a giant reset button.


Feel free to just hit the Arduino Mega’s onboard reset button too.



1x Arduino Mega

15x Orange LEDs (Any color you want)

15x 10K Ohm resistor

15x 470 Ohm Resistor

15x Electret Microphones

30x 0.1uF Ceramic Capacitors

Lots and lots of jumper wires

Lots of heat-shrink tubing


Tools you’ll need:

Soldering iron & solder

Heat gun


Assembly pointers:

There is no right way or wrong way to build the candle assemblies.


I assembled each branch of the circuit separately, so I could put heat-shrink tubing on all the exposed components and leads. Then, the same as I combined the branches together.


When adding wire to the ends of the circuit, where it’ll plug into the Arduino Mega, I solder in jumper wires from the many kits I bought. I thought it would be easier to quickly connect it to the Arduino.


The final step, I placed a straw segment into the candle assembly as a way to stick it into a cake. However, this was not the best idea. Bits of cake will get stuck in the straw. I placed more heat shrink over the ends of the straws to stop that from happening.


I recommend finding some popsicle sticks, or something similar instead.


Wiring pointers:

To give my candles some wire slack, I used several 12” jumper wire extensions on each lead. It was cumbersome, but did the job.


On the ground and 5V points, I used even more jumper wires and made a breakout bundle. A bit of a brute force effort, but again.. it did the job.


Schematic and design:



See attached file to this post.



- The wiring was a bit tedious. Be sure to have several hours of movies or shows you can pay semi attention to at the ready. I had James Cameron’s The Story of Science Fiction and the terrible movie Primal Rage to keep me company.


Other uses of the system:

- This project does one thing, turns off a circuit when a sound in heard on the microphone. So, and circuit could be turned off in the same way. Replace the LED with a relay system, and imagination is the limit.


If I had more money/time:

- Come up with a way to assemble these candle into a smaller package. I am sure it’s just some soldering finesse.

- Add sound. Flame sounds, and a sound when they go out.

- I would want to adjust the sensitivity threshold to  make the candle easier to blow out. I didn't experiment too much for an optimal value. What I have set here a 3 year old could blow out one, but not across a whole cake.

- A 4 conductor cable with some sort of connector on it would have been better than the project wires. Perhaps a 4 line audio jack.


Oddities and observations:

- Jumper wires are not meant to be plugged into each other it seems. They would fit rather loose. To fix this issue, I used pliers to crimp the ends more.

- When done with the project, the candles were covered with cake and frosting. A detachable stem would have saved me a lot of cleaning time!


Happy Birthday, Arduino! Enjoy your 0.5V cake.