Fire Detection And Notification Alarm using Arduino

In this blog, we will implement a smart alarm solution that will send us notifications over SMS and calls in case of a fire outbreak.


Components Required and their Information:

Flame Sensor Module:


This module basically comprises a comparator IC with a phototransistor that will output a digital low signal whenever it detects IR radiation due to nearby fire. It outputs a digital high signal otherwise. There is a potentiometer to adjust the sensitivity of the sensor.

GSM SIM800C Modem Shield with Antenna:


This one small modem can help use the GSM network of a SIM card. It can be used to make text messages and calls. It can also provide the user with the GPS location. Its low form factor and comparatively lower power requirements make it a good option for this project.

5V passive buzzer


This sensor will automatically start buzzing as soon as 5V is supplied to its +ve Lead.

5mm LED


Both the LEDs can directly be connected to 5V without the need for a resistor thus making the circuit easier to build.

Working Principle:

  1. The Flame Sensor which consists of a phototransistor will conduct some amount of current when infrared rays from a Fire source is incident on the sensor.
  2. This, in turn, will cause the sensor to output a digital high signal.
  3. Our Arduino will be continuously listening to the output of the module and as soon as detect its status as high,
  4. We will send a request to the GSM SIM800C to send a text message and a call to the predefined number.
  5. And Bam! You just received the Alert.

The circuit diagram and explanation:

circuit diagram of fire detection and Arduino
  1. First Connect the Cathode (+ve) of the 5mm Red LED to digital pin 9 (D9) on Arduino.
  2. Similarly, connect the Cathode (+ve) of the 5mm Green LED to digital pin 8 (D8) on Arduino.
  3. Now, connect the Anode (-ve) of both the LED’s to the Ground pin on Arduino.
  4. Then connect the +ve of Buzzer to digital pin 5 (D5) on Arduino.
  5. Next, connect the D0 pin on the Flame Sensor Module to digital pin 5 (D5) on Arduino.
  6. Connect the VCC and GND on the Flame Sensor Module to the 5V pin and the Ground pin on Arduino respectively.
  7. Now, connect the TX and RX of SIM800C to the RX (D0) and TX (D1) of Arduino respectively.
  8. Finally, give the SIM800C power supply using a 9V battery or a 12V Power Supply. Also, ensure that all systems are having common ground by connecting the ground on SIM800C to Ground Pin on Arduino.
  9. This completes our connection.



 * Flame detection and notification system

 * Code developed by Jatin Vira



#define redled 9       //This will define "redled" as number 9 whenever it occurs again in code

#define greenled 8     //This will define "greenled" as number 8 whenever it occurs again in code

#define BuzzerPin 7    //This will define "BuzzerPin" as number 7 whenever it occurs again in code

#define FlamePin 5     //This will define "FlamePin" as number 5 whenever it occurs again in code


boolean Flame_Sensor_Value = HIGH;    //This variable will store the value of Flame Sensor


void setup()  //This will run only once and at the start of the program


  /*By using pinMode function we will declare state 

   * of each pin as Output/Input depending on their nature

   * We use OUTPUT when we have to define the output state of the pin (0/5V)

   * We use Input when we have to read


  pinMode(BuzzerPin, OUTPUT);

  pinMode(redled, OUTPUT);

  pinMode(greenled, OUTPUT);

  pinMode(FlamePin, INPUT);

  Serial.begin(9600);   //Set the baud rate to 9600 bit per second



void loop()   //This will run indefinitely till the program is terminated


  Flame_Sensor_Value = digitalRead(FlamePin); //Store the value of sensor in this variable


  if (Flame_Sensor_Value == LOW)  //check if condition matches with fire detection state


    /*Turn on Indicators*/

    digitalWrite(BuzzerPin, HIGH);    // Turn Buzzer on

    digitalWrite(redled, HIGH);       // Turn Red LED on

    digitalWrite(greenled, LOW);      // Turn Green LED off


    /*Responsible for sending SMS*/

    Serial.println("AT+CMGF=1");                 //Selects SMS message format as TEXT

    delay(1000);                                 // Delay of 1 second

    Serial.println("AT+CMGS=\"+91xxxxxxxxxx\""); // Replace x with mobile number

    Serial.println("FIRE IN THE HOUSE");         // The SMS text you want to send




    /*Responsible for making a CALL*/

    Serial.println("ATD+ +91xxxxxxxxxx;"); // Replace x with your mobile number

    delay(5000);                          //Wait for Call to reach

    Serial.println("ATH");                 //Hang up the Call





    digitalWrite(BuzzerPin, LOW);          // Turn Buzzer off

    digitalWrite(greenled, HIGH);          // Turn Green LED on

    digitalWrite(redled, LOW);             // Turn Red LED off






  • As soon as the sensor detects that some form of IR radiation is incident, it outputs a low signal which when read by the microcontroller outputs a serial print command which has AT commands responsible to make a call and send a text message to a predetermined number.
  • A call and a text SMS are received along with the Red LED glowing and the buzzer ringing.

This blog has been submitted by VCET Robotics Club, VCET Vasai under the Robocraze Club Outreach Program.

Leave a comment

Please note, comments must be approved before they are published