Fire Detection Alarm System Using Arduino and Flame Sensor


In this project, I will show you to make a Fire detection alarm system using Arduino.

It's can smartly sense the surroundings for the occurrence of fire with the help of a flame sensor module and a buzzer starts to sound an alarm.

Let's make it!

Components List

The following components are needed to make this fire detection alarm system.

  • Arduino Board (1 pcs)
  • Flame Sensor Module (1 pcs)
  • 5V Buzzer (1 pcs)
  • Breadboard
  • Jumper wires

Fire Detection Alarm System Circuit Diagram

Schematic of fire detection alarm system using flame sensor and arduino circuit shown below.

Module connection. Connect the module's digital output (D0) to pin D2 on the Arduino and connect the power line (+) and ground (G) to 5V and GND respectively.

Buzzer connection. Connect the 5V Buzzer's +Ve terminal to pin D3 on the Arduino board and the ground terminal to GND pin.

Circuit Working Explanation

The main component of this circuit is the Flame sensor.

Most of the flame sensors came with the YG1006 sensor which is a high speed and high sensitive NPN silicon phototransistor.

I used KY-026 module in this project.

It has both digital and analog outputs, however, digital output pins have been used here.

The sensor basically detects IR (Infra-Red) light wavelength between 760 nm – 1100 nm (nanometer) that is emitted from the fire flame.

IR sensors like all other photosensor work on the principle that a photon of sufficient energy can knock out electrons, so that the resistance of the circuit is changed.

It gives logic 1 as output if a flame is detected, otherwise, it gives logic 0 as output.

An Arduino board checks the logic level on the dgital D0 output pin of the sensor and activating the buzzer alarm.

Program/Source Code

The complete Arduino code for this project:

int buzzer = 3; // initializing pin 3 as the buzzer output pin
int flame_sensor = 2; // initializing pin 2 as the sensor output pin
int flame_detected; // state of sensor

void setup()
  Serial.begin(9600); // setting baud rate at 9600
  pinMode(buzzer, OUTPUT); // declaring buzzer pin as output pin
  pinMode(flame_sensor, INPUT); // declaring sensor pin as input pin for Arduino

void loop()
  flame_detected = digitalRead(flame_sensor); // reading from the sensor
  if (flame_detected == 1) // applying condition
    digitalWrite(buzzer, HIGH); // if state is high, then turn high the buzzer
    digitalWrite(buzzer, LOW); // otherwise turn it low

Fire Detection Alarm System - Demo & Testing

Check the demo Video below.

Now, you know how to do fire detection alarm system using Arduino and flame sensor, hope you enjoyed learning it, if you have any questions leave them in the comment section below.

No comments