Quick and simple start guide for using and exploring the Flame Sensor module with an Arduino.
The model in the example is a single sensor module from my store, you can find it at Cipher Computer and Robotics.
- Flame Sensor (model with an analog out)
- Male to Female jumper wires
- An Arduino, any flavor.
- Lighter or another flame source for testing.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Getting to Know Your Flame Sensor:
These types of sensors are used for short range fire detection and can be used to monitor projects or as a safety precaution to cut devices off / on.
I have found this unit is mostly accurate up to about 3 feet.
How it works:
The flame sensor is very sensitive to IR wavelength at 760 nm ~ 1100 nm light.
Analog output (A0): Real-time output voltage signal on the thermal resistance.
Digital output (D0): When the temperature reaches a certain threshold, the output high and low signal threshold adjustable via potentiometer.
VCC...... Positive voltage input: 5v for analog 3.3v for Digital.
A0.......... Analog output
D0......... Digital output
1.18 in x 0.59 in x 0.20 in (3.0 cm x 1.5 cm x 0.5 cm)
0.28 oz (8 g)
Step 2: Testing and Troubleshooting:
To test the Flame Sensor and ensure that it is working correctly connect the VCC to a 5v power source and GND. Move a flame source with in a foot of the front of the Ir sensor and the D0-LED should light up.
If the D0-LED does not light up check the following:
- Is the power source 5v?
- Is the ground hooked up?
- Is the flame with in 1 foot and in Line of Sight?
If none of the previous makes the D0-LED light up, your sensor may be defective.
Step 3: Wiring to an Arduino:
To wire the Flame Sensor to the Arduino simply connect the following as shown:
Flame sensor ............... Arduino
A0.................................. Analog in 0
Step 4: Arduino Sketch Example:
The following code maps and reads the analog values given by the flame sensor (0-1024). The stock flame sensor will have the following reaction with this code:
- If holding a flame within 1.5 feet in front of the sensor; "case 0" will be activated and " ** Close Fire ** " will be sent to the serial monitor.
- If holding a flame between 1.5 feet and 3 feet in front of the sensor; "case 1" will be activated and " **Distant Fire** " will be sent to the serial monitor.
- If no flame is detected in front of the sensor; "case 2" will be activated and " No Fire " will be sent to the serial monitor.
* To view the output, point a serial monitor such as Putty at your Arduino.
* This code is constantly updating in order to provide a real time feedback of the flame sensor.
- Attached due to formatting.