Home Top Ad

Fire Detection Alarm System using Arduino, Flame Sensor, Buzzer


In this project, I will show you how to make a Fire detection alarm system using Arduino for Home & Office. It can smartly detect its surroundings for the presence of a fire using a flame sensor module, and a buzzer starts sounding an alarm.

Let's make it!

Components for Fire Detection Alarm System

The following components are required to make this safety system:

Name Value Qty.
Flame Sensor KY-026 Module 1
Active Buzzer KY-006 Module 1
Arduino Nano/Uno 1
Breadboard Any 1
Jumper Wire Male to Male 1
Power Supply DC 5V 1

Interfacing Flame Sensor with Arduino and Buzzer

The connection diagram of the flame sensor with an Arduino and a buzzer for the fire detection alarm system is shown below.

Before interfacing it, you need to understand the pinouts of the Flame Sensor module and the Active Buzzer module.

IR flame sensor module pinout Active buzzer module pinout
The sensor module has 4 male header pins those are —
  1. Pin (A0): Analog Signal
  2. Pin (G): GND
  3. Pin (+): DC 5V
  4. Pin (D0): Digital Signal
The buzzer module has 3 male header pins those are —
  1. Pin (S): Analog Signal
  2. Pin (middle):NC
  3. Pin (GND): Ground

After arranging all the required components, make the following pin connections on the breadboard using jumper wires.

KY-026 Module KY-006 Module Arduino
D0 Pin D2
+ Pin 5V
S Pin D3

Here is the Arduino programming code to detect the fire. I uploaded the sketch in my Arduino board through the Arduino IDE software.

int flame_sensor = 2; // initializing pin 2 as the sensor output pin
int buzzer = 3; // initializing pin 3 as the buzzer 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

Testing & Demo: Fire Detection Alarm System

Watch the DEMO Video!

I powered the fire detection alarm system using a 5V USB power supply and brought a match flame near the sensor for testing. The system detected the flame immediately and started sounding the alarm. You can adjust its sensitivity by turning the potentiometer on top of the sensor module clockwise.

No comments

If you have any doubts or questions, please let me know. Don't add links as it goes to spam. Share your valuable feedback. Thanks