Final Report
Final Report
Final Report
Submitted to
Submitted by
Kripesh Sharma(6-2-432-127-2020)
February, 2024
Kiran Bagale
Tribhuvan University
SUPERVISOR’S RECOMMENDATION
-------------------------------------
SIGNATURE
Kiran Bagale
PROJECT SUPERVISOR
Tribhuvan University
This is to certify that this project prepared by “Sujan Reshmi” and “Kripesh Sharma”
entitled “LPG GAS LEAK DETECTION SYSTEM” in partial fulfillment of the
requirement for the degree of Bachelor in Computer Application has been evaluated. In
our opinion it is satisfactory in the scope and quality as a project for the required degree.
--------------------------------- ----------------------------------------
Mr. Phul Babu Jha
Kiran Bagale
Coordinator
Lecturer, Project Supervisor
Department of BCA
Madan Bhandari Memorial College
Madan Bhandari Memorial College
--------------------------------------- --------------------------------------
ABSTRACT
Safety plays a major role in today’s world and it is necessary that good safety systems are
to be implemented in places of education and work. This work modifies the existing
safety model installed in industries and this system also be used in homes and business
premises. One of the preventive measures to avoid the danger associated with gas leakage
is to install a gas leakage detector at vulnerable locations. A gas detector is a device that
detects the presence of gases in an area, often as part of a safety system. Gas Detector
where it can sound an alarm to operators in the area where the leak is occurring, giving
them the opportunity to fix or leave. This type of device is important because there are
many gases that can be harmful to organic life, such as humans or animals. This system
provides an approach to discover LPG discharge supported microcontroller. To alert on
Liquefied rock oil Gas (LPG) leakage and preventing any unwanted incident, we need to
apply some cautions to discover the discharge. This system aims to provide a solution to
this problem by building a device which will do the area monitoring continuously. The
gas sensor provides data to ESP32, and then the results are displayed as a warning to the
user via a smart-phone device [1]. Using this device users will be able to prevent
accidents that occur due to harmful gas leaks so that accidents can be avoided.
Keywords: LPG, Fire detection, Gas leakage detection, GSM Module, Gas Leakage
Prevention, IoT (Internet of Thing)
i
ACKNOWLEDGEMENT
The project work presented in this report has been carried out and presented at Madan
Bhandari College, Faculty of Humanities and Social Sciences Tribhuvan University of
Technology as a part of Bachelors of Arts in Computer Application. Project is a test of
not only technical skills but also team work and performance under various constraints.
This journey cannot be successfully accomplished without help from experts.
We will be ever grateful to our supervisor Mr. Kiran Bagale, Lecturer without whose
guidance, this project would not have become successful. We are also grateful to our
department coordinator Mr. Phul Babu Jha. Finally, our greatest appreciation and love
goes to our families, friends and mentors and for sure this would not have happened
without their unconditional love, care and support.
ii
TABLE OF CONTENTS
ABSTRACT........................................................................................................................
ACKNOWLEDGEMENT................................................................................................
TABLE OF CONTENTS.................................................................................................
LIST OF ABBREVIATION..............................................................................................
LIST OF FIGURES..........................................................................................................
LIST OF TABLES...........................................................................................................
CHAPTER 1: INTRODUCTION....................................................................................
1.1. Introduction..............................................................................................................
1.2. Problem Statement...................................................................................................
1.3. Objectives................................................................................................................
1.4. Scope and Limitation...............................................................................................
1.5. Report Organization.................................................................................................
CHAPTER 2: BACKGROUND STUDY AND LITERATURE REVIEW..................
2.1. Background Study....................................................................................................
2.2. Literature review......................................................................................................
CHAPTER 3: SYSTEM ANALYSIS AND DESIGN.....................................................
3.1. System Analysis......................................................................................................
3.1.1 Requirement Analysis.........................................................................................
3.1.2 Feasibility Analysis.............................................................................................
3.1.3 Data Modeling (ER-Diagram)............................................................................
3.1.4 Process Modeling (DFD)....................................................................................
3.2. System Design......................................................................................................
3.2.1 Architecture Design..........................................................................................
3.2.2 Database Schema Design..................................................................................
3.2.3 Interface Design................................................................................................
3.2.4 Physical DFD....................................................................................................
CHAPTER 4: IMPLEMENTATION AND TESTING.................................................
4.1 Implementation.......................................................................................................
4.1.1 Tools Used........................................................................................................
4.1.2 Hardware Used.................................................................................................
4.1.3 Implementation Details of Modules.................................................................
iii
4.2 Testing.....................................................................................................................
4.2.1 Test case for unit testing...................................................................................
4.2.2 Test case for system testing..............................................................................
CHAPTER 5: CONCLUSION AND FUTURE RECOMMENDATIONS.................
5.1 Lesson Learnt / Outcome........................................................................................
5.2 Conclusion..............................................................................................................
5.3 Future Recommendations.......................................................................................
REFERENCES................................................................................................................
APPENDICES..................................................................................................................
iv
LIST OF ABBREVIATION
BaaS: Backend-as-a-Service
JS: JavaScript
v
LIST OF FIGURES
vi
LIST OF TABLES
Table 4-1 Gantt
chart............................................................................................................7
Table 4-2 Testing Registration
Form .................................................................................18
Table 4-3 Testing Login
Form ...........................................................................................19
Table 4-4 Testing Gas
Level...............................................................................................20
Table 4-5 System Testing...................................................................................................20
vii
viii
CHAPTER 1: INTRODUCTION
1.1. Introduction
The LPG Gas Leak Detection system is a solution designed to ensure safety and prevent
hazardous situations from gas leaks in residential and commercial environments by using
IoT devices. The purpose of the LPG Gas Leak Detection system is to detect the presence
of gas leaks at an early stage by using several IoT devices and provide timely alerts to
minimize potential risks. The system contains some kind of sensing technologies like the
MQ-2 gas sensor which has the ability to sense multiple gases. It analyzes the gas
concentration levels and compares them to predefined thresholds[1]. If the gas
concentration exceeds the threshold, indicating a potential leak, the control unit triggers
the alert mechanism to notify the users. The alert mechanism can take various forms,
such as audible alarms (buzzers), visual indicators (LEDs), and remote notifications.
Using this device users will be able to prevent accidents that occur due to harmful gas
leaks so that accidents can be avoided [1].
1.3. Objectives
The main objective of this project is:
i. To detect gas leaks in real-time and alert users to take appropriate safety measures.
ii. To enable remote monitoring of gas levels and conditions.
2
CHAPTER 2: BACKGROUND STUDY AND LITERATURE
REVIEW
LPG is one of the alternate fuels used now days. This gas is commonly used for
heating appliances, hot water, cooking, and various other purposes also [3]. In such a
case, gas leakage security systems become an essential and help to protect from gas
leakage accidents.
Dr. Chetana Tukkoji and Mr. Sanjeev Kumar A.N conducted on research on “LPG
Gas Detection using IOT”. In this research paper, Arduino was introduced as
microcontroller board and MQ-6 as gas sensor. Their device alerts the gas leak with
sound in buzzer. The LPG or gas that is combustible mixture of organic compound
gases utilized in use as fuel in abundant application like homes, hostels, industries,
automobiles' vehicles attributable to its fascinating properties that embrace high hot
price, that manufacture the less smoke, produces less soot and doesn't cause abundant
hurt to the setting [4].
Arun Mahas, Neeraj Chambyal, Manish Raina, Dr. Simmi Dutta and Er. Prabhjot
Singh conducted on research on “LPG Gas Leakage Detection using IOT”. In this
research paper, NodeMCU was introduced as microcontroller board and MQ-5 as gas
sensor. This technique triggers buzzer and displays the severity of the escape to alert
individuals once LPG escape is detected [1].
3
CHAPTER 3: SYSTEM ANALYSIS AND DESIGN
i. Functional Requirements
These requirements are what of your website i.e. it includes the functions and core
operations of LPG Gas Leak Detection System which lets the users interact with the
website. It defines what will happen when there is gas leak. These are tangible, easy to
quantify and understand, and typically define the behavior of a system based on user
interactions.
4
Figure 0.1 Use case diagram of LPG Gas Leak Detection System
In the above use case diagram, it consists of stick figures representing different roles:
User, Gas Sensor, and Alert System. Oval shapes represent steps or actions in the
process: Sign up, Login, Monitor System, Detects Gas Leak, Generate alert, Respond
to Alert and Logout. Arrows indicate the flow of actions or interactions between
different roles and steps. In this system, a user initiates interaction by signing up and
logging in. The user can then monitor the system, which is concurrently overseen by
a gas sensor. If the gas sensor detects a gas leak, it triggers an alert system that
generates an alert. The user, informed of the potential hazard, is expected to respond
to this alert accordingly. After addressing the alert or completing their monitoring
session, the user logs out of the system, ending their interaction with it. This
systematic process ensures that both manual (user) and automated (gas sensor and
alert system) monitoring are in place for effective gas leak detection and response.
5
ii. Non-Functional
NFRs describe the general properties of a system. They are among the most important
things to define when building the specification for LPG gas leak detection system, as
most have a direct impact on the experience and satisfaction of your users. Here are some
basic types of non-functional requirements:
a. Reliability
The system should be highly reliable, ensuring consistent and accurate
performance in detecting gas leaks.
b. Availability
The system should have a high level of availability, ensuring continuous operation and
minimal downtime to provide uninterrupted gas leak monitoring.
c. Response Time
The system should have a fast response time, providing immediate alerts and
notifications upon detecting a gas leak to facilitate swift response and mitigation
measures.
6
iv. Schedule
This includes the project schedule and all time allocated for their completion. The Gantt
chart is as follow:
Table 0-1 Gantt chart
Ta sk
Plan n in g
An aly sis
Desig n
Co d in g
7
3.1.3 Data Modeling (ER-Diagram)
8
A context diagram, also known as a system context diagram or level 0 DFD (Data
Flow Diagram). The above context diagram of LPG Gas Leak Detection System
provides a high-level view of a system or process and its interaction with external
entities. It illustrates the boundaries of the system and shows how it interacts with
external entities without going into detailed internal processes. It is supposed to be an
abstract view, with the mechanism represented as a single process with external
parties.
The diagram consists of five processes: Validate user details for registration,
Authenticate user, ESP 32 Microcontroller, Data Processing, Real-time Database
(RTDB) and Alert Processing. First, user registers by providing details which are
validated and after the registration success, user authentication is carried out during
log in process. The User Interface component also interacts with the Users database
to authenticate users and display error messages if needed . The Gas Sensor collects
9
ambient gas data and sends it to the ESP 32 Microcontroller. The microcontroller
processes this data and sends it to Data Processing for further analysis and the Real-
time Database (RTDB) for storage. The processed data is displayed and analyzed in
the User Interface where the user can access it. If there’s an alert, the Alert Processing
system notifies the user.
10
Figure 0.6 Architecture design of LPG Gas Leak Detection System
11
Figure 0.8 User registration Page
As shown as above figure this is the landing page of our system, serving as the index
page. It provides a registration system for user. To access the system, it is necessary
to have a registered account within this system and in order to register you have to
enter your valid information.
12
In the above figure you can login into the system as a user by using the registered
account details and access the dashboard panel.
c) Dashboard page
The interface design for dashboard page is shown below:
13
Figure 0.11 Physical DFD of LPG Gas Leak Detection System
The system consists of four main components: Gas Sensor MQ-2, ESP 32
Microcontroller, Firebase Realtime Database (RTDB), and Data Processing. The Gas
Sensor MQ-2 captures ambient gas data and sends it to the ESP 32 Microcontroller for
processing. The ESP 32 Microcontroller processes the gas data and stores it into the
Firebase Realtime Database (RTDB), which is a cloud database that stores real-time data.
The Data Processing component fetches the gas data from the ESP 32 Microcontroller
and performs further analysis and alert processing. It also interfaces with the User
Interface component, which displays and analyzes the data for the users. The user
Interface component also interacts with the Users database, which contains user
information for authentication purposes. Users can register or log in to access the system
and view the gas data. The system also displays error messages if there are issues with
user login or registration. The user Interface component also interacts with the Users
database, which contains user information for authentication purposes. Users can register
or log in to access the system and view the gas data. The system also displays error
messages if there are issues with user login or registration.
14
CHAPTER 4: IMPLEMENTATION AND TESTING
4.1 Implementation
Implementation is the process of putting a decision or plan into effect. During
implementation we start coding according to our requirement.
15
4.1.2 Hardware Used
a) ESP32
ESP32 is a series of low-cost, low-power system on a chip microcontrollers with
integrated Wi-Fi and dual-mode Bluetooth.is also an open - source IoT board.
b) Arduino UNO
The Arduino UNO is a standard board of Arduino. Arduino UNO is based on an
ATmega328P microcontroller. It is easy to use compared to other boards, such as the
Arduino Mega board, etc. The board consists of digital and analog Input/Output pins
(I/O), shields, and other circuits.
d) Buzzer
A buzzer or pager is an audio signaling device, which can be mechanical, mechanical
device, or electricity (Piezo for short). lt has 2 pins in it. It’s easy construction and low
worth makes it usable in varied applications like car/truck reversing indicator, computers,
decision bells etc. Once subjected to an alternating field of force they stretch or compress,
in accordance with the frequency of the signal thereby producing sound.
e) Jumper wires
A jumper wire is associate electrical wire, or cluster of them forming a cable, with a
connecter or pin at every finish (or typically while not them - merely "tinned"), that is
often accustomed interconnect the components of a breadboard or other prototype or test
circuit, internally or with other equipment or components, without soldering. Individual
jump wires are fitted by inserting their "end connectors" into the slots provided during a
board, the header connecter of a printed circuit, or a chunk of equipment.
f) Breadboard
A Breadboard is simply a board for prototyping or building circuits on. It allows you to
place components and connections on the board to make circuits without soldering. The
16
holes in the breadboard take care of your connections by physically holding onto parts or
wires where you put them and electrically connecting them inside the board.
g) Connecting wires
A wire may be a single, typically cylindrical, versatile strand or rod of metal. Wires
square measure accustomed bear mechanical masses or electricity and
telecommunications signals. Wire is often fashioned by drawing the metal through a hole
in a very die or draw plate. Wire gauges are available in numerous customary sizes, as
expressed in terms of a gauge range.
h) LED indicator
LED indicators are illuminated components used to show the status of a function, a
battery, or electronics.
17
4.2 Testing
Once source code has been generated, software must be tested to correct as many
errors as possible before delivery to customer. Our goal is to design a series of test
cases that have a high likelihood of finding errors. Following testing techniques are
well known and the same strategy is adopted during this project testing.
18
password
doesn’t
match
5 User enters Username: Sujan Logged in Logged in Pass
valid to page
details Email:[email protected]
Phone:+9779866622640
Password: Sujan@123
Confirm password:
Sujan@123
6 User sign Username: Display Fields Pass
up without message can’t be
details Email: as fields empty
Phone: can’t be
empty
Password:
Confirm password:
19
valid details Password: Sujan@123 to page
20
promptly acceptable
time frame
21
Services levels) accurate data
provided to
emergency
services
22
both locally and remotely was achieved through the implementation of the
notification model. The system is able to provide a more convenient way for users to
access the gas level and status. Likewise, users can get notification of gas leak
through phone call in their mobile phone.
5.2 Conclusion
We can hereby conclude that our project, LPG Gas Leak Detection System, is capable
of performing its intended functions seamlessly and offers a user-friendly navigation
experience. Users can interact with the system effortlessly, making it easy for users to
view the gas level and status. Also, users can view the graph generated through
different levels of gas. The system's functionality is smooth and efficient. In this
system, we have described a new approach for gas leakage detection system at a low
concentration. The leakage is detected with the help of MQ-2 gas sensor. Sensor
sends a signal to microcontroller. In the next step microcontroller sends an active
signal to other externally connected devices. This system triggers LED and buzzer to
alert people when LPG leakage is detected including phone call to users.
REFERENCES
23
[2] D. A. A. G. S. B. A. ,. H. D. E. Jebamalar Leavline, "LPG Gas Leakage Detection and
Alert System," International Journal of Electronics Engineering Research, vol. 9, no. 7,
pp. 1095-1097, 2017.
[4] N. Chetana Tukkoji and Sanjeev Kumar A, "LPG GAS LEAKAGE DETECTION
USING IOT," International Journal Of Engineering Applied Sciences and Technology,
vol. 4, no. 12, pp. 603-609, 2020.
[6] A. P. C. R. a. S. P. Sejal Shah, "IOT Based Smart Gas Leakage Detection and Alert
System," International Conference on Advances in Science & Technology, 2021.
APPENDICES
I. User Registration
24
II. User Login
25
IV. Implementation Code in Arduino
26
27
28
V. Database
29
VII. Web page implementation
30
31
32
33
34
35
36
37
38
39
VIII. System Configuration
40