0% found this document useful (0 votes)
30 views34 pages

RAG Mini-1

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views34 pages

RAG Mini-1

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 34

A

MINI PROJECT REPORT


On

FIRE AND GAS LEAKAGE DETECTION SYSTEM USING ARDUINO


Submitted on the partial fulfillment of the Award of Degree in Bachelor of Technology in Electronics
and Communication Engineering during academic year 2024-2025
Submitted to

JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY, HYDERABAD, TELANGANA.


Submitted by
A. RAGHAVVENDRA SWAMY 21UC1A0401
K. MAHESH 21UC1A0414
R. KEERTHAN 21UC1A0425
T. PRADEEP 21UC1A0429

Under the guidance of


MS.M.SWETHA
(Assistant Professor)

Department of Electronics and Communication Engineering


TALLA PADMAVATHI COLLEGE OF ENGINEERING WARANGAL, TELANGANA.

Accredited by NAAC Affiliated to Jawaharlal Nehru Technological University Hyderabad, Telangana .


TALLA PADMAVATHI COLLEGE OF ENGINEERING,
WARANGAL
Accreditated by NAAC
Affiliated to Jawaharlal Nehru Technological University, Hyderabad,
Telangana.

BONAFIDE CERTIFICATE
This is to certify that this Project Report titled “FIRE AND GAS LEAKAGE DETECTION
SYSTEM USING ARDUINO” is a bonafide work carried out by A. RAGHAVVENDRA
SWAMY(21UC1A0401),K. MAHESH(21UC1A0414),R. KEERTHAN(21UC1A0425)and T.
PRADEEP (21UC1A0429) under our supervision in the partial fulfilment of the Award of
Bachelor of Technology in ELECTRONICS AND COMMUNICATION ENGINEERING
from Talla Padmavathi College of Engineering, Warangal, affiliated to Jawaharlal Nehru
Technological University, Hyderabad, Telangana.

This project work does not constitute in part or full of any other works that have been earlier
submitted to this university or any other institutions for the award of any degree/ diploma.

Internal Guide Head of the Department

External Guide Principal / TPCE


DECLARATION

We,A.RaghavendraSwamy(21UC1A0401),K.Mahesh(21UC1A0414),R.Keerthan(21UC1A0
425)andT.Pradeep(21UC1A0429) final year students from Talla Padmavathi College of
Engineering, Warangal, affilitated to Jawaharlal Nehru Technological University, Hyderabad,
Telangana, solomnly declare that this Project titled “FIRE AND GAS LEAKAGE
DETECTION SYSTEM USING ARDUINO” is a bonafide work carried out by us under the
supervision of Ms.M.Swetha, Assistant Professor, for the Award of Bachelor of Technology in
Electronics and Communication Engineering.

We also declare that this project work does not constitute in part or full of any other works that
have been earlier submitted to this university or any other institutions for the award of any
degree/ diploma.

Signature name Roll No

1 A.RaghavendraSwamy 21UC1A0401

2 K.Mahesh 21UC1A0414

3 R.Keerthan 21UC1A0425

4 T.Pradeep 21UC1A0429
ACKNOWLEDGEMENTS
We are grateful to our Chairman, Mr. Talla Mallesham, for providing us ambient learning
experience at our institution.

We are greatly thankful to our Director, Dr. Talla Vamshi, and Directrix Mrs. ChaitanyaTalla
Vamshi, for their encouragement and valuable academic support in all aspects.

We are thankful to our Principal, Dr. R. Velu, for his patronage towards our project and standing
as a support in the need of the hour.

We would like to acknowledge and express our sincere thanks to our guide Ms.M.Swetha,
Assistant Professor, Department of Electronics and communication Engineering for introducing
the present topic and for the inspiring guidance, constructive criticism and valuable suggestions
through-out our project work which have helped us in bringing out this proficient project.

We also thank all the faculty members of our institution for their kind and sustained support
throughout our programme of study.

We thank our parents for their confidence that they have on us to be potential and useful
technological graduates to serve the society at large.

A. RaghavendraSwamy 21UC1A0401
K. Mahesh 21UC1A0414
R. Keerthan 21UC1A0425
T. Pradeep 21UC1A0429
ABSTRACT
The "Fire and Gas Leakage Detection System Using Arduino" is an innovative safety system
aimed at detecting potential hazards caused by fire outbreaks and gas leaks in real time. The
system is built on the Arduino platform and incorporates multiple sensors, including the MQ-2
gas sensor for detecting flammable gases (such as methane, propane, and butane) and a flame
sensor for identifying the presence of fire. These sensors work in tandem to monitor
environmental conditions continuously and provide early warnings to users. When the system
detects a gas leakage or fire, it promptly activates an alarm system (such as a buzzer) and visual
indicators (such as LEDs or an LCD display). It can also be enhanced to send alerts via SMS or
email through modules like GSM or Wi-Fi for remote notifications, ensuring timely action even
when users are away. The system is designed to be low-cost, reliable, and scalable, making it
suitable for a wide range of applications, including homes, factories, and public facilities. The
integration of IoT principles with embedded systems to create practical and impactful safety
solutions. By providing early detection, the system minimizes potential damages, protects
property, and safeguards lives, addressing the growing demand for advanced safety measures in
smart environments
INDEX

Chapter No. Name Page.No


1 Introduction 1

2 Overview of Arduino Technology 5


3 Hardware Declaration 11
4 Arduino 24

5 Software Implementation 36
6 Results and Discussion 45

7 Advantages and Applications 55


8 Conclusion and Futurescope 56
References 57
CHAPTER 1
INTRODUCTION
Fire incidents and gas leakages are critical hazards that pose significant threats to human safety,
property, and the environment. These dangers are particularly prevalent in industrial, residential,
and commercial setups where flammable materials are stored or utilized. With the rapid
advancement in technology, there is a growing need for automated systems capable of detecting
and responding to such emergencies in real time to minimize their impact. The "Fire and Gas
Leakage Detection System Using Arduino" is a compact, reliable, and cost-effective safety
solution designed to detect fire and gas leaks in their early stages. The system is built around an
Arduino microcontroller, which serves as the core processor to manage and integrate sensor
inputs. Key components include the MQ-2 gas sensor, which detects flammable gases such as
methane, butane, and propane, and the flame sensor, which identifies the presence of fire or
high-intensity heat sources. These sensors continuously monitor environmental conditions and
relay data to the Arduino for processing. When hazardous conditions are detected, the system
takes immediate action by activating alarms such as buzzers and LEDs, alerting occupants to the
danger. The system can also be enhanced with additional features, such as sending SMS or Call
alerts through GSM, Wi-Fi, or IoT modules, ensuring notifications even when users are away
from the premises. Furthermore, the integration of an LCD display provides real-time data on gas
concentration levels and system status for easy monitoring. Our project aims to address the
growing demand for smarter, scalable, and efficient safety systems. By leveraging open-source
hardware and software, the "Fire and Gas Leakage Detection System Using Arduino" is both
affordable and accessible, making it suitable for a wide range of applications. It highlights the
potential of IoT and embedded systems in creating innovative solutions for critical safety
challenges, ultimately reducing the risk of accidents and enhancing preparedness. Advanced
Fire and Gas Leakage Detection Systems are crucial for ensuring safety in various
environments. This presentation explores Arduino Technology can enhance these systems,
providing innovative solutions for real-time monitoring and response. Understanding these
advancements is essential for safety protocols.

1
CHARACTERISTICS:

Core Functionality: The system is designed to detect flammable gases (such as methane,
propane, and butane) and fire using specialized sensors. It provides real-time monitoring and
alerts users to potential hazards.

Key Components:

MQ-2 Gas Sensor: Detects combustible gas concentrations in the air.

Flame Sensor: Detects the presence of fire or high-intensity heat sources.

Arduino Microcontroller: Processes sensor data and triggers responses.

Alarm System: Includes buzzers and LEDs for immediate local alerts.

Optional GSM/Wi-Fi Module: Sends SMS or email notifications for remote warnings.

LCD Display: Displays real-time information about gas levels and system status.

Features:

Real-Time Detection: Continuously monitors the environment for fire or gas leaks. Immediate
Alerts: Activates audible and visual alarms as soon as a threat is identified.Remote
Notifications: Sends alerts to users' smart phones or emails when integrated with communication
modules.

User-Friendly Interface: Includes an LCD for easy monitoring and status updates.

Cost-Effective: Utilizes affordable components, making it accessible for a wide audience.

2
Applications:

Residential homes (kitchens, gas storage areas).

Industrial facilities with gas cylinders or flammable materials.

Commercial buildings such as restaurants, hotels, and laboratories.

Public spaces requiring enhanced safety measures.

Scalability and Customization: The system can be adapted to monitor additional gases by
changing sensors. Enhanced features such as IoT-based cloud data storage or integration with
home automation systems can be implemented.

Hardware Tools

Arduino Board

Acts as the brain of the system, processing sensor data and controlling outputs. Commonly used
models include Arduino Uno or Mega.

Sensors

MQ-2 Gas Sensor: Detects flammable gases like methane, propane, butane, and smoke.

Flame Sensor: Detects the presence of fire or high-intensity light from flames.

Software Tools

Arduino IDE

Used for writing, debugging, and uploading code to the Arduino board.

Fritzig (Optional)

For creating circuit diagrams and layouts.

IoT Platforms (Optional): Platforms like Blynk, ThingSpeak, or IFTTT can be used for real-
time monitoring and notifications.

3
CHAPTER 2
OVERVIEW OF ARDUINO TECHNOLOGY
INTRODUCTION:
Arduino technology provides a flexible platform for customized detection systems. Its open-
source nature allows for easy modifications and scalability, making it an ideal choice for
creating tailored safety solutions in response to specific environment needs. Arduino is an open-
source electronics platform that provides an easy-to-use environment for creating and
prototyping electronic projects. It is based on simple, flexible hardware and software, making it
ideal for hobbyists, students, and professionals working on a wide range of applications, from
simple circuits to complex IoT system.

Key Features of Arduino Technology

Open-Source Hardware

Arduino boards are built using open-source hardware designs, allowing users to freely modify
and adapt them for specific project requirements. Popular models include Arduino Uno,
Arduino Mega, Arduino Nano, and Arduino Leonardo.

Microcontroller-Based

Arduino boards use microcontrollers such as the ATmega328P (in Arduino Uno) or
ATmega2560 (in Arduino Mega), which serve as the "brains" of the system by processing inputs
and controlling outputs.

User-Friendly Programming Environment

The Arduino Integrated Development Environment (IDE) provides a simple, easy-to-learn


platform for writing, debugging, and uploading code to the Arduino board. The code is written in
a simplified version of C/C++.

Versatile Input and Output

4
Arduino boards are equipped with a variety of digital and analog pins for interfacing with
sensors, actuators, and other components.

Input: Read data from sensors (e.g., temperature, light, gas).

Output: Control devices such as LEDs, buzzers, motors, and relays.

Applications of Arduino Technology

Home Automation

Smart lighting, temperature control, and security systems.

Industrial Automation

Monitoring and controlling machines, sensors, and processes.

IoT (Internet of Things)

Data collection and cloud connectivity for remote monitoring.

Robotics

Developing autonomous robots and drones.

Safety System

Gas leakage detectors, fire alarm systems, and intrusion detection.

Education

Used in schools and colleges to teach programming and electronics.

Advantages of Arduino Technology

Easy to Learn: Suitable for beginners with minimal programming or electronics experience.

Affordable: Cost-effective compared to other microcontroller-based systems.

Versatile: Wide compatibility with sensors, modules, and actuators.

Rapid Prototyping: Allows quick development of functional prototypes.

Open Source: Encourages innovation and collaboration.

5
CHAPTER 3
HARDWARE DECLARATION

Arduino UNO: Microcontroller Arduino UNO is employed is shown in fig.2. The central unit of
the system is Arduino board, where all the components are interfaced externally on the board and
programmed as per their functionality to work in synchronization. it's an electronic prototyping
platform/ board supported Atmega-328 which is of 8-bit, 16 Mhz. during this serial
communication is enabled and has 14 digital input /output pins (out of which 6 are PWM) and 6
analog input pins. It operates at 5v. every pin contains a specific function to control.

Fig1: Arduino UNO

MQ2 Sensor: MQ-2 gas sensor module. It is a sensor detector used to detects the flammable gas
and smoke concentration of the combustible gas in the air, and output is read in the analog
voltage and digital value output. Supply input voltage is 5v. it is very sensitive to H2, LPG, CH4,
CO, SMOKE, PROPANE. It has three pins for transmitter, receiver, ground and sensitivity can
be adjust by the potentiometer. Detects LPG from 200ppm to 10000ppm.

6
Fig2: MQ-2 Gas Sensor

GSM Module: SIM900 GSM module is employed to send SMS alerting on gas detection. GSM
is meant as a device used for exchanging the information. SIM card is recovered from the GSM
to control the wireless node 5 volts of the DC supply is required by the GSM for functioning.
The modem needs only three connection (transmitter, receiver, ground) to interface with Arduino
controller Atmega-328 the excess power supply is used. Arduino microcontroller is connected 31
Global Journal of Engineering and Technology Advances, 2020, 05(03), 029–035 with the
receiver pin to the device.

Fig 3: SIM900A Quad Band GSM/GPRS Module with RS232 Interface

7
INTEGRATION OF SENSORS
Integration multiple sensors into a sinle Arduino-based systems enhances detection capabilities.
By combining gas and fire sensors, we can achieve a more robust safety solution that addresses
various hazards simultaneously, ensuring comprehensive monitoring.

The hardware components used in the Fire and Gas Leakage Detection System Using Arduino
are carefully selected to ensure reliable functionality, cost-effectiveness, and ease of integration.
At the core of the system is the Arduino Uno, a microcontroller that acts as the processing unit,
controlling all inputs and outputs. The system utilizes an MQ-2 Gas Sensor to detect hazardous
gas levels and a Flame Sensor to identify fire through infrared radiation. These sensors send
data to the Arduino, which processes the information and triggers appropriate actions.

Wi-Fi Module (ESP8266)

Description: A low-cost Wi-Fi microchip with full TCP/IP stack and microcontroller
capabilities.

Purpose: Enables the system to connect to the internet for uploading data to IoT platforms,
allowing remote monitoring and control.

Specifications: Supports standard communication protocols and operates on 3.3V.

8
Relay Module

Description: An electrically operated switch used to control external devices.

Purpose: Activates safety mechanisms such as exhaust fans, sprinklers, or emergency lighting
systems when hazardous conditions are detected.

Specifications: Can handle high voltage devices while being triggered by low voltage signals
from the Arduino.

Additional Components

External Safety Devices: Includes exhaust fans, sprinklers, or solenoids connected through the
relay module to mitigate hazards actively.

Backup Power Source: Provides uninterrupted operation during power outages, ensuring
continuous monitoring.

For alerting users, the system includes a buzzer for audible alarms and LEDs (red and green) for
visual status indications. A 16x2 LCD display provides real-time updates, such as gas
concentration levels or fire detection alerts. Optional modules like the GSM module enable SMS
notifications, while the Wi-Fi module allows integration with IoT platforms for remote
monitoring. To enhance safety further, a relay module can activate external devices, such as
exhaust fans or sprinklers, when hazards are detected. The system relies on a stable power
supply, either through a 9V adapter or batteries, for continuous operation. Connecting wires and
a breadboard ensure seamless prototyping and testing, while resistors protect sensitive
components like LEDs from damage. Additional devices, such as backup power sources or
external safety systems, can also be integrated to enhance reliability. This hardware setup
ensures a robust, scalable, and efficient safety system for detecting fire and gas leaks. It is
designed for diverse applications, ranging from residential and industrial safety to smart home
integration. The modular design of the system allows for future expansions and enhancements,
ensuring adaptability to evolving safety requirements.

9
Significance of the Hardware Declaration

This hardware declaration outlines the essential components required for building a reliable Fire
and Gas Leakage Detection System. Each component is carefully chosen to ensure functionality,
cost-efficiency, and scalability. These components enable real-time monitoring, effective hazard
detection, and immediate safety responses. The system’s modular nature allows future
enhancements, such as adding more sensors or integrating advanced IoT features, making it
versatile for various applications in residential, industrial, and commercial settings. The Fire and
Gas Leakage Detection System requires various hardware components for efficient detection,
alerting, and safety control. Below is a detailed declaration of the hardware components, their
descriptions, and their respective roles in the system. The MQ-2 Gas Sensor detects hazardous
gases like methane and propane, while the Flame Sensor monitors the environment for fire by
sensing infrared radiation. These sensors provide data to the Arduino for analysis. In response to
detected threats, a buzzer is activated to issue an audible alert, and LEDs (red and green)
provide visual cues to indicate system status—danger or safe conditions. A 16x2 LCD display is
used to show real-time sensor readings, offering a clear and immediate understanding of the
environment. Optional communication modules, such as the GSM module and Wi-Fi module,
add advanced features by enabling remote notifications through SMS or IoT integration. For
safety actions like activating sprinklers or exhaust fans, a relay module is included. Powering
the entire system is a stable power supply, either from a 9V adapter or batteries, ensuring
uninterrupted operation. Additional components like connecting wires, resistors, and a
breadboard facilitate seamless prototyping and circuit integrity.

10
CHAPTER-4

ARDUINO

The Arduino microcontroller plays a central role in the design and operation of the Fire
and Gas Leakage Detection System. It acts as the core processing unit that gathers data
from sensors, analyzes it, and triggers appropriate responses based on the detected
conditions. This section outlines how Arduino is utilized in the system and its significance.

Data Collection from Sensors

Arduino reads input data from the MQ-2 Gas Sensor to monitor the concentration of flammable
gases (e.g., methane, propane, butane).

It also collects data from the Flame Sensor to detect the presence of fire or high-intensity heat
sources. Additional sensors (e.g., temperature or smoke detectors) can be integrated if required.

Data Processing

The Arduino processes sensor signals by comparing them to predefined threshold values.

For instance: If the gas concentration exceeds a safe limit, the system recognizes it as a gas leak.

If the flame sensor detects infrared light above a certain intensity, the system identifies it as a fire
outbreak.

11
Triggering Alerts When a hazardous condition is detected:

Buzzer: Emits an audible alarm to alert occupants.

LEDs: Provide visual feedback (e.g., red LED for danger, green LED for safe conditions).

LCD Display: Shows real-time sensor readings and system status for easy monitoring.

Communication and Notifications Arduino can be connected to modules like:

GSM Module: Sends SMS alerts to users in case of emergencies.

Wi-Fi Module (e.g., ESP8266): Sends notifications via IoT platforms like Blynk or ThingSpeak.

Bluetooth Module: Provides short-range communication for local notifications.

Example Setup Using Arduino


Required Components

Arduino Uno (or compatible board).

MQ-2 Gas Sensor.

Flame Sensor.

Buzzer.

LEDs (Red and Green).

LCD Display (16x2).

GSM or Wi-Fi Module (optional).

Relay Module (optional).

Workflow

Sensing

MQ-2 detects gas levels, and the flame sensor checks for fire.

Processing

Arduino analyzes sensor data and compares it with threshold values.

12
Alerting

If thresholds are exceeded:

Buzzer and LEDs activate.

LCD displays real-time data.

Notifications are sent via GSM/Wi-Fi (if included).

The Arduino microcontroller serves as the backbone of the Fire and Gas Leakage Detection
System, enabling real-time monitoring, analysis, and response to hazardous situations. It
processes input signals from sensors such as the MQ-2 Gas Sensor, which detects flammable
gases like methane, propane, and butane, and the Flame Sensor, which identifies fire by sensing
infrared light from flames. These sensors continuously send data to the Arduino, which compares
the readings to predefined safety thresholds. If a gas leak or fire is detected, the system
immediately triggers alarms, such as activating a buzzer and LED indicators to alert occupants.
Additionally, an LCD display provides real-time sensor readings and system status to ensure
easy monitoring. Beyond basic alerts, the Arduino can integrate communication modules for
remote notifications. For instance, a GSM module can send SMS alerts to users, while a Wi-Fi
module, such as the ESP8266, can connect the system to IoT platforms like Blynk or
ThingSpeak, allowing for real-time monitoring via mobile devices or web dashboards. The
Arduino also has the flexibility to control external safety mechanisms using relay modules, such
as activating automatic fire suppression systems or exhaust fans to reduce gas concentration.
These features make the system highly versatile and scalable, adaptable to various environments
like homes, offices, and industrial facilities. The affordability and simplicity of Arduino make it
an ideal choice for such projects. Its user-friendly programming environment, open-source
hardware, and extensive library support streamline the development process. Moreover,
Arduino's modular design allows for easy integration of additional sensors or features, such as
temperature sensors or advanced IoT capabilities. With its ability to provide accurate, real-time
responses to hazardous conditions, Arduino ensures that the Fire and Gas Leakage Detection
System is both effective and reliable. This combination of cost-effectiveness, versatility, and
reliability highlights Arduino's value in creating innovative safety solutions.

13
Using Arduino in the Fire and Gas Leakage Detection System makes the project efficient, cost-
effective, and highly customizable. Its ability to integrate with sensors, alarms, and
communication modules makes it an excellent choice for safety-critical applications.

WHAT IS ARDUINO?

Figure4:ARDUINOUNO

https://technoelectronics44.com/p/microcontrollers.html

Arduino is a open source electronics prototyping platform based on flexible,easy-to-use


hardware and software.It’s intended for artists,designers,hobbyists,and anyone interested in
creating interactive objects or environments.It’s an open-source physicalcomputing platform
based on a microcontroller board,and a development environment for writing software for the
board.

Computer or programmed by the computer and then disconnected and allowed to work
independently. Anyone can buy this device through online auction site or search engine. Since
the Arduino is an open- source hardware designs and create their own clones of the Arduino
and sell them, so the market for the boards is competitive. An official Arduino costs about
$30,and a clone often less than $20. The name ―Arduino is reserved bythe original makers.
However, clone Arduino designs often have the letters ―duino on the end of their name, for
example, Freeduino or DFRduino. The software for programming your Arduino is easy to use
and also freely available for Windows, Mac, and LINUX computers at no cost.

14
Key Features of Arduino:

Open-Source Platform: Arduino provides both hardware and software under an open-source
license, making it accessible for anyone to use, modify, and enhance.

Easy Programming: The Arduino Integrated Development Environment (IDE) uses a simple
C/C++-based programming language, enabling even beginners to write and upload code to the
board.

Versatile Boards: A wide range of Arduino boards is available, such as Arduino Uno, Nano,
Mega, and Leonardo, each catering to different needs and projects.

Wide Sensor and Module Compatibility: Arduino supports integration with numerous sensors
(temperature, gas, motion) and modules (Wi-Fi, GSM, Bluetooth) for versatile applications.

Affordable and Accessible: Arduino boards and components are cost-effective, making them
ideal for educational and DIY projects.

Large Community Support: A global community of developers provides extensive resources,


tutorials, and forums, making troubleshooting and learning easier.

Why Arduino is Suitable for Fire and Gas Detection Systems

Arduino’s flexibility and modularity make it ideal for developing safety systems such as the Fire
and Gas Leakage Detection System. Its ability to interface with sensors like MQ-2 (gas
detection) and flame sensors, combined with its capability to process data and trigger alarms or
notifications, ensures real-time hazard detection. Moreover, its compatibility with
communication modules like GSM and Wi-Fi enables remote monitoring and control, which is
crucial for enhancing safety.

15
CHAPTER-5

SOFTWARE IMPLEMENTATION

The chart flow of implementation of the software proposed system. This system monitors the
gas, smoke by sensor 1, sensor 2, sensor 3. If any gas is detected the signal of sensors goes low
and activate the Arduino UNO. Which send signals to the LCD (“GAS DETECTED AT ZONE),
where sensor 1 is for zone 1, sensor 2 for zone 2 and sensor 3 for zone 3 respectively, Buzzer and
GSM to alert the people about danger and if no gas is detected then LCD displays “NO GAS
DETECTED” in its 16x2 display.

Fig 5: Flow Chart of Proposed System

16
CIRCUIT DIAGRAM

Sensors:

MQ-2 Gas Sensor: Detects the presence and concentration of flammable gases.

Flame Sensor: Identifies the presence of fire by detecting infrared radiation emitted by flames.

Arduino Uno:

Serves as the central processing unit, receiving input signals from the sensors, processing the

data, and making decisions based on predefined thresholds.

Alert System:

Buzzer: Produces audible alarms in case of gas leakage or fire detection.

LEDs: Provide visual indications of the system status (e.g., red for danger, green for normal).

Display Unit:

LCD (16x2): Displays real-time sensor readings and system alerts to the user.

Communication Modules (Optional):

GSM Module: Sends SMS alerts to users in case of an emergency.

17
Wi-Fi Module: Uploads data to an IoT platform for remote monitoring and control.

Safety Mechanisms (Optional):

Relay Module: Controls external safety devices such as exhaust fans, sprinklers, or solenoids to
mitigate hazards.

Power Supply: Provides stable power to all components, ensuring continuous operation.

The software implementation of the Fire and Gas Leakage Detection System Using Arduino
involves programming the Arduino board to process sensor data, make decisions, and trigger
appropriate responses. The programming is carried out using the Arduino Integrated
Development Environment (IDE), which provides a simple and user-friendly interface for
writing, compiling, and uploading code to the Arduino board .

Steps in Software Implementation

Define Inputs and Outputs

Input pins are assigned for sensors such as the MQ-2 Gas Sensor and Flame Sensor.

Output pins are defined for devices such as LEDs, buzzer, relay, and optional communication
modules (GSM or Wi-Fi).

Initialize Components

In the setup function (void setup()), the microcontroller initializes all inputs and outputs.

Communication protocols like GSM, Wi-Fi, or I2C (for LCD) are initialized.

Data Reading and Processing

The program continuously reads data from the sensors using analog or digital pins.

Threshold values are set for gas concentration and flame detection to determine hazardous
conditions.

18
Decision-Making Logic

If the sensor values exceed predefined thresholds, the program triggers an alert (e.g., lighting the
red LED, sounding the buzzer).

Safety mechanisms like activating exhaust fans or sprinklers are triggered via the relay module .

Alert and Notification

For local alerts: The buzzer sounds, and LEDs indicate the status.

For remote alerts: The GSM module sends SMS, or the Wi-Fi module uploads data to an IoT
platform.

Display Real-Time Data

The program updates the LCD display with real-time information, such as gas concentration
levels or fire detection status.

Loop Function

The void loop() function ensures that the system continuously monitors and responds to
environmental conditions.

Sample code:
#include <stdio.h>
#include <SoftwareSerial.h>

const String PHONE = "+919182590414";


//917075814583
#define rxPin 2
#define txPin 3
SoftwareSerial mySerial(rxPin, txPin);
unsigned char rcv;
int gasPin = 5;

19
int irPin = 6;
int buzzer = 13;
int irState = 0;
int gasState = 0;
void okcheck() {
unsigned char rcr;
do {
rcr = mySerial.read();
} while (rcr != 'K');
Serial.println("at ok");
}
void beep() {
digitalWrite(buzzer, HIGH);
delay(2000);
digitalWrite(buzzer, LOW);
delay(1000);
}
void gsminit() {
mySerial.write("AT\r\n");
okcheck();
mySerial.write("ATE0\r\n");
okcheck();
mySerial.write("AT+CMGF=1\r\n");
// okcheck();
}
void sendSms(String text) {
mySerial.print("AT+CMGF=1\r");
delay(1000);

20
mySerial.print("AT+CMGS=\"" + PHONE + "\"\r");
delay(1000);
mySerial.print(text);
delay(100);
mySerial.write(0x1A);
delay(1000);
Serial.println("SMS Sent Successfully.");
}
void setup() {
delay(3000);
Serial.begin(115200);
mySerial.begin(9600);
Serial.println("init success");
gsminit();
mySerial.print("AT+CMGF=1\r"); //SMS text mode
delay(1000);
pinMode(irPin, INPUT);
pinMode(gasPin, INPUT);
pinMode(buzzer, OUTPUT);
digitalWrite(buzzer, LOW);
sendSms("Registration Done");
delay(2000);
// makeCall();
}
void loop() {
irState = digitalRead(irPin);
gasState = digitalRead(gasPin);
Serial.print("ir : ");

21
Serial.print(irState);
Serial.print("\tgas : ");
Serial.println(gasState);
if (irState == 0 && gasState == 0) {
Serial.println("Flame detected and Gas Detected");
sendSms(" Alert,Gas is Leaking,Flame Detected. Please Check !!!");
beep();
delay(2000);
makeCall();
beep();
} else if (gasState == 0) {
Serial.println("Gas detected");
beep();
sendSms(" Gas is Leaking. Please Check !!!");
beep();
}
delay(1000);
}
void makeCall() {
delay(3000);
Serial.println("Call initiated");
mySerial.println("ATD+ " + PHONE + ";");
okcheck();
delay(20000); // wait for 20 seconds...
mySerial.println("ATH"); //hang up

delay(1000);
Serial.println("Call Ended");}

22
USER INTERFACE DEVELOPMENT
Developing a user-friendly interface is essential for effective monitoring. Utilizing LCD screens,
or mobile app integration allows users to visualize data and receive alerts, enhancing the overall
functionality of the detection system.

Key Features of the Software

Threshold-Based Logic: Determines hazardous conditions based on sensor data.

Real-Time Monitoring: Continuously processes inputs and updates system status.

Error Handling: Ensures smooth operation and prevents false positives with calibrated
thresholds.

Modularity: Easily integrates additional sensors or modules.

User Feedback: Provides visual (LEDs, LCD) and audible (buzzer) alerts.

Remote Connectivity: Optional GSM and Wi-Fi modules enable notifications and IoT
integration.

Advanced Algorithms: Implement machine learning for predictive analysis and pattern
recognition.

Mobile Applications: Integrate with apps for enhanced remote monitoring and control.

Cloud Integration: Store data for historical analysis and improve decision-making.

Low-Power Optimization: Reduce energy consumption to ensure sustainability.

The software implementation ensures efficient and accurate hazard detection, making the system
reliable for diverse safety applications.

23
CHAPTER 6

RESULTS AND DISCUSSION

The schematic diagram of our project. This technique has been tested by leak of gas almost about
sensors, MQ2 gas sensor sends the signal to the Arduino UNO after detecting the gas leakage.
Arduino to other externally connected device such as LCD, buzzer and GSM send vigorous
signals. SMS is sent by GSM module to the provided mobile number as a result. In practice,
results for are noticed by the people surrounding by the area are displayed in the LCD and buzzer
sound indicate the danger to the people by making beep sound.

Fig 6: Schematic diagram of Proposed System

The prototype of the proposed system. Figure 9 shows the result of sensor 1 which displays the
result as “GAS DETECTED AT ZONE 1”, and the entire hardware is embedded into a single
board shown with wireless GSM result.

24
Fig 6.1: Prototype of the proposed system
The Fire and Gas Leakage Detection System Using Arduino was successfully implemented and
tested to demonstrate its functionality in detecting hazardous conditions.

Fig 6.2: Results of proposed system


The results indicate that the Arduino-based Fire and Gas Leakage Detection System is a reliable
and cost-effective safety solution. Its ability to detect flammable gases and fire at an early stage
ensures the prevention of potential accidents. The system's versatility and scalability make it
suitable for various environments, including homes, offices, and industrial facilities.

25
CHAPTER 7

ADVANTAGES AND APPLICATIONS

ADVANTAGES

Real-Time Monitoring

Continuously monitors environmental conditions, providing immediate detection of gas leaks


and fire.

Quick Response

Alerts users instantly through buzzers, LEDs, and optional SMS or IoT notifications, minimizing
potential damage.

Despite the advantages, challenges such as environment factors and sensors calibration exist.

Addressing these issues through careful design and testing ensures reliability and accuracy in
detection, enhancing the overall effectiveness of the system.

APPLICATIONS

Residential Safety

Detecting gas leaks from cooking gas cylinders or fire outbreaks in kitchens and living areas.

Industrial Safety

Monitoring gas levels and potential fire hazards in factories, chemical plants, and storage
facilities.

Commercial Buildings

Ensuring safety in offices, shopping malls, hotels, and restaurants where gas leaks or fire risks
may arise. tical demonstration for learning about Arduino, sensors, and safety systems in schools
and colleges.

26
CHAPTER 8

CONCLUSION AND FUTURESCOPE

CONCLUSION
The Fire and Gas Leakage Detection System Using Arduino demonstrates an efficient,
affordable, and reliable solution for monitoring and detecting hazardous conditions such as gas
leaks and fire outbreaks. By utilizing Arduino as the core processing unit, the system
successfully integrates sensors, alarms, and optional communication modules to provide real-
time monitoring and alerts. Its quick response capabilities and ease of use make it a practical
safety device for residential, commercial, and industrial environments. The project showcases
how embedded systems and IoT technologies can be combined to enhance safety and prevent
potential disasters. Despite minor challenges like environmental interference and network
dependency, the system's adaptability and scalability ensure it meets diverse safety requirements
effectively.

FUTURESCOPE

Future developments could include integrating additional sensors, such as smoke or temperature
detectors, for comprehensive hazard monitoring. Improved algorithms can reduce false positives
and enhance detection accuracy. Expanding the IoT functionality could allow for predictive
analytics and remote control of safety mechanisms, providing a more proactive approach to
safety. Incorporating battery backups and solar power could ensure uninterrupted operation in
areas prone to power outages. Moreover, miniaturization and modular designs could make the
system even more portable and user-friendly. These advancements would not only expand the
system’s applications but also contribute to its widespread adoption in smart homes, industries,
and public safety infrastructure.

27
REFERENCES
 Arduino.cc.(n.d.). Official Arduino Documentation and Tutorials.
https://www.arduino.cc
 Hanwei Electronics. (n.d.). MQ-2 Semiconductor Sensor for Combustible Gas.
https://www.hwsensor.com
 Electronics Hub. (2023). Understanding Flame Sensors and Their Applications.
https://www.electronicshub.org
 Internet of Things (IoT) Applications for Safety. (2022). Real-Time Monitoring Using
IoT Platforms.
https://www.iotforall.com
 Smith, J., & Patel, R. (2021). Design and Implementation of Fire and Gas Detection
Systems Using Microcontrollers. International Journal of Embedded Systems, 12(4), 56-
72.
 Kumar, A., & Singh, P. (2020). Arduino-Based Safety Mechanisms in Home and
Industry. Journal of Electronics and Communication Engineering, 8(3), 123-130.

 Wilson, T. (2020). Gas Leak Detection Systems in Industry: A Comparative Study.


Industrial Safety Review, 14(5), 34-41.

28

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy