0% found this document useful (0 votes)
14 views56 pages

Hybrid

The project report presents an IoT-Enabled Gas Leakage Detection System aimed at enhancing safety and enabling remote monitoring in various environments. It discusses the integration of hardware and software for effective gas leak detection, emphasizing the importance of automated systems over traditional methods. The research outlines the design, implementation, and evaluation of the system, demonstrating its potential to improve safety standards and operational efficiency.

Uploaded by

Sangram Sawant
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)
14 views56 pages

Hybrid

The project report presents an IoT-Enabled Gas Leakage Detection System aimed at enhancing safety and enabling remote monitoring in various environments. It discusses the integration of hardware and software for effective gas leak detection, emphasizing the importance of automated systems over traditional methods. The research outlines the design, implementation, and evaluation of the system, demonstrating its potential to improve safety standards and operational efficiency.

Uploaded by

Sangram Sawant
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/ 56

SAVITRIBAI PHULE PUNE UNIVERSITY

A PROJECT REPORT ON

“ IoT-Enabled Gas Leakage Detection System for


Enhanced Safety and Remote Monitoring”

SUBMITTED TO THE SAVITRIBAI PHULE PUNE UNIVERSITY, IN THE


COMPLETE FULLFILLMENT OF THE REQUIRMENTS FOR THE AWARD
OF THE DEGREE
BACHELOR OF ENGINEERING
(COMPUTER ENGINEERING)

Submitted By
Siddika Shaikh Roll No 32
Aditya Rokade Roll No 63
Sajid Nadaf Roll No 64
Affaan Attar Roll No 50

DEPARTMENT OF COMPUTER ENGINEERING

Shalaka Foundation’s Keystone School of Engineering


Near Handewadi Chowk, Pune-412308
2023-24
CERTIFICATE

This is to certify that the Project entitled

“ IoT-Enabled Gas Leakage Detection System for


Enhanced Safety and Remote Monitoring”
Submitted by

Siddika Shaikh Roll No 32

Aditya Rokade Roll No 63

Sajid Nadaf Roll No 64

Affaan Attar Roll No 50

Is a bonafide work carried out by his/her under the supervision of Prof. Prasanna
Kandekar and it is approved for the partial fulfillment of the requirement of Sav-
itribai Phule Pune University, Pune for the award of the degree of Bachelor of
Engineering (Computer Engineering)

Prof. Prasanna Kandekar Prof. S. S. Rajebhosale


Guide Head of the Department
Department Of Computer Engineering Department Of Computer Engineering

Dr. Sandip Kadam


Principal
Keystone School Of Engineering

Place : Pune
Date : 21/10/2024

Signature Of Internal Examiner Signature Of External Examiner

2
ACKNOWLEDGEMENT
We take immense pleasure in presenting the complete project report on ’IoT-Enabled Gas
Leakage Detection System for Enhanced Safety and Remote Monitoring’. We extend our deep-
est gratitude to our guide and project co-ordinator Prof. Prasanna Kandekar, co-guide,Prof.
Avneet kuar, for their unwavering support and guidance. We also wish to thank our Head of
Department, Prof. Sagar. Rajebhosale, for his invaluable insights. Our heartfelt appreciation
goes to Dr. Sandeep Kadam, Principal of our institution, and Prof. Y.R. Soman, Director,
for their encouragement and cooperation throughout the project. This project would not have
been possible without the support of our faculty members, laboratory assistants, dear parents,
and friends.

3
Abstract
This research explores the integration of essential hardware components and advanced soft-
ware systems to enable effective gas leak detection and timely response in industrial, commercial,
and residential environments. Gas leaks pose serious risks, including fire hazards, environmental
damage, and health threats. Traditional monitoring methods, often reliant on manual checks,
are prone to delays in emergency situations. This paper outlines the design, implementation,
and evaluation of an Automated Gas Leak Detection and Prevention System that leverages IoT-
enabled gas sensors, real-time data acquisition, and intelligent control mechanisms to enhance
safety. By offering a systematic approach to system design and application, this study advances
gas leak detection technology, demonstrating how automated solutions can significantly improve
safety standards, mitigate risks, and boost operational efficiency across diverse settings.

Keywords— Gas sensor, IoT, Automated response, Safety enhancement, Gas Leakage De-
tection, Real-time monitoring, Environmental protection, Smart control mechanisms, Isolation
Forest Model

4
Contents

1. Introduction 8
1.1 Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.2 Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.3 Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.4 Organization of Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

2. Project Perception and Study 12


2.1 Brief Introduction about project . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.2 Literature Review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.3 Observations of Literature Review . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.3.1 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.4 Problem Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.5 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.6 Goals and Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.7 Principles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.8 System Methodology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.9 Benefits of system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

3.System Architecture amd Requirement Analysis 25


3.1 System Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
3.2 Functional Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.3 Non-Functional Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.4 Feasibility Study . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
3.5 Risk Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
3.6 Planning and Scheduling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
3.7 Cost Estimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

4. System Modeling and Designing 35


4.1 UML Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
4.2 ER Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
4.3 Data Flow Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

5. Implementation 46
5.1 Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
5.1.1 Gas Leakage Detection and Prevention System Algorithm . . . . . . . . . 46
5.1.2 Predictive Maintenance Algorithm . . . . . . . . . . . . . . . . . . . . . . 46
5.2 Flow of Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
5.3 Methodology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
5.4 Psuedo Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
5.5 Screen Shots of Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

Conclusion 54

References 56

5
List of Figures
2.1 Agile methodology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.2 System Architechture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
3.3 Gantt Chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
4.4 use case diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
4.5 use case diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
4.6 Sequential Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
4.7 Activity diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
4.8 State Chart Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
4.9 Package Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
4.10 Deployment Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
4.11 Communication Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
4.12 ER Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
4.13 Level 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
4.14 Level 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
5.15 Flow Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
5.16 Simulation Diagram - 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
5.17 Simulation Diagram -2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
5.18 Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
5.19 Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

6
CHAPTER 1
INTRODUCTION

7
INTRODUCTION

1.1 Purpose
The purpose of this project is to create a robust and responsive gas leakage detection sys-
tem that leverages IoT technology to improve safety in residential, commercial, and industrial
environments. Gas leaks present serious hazards, including fire risks, health concerns, and
environmental damage, which can have devastating consequences if not detected early. An
IoT-enabled system integrates advanced sensors with real-time data transmission, allowing for
continuous monitoring of gas levels and immediate alerts to users and emergency services via
smartphones or other connected devices. This proactive approach enhances safety by enabling
remote monitoring, early detection, and automatic preventive measures, such as shutting off gas
supplies. The need for such a system is driven by the increasing use of gas-based equipment,
the growing focus on smart homes and industrial automation, and the demand for reliable,
real-time safety solutions.

1.2 Scope
The scope of this project extends to various environments, including residential buildings, in-
dustrial plants, commercial facilities, public infrastructure, and high-risk areas such as chemical
manufacturing sites, oil and gas refineries, food processing plants, pharmaceutical factories,
public utilities, waste management facilities, and marine operations. This gas leakage detection
system is designed to address safety needs in locations where hazardous gases like methane,
propane, or ammonia are commonly used, stored, or processed. In such settings, undetected
gas leaks can pose significant risks to personnel, the environment, and infrastructure. By pro-
viding real-time monitoring, automated response mechanisms, and remote access capabilities,
this system offers a proactive solution for gas safety. Furthermore, its versatility allows it to be
customized to meet specific safety requirements in various industries, enhancing security and
operational reliability across diverse applications.

1.3 Application
1. Residential Safety: The IoT-enabled gas leakage detection system can be implemented
in households to detect leaks from common cooking gases like LPG. This helps prevent
fires, explosions, and health risks by sending real-time alerts to homeowners, even when
they are away.

2. Industrial Gas Safety Monitoring: Many industrial facilities handle hazardous gases,
such as in chemical manufacturing, oil and gas, and pharmaceuticals. This system can
monitor gas levels continuously, providing immediate alerts to staff and automated re-
sponses like shutting off valves, thus enhancing workplace safety and protecting personnel.

3. Commercial Buildings and Public Spaces: Commercial kitchens, restaurants, and


large public buildings with centralized gas systems can use this technology to improve

8
safety for both employees and customers. The system provides a reliable solution for
early leak detection and immediate response, reducing the risk of accidents in high-traffic
areas.

4. Smart Cities Infrastructure: As cities adopt smart infrastructure, this IoT-based


system can be integrated within urban gas pipelines to provide widespread, automated
safety checks across entire neighborhoods. This proactive approach helps municipalities
manage public safety, minimize environmental hazards, and quickly address potential gas
leaks.

5. Remote Monitoring and Disaster Prevention in Isolated Areas: In remote lo-


cations or isolated facilities where human monitoring is limited, such as mining sites,
warehouses, or storage facilities, this system offers remote gas monitoring capabilities.
The system’s alerts and automated shut-offs allow for quick action to prevent disasters,
even if no personnel are on-site.

6. Healthcare Facilities: Hospitals and medical laboratories that use gases like oxygen
and nitrous oxide can integrate this system to ensure the safe handling and storage of
gases. The system aids in maintaining patient safety by alerting staff to any leaks that
may compromise air quality in critical areas.

7. Transportation and Logistics: In the transportation sector, particularly in vehicles


carrying hazardous or flammable gases, this system can detect leaks in transit. Logis-
tics companies can track gas levels remotely, ensuring the safety of both the transport
personnel and the public.

8. Marine and Offshore Operations: Offshore drilling platforms, ships, and other marine
vessels often handle combustible gases like methane or natural gas. An IoT-enabled
detection system helps manage gas safety in these high-risk environments, where quick
detection and response are essential to avoid accidents in remote, challenging-to-access
locations.

9. Oil and Gas Extraction Sites: This detection system is ideal for oil and gas fields where
flammable gas leaks could lead to serious accidents. By providing real-time monitoring
and immediate alerts, it helps to secure operations at extraction sites, protecting both
workers and the surrounding environment from the effects of gas leaks.

10. Hotels and Hospitality Industry: Hotels and restaurants use gas for cooking, heating,
and other operations. This system can improve guest and staff safety by continuously
monitoring for leaks and enabling prompt responses, even if the facilities are operating
around the clock.

11. Educational Institutions and Campus Safety: In schools and universities where
science laboratories may contain gases for instructional purposes, the detection system
ensures a safe environment by alerting faculty and staff to leaks, safeguarding students
and minimizing risks in educational facilities.

9
1.4 Organization of Report
This report on the ”IoT-Enabled Gas Leakage Detection System for Enhanced Safety and Re-
mote Monitoring” is organized to provide a comprehensive overview of the project’s purpose,
design, and impact. It starts with formal sections like the title page, certification, acknowledg-
ments, and an abstract summarizing key findings. The introduction covers the system’s purpose,
scope, and application across various environments. Next, the Project Perception and Study
section discusses the problem background, literature insights, and objectives, establishing the
project’s importance in addressing gas safety challenges. System Architecture and Requirement
Analysis outlines the technical requirements, feasibility, risk management, and cost planning,
while System Modeling and Designing includes diagrams and flowcharts to illustrate data flow
and system structure. In Implementation, the report describes the algorithm, methodology,
and screenshots for better understanding of system operation. The conclusion highlights the
project’s effectiveness and proposes future advancements. A references section lists all sources,
ensuring the report is thorough and well-structured for academic and practical insights.

10
CHAPTER 2
PROJECT PERCEPTION AND
STUDY

11
Project Perception and Study

2.1 Brief Introduction about project


The ”IoT Enabled Gas Leakage Detection System for Enhanced Safety and Remote Monitoring”
is a comprehensive system aimed at addressing the safety concerns associated with gas leakage
in residential, commercial, and industrial environments. This system leverages the Internet of
Things (IoT) to provide a real-time, automated solution for detecting gas leaks, ensuring that
any potential hazards are quickly identified and addressed. By using gas sensors connected to a
microcontroller, the system continuously monitors gas concentration levels in the environment.
If the gas concentration crosses a predetermined safety threshold, the system triggers an alarm
and sends an immediate notification to the user via a mobile application or web interface.
In addition to detection, the system is capable of initiating preventive actions such as au-
tomatically shutting off the gas supply to prevent further leakage or escalation into fires and
explosions. The use of IoT enables remote monitoring, which allows users to check the status
of the system from any location using their smartphone or connected devices, offering peace of
mind even when they are away from the premises.
The system is designed to work with common gases like LPG, natural gas, and methane,
which are frequently used in households and industries. It provides an additional layer of safety
by not only detecting gas leaks but also automating the response to emergencies, thus reducing
the dependency on manual intervention. The integration of real-time data analytics and alerts
makes the system more efficient and reliable compared to traditional gas leak detection methods.
The primary goal of this system is to enhance the safety and security of spaces that rely on
gas-based appliances or systems. By offering an automated, real-time, and remotely accessible
solution, this IoT-enabled gas leakage detection system can significantly reduce the risk of
accidents and ensure that corrective measures are taken swiftly to avoid damage to life and
property.

12
2.2 Literature Review
1. Paper Title: “Gas Detection And Environmental Monitoring Using Raspberry
Pi Pico”
Authors: Ch.Lasya, Y.Sirisha, S.Parvathi, Y.Geetha Kusuma
Published Year: 2024
Observations: This study employs an LCD display for real-time gas monitoring and utilizes
temperature and humidity sensors to enhance detection accuracy. Real-time alerts are provided
through both audible and visual mechanisms. Custom threshold values are set for different
gases, though the system lacks remote monitoring and has a limited detection range, which
could lead to false alarms[2].

2. Paper Title: “IOT BASED GAS LEAKAGE DETECTION”


Authors: Medabalimi Abhinay, Manda Paul Pramod, Mandapati Usha, Bala Brahmeswara
Kadaru
Published Year: 2024
Observations: Designed with a household focus, this system monitors the weight of gas con-
tainers and features an automated booking system. It provides users with a mobile application
interface, though it is limited to household applications and does not cater to industrial or
remote gas detection needs[1].

3. Paper Title: “Gas Leakage Detection System Using IoT and Cloud Technology”
Authors: V. Sharma,R. Dugyala,V.Padmavathi,G. Vijendar Published Year: 2023
Observations: The system detects gas leaks using IoT and cloud technology for real-time
monitoring and alerts. It depends on stable internet connectivity for cloud communication,
which may impact reliability in areas with unstable connections. Regular sensor calibration is
required to maintain accuracy, highlighting the importance of ongoing maintenance for optimal
performance[3].

4. Paper Title: “A Smart Natural Gas Leakage Detection and Control System for
Gas Distribution Companies of Bangladesh using IoT”
Authors: Md. Monirul Kabir, Mohammad Khalid Saifullah, Hilton Paul
Published Year: 2021
Observations: This system integrates app-controlled on/off valves for safety, as well as an
insulating kit. Real-time monitoring is provided via an LCD display, though the reliance on
threshold values can lead to data overload, which might reduce system effectiveness[4].

5. Paper Title: “Smart Gas Leakage Detection with Monitoring and Automatic
Safety System”
Authors: S.M. Zinnuraain, Mahmudul Hasan, Md. Akramul Hakque, Mir Mohammad Nazmul
Arefin
Published Year: 2019
Observations: Utilizing both visual and auditory alerts, this system provides real-time gas
leakage monitoring through an LCD display and the Blynk app. However, its threshold-based
system carries a risk of false alarms, and the paper provides limited additional information on
preventative measures[5].

13
6. Paper Title: “Gas Detection And Environmental Monitoring Using Raspberry
Pi Pico”
Authors: Y.Geetha Kusuma, S.Parvathi, Y.Sirisha, Ch.Lasya
Published Year: 2019
Observations: This system includes weight monitoring and an automated booking system,
notifying users via mobile devices. However, it lacks functionality for preventing gas leakage,
which limits its safety applications in industrial settings.

7. Paper Title: “Implementation of Ammonia Gas Leakage Detection and Moni-


toring System using Internet of Things”
Authors: J. Vijaya Lakshmi, Dr. G. Puthilibhai, S.R. Leoram Siddarth
Published Year: 2019
Observations: This system detects ammonia leaks and provides real-time IoT alerts to en-
hance safety. The accuracy of the sensors is influenced by environmental factors, necessitating
regular calibration. Consistent power supply and network connectivity are crucial for ensuring
reliable monitoring and timely alerts[7].

8. Paper Title: “IOT BASED GAS LEAKAGE DETECTION”


Authors: Metta Santiputri, Muhammad Tio
Published Year: 2018
Observations: Equipped with a custom Android application, this system issues alerts and
notifications, including an alarm. A flame sensor is included to detect fires; however, alerts are
triggered post-flame detection, and no preventive measures are implemented[8].

9. Paper Title: “LPG Monitoring and Leakage Detection System”


Authors: Shruthi Unnikrishnan, Mohammed Razil, Joshua Benny, Shelvin Varghese, C.V.
Hari
Published Year: 2018
Observations: This cost-effective and compact system includes leakage detection with an
alarm and integrates a mobile application for user convenience. It primarily displays gas levels
and leakage status without additional preventive measures, making it limited for industrial
safety applications[9].

10. Paper Title: “GSM Based Gas Leakage Detection System Using Arduino”
Authors: A. Beliraya, Yenepoya
Published Year: 2017
Observations: This compact, cost-effective system detects gas leaks and sends SMS alerts
via GSM. However, reliance on GSM limits its use in areas with poor signal, and the lack of
automatic shut-off makes it less ideal for high-risk industrial settings.[10]

14
2.3 Observations of Literature Review

Pub-
Sr. Findings
Paper title Authors lished Methodology
no
year
Environmental
Gas sensors detect
factors affect sensor
leakage, and an Arduino
GSM Based Gas accuracy, and GSM
microcontroller triggers
Leakage Detection A. Beliraya, network reliability
1 2017 an alarm and sends SMS
System Using and Yenepoya can delay alert
alerts via GSM when gas
Arduino. notifications in
levels exceed the
areas with poor
threshold.
signal coverage.
Sensor performance
may degrade due to
Gas sensors detect leaks,
Metta environmental
and data is processed by
Santiputri conditions, and the
IoT-based Gas Leak a microcontroller, which
2 and 2018 system requires
Detection Device sends information to the
Muhammad continuous power
cloud for monitoring and
Tio and stable internet
alerts.
for reliable
operation.
Shruthi Sensor accuracy is
Unnikrishnan, LPG gas sensors detect affected by
Mohammed leaks and send data to a temperature and
LPG Monitoring
Razil, Joshua microcontroller, which humidity, and the
3 and Leakage 2018
Benny, triggers alerts via a system depends on
Detection System.
Shelvin mobile app or IoT a continuous power
Varghese, and platform. supply and stable
C.V. Hari network connection.
S.M.
Zinnurain, Real-time monitoring Risk of false alarms,
Smart Gas Leakage Mahmudul using an LCD display, reliance on
Detection with Hasan, Md. with alerts and threshold values for
4 Monitoring and Akramul 2019 notifications provided via detection, and
Automatic Safety Haque, Mir the Blynk app; includes limited details on
System Mohammad audible and visual alert additional
Nazmul mechanisms functionalities.
Arefin
Risk of false alarms
Suma V, Monitors container due to
Gas Leakage Ramya R, weight; automated threshold-based
5 Detection Based on and Shekar 2019 booking system; provides detection; mainly
IoT Akshay notifications to users’ focused on
Kumar A mobile devices. household
applications.

15
Pub-
Sr.
Paper title Authors lished Methodology Findings
no
year
Accuracy is
influenced by
J. Vijaya
Implementation of Ammonia gas sensors environmental
Lakshmi, Dr.
Ammonia Gas detect leaks, with data conditions, with
G.
Leakage Detection sent to a microcontroller stable power and
6 Puthilibhai 2019
and Monitoring for processing and network
and
System using monitoring via IoT-based connectivity
S.R.Leoram
Internet of Things. platforms. necessary for
Siddarth
consistent
functionality.
A Smart Natural
Gas Leakage Md. Monirul
On/Off valves using app;
Detection and Kabir, Depends on
real-time monitoring
Control System for Mohammad threshold values;
7 2021 using LCD display;
Gas Distribution Khalid potential for data
includes an insulating kit
Companies of Saifullah, overload.
for safety
Bangladesh using Hilton Paul
IoT
Requires stable
Gas sensors send internet for cloud
V. Sharma, real-time data to a cloud communication, and
Gas Leakage
R. Dugyala, platform via a sensor calibration is
Detection System
8 V. 2023 microcontroller for necessary to
Using IoT and
Padmavathi, monitoring and maintain accuracy
Cloud Technology.
G. Vijendar generating alerts when in varying
gas exceeds thresholds. environmental
conditions.
Medabalimi
Abhinay, Primarily suitable
Monitors container
Manda Paul for household
weight; automated
IoT Based Gas Pramod, applications with
9 2024 booking system; provides
Leakage Detection Mandapati limited scalability
mobile application
Usha, Bala to industrial
interface
Brahmeswara settings.
Kadaru
The system offers
Lacks remote
real-time monitoring on
Ch.Lasya, monitoring, limited
Gas Detection and an LCD, customizable gas
Y.Sirisha, detection range,
Environmental thresholds, alerts, and
10 S.Parvathi, 2024 potential false
Monitoring Using temperature-humidity
Y.Geetha alarms, and relies
Raspberry Pi Pico sensing with
Kusuma on threshold-based
audible-visual
detection.
notifications.

16
2.3.1 Summary
The reviewed projects highlight limitations in existing gas detection systems, revealing several
key challenges. Most systems lack remote monitoring capabilities, limiting their usability in
industrial settings where constant oversight is essential. Reliance on threshold-based detection
methods can lead to frequent false alarms, affecting reliability and making systems less suitable
for environments requiring high precision. Some projects depend on stable internet or GSM con-
nectivity, which can compromise functionality in areas with poor signal strength. Additionally,
while many systems provide real-time alerts, few offer preventive control measures, restricting
their effectiveness in fully preventing gas leakage incidents. These gaps emphasize the need for
a more reliable, preventive, and adaptive gas leakage detection system that can overcome the
limitations of threshold reliance, improve accuracy, and extend remote monitoring capabilities,
particularly for industrial applications.

2.4 Problem Definition


The problem with current gas leak detection systems is that they aren’t fast or effective enough
in preventing accidents. Gas leaks can happen without warning due to things like faulty equip-
ment, poor installation, or aging infrastructure, leading to serious dangers like explosions or
fires. Most existing systems rely on people noticing the leak or reacting to alarms, which can
lead to delays, especially if no one is around. These systems also usually can’t be checked or
controlled remotely, meaning if a leak happens when you’re away, you won’t know until it’s too
late. Additionally, many systems don’t automatically shut off the gas in case of a leak, leaving
your home or workplace at risk. The need is for an IoT-enabled system that can instantly
detect gas leaks, send alerts to your phone or other devices, and allow remote monitoring and
automatic prevention, helping keep everyone safe.

2.5 Motivation
Gas leaks are a significant hazard in both industrial and residential environments, leading to
dangerous situations that can result in catastrophic accidents, property damage, and loss of
life. The motivation behind developing this system is driven by the pressing need to enhance
safety measures, particularly in environments where gas leaks can escalate into life-threatening
situations.
A real-life incident that underscores the critical need for such a project occurred in 2017 at an
industrial plant in Visakhapatnam, India, where a gas leak led to a devastating accident. A leak
of styrene gas—a toxic substance—spread rapidly from the plant, affecting nearby residential
areas. The tragedy resulted in several fatalities, hundreds of injuries, and widespread health
impacts on the community. This incident highlighted the gaps in existing gas detection and
safety mechanisms, which lacked both real-time alert systems and automatic preventive actions.
The delay in detecting and responding to the gas leak exacerbated the situation, with severe
consequences that could have been mitigated through timely intervention.
The proposed system aims to prevent similar incidents, Such a system would offer an addi-
tional layer of protection, ensuring quick detection and response to gas leaks, thereby signifi-
cantly reducing the risks posed by gas-related hazards.

17
2.6 Goals and Objectives
Goals

1. Enhance Safety Standards: Develop a system that significantly improves safety by


providing real-time gas leak detection and automatic preventive actions to reduce the risk
of fires, explosions, and health hazards.

2. Implement Reliable Remote Monitoring: Enable remote monitoring capabilities,


allowing users to check gas levels and system status from any location, ensuring continuous
safety management.

3. Minimize Human Dependency: Create an automated detection and response system


that reduces reliance on manual checks, ensuring a faster and more reliable response to
gas leak incidents.

4. Support Environmental Protection: Prevent gas leaks that can lead to environmental
contamination, contributing to eco-friendly operations by minimizing harmful emissions
and promoting safe gas handling practices.

Objectives

1. To design a hardware for detecting gas leakage:design a reliable hardware system


that detects gas leakage in real-time, promptly alerts users, and initiates safety measures
to prevent potential hazards in residential and industrial settings.

2. To Implement Real-Time Alerts: Set up instant notifications via smartphone or web


applications to inform users of gas leaks immediately, regardless of their location.

3. To Enable Automated Response Mechanisms: Integrate automated safety actions,


such as shutting off gas valves and triggering alarms, to prevent the escalation of detected
leaks.

4. To Ensure System Scalability and Compatibility: Design the system to be flexible


and scalable, allowing it to integrate with various environments, including smart home
systems, industrial control systems, and other IoT-enabled devices.

18
2.7 Principles
• Safety First: The primary principle of this project is to enhance safety by minimizing
the risks associated with gas leaks. Every aspect of the system—design, functionality, and
performance should prioritize the prevention of accidents, ensuring the safety of people,
property, and the environment.

• Reliability and Accuracy: The system must provide precise and reliable gas detection,
even in challenging or changing environments. It should be designed to accurately detect
various gas types and respond instantly, minimizing false alarms and ensuring dependable
performance.

• Real-Time Responsiveness: A key principle is immediate response capability. The


system should detect gas leaks and send alerts in real-time, allowing users to act swiftly.
Automated response mechanisms, like shutting off gas valves, should operate seamlessly
to prevent escalation of hazardous situations.

• Automation and Minimal Human Dependency: Reducing human intervention


through automation is crucial. The system should be able to perform routine moni-
toring, detect leaks, and initiate preventive measures without requiring manual checks,
making it more efficient and reducing the chance for human error.

• Data Privacy and Security: Given the system’s IoT-enabled functionality, ensuring
the privacy and security of data is essential. Data related to system performance, gas
levels, and user information should be protected from unauthorized access, aligning with
industry data security standards.

• Scalability and Flexibility: The design should support scalability to accommodate


diverse settings—from homes to large industrial facilities. The system should be adaptable
to different gas types and easily integrated with other IoT devices, smart home systems,
and industrial control systems.

19
2.8 System Methodology
This project follows an Agile SDLC methodology, emphasizing iterative and incremental
development. The focus is on delivering functional components in short sprints, ensuring con-
tinuous feedback and improvement.

We chose the Agile model for this project due to its flexibility and iterative approach, which suit
the evolving needs of an IoT-based safety system. Agile allows us to adapt quickly to changes
and integrate stakeholder feedback, essential for a project involving real-time gas detection and
remote monitoring. The model’s emphasis on delivering functional increments ensures that
critical features—such as alerts, automatic shut-offs, and remote monitoring—are continuously
tested and refined. Agile’s adaptability also enables us to address potential hardware-software
integration challenges early, reducing safety risks and ensuring a robust, reliable system that
aligns with user expectations. This collaborative and responsive approach makes Agile the ideal
choice for developing a proactive gas leakage detection solution.

Figure 2.1: Agile methodology

20
1. Planning Phase (Sprint 1 & Ongoing in Each Sprint)
• Gather requirements from stakeholders (end-users, safety experts, maintenance teams).

• Break down requirements into user stories and create a product backlog.

• Define the scope and objectives for each sprint.

• Prioritize tasks for the sprint.

Deliverables: Product backlog, sprint backlog with tasks and goals.

2. Design Phase (Sprint 2 & Repeated in Later Sprints)


• Design the system architecture, including IoT integration, cloud services, notification,
and remote monitoring interfaces.

• Create UI for dashboard and alert notification system.

• Plan the database schema for managing real-time sensor data.

Deliverables: System architecture diagrams, UI/UX wireframes, database schema.

3. Development Phase (Sprint 3 to Sprint 5)


• Implement gas detection and monitoring module with sensors integrated into the micro-
controller.

• Develop IoT-based remote monitoring and alerting functionalities.

• Build the mobile/web interface for real-time monitoring and control.

• Implement the automatic shut-off feature for enhanced safety during hazardous gas levels.

Deliverables: Functional IoT integration, remote monitoring interface, alert notification mod-
ule.

4. Testing Phase (Integrated in Each Sprint)


• Conduct unit testing on individual modules, such as gas detection and notifications.

• Perform integration testing for interactions between components.

• Conduct user acceptance testing (UAT) with end-users to ensure ease of use and reliability.

Deliverables: Test cases, test results, and bug reports.

5. Deployment Phase (Sprint 5 and Ongoing)


• Deploy incremental builds to a beta environment for testing.

• Implement CI/CD pipelines for streamlined updates.

• Roll out tested modules in a production environment.

Deliverables: Deployed beta version, incremental updates.

21
6. Review and Retrospective Phase (End of Each Sprint)
• Conduct sprint reviews to demonstrate completed features.

• Gather feedback from stakeholders for further refinement.

• Hold retrospectives to identify areas for improvement in development processes.

Deliverables: Updated product backlog, retrospective reports.

7. Maintenance and Support Phase (Post-Deployment)


• Monitor system performance and stability.

• Provide ongoing support through the maintenance team.

• Address issues and implement enhancements based on user feedback.

Deliverables: Regular updates, support tickets, and resolution logs.

22
2.9 Benefits of system
1. Real-Time Monitoring with a Live Dashboard: The system features an easy-to-use
dashboard that provides real-time information about gas levels and sensor data. As soon
as gas levels exceed safety limits, users are alerted instantly through notifications and
visual cues on the dashboard, enabling them to take quick action.

2. Reducing False Alarms using Machine Learning: False alarms are common in
traditional gas detection systems due to sudden sensor spikes. Our system overcomes
this by using the isolation forest machine learning model, which analyzes sensor data
to distinguish between normal variations and actual leaks. This improves accuracy and
reduces unnecessary alarms.

3. Predictive Pipeline Maintenance: The system doesn’t just detect gas leaks but also
monitors pipelines in real-time, tracking important factors like temperature, and gas
composition outside the pipes. By analyzing this data, the system can predict when
maintenance is needed, preventing failures before they happen.

4. Predictive Sensor Maintenance: In addition to pipeline monitoring, the system eval-


uates the performance of the sensors themselves, checking things like response time and
accuracy. If a sensor starts showing signs of failure, the system alerts the user, allowing
for timely maintenance and ensuring the system remains reliable.

5. Remote Valve Control: One of the standout features of the system is its ability to con-
trol gas flow remotely. From the dashboard, users can shut off gas valves in an emergency,
stopping leaks before they cause serious damage.

23
CHAPTER 3
SYSTEM ARCHITECTURE AND
REQUIREMENT ANALYSIS

24
3.1 System Architecture

Figure 3.2: System Architechture

This system architecture is a high-level design for a gas leak detection and monitoring system
using predictive maintenance and real-time alerting.

Components:
1. Sensors:
• Temperature Sensor: Monitors the temperature, which can help detect abnormal
heating related to gas leaks.
• Gas Sensor: Continuously monitors gas levels to detect any leaks or hazardous
levels.
2. Data Storage:
• Sensor Data DB: Stores real-time data from sensors, which can be used for mon-
itoring and trend analysis.
• Maintenance Logs DB: Stores maintenance-related data, such as logs generated
from predictive maintenance processes, ensuring the system can track and schedule
maintenance effectively.

25
3. Predictive Maintenance Service:

• Isolation Forest Model: This machine learning model analyzes the sensor data
for anomalies, such as unusual temperature or gas readings. It helps in identifying
potential issues before they escalate, reducing false alarms and predicting equipment
or sensor maintenance needs.

4. Alarming and Actuating System:

• Alarm, Valve, Exhaust: This component is responsible for triggering alarms,


controlling gas valves, and activating exhaust systems in case of a leak. If the
system detects abnormal readings, it can automatically shut off gas flow or start
exhaust fans to prevent hazards.

5. Live Dashboard:

• Provides real-time data to the user, showing sensor readings and any detected
anomalies. It enables remote monitoring, allowing users to keep track of gas levels
and take immediate action if necessary.

Workflow:
1. The temperature and gas sensors continuously send data to the Sensor Data DB.

2. The Predictive Maintenance Service, powered by the Isolation Forest Model, monitors
this data. If the model detects an anomaly, it logs this information in the Maintenance
Logs DB and alerts the Alarming and Actuating System if necessary.

3. When abnormal readings are detected (e.g., gas concentration exceeding safe limits), the
Alarming and Actuating System activates, triggering alarms and potentially shutting off
gas valves or activating exhaust fans to mitigate the leak.

4. The Live Dashboard provides a real-time interface for users to monitor the system’s status
and receive alerts, allowing prompt action when required.

This architecture emphasizes safety, reliability, and proactive maintenance, aiming to mini-
mize the risk of gas leaks through automated monitoring, alerting, and preventive measures.

26
3.2 Functional Requirements
1. Gas Detection and Monitoring: The system must be able to continuously detect
various gases such as LPG, methane, and other industrial gases using integrated sensors.
Real-time data collection should be maintained for effective monitoring.

2. Real-Time Alerts: Immediate notifications must be sent to users via smartphone or


web applications whenever a gas leak is detected, allowing prompt response regardless of
location.

3. Automated Response Mechanisms: The system should automatically initiate pre-


ventive actions when a leak is detected, such as shutting off gas valves and activating
alarms, to reduce the risk of fires and explosions.

4. User Interface for Remote Access: A user-friendly interface is required for monitor-
ing gas levels, system status, and settings control, allowing users to manage the system
remotely.

5. Data Privacy and Security: The system must protect data related to gas levels and
user information from unauthorized access, ensuring compliance with data security stan-
dards.

6. Scalability and Compatibility: The system design should be flexible to integrate


into different environments, including homes, industrial sites, and smart cities, and be
compatible with other IoT-enabled devices and control systems.

3.3 Non-Functional Requirements


1. Reliability and Accuracy: The system must provide accurate gas detection with
minimal false alarms, ensuring dependable operation in different environments.

2. Real-Time Responsiveness: It should detect gas leaks and send alerts instantly, al-
lowing users to respond promptly. Automated mechanisms like shutting off valves must
function without delay to prevent hazardous situations.

3. Scalability and Flexibility: The system must be adaptable to various settings, from
small homes to large industrial sites, and support integration with other IoT devices and
control systems, enhancing flexibility

4. User-Friendly Interface: The system’s interface should be easy to navigate, enabling


users to monitor gas levels and control system settings effectively(hybrid (1)).

5. Energy Efficiency: The system should be energy-efficient to support continuous oper-


ation, using low power or renewable energy sources wherever possible

27
3.4 Feasibility Study
To assess the feasibility of the gas leak detection and monitoring system, we analyze several
critical areas:

1. System Performance Feasibility (Detection Accuracy)

• Isolation Forest Model: The Isolation Forest model is applied to sensor data to
detect anomalies. Detection accuracy is measured with the following metrics:
– Precision (P): Measures the model’s accuracy in correctly identifying gas
leaks.
∗ True Positives (TP): Correctly detected gas leaks.
∗ False Positives (FP): Instances where a gas leak is incorrectly detected.
– Recall (R): Measures the model’s sensitivity in detecting all actual gas leaks.
∗ False Negatives (FN): Instances where a gas leak is missed.
– F1 Score: Provides a balanced measure of precision and recall to assess model
reliability.
– Model Optimization: The Isolation Forest parameters, such as contamina-
tion factor and number of trees, should be optimized to achieve a high F1
Score.

2. Real-Time Responsiveness Feasibility

• Latency Calculation: The total time delay from gas leak detection to alarm/valve
shutoff is modeled as:

Total Latency (L) = Ldetection + Lprocessing + Lresponse

• Supposed Values:
600ms = 250ms + 50ms + 300ms
– Detection Latency (Ldetection ): Time taken by sensors to detect gas con-
centration above threshold.
– Processing Latency (Lprocessing ): Time taken by the Isolation Forest model
to process data and detect anomalies.
– Response Latency (Lresponse ): Time taken by the system to shut off the
valve and activate alarms.
• Real-Time Response Goal: Minimize the total latency, ideally keeping it under
a specific safety threshold (e.g., 1 second for industrial standards).

3. Cost Feasibility

• Initial Costs:

Total Initial Cost (Cinitial ) = Csensors + Cmicrocontroller + Chardware + Csoftware

• Supposed Values:
2270 = 900 + 800 + 570 + 1000

28
– Sensor Costs (Csensors ): Includes costs of MQ2 gas sensors, temperature
sensors, and additional sensors.
– Microcontroller Costs (Cmicrocontroller ): Cost of a Raspberry Pi Pico or
other microcontroller.
– Hardware Costs (Chardware ): Includes alarms, valves, and exhaust systems.
– Software Development Costs (Csoftware ): Cost to develop and maintain a
live dashboard.
• Operational Costs:
– Maintenance Costs (Cmaintenance): Routine checks, sensor calibration,
and predictive maintenance costs.
– Energy Consumption Costs (Cenergy ): Based on energy consumption of
sensors and microcontrollers.
• Predictive Maintenance Model
– Failure Rate Prediction: The predictive maintenance algorithm assesses
sensor and pipeline health based on a failure rate model.
– Mean Time Between Failures (MTBF): Mean Time Between Failures
(MTBF) is a metric that indicates the average time a system or component
operates before experiencing a failure. It is commonly used to predict the re-
liability and expected uptime of equipment, helping in planning maintenance
and minimizing downtime. A higher MTBF value signifies greater reliability
and longer operational lifespan. Calculated as:

1
MTBF =
λ
where λ is the failure rate.
– Maintenance Scheduling: Based on MTBF values, schedule regular mainte-
nance to reduce downtime and extend system life.
• Scalability Feasibility
– System Expansion Potential: The system should scale from single installa-
tions (e.g., households) to industrial applications.
– Scalability Factor (S): Defined as the maximum number of sensors and de-
vices the system can support without performance degradation. Calculated
based on processing power, bandwidth, and response times.

By analyzing these factors, we assess the feasibility of implementing the gas leak detection and
monitoring system. High detection accuracy, minimal latency, reasonable costs, and scalability
are essential metrics indicating a feasible and effective solution. This feasibility study provides
a quantitative foundation for assessing the practical and economic viability of the proposed
system.

29
3.5 Risk Management
Effective risk management is essential for ensuring the safety, reliability, and operational effi-
ciency of a gas leak detection and monitoring system. The following are key risks identified for
the system, along with corresponding mitigation strategies:

1. Sensor Malfunction

• Risk: Gas sensors (e.g., MQ2) or temperature sensors may malfunction, leading to
incorrect gas concentration readings or failing to detect leaks.
• Impact: Failure to detect a gas leak promptly can result in accidents, property
damage, or environmental hazards.
• Mitigation Strategy:
– Implement predictive maintenance algorithms to monitor sensor health and
trigger maintenance alerts.
– Perform regular sensor calibration to maintain accuracy.
– Use redundant sensors (multiple sensors for the same area) to cross-check data
for reliability.

2. False Alarms

• Risk: The system may trigger false alarms due to environmental changes, interfer-
ence, or algorithm inaccuracies.
• Impact: Frequent false alarms can lead to ”alarm fatigue,” causing users to ignore
alarms, or can disrupt operations.
• Mitigation Strategy:
– Optimize the Isolation Forest model to reduce false positives by refining thresh-
old settings.
– Use temperature and humidity sensors alongside gas sensors to provide contex-
tual data, reducing the likelihood of false alarms.
– Alert users via a dashboard notification to verify the situation before activating
safety mechanisms like shutting off valves.

3. Power Failure

• Risk: A power outage can disable the gas leak detection system, leaving the area
unmonitored.
• Impact: If a gas leak occurs during a power failure, it could go undetected, increas-
ing the risk of accidents.
• Mitigation Strategy:
– Incorporate a backup power supply (e.g., UPS or battery backup) to keep the
system operational during outages.
– Implement fail-safe mechanisms that automatically activate alarms and shut-off
valves if power is lost.

30
4. Network Connectivity Issues

• Risk: The system relies on network connectivity for real-time monitoring and alerts,
which may be disrupted due to connectivity issues.
• Impact: Loss of connectivity could prevent the system from sending alerts, affecting
timely responses to gas leaks.
• Mitigation Strategy:
– Design the system to store data locally and synchronize once connectivity is
restored.
– Implement a notification system that alerts users to connectivity issues so they
can take manual precautions.

5. Hardware Failure (Valves, Alarms)

• Risk: Mechanical components such as automatic shut-off valves, alarms, or exhaust


systems may fail.
• Impact: Failure of these components can reduce the system’s ability to contain or
alert to a gas leak.
• Mitigation Strategy:
– Implement regular testing and maintenance schedules for hardware components.
– Use high-quality, reliable hardware that meets industry standards for durability
and safety.
– Monitor hardware performance in real-time and trigger maintenance requests
based on usage data or detected faults.

6. Regulatory Compliance Risks

• Risk: The system must comply with industry standards and regulations regarding
gas detection and safety.
• Impact: Non-compliance could lead to legal repercussions, fines, and lack of certi-
fication for industrial use.
• Mitigation Strategy:
– Ensure the system design adheres to relevant industry standards (e.g., OSHA,
NFPA).
– Conduct regular compliance audits to verify that all aspects of the system align
with regulatory requirements.
– Keep updated on regulatory changes and adjust the system design and operation
accordingly.

31
3.6 Planning and Scheduling

Figure 3.3: Gantt Chart

32
The Gantt chart illustrates the project timeline for creating a gas leakage detection and monitor-
ing system. It starts with Project Planning and Requirement Gathering from September
4 to September 13, 2024, involving the definition of system requirements and identification of
both hardware and software components. System Design takes place between September 11
and September 27, focusing on architecture creation, software requirements definition, and pre-
liminary design. Hardware and Component Procurement follows from September 30 to
October 10, involving identification, purchase, inspection, and testing of hardware. The final
phase, Live Dashboard and Control System Development, spans October 10 to October
20, focusing on building a live monitoring dashboard for real-time tracking and control.

3.7 Cost Estimation

Table 3.2: Hardware Cost Estimate for Deployment

Item Quantity Cost per Unit () Total ()


MQ2 Sensors 3 150 450
Temperature Sensors 3 150 450
Servo Motor 1 200 90
Buzzer 3 90 270
Arduino Uno 1 800 800
Miscellaneous (Wires, Batteries) – – 150
Total Hardware Cost – – 2210

33
CHAPTER 4
SYSTEM MODELING AND
DESIGNING

34
4.1 UML Diagrams

1. Class Diagram

Figure 4.4: use case diagram

The diagram represents the static structure of the system, showing its classes, attributes,
methods, and relationships. Includes entities like GasSensor, Microcontroller, Actuator, and
their attributes and methods. Highlights associations, such as Microcontroller controlling Ac-
tuator and triggering Alarm. Provides a blueprint for system design and implementation.

35
2. Use-Case Diagram

Figure 4.5: use case diagram

Illustrates functional requirements by capturing interactions between users (actors) and the
system. Includes actors like User and use cases such as Monitor Gas Levels and Trigger Alarm.
Shows how actors interact with specific system functionalities. Ensures all user requirements
are accounted for.

36
3. Sequence Diagram

Figure 4.6: Sequential Diagram

Captures the sequence of interactions between system components over time. Includes ob-
jects like GasSensor, Microcontroller, and Alarm. Depicts the order of messages exchanged to
achieve functionalities like gas monitoring. Ensures clarity on interaction timing and order.

37
4. Activity Diagram

Figure 4.7: Activity diagram

Visualizes the dynamic behavior and workflow of the system’s processes. Includes activities
like Detect Gas Levels, Log Data, and Trigger Alarm. Depicts the flow of control from one
activity to another, including decision points. Helps in understanding system operations and
refining workflows.

38
5. State Chart Diagram

Figure 4.8: State Chart Diagram

Represents the states and transitions of system components, particularly for dynamic be-
havior. States like Idle, Monitoring, and Alarm Triggered. Shows how the system transitions
between states based on events like Gas Detected. Aids in defining system behavior under
different conditions.

39
6. Package Diagram

Figure 4.9: Package Diagram

Organizes the system into logical groups to manage dependencies and structure. Packages
like Sensor Module, Control Module, and User Interface. Shows how these packages depend on
or interact with each other. Simplifies system design by modularizing components.

40
7. Deployment Diagram

Figure 4.10: Deployment Diagram

Illustrates the physical deployment of system components on hardware. Nodes like Micro-
controller, Gas Sensor, and Actuator. Shows how components are connected, such as Microcon-
troller controlling Actuator. Helps in planning hardware configuration and system deployment.

41
8.Communication Diagram

Figure 4.11: Communication Diagram

Focuses on the interactions between system objects, emphasizing communication links. Ob-
jects like GasSensor, Microcontroller, and User. Shows message exchange paths to achieve tasks
like data logging and alerting. Complements sequence diagrams by showing object relationships
and interactions

42
4.2 ER Diagram

43
Figure 4.12: ER Diagram
4.3 Data Flow Diagram

Figure 4.13: Level 0

Figure 4.14: Level 1

The data-flow diagram (DFD) illustrates the flow of data within the system, highlighting how
information is processed and exchanged between different components. It consists of elements
such as GasSensor, Microcontroller, Actuator, and User, showing data movement through pro-
cesses like Monitor Gas Levels, Log Data, and Trigger Alarm. Data stores, if used, represent
repositories where information is stored for later use. The diagram emphasizes the inputs and
outputs for each process, providing a clear view of how data travels and is transformed within
the system. This ensures efficient data handling and helps in identifying potential bottlenecks
or redundancies in the workflow.

44
CHAPTER 5
IMPLEMENTATION

45
5.1 Algorithm
5.1.1 Gas Leakage Detection and Prevention System Algorithm
1. Start: The algorithm begins by starting the gas leakage detection system.

2. Initialize sensors and system components:

• The system initializes all sensors (such as the MQ2 gas sensor and temperature
sensor) and other essential components needed for data collection and analysis.

3. Collect data from MQ2 gas sensor and temperature sensor:

• The system gathers real-time data from both the gas sensor (for gas concentration)
and the temperature sensor.

4. Temperature Threshold Check:

• Condition: If the temperature sensor detects a value above 50°C:


– Action: An alert is sent to the dashboard to warn the user, and the system
activates an alarm.
• Else Condition: If the temperature is below 50°C, the system continues monitoring
without triggering alarms or alerts.

5. Gas Leak Detection using Isolation Forest Model:

• Condition: If a gas leak is detected based on the Isolation Forest model (an
anomaly detection model):
– Action: The system shuts off the gas valve and activates an alarm.
• Else Condition: If no gas leak is detected, the system continues monitoring.

6. Run Predictive Maintenance Algorithm:

• The system runs a separate predictive maintenance algorithm to ensure sensors and
pipelines are functioning properly.

7. Display data on the dashboard:

• All collected and processed data is displayed on the user dashboard for real-time
monitoring.

8. End: The algorithm completes its cycle, restarting or looping for continuous monitoring.

5.1.2 Predictive Maintenance Algorithm


1. Initialize false spike counter and spike limit:

• Set up two parameters:


– false spike counter: Tracks sudden, brief spikes that may indicate sensor
wear.

46
– spike limit: Defines the maximum allowed false spikes before flagging the
sensor for maintenance.

2. Collect data from sensors continuously:

• The algorithm continuously monitors the sensors to collect data and detect irregu-
larities.

3. Loop Through Each Sensor Reading:

• For each sensor reading, the algorithm checks for false spikes.

4. False Spike Check:

• Condition: If the reading shows a false spike:


– Action: Increment the false spike counter by 1.
• Else Condition: If the reading is normal:
– Action: Reset false spike counter to 0.

5. Check for Maintenance Requirement Based on False Spikes:

• Condition: If false spike counter reaches or exceeds spike limit:


– Action: Flag the sensor for maintenance.

6. Analyze Data for Continuous Abnormal Values:

• The algorithm evaluates if persistent abnormalities are present in readings.

7. Pipeline Maintenance Check:

• Condition: If continuous abnormalities are observed:


– Action: Flag the pipeline for maintenance.

8. Reset Counters After Maintenance:

• After flagged components are maintained, the algorithm resets all counters.

9. End: The predictive maintenance algorithm concludes, restarting for continuous moni-
toring.

47
5.2 Flow of Project

Figure 5.15: Flow Diagram

The gas leak detection and monitoring system begins by initializing the sensors and components,
followed by data collection from MQ2 gas sensors and temperature sensors. The system first
checks if the temperature exceeds 50°C; if so, it triggers an alert on the dashboard and activates
an alarm to warn of potential risks. If the temperature is within safe limits, the system proceeds
to run a predictive maintenance algorithm to assess the condition of the pipelines and sensors,
helping to anticipate any potential failures. The MQ2 gas sensor data is analyzed using the
Isolation Forest model, which detects anomalies in gas concentration that may indicate a leak.
If a gas leak is identified, the system automatically shuts off the valve to stop the gas flow and
triggers an alarm to alert users. All collected data and system status updates are displayed on
a live dashboard for continuous monitoring. This process ensures real-time detection of unsafe
conditions, immediate alerts, and automated preventive actions to maintain safety.

48
5.3 Methodology
The IoT-based gas leakage detection and monitoring system is designed to provide comprehen-
sive, real-time safety management. First, gas, temperature, and humidity sensors are strate-
gically installed in high-risk areas to continuously monitor environmental conditions. These
sensors transmit data to a central microcontroller, which preprocesses it by filtering out noise
and unnecessary information. This refined data is then analyzed by an isolation forest model,
a machine learning algorithm that detects anomalies in the sensor readings. By identifying
unusual patterns, the system distinguishes between genuine leaks and false alarms, a common
issue in traditional threshold-based systems. Custom thresholds for various gases are also im-
plemented to detect specific leaks according to safety standards.

Real-time monitoring is conducted through a live dashboard, which provides an accessible in-
terface displaying current gas levels, temperature, and humidity data. When gas levels surpass
safe limits or an anomaly is detected, the system triggers alerts via visual cues and audible
notifications on the dashboard, along with user notifications. Additionally, the system includes
predictive maintenance features for both pipelines and sensors. By analyzing environmental
data around pipelines, it can predict maintenance needs to prevent unexpected failures. Simi-
larly, the system monitors sensor performance over time, tracking response speed and accuracy
to detect early signs of deterioration. This predictive functionality ensures reliable system op-
eration and reduces downtime due to sensor failures.

In critical situations, the system allows authorized users to remotely control gas flow by shutting
off valves through the dashboard, a feature that enables quick emergency response to potential
leaks. If a severe leak is detected, the system automatically activates alarms and other safety
responses, notifying on-site personnel and stopping machinery as needed to prevent further
hazards. Incident and sensor data are continuously logged, enabling a comprehensive record
for future analysis and system improvement. This integrated approach to monitoring, anomaly
detection, and automated safety interventions provides robust protection for industrial settings,
enhancing both safety and operational efficiency.

49
5.4 Psuedo Code
Algorithm for Triggering alarm and sending alerts

Algorithm 1 Gas Leakage Detection and Prevention System


1: Start
2: Initialize sensors and system components
3: Collect data from MQ2 gas sensor and temperature sensor
4: if Temperature ¿ 50°C then
5: Send alert to dashboard
6: Activate alarm
7: else
8: Continue
9: end if
10: if Gas leak detected (Isolation Forest Model) then
11: Shut off valve
12: Trigger alarm
13: else
14: Continue
15: end if
16: Run predictive maintenance algorithm
17: Display data on dashboard
18: End

Algorithm for predictive maintainance of sensors and pipes

Algorithm 2 Predictive Maintenance Algorithm


1: Initialize false spike counter and spike limit
2: Collect data from sensors continuously
3: for each sensor reading do
4: if sensor reading shows a false spike then
5: Increment false spike counter
6: else
7: Reset false spike counter to 0
8: end if
9: end for
10: if false spike counter ≥ spike limit then
11: Flag sensor for maintenance
12: end if
13: Analyze data for continuous abnormal values
14: if abnormalities persist then
15: Flag pipeline for maintenance
16: end if
17: Reset counters after maintenance
18: End

50
5.5 Screen Shots of Implementation

Figure 5.16: Simulation Diagram - 1

Figure 5.17: Simulation Diagram -2

51
Figure 5.18: Implementation

Figure 5.19: Implementation

52
CONCLUSION

53
CONCLUSION

The implementation of advanced gas leak detection systems, as discussed in the reviewed papers,
is crucial in addressing the increasing need for reliable and scalable solutions that prioritize per-
sonnel safety, environmental protection, and operational efficiency. These systems, which incor-
porate real-time monitoring, wireless communication, and automatic response mechanisms such
as alarms and shut-off valves, provide immediate and effective responses to potential gas haz-
ards. By utilizing sophisticated technologies like FPGA, GSM modules, and microcontrollers,
these solutions ensure timely detection and mitigation of gas leaks, whether in industrial or do-
mestic settings. The successful adoption of such systems will play a significant role in creating a
safer, more efficient industrial landscape, reinforcing the commitment to health, safety, and en-
vironmental stewardship. Specifically, the integration of real-time monitoring and alert systems
allows companies to swiftly respond to potential gas leaks, preventing accidents, minimizing
environmental damage, and enhancing overall production efficiency. This shift towards more
proactive and automated gas leak detection is essential for fostering a safer, more sustainable
future across various sectors.

54
REFERENCES

55
REFERENCES

[1] Bala Brahmeswara Kadaru (2024). IoT Based Gas Leakage Detection.

[2] Y. Geetha Kusuma (2024). Gas Detection and Environmental Monitoring Using Rasp-
berry Pi Pico.

[3] V. Sharma, R. Dugyala, V. Padmavathi, and G. Vijendar (2023). Gas Leakage Detection
System Using IoT and Cloud Technology.

[4] Mohammad Khalid Saifullah (2021). A Smart Natural Gas Leakage Detection and Control
System for Gas Distribution Companies of Bangladesh using IoT.

[5] S. M. Zinnuraain (2019). Smart Gas Leakage Detection with Monitoring and Automatic
Safety System.

[6] Ramya R Shekar (2019). Gas Leakage Detection Based on IoT.

[7] J. Vijaya Lakshmi, Dr. G. Puthilibhai, and S. R. Leoram Siddarth (2019). Implementa-
tion of Ammonia Gas Leakage Detection and Monitoring System using Internet of Things.

[8] Metta Santiputri (2018). IoT-based Gas Leak Detection Device.

[9] Shruthi Unnikrishnan (2017). LPG Monitoring and Leakage Detection System.

[10] A. Beliraya and Yenepoya (2017). GSM Based Gas Leakage Detection System Using
Arduino.

56

You might also like