VILASRAO DESHMUKH FOUNDATION SCHOOL
OF POLYTECHNIC , LATUR
A Project report on
SMS BASED LPG GAS LEKAGE DETECTION
SYSTEM USING ARDUINO
Submitted by:-
STUDENT NAME ENROLLMENT NO.
DEWANG SHIVKUMAR KULKARNI. 2215000144
ABHISHEK PARMESHWAR BOYANE 2215000145
RITESH MEGHRAJ DESHMUH 2215000146
SANTOSH SATPUTE 23511990364
Under the guidance of :-
PROF. DADPE K. K.
DEPARTMENT OF ELECTRONICS ENGINEERING
[A.Y.2024-25]
VILASRAO DESHMUKH FOUNDATION SCHOOL
OF POLYTECHNIC , LATUR
Certificate
This is to certify that the project planning seminar entitled “SMS BASED
LPG GAS LEAKAGE DETECT SYSTEM”has been carried out by Mr.
DEWANG KULKARNI, ABHISHEK BOYANE, RITESH DESHMUH,
SANTOSH SATPUTE in partial fulfilment of the diploma in
“Electronics Engineering” of M.S.B.T.E. (Maharashtra State Board of
Technical Education) during the academic year 2024-2025.
DATE: / /2024
PLACE: Latur
[Link] K.K PROF. BHALERAO MADAM
GUIDE CO-ORDINATOR
PROF. RAUT SIR PROF. SAKHRE SIR
HOD Principal
ACKNOWLEDGEMENT
We express our sincere thanks to PROF. DADPE [Link] for
their valuable guidance, encouragement and tolerance for carrying out the
seminar in allphases of its working. They have always been a source of
inspiration for us right from the feasibility study of the seminar.
We would like to extend our special thanks to
HOD PROF. RAUT SIR and Principal Sir for spending their valuable
time to go through our report and providing many helpful suggestions.
Lastly we would like to thank all the staff members of electronics
department and our friends without whom the project report would not
have been completed.
STUDENT NAME ENROLLMENT NO.
DEWANG KULKARNI 2215000144
ABHISHEK BOYANE 2215000145
RITESH DESHMUH 2215000146
SANTOSH SATPUTE 23511990364
SMS BASED LPG GAS LEAKAGE DETECT
SYSTEM USING GSM
ABSTRACT
This paper presents the development of a cost-effective and reliable
SMS-based LPG gas leakage detection system utilizing an Arduino
microcontroller. The system aims to enhance safety by automatically
detecting hazardous LPG leaks and promptly alerting users via SMS.
The core of the system comprises an MQ-2 gas sensor interfaced
with an Arduino Uno board. Upon detecting an LPG concentration
exceeding a predefined safety threshold, the Arduino triggers an alarm
(buzzer) and simultaneously activates a GSM module (SIM800L). The
GSM module then sends a pre-configured SMS alert message to a
designated mobile phone number, informing the user about the gas leak
and its potential danger.
The system is designed for ease of installation and operation,
offering a practical solution for homes, kitchens, and industrial
environments where LPG gas is used. The implementation details,
hardware components, software code, and preliminary testing results
demonstrating the system's responsiveness and accuracy in detecting and
reporting LPG leaks are discussed. This project offers a simple yet
effective approach to mitigating the risks associated with LPG gas leaks
through timely remote notification.
TABLE OF CONTENTS
CHAPTER 1 : INTRODUCTION
1.1 Introduction
1.2 Problem Definition and It’s Background
1.3 Objectives
CHAPTER 2: LITERATURE SURVEY
2.1 Literature survey (problem identification)
CHAPTER 3: PROPOSED METHOLOGY
3.1 B
lock diagram
3.2 working
3.3 component description
3.4 Action play
CONTENTS
ABSTRACT...............................................................................................................4
TABLE OF CONTENTS…......................................................................................5
LIST OF FIGURE ............................................................................................…..7
CHAPTER 1
1.1 INTRODUCTION .............................................................................8
1.2 OBJECTIVE….....................................................................................9
CHAPTER 2
2.1 LITERATURE SURVEY.............................................................…10
CHAPTER 3
3.1 BLOCK DIAGRAM.............................................................................13
3.2 WORKING ..................................................................................….14
3.3 COMPONENT DESCRIPTION.................…....................................15
3.4 CIRCUIT DIAGRAM..............................................…........................21
3.5 ACTION PLAN ............................…................................................... 22
REFERENCE ......................................................................................................... 23
LIST OF FIGURES
3.1.1 BLOCK DIAGRAM OF SMS BASED LPG GAS LEAKAGE
DETECT SYSTEM USING GSM
3.1.2 ARDUINO UNO
3.1.3 SIM 800/900 GSM MODULE
3.1.4 16X2 LCD DISPLAY
3.1.5 BUZZER
3.1.6 MQ2 SENSOR
3.1.7 I2C MODULE
3.1.8 CIRCUIT DIAGRAM
CHAPTER 1
1.1 Introduction
Safety with Smart Technology: An Introduction to SMS-Based LPG Gas
Leakage Detection using Arduino
Liquefied Petroleum Gas (LPG) is a widely used and efficient fuel source
for domestic and commercial purposes. However, its highly flammable
nature poses significant safety risks. Gas leaks, if undetected, can lead to
devastating accidents, causing property damage, injuries, and even loss of
life. Traditional methods of leak detection, often relying on human
senses, are unreliable and prone to delays, especially in unattended
environments. This necessitates the development of more robust and
proactive safety measures.
The advent of affordable and powerful microcontrollers like Arduino,
coupled with advancements in sensor technology and wireless
communication, has paved the way for innovative solutions in gas safety.
An SMS-based LPG gas leakage detection system using Arduino offers a
cost-effective and reliable approach to mitigating the dangers associated
with gas leaks. This system leverages the Arduino platform's versatility to
interface with a gas sensor, detect the presence of LPG beyond a safe
threshold, and promptly alert users via Short Message Service (SMS).
The core principle of this system revolves around the real-time
monitoring of LPG concentration in the surrounding air. A dedicated gas
sensor, typically an MQ series sensor known for its sensitivity to
combustible gases, continuously analyzes the air quality. The analog
output from this sensor, proportional to the detected gas concentration, is
fed into the Arduino microcontroller. The Arduino, programmed with
predefined safety thresholds, processes this data and triggers an alarm and
notification mechanism upon detecting a leak.
The integration of a GSM (Global System for Mobile Communications)
module is crucial for the remote alerting capability of this system. When
the Arduino detects a gas leak exceeding the set limit, it activates the
GSM module. This module, equipped with a SIM card, then sends an
SMS alert to pre-configured mobile phone numbers. This immediate
notification allows users to take timely action, such as isolating the gas
supply or evacuating the premises, even if they are not physically present.
Beyond the core functionality of detection and notification, such a system
can be further enhanced with additional features. These might include
visual and auditory alarms for immediate local alerts, the ability to
remotely monitor the gas sensor readings, and even integration with other
smart home systems for a comprehensive safety network. The open-
source nature of Arduino allows for easy customization and expansion of
the system's capabilities, making it a versatile solution for diverse
applications, from residential kitchens to industrial storage facilities.
In conclusion, an SMS-based LPG gas leakage detection system utilizing
the Arduino platform presents a significant step forward in enhancing gas
safety. By combining the power of microcontrollers, sensitive sensors,
and ubiquitous mobile communication, this system offers a proactive and
reliable means of detecting leaks and alerting users promptly, ultimately
contributing to a safer environment and minimizing the potential for
hazardous incidents.
1.2 Problem Definition and It’s Background
increasing reliance on Liquefied Petroleum Gas (LPG) for domestic and
commercial cooking necessitates robust safety measures to prevent
accidents arising from gas leaks. Currently, many households and
establishments rely solely on the smell of the gas or manual checks to
detect leaks, which are often unreliable and can lead to hazardous
situations including explosions, fires, and health risks due to inhalation.
There is a clear need for an affordable, reliable, and automated system
that can promptly detect LPG leaks and alert users, enabling timely
intervention and mitigating potential disasters. This project addresses this
need by defining the problem of inadequate and often delayed LPG leak
detection in residential and commercial settings, leading to potential
safety hazards and property damage.
Background:
LPG is a highly flammable mixture of hydrocarbon gases, primarily
propane and butane, widely used as a fuel source due to its high calorific
value and relatively clean combustion. However, its inherent
flammability makes leaks extremely dangerous. Traditional methods of
leak detection are often insufficient. Relying on the human sense of smell
can be problematic due to olfactory fatigue or the presence of masking
odors. Manual checks are infrequent and dependent on user vigilance.
The advent of affordable and versatile microcontrollers like Arduino,
coupled with low-cost gas sensors and GSM modules, presents a viable
solution for developing automated gas leakage detection systems.
Existing solutions in the market often involve complex and expensive
wired systems, making them less accessible for widespread adoption,
particularly in low-income households. Wireless technologies like Wi-Fi-
based systems require existing network infrastructure, which may not be
consistently available in all locations.
An SMS-based system offers a significant advantage by leveraging the
ubiquitous mobile network infrastructure. Short Message Service (SMS)
provides a reliable and widely accessible communication channel for
alerting users regardless of internet connectivity. This makes it a practical
and cost-effective solution for real-time notification of gas leaks.
Furthermore, integrating a gas sensor with an Arduino microcontroller
allows for continuous monitoring of LPG concentration in the
environment. Upon detecting a leak above a predefined safety threshold,
the Arduino can trigger an alert mechanism. Utilizing a GSM module,
this alert can be instantly transmitted to the user's mobile phone as an
SMS notification, providing crucial information for immediate action.
This project aims to leverage the capabilities of Arduino, gas sensors, and
GSM technology to develop a simple, cost-effective, and reliable SMS-
based LPG gas leakage detection system. This system will continuously
monitor the environment for LPG leaks and promptly notify users via
SMS, thereby enhancing safety and reducing the risk of accidents
associated with gas leaks in domestic and commercial applications. The
development of such a system addresses a critical safety concern and
offers a significant improvement over existing, less reliable methods.
1.3 Objective
Develop a functional prototype: To design and build a working
model of an LPG gas leakage detection system utilizing an
Arduino microcontroller, a gas sensor, and a GSM module.
Achieve real-time LPG concentration monitoring: To continuously
monitor the ambient air for LPG concentration using a suitable gas
sensor interfaced with the Arduino.
Implement a threshold-based detection mechanism: To program the
Arduino to detect LPG concentration exceeding a predefined safe
threshold level.
Establish SMS-based alert notification: To enable the Arduino to
send an SMS alert message to a designated mobile phone number
upon detection of a gas leak above the threshold.
Ensure reliable SMS delivery: To integrate a GSM module that can
reliably connect to the mobile network and transmit SMS
notifications.
Minimize false positives: To calibrate the gas sensor and program
the system to reduce the occurrence of false alarms due to transient
gas presence or sensor drift.
Design for low power consumption: To optimize the system's
design and code for efficient power usage, potentially enabling
battery-powered operation.
Develop a user-friendly setup: To create a system that is relatively
easy to assemble, configure, and deploy in residential or
commercial settings.
Maintain cost-effectiveness: To utilize readily available and
affordable components to ensure the system remains a cost-
effective safety solution.
Demonstrate system effectiveness: To test and validate the system's
ability to accurately detect LPG leaks and promptly send SMS
alerts under various simulated leakage scenarios.
CHAPTER 2
LITERATURE SURVEY
2.1 Literaure survey
1. Title : SMS BASED LPG GAS LEAKAGE SYSTEM
Author : sejal ghosh
Summary : . The researchers aredeveloping an alarm system that will sound if
there is a gas leak that could start a [Link] alarm will sound, alerting and warning
the people in the area of the gas leak, andwill automatically send an SMS to the
owner. A better idea for this harmful gas leakage
2. Title : SMS BASED LPG GAS LEAKAGE SYSTEM
Author :Simarjot singh kalsi
Summary : Detection of fire and smoke is highly important for the safety and
security of the people against incidents One study detects the gas leak of the LPG and
also computes the weight of the cylinder using a sensor. Advance security for the
LPG right now is extremely being focus on the research areas.
3. Title : SMS BASED LPG GAS LEAKAGE SYSTEM
Author : Debjani Banerjee
Summry: Everyone needs security guarantee in their homes and when they work in
a building hence, making security an integral aspect in human life.
4. Title : SMS BASED LPG GAS LEAKAGE SYSTEM
Author :Hardik Motghare
Summary : The application of monitoring and safety systems to buildings
especially in homes, market shops and ICT centres, can reduce or even eradicate the
menace of fire disaster and equipment damages.
5. Title : SMS BASED LPG GAS LEAKAGE SYSTEM
Author :Lahmeen Haidar
Summary : The Gas sensor will sense the premises for gas leakage within its radar
range; also, the temperature sensor will sense the temperature of the premises within
its radar range..
6. Title : SMS BASED LPG GAS LEAKAGE SYSTEM
Author :William shaw
Summary: the temperature sensor will sense the temperature of the premises within
its radar range. The output values from the Gas and temperature sensor will be sent as
inputs to the microcontroller. The microcontroller
CHAPTER 3
PROPOSED METHODOLOGY
3.1 BLOCK DIAGRAM
FIG 3.1.1 BLOCK DIAGRAM OF SMS BASED LPG GAS SYSTEM
3.2 WORKING
Working of the SMS-Based LPG Gas Leakage Detection System using
Arduino
The SMS-based LPG gas leakage detection system using Arduino
operates through a sequence of interconnected processes, continuously
monitoring the environment for potential gas leaks and alerting users via
SMS when a hazard is detected.
The core of the system is the Arduino microcontroller, which acts as the
central processing unit. It is interfaced with three key components: an
LPG gas sensor, a GSM module, and a power source. The LPG gas
sensor, typically a metal oxide semiconductor sensor like the MQ-2, is
responsible for detecting the concentration of LPG in the surrounding air.
This sensor works by changing its electrical resistance in the presence of
LPG. The Arduino reads the analog voltage output from the gas sensor,
which is directly proportional to the gas concentration.
The Arduino program continuously samples the gas sensor readings at
regular intervals. These analog readings are then converted into digital
values using the Arduino's Analog-to-Digital Converter (ADC). To
account for sensor drift and environmental fluctuations, the program often
implements a baseline calibration phase upon startup, establishing a
normal, safe gas concentration level.
A crucial aspect of the system is the threshold detection mechanism. The
Arduino program compares the current gas sensor reading against a pre-
defined safety threshold. This threshold represents the maximum
permissible LPG concentration before it is considered a leak hazard. This
value is typically determined through experimentation and datasheet
specifications of the gas sensor.
Once the gas sensor reading exceeds the pre-set threshold for a sustained
period (to avoid false alarms due to momentary gas presence), the
Arduino identifies a potential gas leak. Upon detecting a leak, the
Arduino activates the GSM module. The GSM module is a small
electronic device that allows the Arduino to connect to the cellular
network, similar to a mobile phone. It requires a Subscriber Identity
Module (SIM) card with sufficient balance to send SMS messages.
The Arduino sends specific AT commands to the GSM module via serial
communication. These commands instruct the GSM module to compose
and send an SMS message to a pre-programmed mobile phone number
(or multiple numbers). The SMS message typically contains information
about the detected gas leak, such as "LPG Leak Detected!" or "High Gas
Concentration - Take Immediate Action!".
The entire system is powered by a suitable power source, which could be
a DC power adapter or a battery, depending on the intended application
and portability requirements. The Arduino regulates the power supply to
the sensor and the GSM module.
In summary, the system works by: continuously sensing LPG
concentration, processing the sensor data using the Arduino, detecting
leaks based on a pre-defined threshold, communicating the alert via SMS
through the GSM module, and being powered by a reliable source. This
automated process ensures timely detection and notification of LPG
leaks, significantly enhancing safety and enabling prompt intervention to
prevent accidents.
3.3 COMPONENT DESCRIPTION
FIG 3.1.2 ARDUINO UNO
The Arduino Uno is an open-source microcontroller board based on the
ATmega328P microchip. It is one of the most popular and widely used
boards in the Arduino family, ideal for beginners and experienced users
alike.
The Uno can be powered through the USB connection, an
external power supply, or a battery, making it versatile for various
applications. It's widely used for projects involving sensors, actuators,
robotics, home automation, and educational purposes. The board is
programmed using the Arduino IDE (Integrated Development
Environment)..
Key Features:
Microcontroller: ATmega328P
OperatIng Voltage: 5V
Input Voltage: 7-12V (recommended), 6-20V (absolute limit)
Digital I/O Pins: 14 (6 of which can be used as PWM outputs)
Analog Input Pins: 6
Clock Speed: 16 MHz
Flash Memory: 32 KB (of which 0.5 KB is used by the bootloader)
SRAM: 2 KB
EEPROM: 1 KB
Overall, the Arduino Uno is a powerful and easy-to-use platform for
developing a wide range of electronics projects.
Working of the Arduino in the SMS-Based LPG Gas Leakage Detection
System
In the SMS-based LPG gas leakage detection system, the Arduino
microcontroller serves as the intelligent core, orchestrating the entire
process of sensing, processing, and communication. Its role is
multifaceted, encompassing data acquisition, logical decision-making,
and interfacing with other hardware components.
First and foremost, the Arduino is responsible for interfacing with the
LPG gas sensor. Typically, the gas sensor (like the MQ-6) outputs an
analog voltage signal proportional to the detected LPG concentration. The
Arduino's Analog-to-Digital Converter (ADC) pins are connected to the
sensor's analog output. The Arduino program continuously reads these
analog voltage levels at defined intervals. The ADC converts these analog
signals into digital values (typically between 0 and 1023 for a 10-bit
ADC), representing the instantaneous LPG concentration.
The Arduino then processes this raw sensor data. Often, the initial
readings might be noisy or subject to minor fluctuations. The Arduino
program can implement filtering techniques (like averaging multiple
readings) to smooth out the data and obtain a more stable representation
of the gas concentration. During the system's initialization, the Arduino
typically establishes a baseline reading representing the normal, safe
ambient gas level. This baseline is crucial for accurately detecting
deviations indicating a leak.
The core intelligence of the system resides in the threshold detection
logic programmed into the Arduino. The software compares the
processed sensor readings against a pre-determined safety threshold
value. This threshold, defined in the Arduino code, represents the critical
LPG concentration beyond which a leak is considered hazardous. The
selection of this threshold is vital for balancing sensitivity and avoiding
false alarms.
When the Arduino detects that the processed sensor reading has exceeded
the pre-set threshold for a defined duration (to prevent triggering on
transient gas puffs), it makes the crucial decision that a gas leak has
occurred. Upon this detection, the Arduino's primary action is to initiate
the SMS alert mechanism through the interfaced GSM module.
The Arduino communicates with the GSM module via serial
communication (typically using the UART protocol). The Arduino
program sends specific AT commands to the GSM module. These
commands are standardized instructions used to control the functions of
GSM modems. The Arduino sends commands to:
* Initialize the GSM module: Ensuring it is properly connected to the
mobile network.
* Specify the recipient's phone number: This number is pre-programmed
into the Arduino code.
* Compose the SMS message: The Arduino constructs a text message
containing an alert, such as "LPG Leak Detected!" or "High Gas
Concentration - Take Immediate Action!".
* Send the SMS message: The Arduino instructs the GSM module to
transmit the composed message to the specified phone number.
Beyond these core functions, the Arduino can also manage other aspects
of the system, such as controlling visual indicators (like LEDs) or audible
alarms to provide local alerts in addition to the SMS notification. It also
manages the timing of sensor readings and SMS sending to ensure
efficient operation. Essentially, the Arduino acts as the brain,
continuously monitoring the sensor, making critical decisions based on
the data, and orchestrating the communication of alerts via the GSM
module, thereby forming the backbone of the entire LPG leakage
detection system.
FIG 3.1.3 SIM 800l GSM MODULE
The SIM800L is a miniature, low-cost, and highly versatile quad-band
GSM/GPRS module developed by SIMCom Wireless Solutions. It serves as a
self-contained cellular communication engine, enabling embedded systems like
the Arduino to connect to the GSM mobile network. Its compact size, low
power consumption, and comprehensive feature set have made it a popular
choice for various IoT (Internet of Things) applications, including remote
monitoring, asset tracking, and, crucially for our context, wireless alert systems
like the SMS-based LPG gas leakage detection system.
The "quad-band" capability of the SIM800L signifies its compatibility with the
four primary GSM frequency bands: 850MHz, 900MHz, 1800MHz, and
1900MHz. This broad frequency support ensures that the module can operate on
GSM networks across most regions globally, offering significant flexibility in
deployment. Beyond basic GSM connectivity for voice calls and SMS, the
SIM800L also supports GPRS (General Packet Radio Service), enabling data
transmission over the internet. While GPRS functionality isn't strictly necessary
for a simple SMS alert system, its presence opens up possibilities for more
advanced features in future iterations, such as logging data to a remote server or
receiving over-the-air updates.
The SIM800L module typically comes in a small form factor, often with
castellated holes for easy soldering onto a custom PCB or with pins exposed for
breadboard prototyping. It requires an external SIM card (usually a micro-SIM)
to connect to the mobile network. The module communicates with a
microcontroller, such as the Arduino, primarily through serial communication
(UART) using a set of standardized AT commands. These AT commands allow
the microcontroller to control various functionalities of the GSM module,
including network registration, sending and receiving SMS messages, making
and receiving voice calls, and establishing GPRS connections.
One of the key advantages of the SIM800L is its low power consumption,
especially in idle mode, making it suitable for battery-powered applications.
However, during active transmission (like sending an SMS or establishing a
GPRS connection), the module can draw significant peak current (up to 2A),
necessitating a stable and adequately rated power supply. A typical operating
voltage range for the SIM800L is between 3.4V and 4.4V, making it crucial to
provide a regulated power source within this range. Directly powering it from
the Arduino's 5V output is generally discouraged due to potential voltage
incompatibility and insufficient current delivery, which can lead to unreliable
operation or even damage to the module.
The SIM800L module also features several interface pins, including power
supply (VCC and GND), serial communication pins (TXD and RXD), a reset
pin (RST), a power key pin (PWRKEY) for controlling the module's power
state, indicator LEDs for network status, and connections for an external
antenna, microphone, and speaker (though the latter two are usually not utilized
in a basic SMS alert system). A crucial aspect for reliable operation is the
external GSM antenna. A properly chosen and connected antenna is vital for
ensuring good signal reception and transmission. Using the module without an
antenna or with an improperly matched one can severely degrade performance
and potentially damage the module's RF circuitry.
Working of the SIM800L in the SMS-Based LPG Gas Leakage Detection
System using Arduino
In the context of an SMS-based LPG gas leakage detection system using
Arduino, the SIM800L module acts as the wireless communication bridge,
enabling the Arduino to send immediate alerts when a gas leak is detected.
Here's a step-by-step breakdown of its working within this system:
* Powering Up and Network Registration: When the LPG leakage detection
system is powered on, the SIM800L module receives its required power supply
(ideally a regulated 3.7V-4.2V source). The Arduino typically controls the
power-on sequence by briefly pulling the PWRKEY pin low. Once powered,
the SIM800L attempts to register onto the GSM network using the inserted SIM
card. The network status LED on the module will blink at different rates to
indicate the registration progress (e.g., fast blinking for not registered, slow
blinking for registered).
* Arduino Interaction via Serial Communication: The Arduino communicates
with the SIM800L module through its serial TX and RX pins. In many Arduino
setups, a software serial library is used to establish this communication on
digital pins, freeing up the hardware serial port for debugging. The Arduino
sends AT commands to the SIM800L to control its functions.
* Initialization and Configuration (Performed Once at Startup): After the
SIM800L has powered up and (ideally) registered on the network, the Arduino
sends a series of initialization AT commands:
* AT: To check if the module is responding.
* ATE0: To disable command echoing from the module.
* AT+CMGF=1: To set the SMS message format to text mode, which is
easier to work with than PDU mode for simple alerts.
* AT+CSCS="GSM": To set the character set for SMS to GSM 7-bit, which
is suitable for standard English text.
* Leak Detection by Arduino: The Arduino continuously monitors the LPG gas
sensor. When the sensor reading exceeds a pre-defined safety threshold for a
sustained period, the Arduino determines that a gas leak has occurred.
* Preparing and Sending the SMS Alert: Upon detecting a leak, the Arduino
initiates the SMS sending process by sending the following AT commands to
the SIM800L:
* AT+CMGS="[RecipientPhoneNumber]": The Arduino replaces
[RecipientPhoneNumber] with the mobile phone number that should receive the
alert. This number is typically pre-programmed into the Arduino code. The
phone number should be in the international format (e.g., +91XXXXXXXXXX
for an Indian number).
* [SMS Message Body]: The Arduino then sends the text of the alert message,
such as "WARNING! LPG Leak Detected" or "High Gas Concentration - Take
Action Immediately!". This message can be customized in the Arduino code.
* <Ctrl+Z> (ASCII character 26): Finally, the Arduino sends the Ctrl+Z
character (ASCII value 26) to the SIM800L. This character signals the end of
the SMS message and instructs the module to send it.
* SMS Transmission by SIM800L: Upon receiving the Ctrl+Z character, the
SIM800L module takes the provided phone number and message body and
transmits the SMS message over the GSM network. The success of the
transmission depends on factors like network availability, signal strength, and
the SIM card having sufficient balance.
* Confirmation (Optional): In some implementations, the Arduino code might
include logic to read the response from the SIM800L after sending the SMS. A
successful transmission typically results in a response like +CMGS: xxx, where
xxx is a message reference number. Error responses can also be received, which
the Arduino could potentially handle (e.g., by retrying the SMS).
In essence, the SIM800L acts as a wireless modem controlled by the Arduino.
When the Arduino detects a dangerous LPG leak, it uses the SIM800L to dial
out an SMS alert to a designated mobile phone, providing timely notification
that allows for prompt action to mitigate potential hazards. The reliability and
widespread availability of the GSM network make this approach a robust
solution for remote alerting in safety-critical applications.
FIG 3.1.4 16X2 LCD DISPLAY
16x2 Liquid Crystal Display (LCD) is a highly popular and widely used
electronic display module for visualizing textual information in embedded
systems. Its name signifies its display capacity: it can show 16 characters per
line and has two such lines, providing a total display area for 32 alphanumeric
characters. The 16x2 LCD module is a versatile and cost-effective way for
microcontrollers like the Arduino to present real-time data, status updates, user
interface elements, and debugging information.
These displays typically utilize a standard HD44780 controller (or a compatible
equivalent), which simplifies the interface and control process. The HD44780 is
an industry-standard dot-matrix LCD controller capable of displaying ASCII
characters and some custom symbols. This standardization ensures that
numerous libraries and code examples are readily available for interfacing with
16x2 LCDs across various microcontroller platforms.
The 16x2 LCD module consists of a liquid crystal panel sandwiched between
two polarized sheets. When an electric field is applied across specific segments
of the liquid crystal, it causes the crystals to align in a way that either blocks or
allows the passage of light. By selectively controlling these electric fields for
individual pixels arranged in a 5x8 dot matrix for each character, the display can
form alphanumeric characters and basic symbols. A backlight, usually
consisting of LEDs, is integrated into the module to illuminate the display,
making it readable in various lighting conditions.
The module typically has 16 pins for interfacing:
* VSS (Ground): Connects to the ground of the circuit.
* VDD (Power Supply): Requires a +5V DC power supply.
* VO (Contrast Adjust): Controls the contrast of the display. Typically
connected to the center pin of a potentiometer (10kΩ) with the other two ends
connected to VCC and GND, allowing manual adjustment of the display's
clarity.
* RS (Register Select): Controls whether the data being sent to the LCD is
interpreted as a command (e.g., clear display, set cursor position) or as character
data to be displayed.
* RW (Read/Write): Controls the direction of data flow. Typically connected to
GND for write-only operation (as reading from the LCD is less common in
basic applications), simplifying the interface.
* E (Enable): A high-to-low pulse on this pin enables the data transfer between
the microcontroller and the LCD module.
* D0-D7 (Data Bus): These are 8 data lines used to transfer 8 bits of data at a
time. However, the LCD can also be operated in a 4-bit mode, using only D4-
D7, which reduces the number of microcontroller pins required for interfacing.
* A (Backlight Anode): Connects to +5V through a current-limiting resistor
(typically 220Ω) to power the backlight LED.
* K (Backlight Cathode): Connects to the ground of the circuit.
The 16x2 LCD provides a simple yet effective way to provide visual feedback
from an embedded system. Its ease of use, low cost, and readily available
libraries make it a staple component in many Arduino projects.
Working of the 16x2 LCD in the SMS-Based LPG Gas Leakage Detection
System using Arduino
In an SMS-based LPG gas leakage detection system using Arduino, the 16x2
LCD display serves as a crucial local visual interface, providing immediate
feedback on the system's status and detected gas levels. While the primary alert
mechanism is the SMS notification sent via the GSM module, the LCD offers a
direct and readily accessible way for users in the vicinity to understand the
system's operation and any detected hazards.
Here's how the 16x2 LCD is typically integrated and utilized in such a system:
* Hardware Interfacing: The Arduino microcontroller is connected to the 16x2
LCD module using several digital output pins. Typically, the LCD is operated in
4-bit mode to conserve Arduino pins. In this configuration, the RS, E, and four
data lines (D4-D7) of the LCD are connected to specific digital output pins on
the Arduino. The RW pin is usually connected to GND for write-only operation.
The VSS and VDD pins are connected to the Arduino's ground and +5V supply,
respectively. The VO pin is connected to a potentiometer for contrast
adjustment, and the backlight pins (A and K) are connected to +5V (through a
resistor) and GND to illuminate the display.
* Library Integration: The Arduino IDE provides a built-in LiquidCrystal.h
library (or similar community-developed libraries) that simplifies the control of
HD44780-based LCDs. The Arduino sketch includes this library and initializes
an LiquidCrystal object, specifying the Arduino pins connected to the LCD's
control and data lines.
* Displaying System Status: Upon powering up, the Arduino can use the LCD
to display an initial system status message, such as "LPG Detector
Initializing..." or "System Ready". This provides immediate feedback to the user
that the system is starting up correctly.
* Real-time Gas Level Indication: The Arduino continuously reads the LPG gas
sensor and processes the data. This processed gas concentration value can be
displayed on the LCD. For example, the first line of the LCD could show "LPG
Level:" and the second line could display the numerical value of the gas
concentration (after appropriate scaling or mapping) along with its unit (e.g.,
"PPM" or a relative percentage). This allows users to monitor the current gas
levels in real-time.
* Threshold Indication: The LCD can also display the pre-set safety threshold
level, providing transparency about when an alert will be triggered. This could
be shown as "Threshold: [Value] PPM".
* Alert Message Display: When the Arduino detects an LPG leak (i.e., the gas
concentration exceeds the threshold), it not only triggers the SMS sending
process via the GSM module but also displays a clear warning message on the
LCD. This message could be something like "WARNING! LPG Leak Detected"
or "High Gas Level - Check Immediately!". The display can also blink or show
a scrolling message to further emphasize the alert.
* GSM Status Indication (Optional): In more advanced implementations, the
Arduino could interact with the GSM module to check its network registration
status and display it on the LCD (e.g., "GSM: Connected" or "GSM: No
Signal"). This can help users troubleshoot potential issues with SMS delivery.
* Menu or Configuration Interface (More Complex): While less common in
basic leakage detection systems, the LCD could potentially be used to display a
simple menu for configuring parameters like the alert threshold or the recipient's
phone number, using buttons connected to the Arduino for navigation and
selection.
In summary, the 16x2 LCD display in an SMS-based LPG gas leakage detection
system serves as a vital local visual interface. It provides immediate feedback
on the system's initialization, real-time gas levels, the alert threshold, and, most
importantly, clear and direct warning messages when a gas leak is detected.
While the SMS provides remote notification, the LCD ensures that users in the
immediate vicinity are also promptly informed of the potential hazard,
complementing the wireless alert mechanism and enhancing the overall safety
of the system.
FIG 3.1.5 BUZZER :
A buzzer, also known as a beeper or sounder, is a simple yet effective
electromechanical or piezoelectric audio signaling device. Its primary function
is to convert an electrical signal into an audible sound, typically a buzzing or
beeping tone. Buzzers are ubiquitous in various electronic devices and systems,
serving as indicators for alarms, notifications, user feedback, and warnings.
Their simplicity, low cost, and ease of integration with microcontrollers like the
Arduino make them a fundamental component in many embedded projects.
There are two main types of buzzers commonly used in electronics:
* Electromechanical Buzzers (Magnetic Buzzers): These buzzers operate based
on the principle of electromagnetism. They typically consist of a coil, a
diaphragm (usually made of metal), and a permanent magnet. When an
electrical current flows through the coil, it creates a magnetic field that interacts
with the permanent magnet, causing the diaphragm to vibrate rapidly. This
vibration produces sound waves, resulting in the audible buzz.
Electromechanical buzzers often require a driving circuit to generate the
oscillating current needed for sound production.
* Piezoelectric Buzzers: These buzzers utilize the piezoelectric effect, a
phenomenon where certain materials (like ceramic or crystal) generate an
electrical charge when subjected to mechanical stress or, conversely, deform
mechanically when an electric field is applied across them. A piezoelectric
buzzer typically consists of a piezoelectric ceramic disc bonded to a metal plate.
When an alternating voltage is applied across the ceramic disc, it vibrates,
causing the metal plate to vibrate as well, thus producing sound. Piezoelectric
buzzers can be further categorized into:
* Passive Buzzers: These require an external oscillating signal (AC voltage) at
their resonant frequency to produce sound. The frequency of the applied signal
determines the pitch of the sound.
* Active Buzzers: These have an internal oscillating circuit built-in. When a
DC voltage is applied, the internal circuitry generates the necessary oscillating
signal to drive the piezoelectric element, producing a fixed-frequency sound.
Active buzzers are generally easier to use as they only require a DC voltage to
operate.
For Arduino-based projects, both active and passive piezoelectric buzzers are
commonly used. Active buzzers are particularly straightforward to integrate as
they only need to be connected to a digital output pin and ground. Applying a
HIGH signal to the pin will typically activate the internal oscillator and produce
a sound. Passive buzzers offer more control over the sound produced, as the
Arduino can generate different frequencies to create various tones and melodies.
Buzzers are characterized by several specifications, including their operating
voltage, current consumption, sound pressure level (measured in decibels, dB, at
a specific distance), resonant frequency (for passive buzzers), and physical
dimensions. Selecting the appropriate buzzer depends on the specific
requirements of the application, such as the desired loudness, tone, and power
constraints.
Working of the Buzzer in the SMS-Based LPG Gas Leakage Detection System
using Arduino
In an SMS-based LPG gas leakage detection system using Arduino, the buzzer
serves as a crucial local audible alarm, providing an immediate and attention-
grabbing warning to individuals in the vicinity of the detected gas leak. While
the SMS notification alerts users remotely, the buzzer ensures that anyone
nearby is instantly aware of the potential danger, allowing for quicker
evacuation or intervention.
Here's how the buzzer is typically integrated and functions within such a
system:
* Hardware Interfacing: The buzzer is connected to one of the digital output
pins of the Arduino microcontroller. For an active buzzer, one pin is connected
to the Arduino's digital output, and the other pin is connected to the ground
(GND). For a passive buzzer, one pin is connected to a digital output pin
capable of generating PWM (Pulse Width Modulation) signals (for controlling
the frequency and thus the pitch), and the other pin is connected to GND. Often,
a current-limiting resistor (e.g., 220Ω) is placed in series with the buzzer to
protect the Arduino's output pin, although this might not always be strictly
necessary depending on the buzzer's current draw.
* Software Control: The Arduino code is programmed to activate the buzzer
when the LPG gas sensor detects a concentration exceeding the pre-defined
safety threshold for a sustained period, indicating a confirmed gas leak.
* Activation Logic: When the Arduino's leak detection logic determines that a
hazardous gas level is present, it sends a digital HIGH signal to the digital
output pin connected to the buzzer.
* For an active buzzer, this HIGH signal completes the circuit, powering the
internal oscillator and causing the buzzer to emit a continuous tone (typically a
fixed frequency). Sending a LOW signal will deactivate the buzzer.
* For a passive buzzer, the Arduino can generate square wave signals of
different frequencies on the connected digital pin using functions like tone() in
the Arduino library. By rapidly switching the pin HIGH and LOW at a specific
frequency, the passive buzzer vibrates and produces a sound at that frequency.
The noTone() function can be used to stop the sound.
* Alarm Pattern: The Arduino code can be programmed to generate various
alarm patterns using the buzzer. Instead of a continuous tone, the buzzer can be
made to beep intermittently, produce different tones, or follow a specific
sequence of beeps and pauses to make the alert more noticeable and
distinguishable from other sounds. For example, the buzzer could emit a series
of short, rapid beeps followed by a brief pause, repeating this pattern.
* Synchronization with SMS Alert and LCD: The activation of the buzzer is
typically synchronized with the sending of the SMS alert via the GSM module
and the display of a warning message on the 16x2 LCD. This multi-pronged
approach ensures that the alert is conveyed through multiple sensory channels,
increasing the likelihood of it being noticed by individuals both near and far
from the detection system.
* Deactivation: Once the gas concentration falls below the safety threshold for
a determined period, indicating that the leak has subsided or been addressed, the
Arduino code will send a LOW signal to the active buzzer's pin (or use
noTone() for a passive buzzer) to silence the audible alarm.
In essence, the buzzer in the SMS-based LPG gas leakage detection system acts
as an immediate, local warning mechanism. When the Arduino detects a
dangerous gas leak, it triggers the buzzer to produce a distinct audible alarm,
alerting people in the immediate vicinity to the potential hazard, prompting
them to take necessary safety precautions such as evacuating the area or
shutting off the gas supply. This local alarm serves as a critical first line of
defense, complementing the remote notification provided by the SMS alert. The
simplicity and effectiveness of the buzzer make it an indispensable component
for enhancing the safety and responsiveness of the LPG leakage detection
system.
FIG 3.1.6 MQ2 GAS SENSOR
The MQ-2 gas sensor is a popular and cost-effective component widely used for
detecting the presence and concentration of various flammable gases and smoke
in the air. Belonging to the MQ series of gas sensors, it utilizes a metal oxide
semiconductor (MOS) technology, specifically tin dioxide (SnO2), as its
sensing material. In clean air, the SnO2 material exhibits a relatively low
conductivity. However, when it comes into contact with target gases like
Liquefied Petroleum Gas (LPG), propane, methane, carbon monoxide,
hydrogen, alcohol, and smoke, a chemical reaction occurs on the sensor's
surface. This reaction causes a significant change in the conductivity of the
SnO2 layer, which is directly proportional to the concentration of the detected
gas.
The MQ-2 sensor is characterized by its high sensitivity to LPG and smoke,
making it particularly suitable for applications like domestic gas leakage alarms
and portable gas detectors. It also demonstrates good sensitivity to other
flammable gases, offering versatility in various detection scenarios. The sensor
is relatively inexpensive, easy to integrate with microcontroller platforms like
Arduino, and offers both analog and digital output options, providing flexibility
in circuit design and data acquisition.
Physically, the MQ-2 sensor typically consists of a sensing element (the SnO2
layer), a heating element, and connection pins, all housed within a protective
mesh or enclosure. The heating element is crucial for the sensor's operation as it
needs to be heated to a specific temperature for the chemical reaction with the
target gases to occur effectively. This heating is usually achieved by applying a
specific voltage (typically 5V) across the heater terminals.
The sensor's output can be obtained in two ways: analog and digital. The analog
output provides a continuous voltage reading that varies with the gas
concentration. This allows for a more precise measurement of the gas level. The
digital output, on the other hand, provides a simple HIGH or LOW signal based
on a pre-set threshold. This is useful for triggering alarms or other binary
actions when a certain gas concentration is reached.
To utilize the MQ-2 sensor effectively, it's important to understand its
characteristics, including its sensitivity range (typically 300 to 10000 ppm for
flammable gases), the required preheating time for stabilization, and the
appropriate circuitry for signal conditioning and interfacing with a
microcontroller.
Working of MQ-2 in an SMS Based LPG Gas Leakage Detection System using
Arduino
Integrating the MQ-2 gas sensor with an Arduino microcontroller and a GSM
(Global System for Mobile communications) module allows for the creation of
an automated SMS-based LPG gas leakage detection system. Here's how the
MQ-2 sensor works within such a system:
* Gas Detection: The MQ-2 sensor is placed in a location where LPG leakage
is a potential risk, such as near a gas cylinder or stove. When LPG gas leaks into
the surrounding air and comes into contact with the sensor's SnO2 sensing
element, a chemical reaction takes place.
* Resistance Change: This chemical reaction causes a decrease in the electrical
resistance of the SnO2 layer. The extent of this resistance change is directly
proportional to the concentration of LPG gas present. Higher gas concentrations
lead to a lower resistance.
* Voltage Divider Circuit: To convert this change in resistance into a
measurable voltage signal, the MQ-2 sensor is typically connected in a voltage
divider circuit. This circuit consists of the sensor's internal resistance (Rs) and a
fixed load resistor (RL) connected in series. A voltage (VCC, usually 5V from
the Arduino) is applied across this series combination. The voltage output
(Vout) is taken from the junction between the sensor's resistance and the load
resistor.
The relationship between Vout, VCC, Rs, and RL is given by:
Vout = VCC * (RL / (Rs + RL))
As the LPG gas concentration increases, Rs decreases, leading to an increase in
Vout.
* Analog Input to Arduino: The analog output pin (A0) of the MQ-2 sensor,
which carries the Vout signal, is connected to one of the analog input pins of the
Arduino microcontroller.
* Analog-to-Digital Conversion: The Arduino's built-in Analog-to-Digital
Converter (ADC) reads the analog voltage signal from the MQ-2 sensor and
converts it into a digital value. This digital value represents the concentration of
LPG gas detected by the sensor.
* Threshold Comparison: The Arduino program continuously monitors the
digital readings from the MQ-2 sensor. A pre-defined threshold value is set in
the code, representing a dangerous level of LPG gas concentration. This
threshold is determined through experimentation and calibration of the sensor in
the specific application.
* Leakage Detection: If the digital reading from the MQ-2 sensor exceeds the
pre-defined threshold, the Arduino identifies this as a gas leakage event.
* SMS Alert Activation: Upon detecting a gas leak, the Arduino activates the
connected GSM module. The GSM module is a small electronic device that can
connect to a mobile network, similar to a mobile phone.
* Sending SMS Message: The Arduino program is configured to send a pre-
written SMS alert message (e.g., "WARNING! LPG gas leak detected in
[Location]") to a designated mobile phone number(s) using AT commands
communicated to the GSM module.
* User Notification: The recipient of the SMS message receives an immediate
notification about the potential gas leak, allowing them to take necessary safety
precautions.
In summary, the MQ-2 sensor in this system acts as the "nose" that detects the
presence of LPG gas and translates its concentration into a varying analog
voltage. The Arduino then acts as the "brain," reading this voltage, determining
if a dangerous level of gas is present by comparing it to a threshold, and then
triggering the GSM module to send an SMS alert, providing a timely warning of
a potential gas leakage. This automated system enhances safety by providing
immediate remote notification in case of a hazardous event.
FIG 3.1.7 I2C MODULE
the realm of embedded systems, efficient communication between different
integrated circuits (ICs) is paramount. The Inter-Integrated Circuit (I2C)
protocol, often pronounced "I-squared-C" or "I-two-C," emerges as a ubiquitous
and elegant solution for short-distance, serial communication between multiple
devices. Developed by Philips Semiconductors (now NXP Semiconductors),
I2C utilizes just two bidirectional lines – Serial Data Line (SDA) and Serial
Clock Line (SCL) – to facilitate communication between a master device and
one or more slave devices. This simplicity in wiring makes it an incredibly
versatile and space-saving choice for connecting various peripherals to
microcontrollers like the Arduino.
The beauty of I2C lies in its addressing mechanism. Each slave device
connected to the I2C bus is assigned a unique 7-bit or 10-bit address. The
master device, in our case the Arduino, initiates communication by sending the
address of the target slave device along with a read/write bit. This allows the
master to selectively communicate with specific slave devices on the same bus
without requiring individual dedicated communication lines for each. The SCL
line provides the timing for data transfer, while the SDA line carries the actual
data bits. Data is transferred serially, bit by bit, synchronized by the clock
signal.
In the context of an SMS-based LPG gas leakage detection system using
Arduino, the I2C module plays a crucial role when integrating certain types of
sensors or displays. For instance, some advanced gas sensors or Liquid Crystal
Displays (LCDs) with backlight control often utilize the I2C interface for
communication. Instead of requiring numerous digital or analog pins on the
Arduino for control and data transfer, these I2C-enabled peripherals can be
connected using just the two I2C pins (typically A4 for SDA and A5 for SCL on
standard Arduino Uno boards).
Consider the integration of an I2C-based LCD to display the current gas
concentration readings or system status messages. Without I2C, controlling an
LCD might require several digital output pins on the Arduino. However, with an
I2C LCD module, the Arduino acts as the master, sending commands and data
to the LCD (the slave) over the I2C bus using its unique address. This simplifies
the wiring considerably and frees up valuable Arduino pins for other essential
components, such as the MQ series gas sensor itself or the GSM module
responsible for sending SMS alerts.
Similarly, if a more sophisticated gas sensor with onboard processing or
calibration features utilizes I2C, the Arduino can communicate with it to
retrieve processed gas concentration data or configure sensor settings. The I2C
protocol ensures reliable data transfer between the sensor and the Arduino,
allowing for more accurate and feature-rich gas detection capabilities. The
Arduino code would then include specific libraries and functions to initiate I2C
communication, address the connected I2C devices, send commands, and
receive data, ultimately forming a cohesive and efficient LPG leakage detection
system capable of alerting users via SMS upon detecting a hazard. The use of
I2C thus contributes to a more streamlined and expandable design for the
safety-critical gas leakage detection system.
3.4 CIRCUIT DIAGRAM
FIG 3.1.8 CIRCUIT DIAGRAM OF SMS BASED LPG GAS LEAKAGE
DETECT SYSTEM USING GSM
3.4 ACTION PLAN
WORKING DATE
PROJECT SELECTION 30-7-2024 to 15-8-2024
PROJECT SYNOPSIS 15-8-2024 to 28-8-2024
COMPONENT PURCHES 28-8-2024 to 2-9-2024
PPT PRESENTATION 2-9-2024 to 20-10-2024
SEMINAR 20-10-2024 to 3-1-2025
POWER SUPPLY 3-1-2025 to 15-1-2025
PCB DESIGN 15-1-2025 to 15-2-2025
PROJECT REPORT 15-2-2025 to 17-2-2025
PROJECT PERFORMANCE 17-2-2025
REFERANCE
Christian and N. Komar, "Prototipe Sistem Pendeteksi Kebocoran Gas LPG Menggunakan
Sensor Gas MQ2, Board Arduino Duemilanove, Buzzer, dan Arduino GSM Shield pada PT.
Alfa Retailindo (Carrefour Pasar Minggu)," Jurnal TICOM, pp. 1-7, 2013.
[ T. H. Mujawar, V. D. Bachuwar, M. S. Kasbe, A. D. Shaligram and L. P. Deshmukh,
"Development of wireless sensor network system for LPG gas leakage detection system,"
International Journal of Scientific & Engineering Research, vol. 6, pp. 1-6, 2015.
[ M. F. Putra, A. H. Kridalaksana and Z. Arifin, "RANCANG BANGUN ALAT
PENDETEKSI KEBOCORAN GAS LPG DENGAN SENSOR MQ-6 BERBASIS
MIKROKONTROLER MELALUI SMARTPHONE ANDROID SEBAGAI MEDIA
INFORMASI," Jurnal Informatika Mulawarman, vol. 12, pp. 1-6, 2017.
[ H. Santoso, Arduino untu…
Mosavi, A., & Varkonyi, A. (2017). Learning in robotics. International Journal of Computer
Applications, 157(1), 8-11.
Pakdaman, M., Sanaatiyan, M. M., & Ghahroudi, M. R. (2010, February). A line follower
robot from design to implementation: Technical issues and problems. In 2010 The 2nd Inter-
national Conference on Computer and Automation Engineering (ICCAE) (Vol. 1, pp. 5-9).
IEEE.
Herrmann, M., Otesteanu, M., & Otto, M. A. (2013, October). A novel approach for auto-
mated car body panel fitting. In 2013 IEEE International Symposium on Robotic and Sensors
Environments (ROSE) (pp. 190-195). IEEE.
Varabin, D., & Bagaev, D. (2012, September). Autonomous system” car robot”. In 2012 IV