Interfacing Flame Sensor With Arduino
by hIOTron IoT in Circuits > Arduino
908 Views, 0 Favorites, 0 Comments
Interfacing Flame Sensor With Arduino
In this project, we interface Flame Sensor with Arduino which helps to build Fire Alarm System.
Supplies
Hardware Components
Arduino Uno
Flame Sensor
Connecting Wires
Buzzer/LED
Software Components
Arduino IDE
Working of the Project
Flame Sensor
A flame detector is a sensor outlined to identify and answer to the presence of a flame or fire. Responses to a recognized flame depend on the installation but can combine sounding an alarm, deactivating a fuel line and activating a fire suppression system.
In this project, we are using an IR based flame sensor. It can identify infrared light with a wavelength ranging from 700nm to 1000nm and its exposure angle is about 60°.
A flame sensor module includes a photodiode (IR receiver), resistor, capacitor, potentiometer and LM393 comparator in an integrated circuit.
Know more about IoT Training and Industrial IoT Solutions
Working of Flame Sensor with Arduino
Arduino Uno is an open-source microcontroller board that depends on an ATmega328p microcontroller. The flame sensor recognizes the presence of fire or flame based on the Infrared (IR) wavelength released by the flame. It gives logic 1 as output if the flame is identified, otherwise, it gives logic 0 as output. Arduino Uno controls the logic level on the output pin of the sensor and offers additional tasks such as activating the buzzer and LED, sending an alert notification.
Run a Program
int buzzer = 8;
int LED = 7;
int flame_sensor = 4;
int flame_detected;
void setup()
{
Serial.begin(9600);
pinMode(buzzer, OUTPUT);
pinMode(LED, OUTPUT);
pinMode(flame_sensor, INPUT);
}
void loop()
{
flame_detected = digitalRead(flame_sensor);
if (flame_detected == 1)
{
Serial.println("Flame detected...! take action immediately.");
digitalWrite(buzzer, HIGH);
digitalWrite(LED, HIGH);
delay(200);
digitalWrite(LED, LOW);
delay(200);
} else
{
Serial.println("No flame detected. stay cool");
digitalWrite(buzzer, LOW);
digitalWrite(LED, LOW);
}
delay(1000);
}