Mini Project
Mini Project
CH.SATHVIKA
D.SAI SUMANTH
D.VIGNESHWAR REDDY
1
GAS LEAKAGE DETECTOR AND MONITORING SYSTEM
MINI PROJECT
REPORT
SUBMITTED
IN PARTIAL FULFILMENT OF THE
REQUIREMENTS FORTHE DEGREE OF
BACHELOR OF TECHNOLOGY
IN
ELECTRONICS AND COMMUNICATION
ENGINEERING
BY
CH.SATHVIKA (21261A04D8)
D.SAI SUMANTH (21261A04D9)
D.VIGNESHWAR REDDY (21261A04E0)
2
MAHATMA GANDHI INSTITUTE OF
TECHNOLOGY
CERTIFICATE
Date: /2024
This is to certify that the mini project work entitled “GAS LEAKAGE DETECTOR AND
MONITORING SYSTEM ” is a bonafide work carried out by
CH.SATHVIKA (21261A04D8)
D.SAI SUMANTH (21261A04D9)
D.VIGNESHWAR REDDY (21261A04E0)
The results embodied in this report have not been submitted by any other
university or institution for the award of any degree or diploma.
DR.T.R.VIJAYALAKSHMI DR S P Singh
Associate Professor Head of Dept
3
ACKNOWLEDGEMENT
Finally, we thank all the people who have directly or indirectly helped us
through the course of our Project.
CH.SATHVIKA (21261A04D8)
D.SAI SUMANTH (21261A04D9)
D.VIGNESHWAR REDDY (21261A04E0)
4
ABSTRACT:
Leakage of gas is a major issue in the industrial sector, residential buildings, and gas-
powered vehicles, one of the preventive methods to stop accidents associated with gas
leakage is to install gas leakage detection devices. The focus of this work is to propose
a device that can detect gas leakage and alert the owners to avert problems due
to gas leakages.
The system was designed for gas leakage monitoring and alerts via an Arduino
microcontroller with a buzzer and an MQ-2 gas sensor. The circuit contains a
Arduino,MQ-2 gas sensor, buzzer ,LCD , Jumper wires ,Bread board , regulator power
supply board, sim900 GSM modem.The output of this research will be significant in
averting problems associated with gas leakages now and in future.
Gas detectors can be used to detect combustible, flammable and toxic gas and oxygen
depletion. This type of device is used widely in industry and can be found in locations,
such as on oil rigs, to monitor manufacture processes and emerging technologies such
as photovoltaic. They may be used in firefighting.
It is the process of identifying potentially hazardous gas leaks by sensors. These sensors
usually employ an audible alarm to alert people when a dangerous gas has been
detected. Exposure to toxic gases can also occur in operations such as painting,
fumigation, fuel filling, construction, excavation of contaminated soils, landfill
operations, entering confined spaces, etc. Common sensors include combustible gas
photoionizationdetectors, infrared point sensors, ultrasonic sensors, electrochemical
gas sensors, and semiconductor sensors. More recently, infrared imaging sensors have
come into use. All of these sensors are used for a wide range of applications and can be
industrial plants, refineries, pharmaceutical manufacturing, fumigation facilities, pape
-r pulp mills,aircraft and shipbuilding facilities, hazmat operations, waste-water
treatment facilities, vehicles, indoor air quality testing and homes.
5
Table of Contents:
CHAPTER 3 ANALYSIS
3.1 Arduino Uno(Applications) .................................................................................. 15
3.2 Arduino board ........................................................................................................ 16
3.3 Features of Arduino................................................................................................. 17
3.4 GSM ....................................................................................................................... 19
3.5 Intelligent GSM device for automation and security ............................................. 22
3.6 MQ-2 sensor .............................................................................................................23
3.7 LCD & I2C................................................................................................................ 24
6
CHAPTER 4 DESIGN
4.1 Flowchart.......................................................................................................... 25
4.2 Connectivity .................................................................................................... 24
4.3 Set up for implementation… ............................................................................ 26
CHAPTER 5 IMPLEMENTATION
5.1 Coding ............................................................................................................ 27
5.2 Arduino IDE ..................................................................................................... 29
The compilation process................................................................ 30
Installation Process ....................................................................... 31
Installing Additional Arduino Libraries ....................................... 32
Manual installation ....................................................................... 36
Open your first sketch ................................................................ 37
Select your board type and port..................................................... 38
Upload the program....................................................................... 40
REFERENCES .................................................................................. 43
7
LIST OF FIGURES
8
1.1 INTRODUCTION:
CHAPTER 1
OVERVIEW
Gas leakage is a critical safety concern in both residential and industrial settings. The
accidental release of combustible gases such as Liquefied Petroleum Gas (LPG),
methane, or natural gas can lead to hazardous situations, including explosions, fires, or
health risks caused by inhalation of toxic gases. Early detection of gas leaks is essential
to mitigate such dangers and protect lives and property. In this context, technological
advancements have enabled the development of automated systems for gas leak
detection, offering rapid alerts to ensure prompt intervention.
This project focuses on the design and implementation of a Gas Leakage Detection
System with SMS Alert using an Arduino Uno microcontroller and a GSM900 module.
The system serves as a practical and cost-effective solution for monitoring gas leaks
and notifying users in real time through SMS alerts.
The core of the system is the MQ-2 gas sensor, which is highly sensitive to the presence
of combustible gases. It continuously monitors the concentration of gases in the
surrounding environment and outputs a voltage signal proportional to the gas
concentration. When the gas concentration exceeds a predefined safety threshold, the
sensor detects the anomaly and sends a signal to the Arduino Uno microcontroller. The
Arduino Uno, programmed to interpret the sensor data, processes this signal and
triggers appropriate actions.
One of the standout features of this system is the integration of the GSM900 module,
which enables wireless communication. Upon detecting a gas leak, the Arduino sends
a command to the GSM module to transmit an SMS alert to predefined phone numbers.
This alert contains information about the gas leak, ensuring that the user is informed
immediately, even when they are not present at the site.
In addition to SMS alerts, the system can activate other safety measures, such as
sounding an alarm or activating a solenoid valve to cut off the gas supply. These
secondary measures further enhance the system's capability to prevent accidents. The
9
Arduino Uno serves as the control hub, coordinating the actions of the gas sensor, GSM
module, and any additional components such as buzzers or indicator LEDs.
The choice of components, including the Arduino Uno and GSM900 module, makes
the system highly versatile and scalable. The Arduino Uno, with its ease of
programming and compatibility with various sensors and modules, simplifies the
development process. The GSM900 module ensures reliable communication over long
distances, enabling alerts to be sent to users anywhere within the network coverage area.
This gas leakage detection system has wide-ranging applications in domestic,
commercial, and industrial settings. In households, it can prevent accidents caused by
leaking LPG cylinders. In industries, it can ensure compliance with safety regulations
and prevent catastrophic accidents in environments where flammable gases are stored
or used. Additionally, it can be deployed in restaurants, hotels, laboratories, and other
establishments where gas usage is prevalent.
The project represents a practical implementation of Internet of Things (IoT)
principles, combining sensors, microcontrollers, and communication technologies to
create a smart, automated safety solution. Beyond its core functionality, the system can
be enhanced with features like integration with cloud platforms for remote monitoring,
logging gas concentration data for analysis, or linking to mobile apps for advanced
control and notifications.
By leveraging the capabilities of the Arduino Uno and GSM900, this gas leakage
detection system demonstrates how simple, affordable technology can be used to
address critical safety challenges. Its ability to detect leaks, alert users in real time, and
take preventive measures ensures a proactive approach to gas safety. This mini-project
serves as a practical example of how IoT and embedded systems can be applied to
improve safety and enhance quality of life, making it a valuable contribution to the field
of automation and safety engineering.
10
1.2 AIM OF THE PROJECT:
To design and implement an lpg gas leakage detection and alert system that
enhances the safety of households and industries by detecting potential gas
hazards and providing an early warning to prevent accidents, fires, and
explosions.
1.3 SIGNIFICANCE:
The system’s ability to detect gas leaks and notify users remotely makes it
especially valuable in homes, hotels, restaurants, laboratories, and
industries. It offers an affordable, efficient, and user-friendly solution,
integrating readily available components like gas sensors, microcontrollers,
and GSM modules. The system enhances safety compliance in industrial
environments and prevents costly accidents while safeguarding workers and
infrastructure.
1.4 METHODOLOGY:
Component Selection:
Use an MQ-2 gas sensor to detect combustible gases.
Employ an Arduino Uno microcontroller for data processing.
Integrate a GSM900 module for sending SMS alerts.
System Design:
Connect the MQ-2 sensor to the Arduino to monitor gas levels.
Program the Arduino to compare sensor readings with a predefined
threshold.
Alert Mechanism:
11
When gas concentration exceeds the threshold, the Arduino triggers the
GSM module to send an SMS alert to predefined phone numbers.
Activate additional safety features like alarms or solenoid valves, if
applicable.
Testing and Calibration:
Test the system under controlled conditions to ensure accurate gas
detection.
Calibrate the sensor to optimize sensitivity for specific gases.
Implementation:
Deploy the system in homes, restaurants, or industries.
• Ensure periodic maintenance for reliable performance.
1.5 SCOPE:
Enhanced Safety: Provides real-time alerts to prevent accidents like fires, explosions,
and toxic inhalation.
Wide Applications: Suitable for homes, restaurants, hotels, laboratories, and industrial
setups where combustible gases are used.
Scalability: Can be integrated with IoT platforms, smart home systems, and mobile
apps for advanced monitoring and control.
Energy Conservation: Helps detect and minimize gas wastage, reducing costs and
environmental impact.
12
1.6 ORGANISATION OF WORK:
1.6.1 Software requirements:
• Arduino IDE
1.6.2 Hardware requirements:
• ARDUINO UNO
• GSM SIM 900
• MQ-2 SENSOR
• POWER SUPPLY
• JUMPER WIRES
• BUZZER
• LCD
13
CHAPTER 2
LITERATURE
STUDY
Gas Sensors: Studies emphasize using MQ series sensors (e.g., MQ-2, MQ-6) for
accurate detection of LPG, methane, and other combustible gases, highlighting their
affordability and sensitivity.
Microcontrollers: Research shows Arduino Uno as a popular choice for processing
sensor data due to its simplicity, reliability, and compatibility with multiple modules.
SMS Alerts: The integration of GSM modules (e.g., GSM900, SIM800L) for real-
time SMS notifications is widely studied, ensuring timely alerts for leak detection.
Applications: Literature covers implementations in homes, industries
14
CHAPTER 3
ANALYSIS
The UNO is that the best board to urge started with electronics and coding. If this is
often your first experience tinkering with the platform, the UNO is that the most
robust boardyou'll start twiddling with . The UNO is that the most used and
documented board of the entire Arduino family.
Arduino Uno may be a microcontroller board supported the ATmega328P
(datasheet). Ithas 14 digital input/output pins(of which 6 are often used as PWM
outputs), 6 analog in puts, a 16 MHz quartz , a USB connection, an influence jack,
an ICSP header and a res et button.
It contains everything needed to support the microcontroller; simply connect it to a
computer with a USB cable or power,it with a AC•to•DC adapter or battery to urge
started.
There are many versions of Arduino boards introduced within the market like
Arduino U no, Arduino Due, Arduino. Leonardo, Arduino Mega, however,
commonest versions are Arduino Uno and Arduino Mega. If you're getting to create,
a project concerning digital electronics, embedded system, robotics, or IoT, then
using Arduino Uno would be the, simplest , easy and most economical option.
Fig 3.1: Arduino Board
You can then use Atmel’s FLIP software (Windows) or the DFU programmer (Mac
OS Xand Linux) to load a new firmware.
Arduino is essential in a gas leakage detection system for the following reasons:
1. Data Processing: It reads and processes signals from gas sensors (e.g., MQ-2) to
detect gas concentrations.
2. Threshold Comparison: It compares gas levels to predefined safety thresholds to
determine if a leak is present.
3. Triggering Alerts: Arduino triggers the GSM module to send SMS alerts when a
leak is detected.
4. Control Actions: It can activate additional safety measures, like alarms or
shutting off gas valves.
5. Easy Programming: Arduino is simple to program, making it ideal for rapid
development and customization.
6. Cost-Effective and Versatile: It is affordable and compatible with various sensors
and modules for scalable solutions.
18
3.4 GSM [3]:
GSM may be a mobile communication modem; it's stands for global system for
mobile communication (GSM). The idea of GSM was famoused at Bell
Laboratories in 1970. Itis widely used mobile communication system within the
world. GSM is an open and digitalized cellular technology used for transmitting
mobile voice and data servicesoperates at the 850MHz, 900MHz, 1800MHz and
1900MHz frequency bands.
GSM system was popularised as a digital system using time division multiple access
(TDMA) technique for communication purpose. A GSM digitizes and reduces the
info , then sends it down through a channel with two different streams of client data,
each in itsown particular slot . The digital system has a capability to hold 64 kbps to
120 Mbps of knowledge rates.
There are various cell shape during a GSM system like macro, micro, pico and
umbrella cells. Each cell varies as per the implementation domain. There are five
different cell shape during a GSM network macro, micro, pico and umbrella cells.
The coverage width of every cell varies consistent with the implementation
environment.
Time Division Multiple Access
TDMA technique relies on assigning different time slots to every user on an
equivalent frequency. It can easily adapt to data transmission and speech and may
carry 64kbps to120Mbps of knowledge rate.
GSM Architecture
A GSM network consists of the following components:
• A Mobile Station: it's the mobile which consists of the transceiver, the display and therefore the
processor and is controlled by a SIM card operating over the network.
• Base Station Subsystem: It acts as an connection between the mobile station and therefore the
network subsystem. It contains of the down Transceiver Station which contains the radio
transceivers and handles the protocols for communication with mobiles. It also consists of the
bottom Station Controller which controls the bottom Transceiver station and acts as a interface
between the mobile station and mobile switching centre.
• Network Subsystem: It provides the essential network connection to the mobile stations.The basic
a material of the Network Subsystem is that the Mobile Service Switching Centre which provides
access to different networks like ISDN, PSTN etc. It also consistsof the house Location Register
and therefore the Visitor Location Register which providesthe decision routing and roaming
capabilities of GSM. It also consists the Equipment Identity Register which maintains an account
of all the mobile equipments wherein each mobile is identified by its own IMEI number. IMEI
stands for International Mobile Equipment Identity.
In this project, as the name says project is based on GSM network technology for
transmission of SMS from sender to receiver. SMS sending and receiving is used for ubiquitous
access of appliances and allowing breach control at home. The system proposes two sub-systems.
Appliance control subsystem enables the user to control home appliances remotely and the security
alert subsystem gives the automatic securitymonitoring.
The system is capable enough to instruct user via SMS from a specific cell number to change the
condition of the home appliance according to the user’s needs and requirements. The second aspect
is that of security alert which is achieved in a way that on the detection of intrusion, the system
allows automatic generation of SMS thus alertingthe user against security risk.
FEATURES:
• Power supply needs: 5V
• Interface type: Analog
• Pin Definition: 1-Output 2-GND 3-VCC
• High sensitivity to LPG, natural gas, town gas Small sensitivity to alcohol, smoke
Fast response Stable and long life Simple drive
• circuit Size: 40x20mm
23
3.7 Liquid Crystal Displays (LCD) with Arduino
The LiquidCrystal library allows you to control LCD displays that are compatible
with the Hitachi HD44780 driver. There are many of them out there, and you can
usually tell them by the 16-pin interface.
Output of the sketch on a 16x2 LCD
The LCDs have a parallel interface, meaning that the microcontroller has to manipulate
several interface pins at once to control the display. The interface consists of the
following pins:
• A register select (RS) pin that controls where in the LCD's memory you're
writing data to. You can select either the data register, which holds what goes on
the screen, or an instruction register, which is where the LCD's controller looks
for instructions on what to do next.
• A Read/Write (R/W) pin that selects reading mode or writing mode
• An Enable pin that enables writing to the registers
• 8 data pins (D0 -D7). The states of these pins (high or low) are the bits that you're
writing to a register when you write, or the values you're reading when you read.
24
CHAPTER 4: DESIGN
LCD DISPLAY<200
4.2 Connectivity:
26
CHAPTER 5
5.1 Coding
IMPLIMENTATION
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include <SoftwareSerial.h>
// Define Pins
27
delay(2000);
// GSM Module Setup
initializeGSM();
}
void loop() {
int gasLevel = analogRead(GAS_SENSOR_PIN); // Read gas sensor value
// LCD Display
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Gas Level: ");
lcd.print(gasLevel);
// Serial Monitor Output
Serial.print("Gas Level: ");
Serial.println(gasLevel);
// Check if Gas Level Exceeds Threshold
if (gasLevel > GAS_THRESHOLD) {
lcd.setCursor(0, 1);
lcd.print("Gas Alert!");
Serial.println("Status: ALERT! High gas level detected! Activating buzzer...");
digitalWrite(BUZZER_PIN, HIGH); // Turn on buzzer
// Send SMS Alert
sendSMS(gasLevel);
delay(5000); // Wait to avoid repeated alerts
} else {
lcd.setCursor(0, 1);
lcd.print("Safe");
Serial.println("Status: Safe");
digitalWrite(BUZZER_PIN, LOW); // Turn off buzzer
}
delay(1000); // Delay for stability
}
void initializeGSM() {
Serial.println("Initializing GSM...");
gsmSerial.println("AT"); // Check GSM Module
28
delay(1000);
gsmSerial.println("AT+CMGF=1"); // Set SMS mode to text
delay(1000);
gsmSerial.println("AT+CSCS=\"GSM\""); // Set character set to GSM
delay(1000);
Serial.println("GSM Initialized.");
}
void sendSMS(int gasLevel) {
String alertMessage = "ALERT: High gas level detected! Level: " + String(gasLevel);
// Send SMS Command
gsmSerial.println("AT+CMGS=\"" PHONE_NUMBER "\"");
delay(1000);
// Send SMS Content
gsmSerial.print(alertMessage);
delay(1000);
// Send CTRL+Z to Send SMS
gsmSerial.write(26); // ASCII code for CTRL+Z
delay(5000);
Serial.println("SMS Sent: " + alertMessage);
}Arduino IDE
After this, it copies all the files in the 'core' directory into
'lib/tmp'. these files are the implementation of the various
At this point the code contained in lib/tmp is ready to be compiled with the
c compiler contained in 'tools'. If the make operation is succesfull then you'll
have prog.hex ready to be downloaded into the processor.
30
NOTE: The next release will see each architecture
(avr/pic/8051) to treated as a 'plug-in' to the IDE so that the user
can just select from a menu the microcontroller board to use and
the IDE will pick the right compilation sequence.
Choose the installation directory (we suggest keeping the default one).
31
Figure 5.4: Installing Process
The process will extract and install all the required files to
execute properlythe ArduinoSoftware (IDE).
32
5.1.3.2 How to Install a Library Using the Library Manager
To install a new library into your Arduino IDE you can
use the Library Manager (available from IDE version 1.6.2).
Open the IDE and click to the "Sketch" menu and then Include
Library > Manage Libraries.
Then the Library Manager will open, and you will find a list of
libraries that are already installed or ready for installation. In
this example we will installthe Bridge library. Scroll the list to
find it, click on it, then select the version of the library you want
to install. Sometimes only one version of the library is available.
If the version selection menu does not appear, don't worry it is
normal.
33
Finally click on install and wait for the IDE to install the new
library. Downloading may take time depending on your
connection speed. Once it has finished, an Installed tag should
appear next to the Bridge library. You can close the library
manager.
34
folder will be a .cpp file, a .h fileand often a keywords.txt file,examples folder, and other files
required by
the library. Starting with version 1.0.5, you can install 3rd party libraries in the IDE. Do not unzip the
downloaded library, leave it as is.
In the Arduino IDE, navigate to Sketch > Include Library > Add .ZIP Library. At the top of the drop-
down list, select the option to "Add .ZIP Library''.
Return to the Sketch > Include Library menu. menu. You should
now see the library at the bottom of the drop-down menu. It is
ready to be used in your sketch. The zip file will have been
expanded in the libraries folder in your Arduino sketches
directory. NB: the Library will be available to use in sketches,
but with older IDE versions examples for the library will not be
exposed in the File > Examples until after the IDE has restarted.
35
5.1.4 Manual installation:
When you want to add a library manually, you need to
download it as a ZIP file, expand it and put in the proper
directory. The ZIP file contains all you
Go to the directory where you have downloaded the ZIP file of the library.
36
Figure 5.9: Add Manual Library
37
Figure 5.10: Code Example
38
Figure 5.11: Board Selection
Select the serial device of the board from the Tools | Serial Port
menu. This is likely to be COM3 or higher (COM1 and COM2
are usually reservedfor hardware serial ports). To find out, you
can disconnect your board and re-open the menu; the entry that
disappears should be the Arduino board.
39
5.1.7 Upload the program
Now, simply click the "Upload" button in the
environment. Wait a few seconds -you should see the RX and
TX leds on the board flashing. If the upload is successful, the
message "Done uploading." will appear in the status bar.
A few seconds after the upload finishes, you should see the
pin 13 (L) LED on the board start to blink (in orange). If it does,
congratulations! You've gotten Arduino up-and- running.
If you have problems, please see the trouble
shooting.
Figure 5.14: Include Library
40
CHAPTER 6
6.1 RESULTS AND CONCLUSIONS:
This work presents the design and implementation of gas leakage detection system.
Various works on gas leakages detection system was reviewed and presented. I was
discovered that some of the existent research don’t takes in to considerations the cost
effectiveness for the purpose of implementation of gas leakages detection at
individual/domestic uses, and not easy to be further modified. This research work had
advanced in knowledge as it included an embedded system to alert users via multiple
mobile phones for further action to be taken when leakage is detected. The device
detects gas leakage using a highly sensitive MQ-2 gas sensor to activate a buzzer that
alert people of leakages, and also sent an SMS with the information “Gas Leakage
Detected” from the SIM800 GSM Module as a backup to alert the appropriate authority
or facility owner of a gas leakage. This design could be adopted, funded, and
implemented as it has a great potential of mitigating against accidents associated with
LPG leakage.
Output:
41
6.2 FUTURE SCOPE:
• Expansion of Devices: More devices will become smart,
offering diverse automation options.
42
REFERENCES:
BOOKS:
[1] Punch newspaper 2021, Panic as gas leakage occurs in Ikeja. Available at
“https://punchng.com/breaking-panic-as-gas-leakage occurs-in-ikeja “ retrived January 17,
2021.
[2] A., L. (2017). Wireless gas leak detection improves employee protection, environs, and
production value.
[3] Arpitha, T. K. (2016). FPGA-GSM-based gas leakage detection system. Bangalore. IEEE
Annual India Conference (INDICON), 1-4.
[4] Chengjun, D. X. (2011). Development of gas leak detection and location system based on
wireless sensor networks. Shanghai. Third International Conference on Measuring Technology
and Mechatronics Automation, 1067–1070.
[5] Kareem, H. (2019). Embedded real‐time system for detecting leakage of the gas used in
Iraqi kitchens. Indonesia J. Elect Eng Comp Sci .vol 14, 1171-1176.
[6] Loth, J. M. (2003). Technology Assessment of online Acoustic monitoring Leak In
fragment in the underground, natural gas Transmission Lines. USA: West Virginia University.
[7] Manohar, R. a. (2018). Android Introduction to Detection. Hindu: Nwebweze, O.
(December 2015) vanguard News .com .
[8] Murvaya, P. (2011). A survey in Gas leak Detection and localization technology. Journal
of loss prevention in the Process Industries, 11-25.
[9] Park, G. L. (2013). Development of gas safety management system for smart‐home
services. Distributor Sensor Network, 9-10.
[10] Sonkar, B. S. (2015). Microcontroller-based LPG Leakage Detector using GSM Module.
International Journal of Electrical and Electronics Research, Vol .111, 264-269.
43