Fire & Gas Detector System Using Arduino Uno - Technoesolution

January 30, 2022


fire-&-gas-detector-system-using-arduino-uno

Description

Hello, In today's article we are going to make a fire and gas detector using Arduino Uno a very interesting and important project. In this article, I'll explain to you how to make a fire and gas detector system with protection using Arduino Uno and MQ-2 gas sensors. In this system, we detect fire and gas and provide protection against it. There are many accidents are occur in domestic and industrial areas due to fire or flammable gas leakage. 
So to avoid this type of accident we are going to design a system which detects this type of accident and instantly provides protection against it to avoid a big hazardous accident in future. We use a fire sensor to detect Fire and an MQ-2 gas sensor to detect LPG gas, you can use another gas sensor to detect various gases as per your requirements. To avoid complicated circuitry I make my own PCB design I'll provide the PCB design as well as PCB layout to make this at home using the toner transfer method.

Watch out the video If reading bores you.

If you got this article helpful, subscribe to our blog and our youtube channel for more interesting projects.

Fire Sensor:-

fire-&-gas-detector-system-using-arduino-uno

In the fire and gas detector system with protection using Arduino Uno project, we use Fire Sensor is mainly designed to detect fire/flame. There is an IR receiver LED is used on the sensor to detect fire. The IR receiver mainly detects radion emitted by the hot body or fire. The sensor has an onboard LED that turns on when the fire gets detected by the sensor. This sensor is very sensitive it detects fire very quickly. This sensor is widely used in fire detecting systems and in industrial areas to detect fire.

Feature of Fire Sensor:-

  • Operating Voltage:- 3.3V - 5V DC
  • Sensitivity:- High
  • IC Used:- LM39*3
  • Accuracy:- High
  • Power Indicator is available

MQ-2 Gas Sensor:-

fire-&-gas-detector-system-using-arduino-uno

In the fire and gas detector system with protection using Arduino Uno project, we use an MQ-2 gas sensor is designed to detect flammable gases. This sensor detects Alcohol, Hydrogen, Propane, Methane, and LPG gas it also detects smoke. This sensor module comes with Analog and digital output pins. When gas gets detected by this sensor its analog output starts increasing and the digital output pin gets high. 
There is the power LED and Indicator LED is placed on the sensor. When the sensor gets a power-up with a 5V supply the power led gets to turn on and when gas gets detected by the sensor the indicating led get's turned on until the gas gets removed from the sensor or respective area. This sensor is highly sensitive to LPG as well as alcohol and other gases. The MQ-2 gas sensor is compatible with Arduino and other microcontrollers.

Features of MQ-2 gas sensor:-

  • Operating Voltage:- +5V DC
  • Gas Detects:-
  • Analog and Digital Output:-
  • Sensitivity:- Combustible gases
  • IC Used:- LM393

Material Required:-

Sr.No

Product Name

Quantity

Best Buy Link

1

Arduino Nano

1

https://amzn.to/3rVNKUr

2

LCD Display

1

https://amzn.to/3GQ14zO

3

MQ-2 gas sensor

1

https://amzn.to/3AgX2xX

4

Fire Sensor

1

https://amzn.to/3nKUgvN

5

LM2596 Module

1

https://amzn.to/33vxWzv

6

Potentiometer (10K)

1

https://amzn.to/3qNJPtq

7

Male-Female Berge Strip

2

https://amzn.to/3GR5KoT

8

LED

1

https://amzn.to/3AnnOVh

9

Resistor (470E & 330E)

3, 2

https://amzn.to/3GNSAJy

10

Buzzer

1

https://amzn.to/3fLzdVC

11

2-Pin DIP Switch

1

https://amzn.to/3FNP5kZ

12

DC Jack Socket

1

https://amzn.to/33S9WGr

13

Capacitor (470uf)

2

https://amzn.to/32iMrG4

14

7805 IC

1

https://amzn.to/3GSBeLE

15

Diode (1N4007)

6

https://amzn.to/3AnuGSO

16

2 & 3 Pin Block Connector


https://amzn.to/32iMD8g

17

Transistor (BC547)

2

https://amzn.to/33UNYTc

18

Transistor (BC2n2222)

1

https://amzn.to/3KHv9UH

19

Relay (5V)

1

https://amzn.to/32jPjTf

20

Copper Clad PCB

1

https://amzn.to/33YoHHX

21

Adapter (12V, 2amp)

1

https://amzn.to/3fMoFFw

22

Transformer (12-0-12) 

1

https://amzn.to/3GRMR5j

23

Exhaust Fan

1

https://amzn.to/3FRHkua

Circuit Diagram:-

fire-&-gas-detector-system-using-arduino-uno

Block Diagram:-

fire-&-gas-detector-system-using-arduino-uno

PCB Layout:-

fire-&-gas-detector-system-using-arduino-uno

I design a PCB layout in EasyEDA Software. I provide the PCB layout link just print the layout on glossy photo paper with 100% accuracy / Actual Size. To make PCB using the toner transfer method.

fire-&-gas-detector-system-using-arduino-uno

Top Silk Layer:- (Download)
Bottom Copper Layer:- (Download)

If you want to buy PCB from PCB manufacturers then go through NEXTPCB.

Gerber File:- (Download)

Tonner Transfer Method:-

To make PCB using toner transfer method, Refer to the following video to make PCB Using Toner transfer method.

My PCB:-

After PCB Etching Process

fire-&-gas-detector-system-using-arduino-uno

Afte Soldering PCB

fire-&-gas-detector-system-using-arduino-uno

Complete PCB Setup:-

fire-&-gas-detector-system-using-arduino-uno

How It Works:-

In this project, I used an Arduino Nano as a microcontroller, We use two Sensors for this project which are the MQ-2 gas sensor and Flame Sensor. This sensor is used for two functions, To detect flammable LPG gas and to detect fire. On PCB I placed a 16x2 lcd display for demo purposes to show the live status of the system, If you placed this system in Kitchen then you can place this lcd display in the living room.

This Display Shows notification:-

  1. Name of the project [ Fire and Gas Detector System With Protection]
  2. Gas Detected/Exhaust system On:- When gas gets detected by the MQ-2 sensor
  3. Fire Detected/Extinguisher system On:- When the fire gets detected by Flame Sensor
  4. The system is stable:- When fire/gas is detected.
  5. I used on-board two Relays instead of a 2-channel relay module to control the Fire extinguisher and Exhaust fan system.

Working:-

  1. Whenever the flammable gas (LPG, Alcohol, Smoke) gets detected by the gas sensor the Exhaust fan system connected across the relay no 1 gets turned On until the gas gets completely removed from the room.
  2. Whenever the fire gets detected by the flame sensor the fire extinguisher system connected across it gets turned on until the fire gets completely extinguished.
  3. On PCB two LED indicators are connected which get turned on when fire/gas get detected by the sensor.
  4. The buzzer is used for alarm purposes when fire/gas gets detected the alarm started to ring.

Arduino Code:-

/*
 * Hello friends welcome back to "Techno-E-Solution"
 * Here is the complete Arduino Code Just Upload to the Arduino
 * Complete video tutorial:- https://youtu.be/Hfz3OumtENU
 */

#include<LiquidCrystal.h>
LiquidCrystal lcd(12,11,10,9,8,7);
int GasLED = A1;  // Gas LED
int Relay1 = 6;   // Exhaust Fan
int Relay2 = 5;   // Extinguisher System
int Buzzer = 4;
int MQ2Sensor = A0;  // MQ2 Sensor
int sensorValue = 0;
int FlameLED = A2;         // Flame LED
int FlameSensor = 2;     // Flame Sensor
int Flame = HIGH;        // Flame
//int REL = 11;
void setup() {
  pinMode(GasLED, OUTPUT);
  pinMode(Relay1, OUTPUT);
  pinMode(Relay2, OUTPUT );
  pinMode(Buzzer, OUTPUT );
  pinMode(MQ2Sensor, INPUT);
  pinMode(FlameLED, OUTPUT);
  pinMode(FlameSensor, INPUT);
  //pinMode(REL, OUTPUT);
  
  Serial.begin(9600);
  lcd.begin(16,2);
  delay (500);
    lcd.print("** SUBSTATION **");
    lcd.setCursor(0,1);
    lcd.print("...FIRE & GAS...");
  delay(2000);
    lcd.clear();
    lcd.print("DETECTOR SYSTEM");
    lcd.setCursor(0,1);
    lcd.print(" WITH PROTECTION");
  delay(2000);
    lcd.clear ();
}
void loop() {
  sensorValue = analogRead(MQ2Sensor);
  Serial.println(sensorValue);
   if (sensorValue > 300) {
   
    digitalWrite(GasLED, HIGH);
    digitalWrite(Relay1, HIGH);
    digitalWrite(Buzzer, HIGH);
    lcd.clear ();
    lcd.setCursor (0,0);
    lcd.print("GAS DETECTED");
    lcd.setCursor (0,1);
    lcd.print("EXHAUST FAN ON");
    delay (2000);
    
  }
  else 
  {
    
    digitalWrite(GasLED, LOW);
    digitalWrite(Relay1, LOW);
    digitalWrite(Buzzer, LOW);
    lcd.clear ();
    lcd.setCursor (0,0);
    lcd.print ("SYSTEM IS STABLE");
  }
  delay (500);
  Flame = digitalRead(FlameSensor);
  if (Flame == LOW)
  {
    digitalWrite(FlameLED, HIGH);
    digitalWrite(Relay2, HIGH);
    digitalWrite (Buzzer, HIGH);
    lcd.clear ();
    lcd.setCursor (0,0);
    lcd.print ("FIRE DETECTED");
    lcd.setCursor (0,1);
    lcd.print ("EXTINGUISHER ON"); 
    delay (2000);
    
  }
  else
  {
    digitalWrite(FlameLED, LOW);
    digitalWrite(Relay2, LOW);
    digitalWrite (Buzzer, LOW);
    lcd.clear ();
    lcd.setCursor (0,0);
    lcd.print ("SYSTEM IS STABLE");
  }
  delay (500);
}

 

You can Buy me a coffee If you got this article helpful.