Artificial Candle Ignited by Real Flame

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

instructables

Artificial Candle Ignited by Real Flame

by Aarav G

Hello again, everyone. In this Instructable, you will see something really cool and exciting and you might not have seen
such a thing yet on the internet. We will design and make a 3D printed arti cial candle. But the interesting part of our
project is that it will not be ignited using some switch but it will be ignited using the ame of a real matchstick or
lighter, just like an ordinary candle.

When we bring a ame from a matchstick or lighter near the top tip of our arti cial candle, the LED bulbs present at the
top of the arti cial candle will magically light up. There's also another interesting element in our project. This is going to
one no ordinary arti cial candle but it will be an arti cial candle that ickers too!

Sounds interesting? Let's dive in further to know how we will go about doing all of this!

Subscribe to Tech Nuttiez for more updates!

Supplies:

The stu you will need for this project:

Components:

Arduino Nano
Flame Sensor
2 x Yellow LEDs
1 x Red LED
CR2032 Coin Cell 3V
Coin Cell Holder
Toggle Mini Switch

My choice for all components: Quartz Components

Tools (Optional):

Soldering Iron
Hot Glue Gun
3D Printer / 3D Printing Service (My Choice: IAmRapid)

After gathering all the required things, move ahead to the next step!

Artificial Candle Ignited by Real Flame: Page 1


https://youtu.be/5qrh6lMMS8Q

Step 1: Concept + Features

There are two main features in our arti cial candle that one and they are going to be in yellow (2) and red (1).
set it apart from any other arti cial candle out there: The LEDs will glow and go o in a pattern one after
another so as to create the whole ickering e ect that
1.1 Ignited Using Real Flame: we are talking about. The ickering feature was inspired
by TheArduinoGuy from this Instructable!
The most important feature of this 3D printed arti cial
candle is that it does not switch on using a remote or a These features will make our arti cial candle look almost
switch on the candle. But, it switches on and starts real in all ways.
glowing when a real ame of a matchstick, lighter etc. is
brought closer to the top tip of the candle. The trick here Replaceable Battery
is really simple. We just have a ame sensor at the top of
the candle which is present in a very minimalistic form As we are making a candle that needs to keep moving
factor so as to be almost hidden from everyone. from one place to another in our house. And also, it is
not a great idea to always have a wire connected to a
This ame sensor senses any kind of ame brought near candle, especially when we are trying our best to make it
it and gives a signal to the Arduino Nano board inside realistic. For this, I have added a small 3V coin cell with its
the candle to turn on the LEDs of the candle and in this required battery holder, to the project. I've also added a
way it starts glowing after being triggered by a real small slide switch at the bottom of the candle, to help us
ame. turn the whole circuit on and o . We can probably
completely eliminate this switch in the upcoming
1.2 Flickering Candle versions of this project where we might blow on the
candle to turn it o . But, in this version, the candle will
This is a feature that you might have seen in a few have to be manually turned o .
arti cial candles, unlike the previous feature. For this to
happen we are going to be using 3 LEDs instead of just

Artificial Candle Ignited by Real Flame: Page 2


Step 2: Circuit Diagram / Wiring

The circuit diagram and wiring of this project are very simple because it has a very less number of components. The
major components involved in the wiring are:

Arduino Nano Board


IR Flame Sensor
Three LEDs

Note: The IR sensor used in the above circuit diagram represents the IR ame sensor. I did not get the exact ame sensor in the
library of components and thus used this sensor instead for demonstration purposes. The pinout and wiring remain the same
for the ame sensor.

You can follow the circuit diagram present above to build the circuit very easily. There is also no need of soldering
anything in this circuit and you can get your way out even without a soldering iron.

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.

After completing the circuit move ahead onto the next step!

Artificial Candle Ignited by Real Flame: Page 3


Step 3: 3D Design (Tinkercad)

https://www.tinkercad.com/embed/4iuOdy6Wpmp?editbtn=1

Now, we need to design the body of our candle for it to be 3D printed. I designed the candle in Tinkercad.

3.1 The Design

There are four parts in the body of our candle:

Main Cylinder
Bottom Piece
Top Piece
Flame Cover

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.

The top and bottom pieces are designed to be snap- t 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, one for the ame sensor's IR receiver diode.

The ame 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 di used glow. The ame 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 e ect to the candle.

3.2 3D Printing the Candle

Now that we are done with the design, we can go on and 3D print our design. You can use any 3D printer for the same. If
you do not have one, you can get it 3D printed from a 3D printing service. I got the parts of my candle printed from
IAmRapid. They have an amazing service and fabulous product quality and delivered the parts to me within two days (in
Artificial Candle Ignited by Real Flame: Page 4
India).

After you have all the 3D printed parts with you, you can move on to assembling everything!

Artificial Candle Ignited by Real Flame: Page 5


Step 4: Working With the Top Piece

We have the circuit diagram. We also have the 3D The wires from the LEDs and the ame sensor can be
printed parts for the candle by now. Now, we need to connected to the Arduino Nano board now and doing
put together everything so that the candle works. this will complete the circuit for us. Now just insert the
Arduino board along with the whole circuitry and wires
There are three holes for the three LEDs on the top piece into the body of the candle. Now you can snap- t the
of the candle. The LEDs need to be inserted into these top piece onto the candle's main cylinder.
holes (in no particular order). There is also a hole for the
ame sensor's IR diode. The diode can be half inserted in After completing the assembly of the top piece, move on to
the hole and then xed on the backside using some glue the next step!
or anything suitable.

Artificial Candle Ignited by Real Flame: Page 6


Step 5: The Bottom Piece Now

Now, we come over to the bottom piece. The bottom Make sure to x the slider switch perfectly in place from
piece has a small rectangular opening to accommodate the inside using tons of hot glue (or any other method)
the small slider of our mini DPDT switch that enables the so that the switch doesn't get detached and start
electricity ow from the battery to the Arduino Nano moving when we slide it from the outside. There will be
board. a little pressure on the switch that it needs to bear to
stay alive.
I did not use a huge rocker switch but went for this as
this saved space and was easier to work with. You can After completing the assembly of the bottom piece, move
now insert the slider of the switch from the inside of the on to the next step!
bottom piece, aligning it such that the slider can
properly be moved from the outside.

Artificial Candle Ignited by Real Flame: Page 7


Step 6: Finishing Assembly - Flame Cover

Now, we are almost done with the assembly of our Without the ame cover, the LEDs would look rough and
candle. We are done with the top and bottom pieces. would not be able to give a smooth and merged look
Now we can go ahead and add the ame cover on the that a real candle has and the one which we want.
top of our three LEDs so that when they glow, this cover
causes a di used and mixed glow e ect along with a After completing the assembly move on to the next step!
ickering candle e ect.

Artificial Candle Ignited by Real Flame: Page 8


Step 7: Coding Showdown

Now, we are done with the assembly of our arti cial candle. We just need to make our candle functional. For that, we
obviously need to write code and ash it to the Arduino Nano board present inside our candle. You can write the code for
this project very easily by yourself, or use the code given by me here:

////////////////////////////////////////////////////////
// Realistic Artificial Candle //
// By Aarav Garg - Tech Nuttiez //
////////////////////////////////////////////////////////

#define flamePin A7
#define ledPin1 A0
#define ledPin2 A2
#define ledPin3 A5

int state = 0;

void setup() {
// put your setup code here, to run once:
pinMode(flamePin, INPUT);
pinMode(ledPin1, OUTPUT);
pinMode(ledPin2, OUTPUT);
pinMode(ledPin3, OUTPUT);
Serial.begin(9600);
state = 0;

void loop() {
// put your main code here, to run repeatedly:
Serial.println(analogRead(flamePin));
if (analogRead(flamePin) < 500){
state = 1;
}
if (state == 1){
analogWrite(ledPin1, random(50)+125);
analogWrite(ledPin2, random(50)+115);
analogWrite(ledPin3, random(50)+135);
delay(random(100));
}

Artificial Candle Ignited by Real Flame: Page 9


Step 8: And Here We Go!

Here we have our working realistic arti cial candle that any other shaped lamp or light as well. You can also use
does not turn on by pressing a switch or using a remote, di erent coloured LEDs other than the ones which I used
but it turns on and starts glowing when the ame of a according to your need or wish.
real matchstick or a lighter is brought near the top tip of
this candle. You can use it as a decorative item in your I enjoyed making this a lot as this was a great design
house and show o the lighting feature to guests challenge as well as a very interesting concept to work
on!
You can also use the same ame sensor to almost light

Step 9: Troubleshooting

If you are here, then I assume that you have built the project and it either worked which is great or it didn't which is also
great because you not only will know how you build something but also how you do not build it and this kind of learning
is very useful.

9.1 It Did Not Work :

9.1.1 Parts Not Snap-Fitting: In this case, there was a slight error in the 3D print, very minor though. For
this, you can just sand the edges of both the pieces and try to t them again and repeat this till it works.
9.1.2 All LEDs Not Glowing: In this scenario, the issue is mostly going to be with the Flame Sensor. Try
checking if the small green LED on the ame sensor is responding to ame or not. If the ame sensor is
OK, then either all of your LEDs are fused or there is an issue with the code.
9.1.3 Some LEDs Not Glowing: If there is this issue, then that's mostly with the LED and this means that
the LED that is not working is most probably fused. In the worst case, there can even be an issue with the

Artificial Candle Ignited by Real Flame: Page 10


coding part of some LEDs in particular.

9.2 It Worked :

Great job mate. You overcome all the obstacles and nally are here, touching victory yourself and that is amazing. There is
also a section down here "I Made It". Meet me there.

Step 10: What Lies Ahead!

This was a really fun project to work on and I wish to add This feature will take a lot of e ort I think but is still
on features to this while keeping everything still possible to be implemented. Stay tuned to get all these
minimal in form factor. A very interesting feature can updates. Subscribe to Tech Nuttiez for more updates!
be added to this project in the future and that is the
candle getting extinguished or turning o when we Thank You :)
blow at the top tip of the candle.

Using real flame is such a neat idea! This is great :D

Thank you so much

Artificial Candle Ignited by Real Flame: Page 11

You might also like