How would you build a digital candle someone could actually blow out? My 11-year-old daughter and I tried to answer that one evening, just for the fun of it.
We looked online to see if there were ways to detect breezes without a set of spinning cups. We quickly learned about hot-wire wind detectors, which monitor a warm wire and detect tiny changes of voltage as air passes over it.
We bought it that night, and, quite honestly, it has been sitting in my bin of parts for months. (In the meantime we built a whole bunch of candles you extinguish by tipping over.)
So for this week’s #MakeEveryWeek, I gave the blow-out candle a try.
Step 1: Solder the Headers
Step 2: Wiring Things Up
Following the instructions in the wind sensor's Ardiuno code, I wired up the connections between the board and an Arduino Uno.
I started a blank sketch in my Arduino desktop program, copy-pasted in the device’s example code and sent it over to the board. I then opened the serial monitor (Tools -> Serial Monitor), and got a bunch of garbage data ... until I changed the baud rate to 57600. But then it worked!
Step 3: Candle Power
I still had a few candle-flicker LEDs around, which have a little chip inside that makes them flicker like a flame. I added that to my setup, and tweaked the code so that the light “blew out” when the sensor detected a breeze of more than 6 mph.
Last week, I couldn’t seem to make a pushbutton work correctly, so I faced my failure and again tried adding a button to my project — to turn the candle back on. This time, I persevered.
My Arduino code is here. It's really just the original wind-sensor example with LED and button code added.
And here’s how I wired it up:
Something to note is that the product page and the example code both say the sensor should have its own, regulated 5-volt power. Since detecting voltage changes is how the whole thing works, this makes it more stable and accurate to determine actual wind speeds. I just wanted to know if there was some amount of wind, not caring about accuracy, so I powered it right off the Arduino.
Here’s what I used:
- Modern Device Wind Sensor
- Arduino Uno
- USB cable for programming the Arudino
- Tiny breadboard
- Candle-flicker LED
- 10K-ohm resistor (I dig this resistor pack)
- Jumper wires
Oughta put this into something resembling an actual candle, right?
Actual candle image by Armen Vogel on Flickr