We first spoke to young maker, Aarav Garg, back in Issue 46 with his portable pocket weather station. This month, we present you with Aarav’s recent creation, an electronic candle with a difference. Instead of flicking a switch, this candle is activated using a real flame near the tip of the candle, just like turning on a real candle. The candle flickers, too.
Thanks for sharing your electronic candle with us, Aarav. Tell us more about it and how it works.
My candle has two parts. The first is ignited using a real flame and secondly, is a flickering candle.
The most important feature of my 3D printed artificial candle is that it does not switch on using a remote or a switch on the candle. Instead, it switches on and starts glowing when a real flame of a matchstick or lighter is brought close to the top tip of the candle. To achieve this, I just used a flame sensor at the top of the candle which has a very small form factor so as to be almost hidden from everyone.
The flame sensor senses any kind of flame brought near it and sends a signal to the Arduino Nano board inside the candle, which turns on the LEDs.
To make the candle have a flicker effect, I have used one red and two yellow LEDs. The LEDs turn on and off in a pattern one after another so as to create the whole flickering effect. The flickering feature was inspired by TheArduinoGuy from his flickering flame project
https://www.instructables.com/member/TheArduinoGuy/
How do you go about powering the candle?
I wanted the candle to be portable and look realistic by not having any wires attached to it. For this, I have added a small 3V coin cell with its required battery holder, to the project. I've also added a small slide switch at the bottom of the candle, to turn the whole circuit on and off. I plan to completely eliminate this switch in an upcoming version of this project where I plan to blow on the candle to turn it off. But, for my current build, the candle needs to be manually turned off.
Blowing out the candle would be a neat trick. If our readers want to build one for themselves, where can they get build details.
I have published my build on Instructables (https://www.instructables.com/Artificial-Candle-Ignited-by-Real-Flame/) and will share details with you below.
The Build:
You can follow the wiring diagram shown here to build the circuit very easily. There is also no need for soldering anything in this circuit.
Note: The IR sensor shown in the Fritzing represents the IR flame sensor. I did not get the exact flame sensor in the library of components and thus used this sensor instead for demonstration purposes. The pinout and wiring remain the same for the flame sensor.
Parts Required: | Jaycar | ||
---|---|---|---|
1 x Arduino Nano or compatible board | XC4414 | ||
1 x Flame/Fire Sensor% | - | ||
2 x Yellow LEDs* | ZD0160 | ||
1 x Red LED* | ZD0150 | ||
1 x CR2032 Battery* | SB2522 | ||
1 x Coin Cell Battery Holder^ | KM1060 | ||
1 x Mini Toggle Switch^ | SS0812 |
* Quantity required, may only be sold in packs. ^ May be different size to what was used in Aarav's project. Modification to 3D print may be required.
% Not the same as Aarav used in project. Modifications to code will likely be required. Note: Aarav's components were sourced via quartzcomponents.com
I have not added the battery to the circuit as that is pretty obvious and you can go about adding it yourself quite easily. Also, the switch must be added in between the Arduino and the battery.
3D Prints
The print files are available to download from my Instructables page or from the DIYODE website. I made the model using Tinkercad (https://www.tinkercad.com/things/4iuOdy6Wpmp), which you can remix if you have a different design in mind.
There are four main parts to make the candle: Main Cylinder, Bottom Piece, Top Piece & Flame Cover.
Main Cylinder
The main cylinder is a hollow cylinder that will also act as a housing for the electronic components of the candle, alongside acting as the body of the candle.
Top and bottom pieces
The top and bottom pieces are designed to be snap-fit on the top and bottom of the main cylinder. The bottom piece has a small rectangular opening for the USB port of the Arduino Nano board. The top piece has four small holes in it; three for the LEDs, and one for the flame sensor's IR receiver diode.
Flame cover
The flame cover will act as a small cap on all of the three LEDs so that their glow looks merged together to get a better-looking diffused glow. The flame cover will be 3D printed in white and will have very thin walls so as to be translucent and amplify the glow tremendously, giving an aesthetic effect to the candle.
Assembly
Top piece
There are three holes for the three LEDs on the top piece of the candle. The LEDs need to be inserted into these holes (in no particular order). There is also a hole for the flame sensor's IR diode. The diode can be half inserted in the hole and then fixed on the backside using some glue, hot glue, or similar.
The wires from the LEDs and the flame sensor can be connected to the Arduino Nano board now and doing this will complete the circuit for us.
Insert the Arduino board, along with the whole circuitry and wires into the body of the candle. Now you can snap-fit the top piece onto the candle's main cylinder.
Bottom piece
The bottom piece has a small rectangular opening to accommodate the small slider of our mini DPDT switch, which manages the power between the battery and the Arduino Nano board.
Insert the slider of the switch from the inside of the bottom piece, aligning it such that the switch’s actuator can properly be moved from the outside.
Make sure to fix the switch perfectly in place from the inside using plenty of hot glue (or any other method) so that the switch doesn't detach and start moving when you slide it from the outside.
Flame Cover
Add the flame cover on the top of our three LEDs.
Note: You could design a flame cover that is in the shape of a flame for an even more realistic look.
Programming the Nano
Program your Nano board using the code that is available to download from my Instructables page or the digital resources for this article.
Operation
With the Nano programmed, you can turn the candle circuit on using the slide switch, and then using a match, lighter or similar to activate the flickering LEDs.
Troubleshooting
If the LEDs don’t start glowing, check all of your wiring to make sure it matches the wiring diagram. Also, double check that you have wired the LEDs the correct way. I.e. the shorter leg is the negative.
To test the flame sensor, the small green LED on the board should illuminate when you bring a flame near the sensor.