How to use Flame Sensor with Arduino Board

Share on Social Media

Hello everyone! I hope you all will be absolutely fine and safe by Covid-19. Today, I am going to provide a detailed discussion on Flame Sensor Arduino Interfacing. The flame sensor is an electronic device that is capable of sensing/detection of fire or a high-temperature zone. It gives an indication through an LED attached at its top, just after sensing the fire. These types of sensors are usually used for short ranges. They are able to detect the fire up to 3 feet. The flame sensor is the most common device available in the market these days due to its good results and cost-efficiency.

flame-sensor-for-arduinoFlame sensors are available in the market in two types one having three pins and the other having four pins respectively. Both of the sensors can be easily interfaced to any micro-controller. I am using four pin flame sensor in this tutorial. You will see the complete wiring diagram for the interfacing flame sensor with Arduino and the complete Arduino source code and its description as well. Flame sensor can detect fire or any other light sources whose wavelength is in the range of 760nm to 1100nm. This device consists of and IR sensor, an LED for indication, an operational amplifier circuit, and a potentiometer. The device is sensitive to flame so when it detects the flame it turns on its LED to show an indication. The sensitivity of the flame sensor can be adjusted according to the requirements. It can be used at different places e.g. in offices, home, institutions, industrial applications.

Connection with Arduino-

flame-sensor-with-Arduino

Code:-

// lowest and highest sensor readings:
const int sensorMin = 0; // sensor minimum
const int sensorMax = 1024; // sensor maximum

void setup() {
// initialize serial communication @ 9600 baud:
Serial.begin(9600);
}
void loop() {
// read the sensor on analog A0:
int sensorReading = analogRead(A0);
// map the sensor range (four options):
// ex: ‘long int map(long int, long int, long int, long int, long int)’
int range = map(sensorReading, sensorMin, sensorMax, 0, 3);

// range value:
switch (range) {
case 0: // A fire closer than 1.5 feet away.
Serial.println(“** Close Fire **”);
break;
case 1: // A fire between 1-3 feet away.
Serial.println(“** Distant Fire **”);
break;
case 2: // No fire detected.
Serial.println(“No Fire”);
break;
}
delay(1); // delay between reads
}


Share on Social Media

Leave a Reply

Your email address will not be published. Required fields are marked *