Introduction: Interfacing Flame Sensor With Arduino

About: hIOTron is an IoT Based company that offers IoT Platforms, IoT Solutions, IoT Training.

In this project, we interface Flame Sensor with Arduino which helps to build Fire Alarm System.


Hardware Components

Arduino Uno

Flame Sensor

Connecting Wires


Software Components

Arduino IDE

Step 1: 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.

Step 2: Run a Program

int buzzer = 8;

int LED = 7;

int flame_sensor = 4;

int flame_detected;

void setup()



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);


digitalWrite(LED, LOW);


} else


Serial.println("No flame detected. stay cool");

digitalWrite(buzzer, LOW);

digitalWrite(LED, LOW);