Your Cart

All orders from Nov 27-30 will be dispatched on Friday. We apologize for any inconvenience. Thank you for your understanding.

Fire Alarm Using Arduino

Fire Alarm Using Arduino

Fire Alarm Using Arduino


Hey folks, fire alarm is the most common and searched project.

Many people asked for it, that’s why we are making this tutorial with all  details such as code, circuit and construction steps. A fire alarm is simply a system which detects smoke from fire and activates a sound alarm and can be used anywhere like homes, offices, schools, lifts, etc. So, let’s get started with the project.




A fire alarm is an alarm which makes sounds whenever it finds the fire in the surrounding area. We use a sensor called flame sensor there and also sometimes we use a smoke sensor to detect the fire. Both sensors work well depending on your uses only which sensor you want to use. Flame sensor is an IR sensor which detects the flame using the IR heat of fire. But it doesn’t have a high distance range. But the smoke sensor can sense the smoke from a required distance. For this reason we always prefer the smoke sensor into  the fire alarm.


Smoke sensors are from the MQ series sensor which have some element inside it and get activated when it comes in contact with smoke. When it comes in contact with the smoke then the coil element activates and increases the conductivity of the coil which results in the change in values. Which triggers the buzzer used in the alarm. And when the smoke will decrease the alarm will turn off.



Components Used:-


Arduino Uno R3

MQ 2 smoke sensor


Zero PCB



16×2 LCD





Make all the connections according to the given circuit diagram. The construction of this project is very simple. Only you have to attach all the things over the zero PCB with the help of glue gun and soldering iron. Use the similar components which we have mentioned.




The working of this project is very simple. There is a smoke sensor from the MQ series. Inside the sensor there is a smoke reactive element which reacts when it comes in contact with the smoke. The element is in the form of a conductor and attached between two wires. From these two wires we got some integer value. Which changes continuously, and this directly depends on the conductivity of the element. When the smoke is detected, the conductivity of the element will increase and this results in a change in integer value.



So, we get this value at the Arduino end and make a threshold value there to start the alarm. Such as if the integer value crosses the threshold value the alarm will start and it will not stop until it gets the integer value less than the threshold value. We have attached a red LED and buzzer with the Alarm. And green LED when the alarm is stopped. All the things we will display in the 16X2 LCD.




#include <LiquidCrystal.h>


LiquidCrystal lcd(7, 6, 5, 4, 3, 2);



int redLed = 10;


int greenLed = 12;


int buzzer = 8;


int smokeA0 = A0;


// Your threshold value


int sensorThres = 100;




void setup() {


pinMode(redLed, OUTPUT);


pinMode(buzzer, OUTPUT);


pinMode(smokeA0, INPUT);










void loop() {


int analogSensor = analogRead(smokeA0);




Serial.print(“Pin A0: “);




lcd.print(“Smoke Level:”);




// Checks if it has reached the threshold value


if (analogSensor-50 > sensorThres)




digitalWrite(redLed, HIGH);


lcd.setCursor(0, 2);




digitalWrite(12, LOW);


tone(buzzer, 1000, 200);








digitalWrite(redLed, LOW);


digitalWrite(12, HIGH);


lcd.setCursor(0, 2);















So, there we have shared all the required steps and content which will help you to make this awesome mini project.