An LED You Can Blow Out Like a Candle!




About: Currently, I'm at a startup trying to change the world. In previous lives, I was an EE Prof., an Imagineer at Disney, and, according to Jay Leno, "a Japanese scientist" (I'm not Japanese, or a scientist). In...

Intro: An LED You Can Blow Out Like a Candle!

LEDs are designed to emit light, but they also make surprisingly capable sensors. Using only an Arduino UNO, an LED and a resistor, we will build a hot LED anemometer that measures wind speed, and turns off the LED for 2 seconds when it detects you are blowing on it. You can use this to make breath controlled interfaces, or even an electronic candle that you can blow out!


An Arduino UNO (with USB cable to connect to your computer)

A 1/4W 220 ohm resistor (

A pre-wired, 0402 yellow LED (

Breakaway header (

You will also need:

A computer to run the Arduino environment

Basic soldering equipment/skills

Step 1: How Does This Work?

When you run current through an LED, its temperature rises. The amount of rise depends on how effectively you are cooling it. When you blow on a hot LED, the extra cooling lowers the running temperature. We can detect this because the forward voltage drop of an LED increases as it gets cooler.

The circuit is very simple and looks much like driving an LED. The only difference is that we will add an extra wire to measure the voltage drop of the LED while it is on. To work well, you want to use a very small LED (I suggest using an 0402 surface mount LED) connected by the thinnest possible wires. This will allow the LED to heat and cool very quickly, and minimize the heat lost through the wires. The voltage changes we are looking for are just millivolts - at the very edge of what can be reliably detected via the UNOs analog pins. If the LED is resting on something that conducts heat away, it may not be able to get hot enough, so it works best if it is up in the air.

Step 2: Get the LED and Resistor Ready to Connect to Your Arduino UNO

Soldering extremely thin wires to very small surface mount LEDs takes a fair amount of skill. Fortunately, you can simply buy pre-wired, 0402 LEDs. These often come with a resistor (covered in heat shrink in the picture) that is sized for 12V operation. If that's what you get, you will need to cut off the resistor. If you cut through the heat shrink tubing next to the resistor bulge, you'll probably be able to pull off the remaining tubing leaving some exposed wire lead for soldering. If you just cut the wire, you will need to strip off a small amount of insulation so that you can solder, and given the thickness of the wire, this can be tricky.

The wires are much too skinny to make a good connection in an Arduino header, so we will need to solder them to something fatter. I used pins from a breakaway header to do the connections, but you can use just about any scrap of appropriate gauge wire. The back (cathode) wire from the LED is soldered to a single breakaway header pin. The red (anode) wire should be soldered to the bent resistor as shown. Trim the leads on the resistor to equal length and solder them to two adjacent header pins as shown in the figure.

Step 3: Connections

Connect the LED/resistor as shown in the figures. The side of the resistor connected to the red LED wire goes to A0. This will be where we measure the voltage on the LED using the analog input capability. The other side of the resistor goes to A1, which we will use as a digital output, setting it high to turn on the LED. The black wire must be connected to GND. Any of the Arduino GND pins can be used.

Step 4: Code

Download the code and open it in the Arduino IDE. You can then upload it to your Arduino.

The program first sets up the pin directions and lights the LED. It then measures the forward voltage drop of the LED via an analogRead on pin A0. To improve the accuracy of the measurement, we read the voltage 256 times in quick succession, and sum the result. (Oversampling like this can increase the effective resolution of the conversion so that we can see changes that are smaller than the smallest step on the converter.) If the data buffer sensedata[] is full, we compare the latest sum to the oldest we have stored in the buffer to see if a recent cooling has raised the LED voltage by at least MINJUMP. If it hasn't, we store sum in the buffer, update the buffer pointer, and start the next measurement. If it has, we turn off the LED for 2 seconds, reset the buffer and then start the process over again.

To better understand what's going on, we write the each sum out as serial data, and use the Arduino IDE's Serial Plotter (under the Tools menu) to graph the LED voltage as it changes over time. Remember to set the baud rate to 250000 to match the program. You will then be able to see how the voltage falls as the LED warms up after turn on. This will also show just how sensitive the system is. After the LED is triggered off, it will have cooled off somewhat by the time it turns back on, which you will see as a jump on the graph.

Step 5: Enjoy!

When the code is running, you should be able to blow out your LED with a quick puff of air. I have found that I can blow out my LED from over 1 meter away! In some rooms, air currents may cause false triggers. If this is a problem, you can lower the sensitivity of your system by increasing MINJUMP. The Serial Plotter can help you visualize what a proper value might be for your application.

You can replace the LED with one of a different color. White LEDs work particularly well. Because they have a higher voltage drop, you will need to change the resistance value to get the right current. Given the drive capability of the UNO, shoot for a current in the 10-15mA range. For a white LED, 100 ohms is a good starting point.

Because an UNO has 6 analog input pins, you can easily modify this code to support 6 independent, hot LED anemometers! This makes it possible to build simple interfaces that can recognize when you are blowing in different directions. This can be incredibly useful when building interfaces for the disabled, expressive controllers for musicians, or even for birthday cakes with many electronic candles!

Finally, if you ended up using this technique to do something cool, please leave a comment below!



  • Furniture Contest 2018

    Furniture Contest 2018
  • Audio Contest 2018

    Audio Contest 2018
  • Fix It! Contest

    Fix It! Contest

56 Discussions


Answer 7 days ago

Yes, I think it should work just fine. Apparently, the Due, Zero and MKR family Arduinos have 12 bit ADCs rather than 10, so you may not need to do any averaging with those...


Answer 1 day ago

I was successful with the arduino uno .. I then tried the pro mini and it is too "noisy" for me to detect when I blow on the led .. I soldered the led directly to the pins that did not help .. It is a great project .. I wish I knew how to damp down the "noise" on the pro mini. I even tried a plastic straw over the exposed led wires but that had no effect...


Reply 1 day ago

The noise might be coming from your power supply. Try using a cleaner supply (like a battery), and see if that helps...


Reply 1 day ago

Thanks so much for getting back to me! I tried the battery but that did not change anything...I’m going to attach a few photos that show my setup. I used the exact led you said to and I am using a 200 ohm resistor rather than 220 but it works on the adruino uno. I pulled the a0 and a1 pins and soldered the resistor directly to the unit. I program the pro mini with an inland ftdi usb connected to a Raspberry pi mod 3 using a raspberry pi power adapter 2.5 amps. The power should be good. The programming part is flawless..loads every time. With a minjump of 150 it basically blinks every 2 seconds. 250 did not help. A real stumper..


Reply 22 hours ago

A few things to check come to mind. First, do you have the 3.3V or 5V version of the Pro Mini? If you have the 3.3V one, you will need to use a smaller resistor to get the requisite current. The 3.3V version is also slower, so you may need to change some of the timing. It looks like your LED is touching the table, which could steal heat away. You can always make MINJUMP so large that it never triggers. Then you can watch the plot to see exactly what's going on without the switching confusing things. Since you have a working UNO version, I'd compare the plots from the two versions. That might give you a better idea what's going on. Finally, I'd double check the resistor value to make sure it's 200 ohms and not 2k. (I couldn't tell from the pic)

Good luck!


Reply 15 hours ago

Will purchase 220 resistors..misread the meter. So instead of 15.9 mA getting 1.75 mA and maybe that was my issue too low to measure? However, the other unit worked with the 2k resistor..This unit is a 5 volt setup. I will get another uno next week to run a check on the plot like you suggest..Thanks least I have some different things to try..

Great project ..and learning how to read resistors and use a meter!


13 days ago

Very cool! Pity you can't just use the built-in pullup for an even lower part-count :-D

pinMode(A0, INPUT_PULLUP); // set pull-up on analog pin 0


13 days ago

Seems like a very cool idea but I can't manage to get it work properly on a breadboard. The values jumped from the serial monitor had fluctuated between 110000-120000 even when there was absolutely no air flow. Both increasing and decreasing the sensitivity didn't work. I highly doubt that the problem is because of the interference caused by the breadboard tracks. Gonna try and make a soldered one tomorrow since I'm too lazy to heat up the iron today :D

Implementing this with a self-flickering or maybe put in some random flickering in arduino code to make It look and feel like a led candle that you can blow. That is very interesting but I think the flickering led effect may also cause some unstable tempratures. I will edit the comment If I every try something like that :D

1 reply

You might see that amount of change as the LED goes from cold start to warm. It depends on your LED and resistor value. However, if you just have the LED on, the curve should be pretty smooth in still air. I'd suggest setting MINJUMP to something very large so the LED never goes out, and then just look at the plot to see what's happening. If you are still seeing a lot of noise, my next suspect would be a noisy power supply. If you are on a laptop, try running from battery and see if it makes a difference.

LukášB59Darwin Energy

Answer 18 days ago

I soldered smd led to some thin wire by my hands. (It's tricky but not impossible) It works, but sensing is not accurate. Sometimes I have to blow several times. I think its due to reatively huge amount of tin on SMD LED part.

tm3Darwin Energy

Answer 4 weeks ago

Which end? The header end, use a soldering iron. The LED end, they came like that (prewired).

Darwin Energytm3

Reply 4 weeks ago

I see, I thought I need to solder the smd 0402 led by hand xD


20 days ago

reminds me of the B.L.O lamp from FLOS, designed by Marcel Wanders. You blow on the lamp to turn it off and on. I think it uses the sound, rather than temp.

Antzy Carmasaic

26 days ago

Great idea. Imagine the reverse. An LED that lights up when hit with wind. Then making lots of LED-Throwies with the circuit and putting them in trees. When the wind blows, the LEDs twinkle in the forest path.

1 reply

Unfortunately, that's harder to do because to make the measurement you need to turn on the LED so it can get warm allowing the wind to cool it down...