0% found this document useful (0 votes)
245 views51 pages

LPG Leakage Detector

This document presents a project that developed a GSM based LPG leakage detection and protection system. It was submitted by three students in partial fulfillment of their Bachelor of Science degree in Electrical and Electronic Engineering at Atish Dipankar University of Science and Technology. The project was supervised by Alea Afrin and aimed to develop a system to detect LPG gas leaks and send alerts via GSM to protect homes and industries. It describes the objectives, methodology, applications and problem statement of the project along with providing details of the hardware implementation including components like Arduino, gas sensors, GSM module, buzzer, relay and power supply.

Uploaded by

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

LPG Leakage Detector

This document presents a project that developed a GSM based LPG leakage detection and protection system. It was submitted by three students in partial fulfillment of their Bachelor of Science degree in Electrical and Electronic Engineering at Atish Dipankar University of Science and Technology. The project was supervised by Alea Afrin and aimed to develop a system to detect LPG gas leaks and send alerts via GSM to protect homes and industries. It describes the objectives, methodology, applications and problem statement of the project along with providing details of the hardware implementation including components like Arduino, gas sensors, GSM module, buzzer, relay and power supply.

Uploaded by

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

GSM based LPG Leakage detection and

Protection System

A Project Submitted in Partial Fulfillment of the Requirements for the Degree


of Bachelor of Science in Electrical and Electronic Engineering

Supervised By
Alea Afrin
Lecturer
Department of EEE
Atish Dipankar University of Science and Technology (ADUST)

Submitted By
Sree Krishno Kumer Das ID: 171-0576-211
Md. Rajib Mia ID: 171-0578-211
MD. Masudur Rahman ID: 171-0383-211

DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING


ATISH DIPANKAR UNIVERSITY OF SCIENCE AND TECHNOLOGY
December 2020
CERTIFICATE OF APPROVAL
“GSM based LPG Leakage detection and Protection System”

Done under my supervision, meets acceptable presentation that is standard and can be submitted
for evaluation to the department of Electrical and Electronic Engineering in partial fulfillment of
the requirement for the degree of Bachelor of Science (B.Sc.) in Electrical and Electronic
Engineering.

Date……………………. ………………………………
Alea Afrin
Lecturer
Atish Dipankar University of Science and Technology
Plot #209, Sector #15, Uttara-1230

i
DECLARATION
We hereby declare that this submission is our own work and to the best of our knowledge it
contains no materials which are exactly same which were previously published anywhere in print
or soft.

Date:……………………………… ……………………
Sree Krishno Kumer Das
ID: 171-0576-211
Dept of EEE, ADUST

Date:……………………………… ……………………
Md. Rajib Mia
ID: 171-0578-211
Dept of EEE, ADUST

Date:……………………………… ……………………
MD. Masudur Rahman
ID: 171-0383-211
Dept of EEE, ADUST

ii
ACKNOWLEDGEMENTS
We are very grateful to almighty Allah at first for finishing my project successfully. I would like
to express our profound gratitude to our supervisor, Alea Afrin, Lecturer, Department of
Electrical & Electronic Engineering, Atish Dipankar University of Science and Technology, for
her guidance throughout all phases of our project. I would like to thank him for his cordial
suggestion, which helped us to reach our goal. I would also like to thank all our faculty members,
Lab instructors of the Department of Electrical &Electronic Engineering, Atish Dipankar
University of Science and Technology. The authors are also grateful to Professor Abdullah Al
Mamun, Advisor of the Department of EEE and all respected teachers of the Electrical and
Electronic Engineering Department for their co-operation and significant help for completing the
project work successfully.
Thank you all.

Author

Sree Krishno Kumer Das


ID: 171-0576-211
Dept of EEE, ADUST

Md. Rajib Mia


ID: 171-0578-211
Dept of EEE, ADUST

MD. Masudur Rahman


ID: 171-0383-211
Dept of EEE, ADUST

iii
ABSTRACT

Now a days the home safety detection system play the important role for the security of people.
Since all the people from the home goes to work on daily bases, it make impossible to have
check on the appliances available at home specially LPG gas cylinder, wired circuits, Etc.
whereas in industrial system it also make difficult for the labors to keep the track of every second
so to work on this problem, the system is develop which will keep the track on various home
appliances such as LPG gas cylinder, wired circuit, etc. this system uses MQ6 gas sensor to
detect inflammable gas leakage. This makes easy for both the commercial as well as domestic
sector to keep the track on problem faced on daily bases. This system effectively track the
problems arises in day to day life.

iv
TABLE OF CONTENTS
Page No
CERTIFICATE OF APPROVAL I
DECLARATION II
ACKNOWLEDGEMENTS III
ABSTRACT IV
TABLE OF CONTENTS V
LIST OF FIGURE VII
CHAPTER ONE: INTRODUCTION
1.1 Introduction 1
1.2 Objectives 1
1.3 Methodology 2
1.4 Application 2
1.5 Problem Statement 2
1.6 Scope of project 3
1.7 Conclusion 3

CHAPTER TWO: LITERATURE REVIEW


2.1 Introduction 4
2.2 Background 4
2.3 Field of applications of gas detection 5
2.3.1 Nuclear power plants 5
2.3.2 Conventional power plants 6
2.3.3 Refineries 6
2.3.4 Chemical and petrochemical plant 6
2.3.5 Offshore 6
2.3.6 Long distance city heating pipelines 6
2.3.7 Food and drinks industries 6

v
2.3.8 Communal waste water pipe systems 7
2.3.9 Gas pipelines 7
2.4 Existing system 7
2.4.1 Definition 7
2.4.2 Field visit 8
2.4.3 ICSS 8
2.4.4 Limitations of existing system 9
2.5 Design / Analysis 10
2.6 Summary 11

CHAPTER THREE: HARDWARE IMPLEMENT


3.1 Introduction 12
3.2 System Implementation 12
3.2.1 Detecting System 12
3.2.2 Arduino UNO 12
3.2.2.1 Power supply, inputs and outputs 17
3.2.2.2 Digital inputs and outputs 18
3.2.2.3 Analog inputs 18
3.2.3 LCD 18
3.3 Gas Sensor 19
3.3.1 Arduino and LPG sensor Connection 20
3.4 GSM Module 21
3.5 Buzzer 23
3.6 Relay 23
3.7 Exhaust Fan 24
3.8 Power Supply 24
3.9 Arduino software 25

CHAPTER FOUR: IMPLEMENTATION RESULT AND DISCUSSION


4.1 Introduction 28
4.2 Result 28

vi
4.3 Advantage of GSM Based Fire Alert Gas leakage Detector 29
4.4 Costing 29

CHAPTER FIVE: CONCLUSION


5.1 Introduction 31
5.2 Application 31
5.3 Future Scopes of the Work 31
5.4 Conclusion 32

Appendix
References: 33
Programming code 36

vii
LIST OF FIGURE Page No
Fig 2.5(1): Block Diagram of GSM based fire alert & gas leakage detector system 10
Fig 2.5(2): Circuit Diagram of GSM based fire alert & gas leakage detector system 10
Fig 3.1 (a): Simple Block Diagram 12
Fig 3.2.2 (a): Arduino UNO 13
Fig 3.2.2 (b): ATmega328P Microcontroller 14
Fig 3.2.2 (c): ATmega328 Microcontroller Architecture 14
Fig 3.2.2 (d): Block diagram of the AVR CPU Core architecture 15
Fig 3.2.2 (e): Microcontroller IC ATmega 328p 17
Fig 3.2.3: 16*2 LCD Display 19
Fig 3.3: LPG Gas Detector 20
Fig 3.3.1: Arduino and LPG sensor Connection 20
Fig 3.4 (a): SIM800L GSM Module 22
Fig 3.4 (b): Schematic Diagram of SIM800L GSM Module 22
Fig 3.4 (c): Circuit Diagram for Arduino and GSM module Connection 23
Fig 3.7: Exhaust Fan 24
Fig 3.8: Power Supply 24
Fig 3.9 (a): Programming platform for ARDUINO 25
Fig 3.9 (b): IDE configuration for ARDUINO UNO Programmer 26

viii
CHAPTER ONE
INTRODUCTION

1.1 Introduction
Fire accident is a common incident in factories, houses, markets in every country. Due to
poor fire extinguishing arrangement, lack of adequate fire alarm and emergency exit, it
increases death and wreck. When it comes to security issues, we cannot take it for granted.
Security is the level of protection against danger and loss. Nowadays, in a world that full of
technology, people needs the help of technology to provide early warning alert to ensure they
have enough time to avoid danger. In designing this project, the dangerous sources that have
been highlighted are about gas leakage and fire. This is because both of these can become a
huge disaster if the security procedure is not taken early. To minimize fire accident our
project will act as a sentinel which is control from a central console room. For detection we
used a high sensitive smoke detector by which microcontroller will get high pulse at input pin
which is preprogrammed for our desired output signal.
This project is about producing an alert warning system based on Global System for Mobile
(GSM) network. It will be used to detect the presence of natural gases as well as LPG.
Whenever gas leakage occurs, the sensors used in the circuit will detect it and the GSM
modem will send out an SMS alert to the user and also to the nearest fire station. With the
system that provides a real-time notification, it increases the response time of the owner. This
will provide the immediate aid to the situation occur. This system can be installed in kitchens,
Liquefied Petroleum Gas (LPG) storage rooms, near the Natural Gas Vehicle (NGV) tank in
mobile cars or any places thinks required.

1.2 Objectives
 To save unwanted accident due to careless movement for fire;
 To reduce fire damages;
 The presence of natural Gas;
 Send an SMS alert to the user;
 To acquire a project “LPG Leakage Detector using Arduino with SMS Alert”

1
1.3 Methodology
The goal of the project is to develop a smart automatic gas leakage detection system. The
system is designed for homes, offices, industries etc. In this system, there will be an alert
system for every individual floor. It is designed to detect sudden gas leakage. It will contain
necessary sensors for detecting gas leakage. When the system will detect gas leakage for a
room it will take following steps.

 Scan Gas & Display in LCD After activation, the device will continuously scan gas
and show the result in the LCD display. If there is no gas, then the display will show -
‘No Gas Leaking’. If there is any gas found, the display will show - ‘Gas leaking’.
 Detection of Gas If there is presence of any gas the display shows ‘Gas Alert’.
 Start Alarm
 When the sensor finds any gas leakage in room or where the device is installed, it
immediately sends notification on mobile. There will be an automatic messaging
system which will send SMS to cell phone number.
 When leakage found main line will cut using relay and establish the connection if
there is no gas
 Stop Alarm & Reset

If the gas sensor cannot find any gas leakage, then it shows that there is no gas leaking and
keeps on scanning for gas.

1.4 Application
 Protection from any gas leakage in cars
 For safety from gas leakage in heating gas fired appliances like boilers, domestic
water heaters
 Large industries which uses gas as their production
 For safety from gas leakage in cooking gas fired appliances like ovens, stoves etc.

1.5 Problem Statement


Natural gases such as Liquefied Petroleum Gas (LPG) are widely used in the whole world.
LPG is used for cooking in home or hotel. It is also used in certain gas based industry. As for

2
now, the use of natural gases instead of petroleum as the alternative fuel for mobile cars also
has been increased. Although the procedure of installing LPG-based system is very tight, we
could not give 100% guaranteed that the LPG-system will not having leakage Even though
human is a perfect creation of God, they still have certain weakness. Human cannot detect the
presence of natural gases as fast as the sensor do. Thus, the use of gas sensing system is
hugely needed to give real-time monitoring of the gas system. In certain cases, gas leakage
can cause fire that will destroy human property. The large scale of fire also could contribute
to serious injury or death. This is due to the fire station got delay information about the fire
occurred. Therefore, this project shall be able to resolve the problem stated. This is because
this project is able to sense the presence of natural gases as well as fire. Besides that, it is also
capable to send out an SMS alert automatically to the owner and also to the nearest fire
station.

1.6 Scope of project


 The circuit is basically on the gas sensor, GSM module, and Exhaust fan. The gas
sensor could be treated, basically as variable resistor which value depends on gas
concentration in air changes respectively. this sensors have high sensitivity.
 The gas sensor chosen is MQ6. It can detect gas concentration in the air from 300 to
5000ppm. 1000 ppm will be set as the dangerous level.
 These sensor will be connected directly and controlled by a microcontroller.
Atmega328 (Arduino UNO) is chosen to makes the detector much simpler.

1.7 Conclusion
This project focuses more on the study case and the project development based on the gas
sensor. The microcontroller will continuously receive the data from both of the sensor in
digital packet of data. It will process the data and convert it to ppm respectively. The
converted data will be displayed by the LCD. Whenever the reading of the sensors exceeding
the limit set, it will automatically send an SMS alert wirelessly by using GSM Network to the
numbers as being set on the source code. it will stop solenoid, main line and starts exhaust
until LPG gas reduce to safe level .The project methodology shows the step by step taken in
order to complete the project. The methodology includes the planning, the development of
the design and the management of the project.

3
CHAPTER TWO
LITERATURE REVIEW

2.1 Introduction
Liquefied Petroleum Gas (LPG) is a highly inflammable gas made up of the mixture of propane
and butane, although butylene, propylene and other hydrocarbons are present in small
quantities. The gas is used as fuel for domestic, automobile and industrial purposes, including
several heating applications. However it has gained considerable use as a cooking gas.
Ethanethiol is added as a powerful odorant to give it its characteristic smell since LPG is
odorless, so that when there is gas leakage it can be detected through smell. It is very important
that gas leakage is detected because of the flammable nature of the gas. If left undetected it can
lead to fire outbreak, causing injuries, loss of property and sometimes death. There are several
factors that can lead to gas leakage such as carelessness on the part of the user, the personnel
that refilled and/or service the gas cylinder/burner or faulty hose and cylinder. Although gas
leakage as a result of faulty cylinder is very rare because the cylinder can last more than two
decades before it expires, it sometimes happens. To illustrate the danger of gas leakage, there
was an incidence in Lagos, Bangladesh where a gas explosion in an apartment in a storey
building resulted in a serious injury to 24 persons. This is just one of many examples showing
the need for an efficient system of gas leakage detection.

2.2 Background
Liquefied Petroleum Gas was first discovered in 1910 by the scientist Dr. Walter Snelling
which is a combination of commercial grade gases like propane and the other butane which
are having saturated and also the unsaturated hydrocarbons. Due to the usefulness of LPG, it
is widely employed for many purposes as industrial and domestic fuel, auto gas, heating,
lighting etc. The wide demand in market for the LPG is also growing day by day. But when
LPG is leaked it may lead to serious fire accidents. Also the number of casualties’ due to such
incidents are also on the rise in the recent years. Therefore there is purpose for a system to
find and also prevent the leakage of LPG. But before the invention of electronic gas detectors
for households in 1980s, it was detected by a chemical dipped paper which will change its
color in the presence of those gases. But after many inventions have been discovered to find,
monitor and alert the spillage of the dangerous gases. Also in recent days, booking a LPG gas

4
cylinder is done by simply sending a text message. LPG companies have recently launched
some customer friendly approaches like IVRS method for the people. Therefore a reliable
system to detect and also display the leakage of any of the gases is very important for
household purposes. In this paper, a microprocessor based system with a gas sensor MQ6 is
proposed to detect the leakage of the dangerous gases. The system is implemented with a
LCD display to indicate the leakage. Gas sensor used in this system has a very good
sensitivity and also has good response time at a low price. If any leakage is sensed, a SMS
will be sent automatically to the corresponding persons or family member using GSM.

J Tsado et al. developed a system of gas leakage detection system that used 555 timer to
interface the MQ 6 gas sensor with the microcontroller and then by means of relays activates the
GSM module to alert the user. N. Harshada and B. Pawar developed a system that directly
interface the MQ 6 gas sensor with the microcontroller. In addition to the GSM module sending
an SMS to the user when it detects gas leakage, there is a buzzer to sound an alarm, the exhaust
fan would be switched on and the sprinkler activated, to reduce the concentration of gas in the
air. V. Ramya and B. Palaniappan also implemented a similar design but without the sprinkler.
Apart from detecting the gas concentration in the air, K. Abid, et al. included a means of
booking a refill of the cylinder with their design so that the user would be automatically notified
when the gas in the cylinder goes below a set threshold. Others such as B. Didpaye and S.
Nanda, T. Soundarya and J. Anchitaalagammai, S. Ashish, et al., and K. B. Vinoth, et al.,
implemented a system that detects the gas leakage and control the leakage by shutting off the
source of the gas supply using either a solenoid valve or a stepper motor.
In this paper we developed a system that can monitor the LPG concentration in the air and
simultaneously alert the user through an SMS so that appropriate actions can be taken to avert
the danger. A unique feature of this design is that it can also be powered by batteries so that
whether there is supply from mains or not the system will be fully functional.

2.3 Field of applications of gas detection

2.3.1 Nuclear power plants


Nuclear power plants must place safety concerns on the highest level of priority before other
interests such as their business interests. Regular inspections of pipe systems need to be
carried out and robots from INSPECTOR SYSTEMS are widely used.

5
2.3.2 Conventional power plants
By taking advantage of the NDT inspection methods that our robots offer, defects and faults
can be avoided increasing the 'up and running' operational time of all kinds of pipe systems.
Worldwide, many power plants already use our robots to do just this.

2.3.3 Refineries
The mineral oil industry can benefit from improved supply, transportation, processing and
distribution of mineral oil as well as improved environmental protection. Our robots are
helping to do just this.

2.3.4 Chemical and petrochemical plant


It is of course vital to continually reduce the risks brought about by the manufacture,
transport and storage of chemicals. This means that the possible dangers need to be examined
and the necessary testing and inspections carried out in order to avoid or at least lessen and
contain them. The use of our robots has become obligatory in many well known companies.

2.3.5 Offshore
The technical demands of offshore rigs as well as safety and environmental requirements are
very high and strongly controlled. This means that there is an enormous amount of required
Non Destructive Testing inspections. Our robots are used worldwide in offshore applications.

2.3.6 Long distance city heating pipelines


Leakages in long distance heat conduits, caused through external corrosion, cause energy and
water losses resulting in damage to, among others, subterranean constructions. Minimizing
energy loss during the transport of heat from source to end user is one of the most important
requirements in order to exclude danger to people and the environment. Our robots help in
this important duty.

2.3.7 Food and drinks industries


The hygiene standard in the food and drinks industries is very high. The condition of the
individual pipe networks is therefore decidedly important. Inspection robots from
INSPECTOR SYSTEMS help to maintain and ensure this high level of hygiene.

6
2.3.8 Communal waste water pipe systems
Subterranean sewer systems have been responsible for the collection and transport of waste
water since planning and construction began in 1842. With the Republic of Germany most of
these sewage systems are owned by the cities and community districts. Regular inspection of
the roughly 445 km of public sewage systems is therefore a complex and cost intensive
process.

2.3.9 Gas pipelines


Within Germany the total length of the natural gas pipeline network is something like 335
km. At the moment it is run by 18 national companies and around 730 local ones. Robots
from INSPECTOR SYSTEMS are deployed for inspection and maintenance these flexible
robots are well suited for carrying out inspections on pipe systems, especially those that have
a lot of bends, vertical sections and pipe branches.These robots are mainly used in the nuclear
power industry, refineries, chemical plants, petrochemical plants, the offshore industry, gas
pipelines, the beverage industry and all types of pipe lines up to 500m long. Three drive
elements provide a speed of up to 200 m/h in both horizontal and vertical directions and allow
for effortless bend taking.

2.4 Existing system

2.4.1 Definition
The existing system only detects the fire and gas leakage in certain important areas only. In
existing system, the fire and gas leaks are measured and the communication is through wires
to the control station. In case of faults like discontinuity in cables, damage to cable due to
environmental conditions may lead to loosing of vital information related to plant safety.

Increase in the complexity of process industry leads to increase in the number of instruments
to detect fire and leak. This increases the number of cables that run from industrial sensors to
the control station which leads to messy wiring. This also increases the size of the duct.
Troubleshooting the reduced insulation or any wire open is difficult because it is a messy
wiring and identifying the individual cable is very difficult along the duct. This also increases
the project cost in terms of cable cost.

7
2.4.2 Field visit
An F&G safety system continuously monitors for abnormal situations such as a fire, or
combustible or toxic gas release within the plant; and provides early warning and mitigation
actions to prevent escalation of the incident and protect the process or environment. By
implementing an integrated fire and gas strategy based on the latest automation technology,
plants can meet their plant safety and critical infrastructure protection requirements while
ensuring operational and business readiness at project start-up. Throughout the process
industries, plant operators are faced with risks. For example, a chemical facility normally has
potential hazards ranging from raw material and intermediate toxicity and reactivity, to
energy release from chemical reactions, high temperatures, high pressures, etc.

According to international standards, safety implementation is organized under a series of


protection layers, which include, at the base levels, plant design, process control systems,
work procedures, alarm systems and mechanical protection systems. The safety shutdown
system is a prevention safety layer, which takes automatic and independent action to prevent
a hazardous incident from occurring, and to protect personnel and plant equipment against
potentially serious harm. Conversely, the fire and gas system is a mitigation safety layer
tasked with taking action to reduce the consequences of a hazardous event after it has
occurred. The F&G system is used for automating emergency actions with a high-integrity
safety and control solution to mitigate further escalation. It is also important for recovering
from abnormal situations quickly to resume full production.

An industrial safety system is a countermeasure crucial in any hazardous plants such as oil
and gas plants and nuclear plants. They are used to protect human, plant, and environment in
case the process goes beyond the control margins. As the name suggests, these systems are
not intended for controlling the process itself but rather protection. Process control is
performed by means of process control systems (PCS) and is interlocked by the safety
systems so that immediate actions are taken should the process control systems fail.

2.4.3 ICSS
Process control and safety systems are usually merged under one system, called Integrated
Control and Safety System (ICSS). Industrial safety systems typically use dedicated systems
that are SIL 2 certified at minimum; whereas control systems can start with SIL 1. SIL
applies to both hardware and software requirements such as cards, processors redundancy

8
and voting functions. Fire and gas detection systems are designed to mitigate unexpected
events. Designers need to know what is available in order to choose the correct systems for
their plants.
The main objectives of the fire and gas system are to protect personnel, environment, and
plant (including equipment and structures). The FGS shall achieve these objectives by:

Detecting at an early stage, the presence of flammable gas,


Detecting at an early stage, the liquid spill (LPG and LNG),
Detecting incipient fire and the presence of fire,
Providing automatic and/or facilities for manual activation of the fire protection
system as required,
Initiating environmental changes to keep liquids below their flash point.
Initiating signals, both audible and visible as required, to warn of the detected
hazards,
Initiating automatic shutdown of equipment and ventilation if 2 out of 2 or 2 out of 3
detectors are triggered, and the exhausting system.

2.4.4 Limitations of existing system


The fire and gas system is generally required to be independent of the control system. This is
consistent with the fire and gas system normally having a higher integrity requirement than
the control system. Some fire and gas systems have been integrated with emergency shut-
down systems. This remains a contentious point.
As already mentioned, no single company can supply all the ‘best in show’ products for all
the items described in this paper. There are therefore normally interfaces between different
suppliers. Minimizing interfaces, document sets and inspections can be achieved by
procuring all products from one source at the cost of reducing choice of initiating devices and
possibly increasing the initial purchase cost.

4-20mA interfaced devices are common, enabling standard or modified process control
interfaces to be used. Field interfaces for smoke detectors, heat detectors and manual call-
points are generally two wires with modifying components in the control system or
marshalling cabinets to allow a 4-20ma interface to be used. Any failure in the loop causes
the system to fail. Presently, the location of the personals working in the site is uncertain. In

9
case of a dangerous event, the Control station officers have to personally check the positions
of the workers in the particular sites. This calls for more effort and time.

2.5 Design / Analysis


First the sensor will sense the leakage on the basis of gas density which is then sent to the
microcontroller in the form of electrical signal and further through programming/coding fed
in arduino, a signal will be sent to a specific message will be mobile number and also a
buzzer will be activated.

Fig 2.5(1): Block Diagram of GSM based fire alert & gas leakage detector system.

Fig 2.5(2): Circuit Diagram of GSM based fire alert & gas leakage detector system.
10
Used Component:
ATmega328:
The Atmega has high performance and function with simplicity. That can be reprogrammed.
That is why it is called the brain of arduino board. It stores the code. It takes 5V to operate.
LCD:
The measured values are shown with the LCD. LCD is used for displaying the value of
voltage, current, power and sunlight.
GSM Module
The GSM Module is a mini GSM/GPRS core development board based on GPRS module. It
supports dual-band GSM/GPRS network, available for GPRS and SMS message data remote
transmission. The board features compact size and low current consumption. With power
saving technique, the current consumption is as low as 3mA in sleep mode. It communicates
with microcontroller via UART port, supports command including GSM 07.07, GSM 07.05
and Ai-Thinker enhanced AT Commands.

MQ-6 Gas Sensor


Sensitive for LPG, propane, hydrogen Output voltage boosts along with the concentration of
the
measured gases increases. Fast response and recovery. Features boost circuit. Adjustable
sensitivity. Signal output indicator.

2.6 Summary
It is about the introduction of the GSM based LPG gas leakage detector using microcontroller
with SMS alert. The hardware used in the project and writing the information about the
specifications of the each module is been used to make in a systematic format. Specifies
about the description of the software tools used in the project, thus giving the clear view of
the design procedure.

11
CHAPTER THREE
HARDWARE IMPLEMENT
3.1 Introduction
In this Chapter we are going to Explain about the system Design construction through
Hardware and development of software. In addition, the chapter elaborates the hardware and
the software stage by stage. All the operations of hardware and software are also included in
this chapter. The system design of the total project is shown in below Figure3.1 with simple
block diagram.

Fig 3.1 (a): Simple Block Diagram

3.2 System Implementation


The LPG detection and protection system can be divided into 3 main parts. They are:
1. Detecting system
2. CPU
3. Output system

3.2.1 Detecting System


The goal of this project is to detect LPG gas. To fulfill this goal it needs LPG gas sensor. Our
aim is to implement a low cost project so that we create a simple sensor which can fulfill the
project demand and objective.

3.2.2 Arduino UNO


Arduino Uno is one of the microcontroller boards manufactured by the Arduino and it is a
microcontroller board based on Atmel’s ATmega328P microcontroller. “Uno” means one in

12
Italian and the Uno board is the latest in a series of USB (Universal Serial Bus) Arduino
boards which is the reference model for the Arduino platform. The Arduino Uno board has a
16 MHz ceramic resonator, a USB connection, a power jack, an ICSP header, a reset button,
6 analog inputs and 14 digital input/output pins (of which 6 can be used as PWM outputs). It
uses the Atmega16U2 programmed as a USB – to - serial converter instead of FTDI USB – to
– serial driver chip which was used in all the pre-ceding boards. The board has 32 KB flash
memory of which 0.5 KB is used by boot-loader, 2 KB of SRAM, 1 KB of EEPROM and 16
MHz clock speed.

Fig 3.2.2 (a): Arduino UNO

Reprinted from the Arduino Board Uno Figure 1 shows the Arduino Uno Board
manufactured by the Arduino in Italy. It can be powered via a USB connection or with an
external power supply. As can be seen in figure 1, pins A0 to A5 are the analog input pins,
pins 0 to 13 are 14 digital input/outputpins and the pins with a “~” sign can be used as digital
pins PWM o can be used as input or output pins by selecting the mode by using the function
Pin-Mode() and then using the function digitalRead() or digitalWrite() according to the ne-
cessity. Pins 0(RX) and 1(TX) are

used for serial communication while pins 10(SS), 11(MOSI), 12(MISO) and 13(SCK) are
used for SPI (Serial Peripheral Interface) communication. In addition to pin 0 and 1, a
Software Serial library allows serial communication on any of the Uno’s digital pin.

13
The microcontroller is a low-power CMOS (Complementary Metal Oxide Semiconductor) 8-
bit microcontroller based on the AVR enhanced RISC (Reduced Instruction Set Computer)
architecture. The powerful execution of instructions in a single clock cycle leads to the
achievement of 1 MIPS per MHz throughputs allowing the designer to optimize power
consumption versus processing speed.

Fig 3.2.2 (b): ATmega328P Microcontroller

Fig 3.2.2 (c): ATmega328 Microcontroller Architecture

14
Reprinted from Datasheet of ATMega328 the internal architecture of the microcontroller is
shown in Fig 2.3.3 (02). The central processing unit (CPU) is the brain of the microcontroller
which controls the execution of the program. The MCU (Microcontroller unit) consists of
4K/8K bytes of in-system programmable flash with read-while-write capabilities, 256/412/1K
bytes EEPROM along with the 512/1K/2K bytes of SRAM. Along with this, the MCU
consists of many other features

 23 general purpose I/O lines and 32general purpose working registers


 flexible timer/counters with compare modes, internal and external interrupts and a
serial programmable USART
 A byte-oriented 2-wire serial interface, an SPI serial port, a 6-channel 10-bit ADC (8
channels in TQFP and QFN/MLF packages), a programmable watch-dog timer with
an internal oscillator and 5 software -selectable power saving modes.

The five, software selectable, power saving modes are idle mode, Power-down mode, Power-
save mode, ADC Noise Reduction mode and the Standby mode. As mentioned in section
2.1.2, the CPU is the brain of the microcontroller which controls the execution of the
program. Therefore the CPU is able to access the memories, perform calculations, control
peripherals and handle interrupts. The AVR uses the Harvard architecture with separate
memories and buses for program and data to maximize the performance as well as the
parallelism. The principle of execution of instructions in the program memory is the single-
level pipelining. The concept of pre-fetching the next instruction while executing one
instruction enables the instructions to be executed in every clock cycle and the program
memory is in the System Reprogrammable Flash memory.

Fig 3.2.2 (d): Block diagram of the AVR CPU Core architecture

15
Reprinted from Datasheet of ATMega328, The block diagram of AVR CPU Core
architecture is shown in figure 3. The fast-access Register File contains 32 x 8 bit general-
purpose working registers with a single cycle access time which results in a single -cycle
ALU operation. The arithmetic and logical operations between the registers or between the
constant and a register are supported by the ALU. The status register is updated to reflect
information about the result of the operation after an arithmetic operation. The boot program
section and the application program section are the two main sections of the program flash
memory. Stack stores the return address of the program counter during the interrupts and
subroutine calls which is allocated in the general data SRAM. The size of the stack is limited
by the total size and usage of the SRAM. The data SRAM is accessible through five different
addressing modes supported in the AVR architecture while the stack pointer is read/write
accessible in the I/O space. The memory spaces in the AVR architecture are all linear and
regular memory maps.

Specifications
Microcontroller: Atmel ATmega328
Operating Voltage (logic level):5 V
Input Voltage (recommended):7-12 V
Input Voltage (limits):6-20 V
Digital I/O Pins: 14 (of which 6 provide PWM output)
Analog Input Pins: 8
DC Current per I/O Pin: 40 mA
Flash Memory: 32 KB (of which 2KB used by boot loader)
SRAM : 2 KB
EEPROM: 1 KB
Clock Speed: 16 MHz
Dimensions: 0.70” x 1.70”

Features
• Automatic reset during program download
• Power OK blue LED
• Green (TX), red (RX) and orange (L) LED
• Auto sensing/switching power input
16
• Small mini-B USB for programming and serial monitor
• ICSP header for direct program download
• Standard 0.1 spacing DIP (breadboard friendly)
• Manual reset switch
Microcontroller IC ATmega328p

Fig 3.2.2 (e): Microcontroller IC ATmega 328p.

The high-performance Microchip picoPower 8-bit AVR RISC-based microcontroller combines


32KB ISP flash memory with read-while-write capabilities, 1024B EEPROM, 2KB SRAM, 23
general purpose I/O lines, 32 general purpose working registers, three flexible timer/counters
with compare modes, internal and external interrupts, serial programmable USART, a byte-
oriented 2-wire serial interface, SPI serial port, a 6-channel 10-bit A/D converter (8-channels in
TQFP and QFN/MLF packages), programmable watchdog timer with internal oscillator, and
five software selectable power saving modes. The device operates between 1.8-5.5 volts. By
executing powerful instructions in a single clock cycle, the device achieves throughputs
approaching 1 MIPS per MHz, balancing power consumption and processing speed.

3.2.2.1 Power supply, inputs and outputs


Either Arduino is supplied with USB connection or with an external power supply
(recommended with 7-12V), outputs are going to have a continuous voltage due to voltage
regulators and stabilization capacitors present on the board. These power supply pins are:

 VIN: it is the input power supply that will have the same voltage that we are
supplying the Arduino with the external power supply

17
 5V: power supply of 5V, this voltage may come from VIN pin and a voltage regulator
or from the USB connection.
 3.3V: power supply that will provide 3.3V generated by an internal regulator, with a
maximum current of 50 mA.
 GND: grounding pins

3.2.2.2 Digital inputs and outputs


Each of the 14 digital pins can be used as an input or output. Besides, each pin can supply or
receive a maximum of 40 mA and has a pull-p resistance from 20 to 50 kOhm. In addition,
some pins have specialized functions such as:
 Pin 0 (RX) and 1 (TX). They are used to receive (RX) and transmit (TX) in TTL
serial communication.
 Pin 2 and 3. External interruptions. Pins in charge of interrupting the sequential
program stablished by the user.
 Pin 3, 5, 6, 9, 10 and 11. PWM (pulse width modulation). They form 8 output bits
with PWM with the function analogWrite ().
 Pin 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI (Serial
peripheral interface) communication.
 Pin 13. LED. There is a LED connected to the digital pin 13. When the pin value is
HIGH, the LED is on, and when the value is LOW, the LED is off.

3.2.2.3 Analog inputs


Arduino UNO has 6 analogical inputs, from A0 to A5, and each one offers abresolution of 10
bits (1024 states). By default, there is a voltage of 5V, but that range can be modified using
the pin AREF and using the function analogReference(), where the user introduces the DC
external signal he wants to use as reference.

3.2.3 LCD
LCD (Liquid Crystal Display) screen is an electronic display module and find a wide range of
applications. A 16x2 LCD display is very basic module and is very commonly used in
various devices and circuits. These modules are preferred over seven segments and other
multi segment LEDs.

18
The reasons being: LCDs are economical; easily programmable; have no limitation of
displaying special & even custom characters (unlike in seven segments), animations and so
on. A 16x2 LCD means it can display 16 characters per line and there are 2 such lines. In this
LCD each character is displayed in 5x7 pixel matrix. This LCD has two registers, namely,
Command and Data. The command register stores the command instructions given to the
LCD. A command is an instruction given to LCD to do a predefined task like initializing it,
clearing its screen, setting the cursor position, controlling display etc.

Fig 3.2.3: 16*2 LCD Display

Features of LCD Display


5 x 8 dots with cursor

Built-in controller (KS 0066 or Equivalent) + 5V power supply (Also available for + 3V)
1/16 duty cycle B/L to be driven by pin 1, pin 2 or pin 15, pin 16 or A.K (LED) N.V. optional
for + 3V power supply.

3.3 Gas Sensor


Gas sensor MQ-6 is highly sensitive to LPG, isobutene and propane. This sensor is used in
gas leakage detecting equipments in domestic and industrial applications. It is suitable for
LPG detection and important thing is, it avoids the noise signal of alcohol, cooking fumes
and smoke. In clean air it has lower conductivity. If combustible gas is detected, the sensor
conductivity increases with increase in gas concentration. Higher sensitivity to LPG, low cost

19
and long life are the main features to select this gas sensor. Voltage variation obtained is from
0.5 volts in clean air to 0.9 volts when leakage detected. Hence 0.7 volts is considered as
threshold level indication of gas leakage. If output voltage of 0.7 volts is detected, gas
leakage system will be operated.

Fig 3.3: LPG Gas Detector

3.3.1 Arduino and LPG sensor Connection

Fig 3.3.1: Arduino and LPG sensor Connection

20
3.4 GSM Module
A number of signal detecting devices are available in the market. These devices include:
 Ethernet Module
 Wifi Module
 Bluetooth Module
 SIM / GSM Module
All of the devices have their own advantages and disadvantages but we will be targeting that
particular device which best suits our requirement. There are certain features that should be
considered when choosing the GSM module for use. The features are

 Long Distance Coverage


 Function description
 Supply voltage: 3.5V - 4.2V
 Power consumption: sleep mode < 2.0mA, idle mode < 7.0mA
 GSM transmission (avg): 350 mA
 GSM transmission (peek): 2000mA
 Module size: 25 x 23cm
 SIM card socket: microSIM
 Antenna connector: IPX
 Status signaling: LED
 Working temperature range: -40 do + 85 ° C
 Has high-performance
 Low Cost
This GSM module can easily achieve data. Its operating frequency is among the
900/1800/1900 MHz frequency band. In SIM800L signal transmit time of different devices
stands at a 0.5 seconds interval so that the work load of SIM chip can be reduced
substantially and more sleeping time can be saved for GSM module. This module is set with
serial interface, which is easy to use and simplifies the overall design.

21
Fig 3.4 (a): SIM800L GSM Module

Fig 3.4 (b): Schematic Diagram of SIM800L GSM Module

GSM (Global System for Mobile communication) is a digital mobile telephony system that is
widely used in Europe and other parts of the world. GSM uses a variation of time division
multiple access (TDMA) and is the most widely used of the three digital wireless telephony
technologies (TDMA, GSM, and CDMA). GSM digitizes and compresses data, then sends it
down a channel with two other streams of user data, each in its own time slot. It operates at
either the 900 MHz or 1800 MHz frequency band.

GSM/GPRS module is used to establish communication between a computer and a GSM-


GPRS system. Global System for Mobile communication (GSM) is an architecture used for
mobile communication in most of the countries. Global Packet Radio Service (GPRS) is an
extension of GSM that enables higher data transmission rate. GSM/GPRS module consists of
a GSM/GPRS modem assembled together with power supply circuit and communication
interfaces (like RS-232, USB, etc) for computer. GSM/GPRS MODEM is a class of wireless
MODEM devices that are designed for communication of a computer with the GSM and
22
GPRS network. It requires a SIM (Subscriber Identity Module) card just like mobile phones
to activate communication with the network. Also they have IMEI (International Mobile
Equipment Identity) number similar to mobile phones for their identification. A GSM/GPRS
MODEM can perform the following operations:
1. Receive, send or delete SMS messages in a SIM.
2. Read, add, search phonebook entries of the SIM.
3. Make, Receive, or reject a voice call.
The MODEM needs AT commands, for interacting with processor or controller, which are
communicated through serial communication. These commands are sent by the
controller/processor. The MODEM sends back a result after it receives a command. Different
AT commands supported by the MODEM can be sent by the processor/controller/computer
to interact with the GSM and GPRS cellular network.

Fig 3.4 (c): Circuit Diagram for Arduino and GSM module Connection.

3.5 Buzzer
A buzzer is an electrical device that makes a buzzing noise and is used for signaling. A
buzzer has a piezo disc and an oscillator inside. When the buzzer is powered, the oscillator
generates a frequency around 2-4 kHz and the piezo element vibrates accordingly to produce
the sound. As soon as the gas leak is detected, the buzzer automatically rings to alert the users
about the gas leak.

3.6 Relay
A relay is an electrically operated switch. All relays contain a sensing unit, the electric coil,
which is powered by AC or DC current. When the applied current or voltage exceeds a

23
threshold value, the coil activates the armature, which operates either to close the opened
contacts or to open the closed contacts. When a power is supplied to the coil, it generates a
magnetic force that actuates the switch mechanism. Relay is used in this system to cut off the
main power supply when the gas leakage goes beyond set point.

3.7 Exhaust Fan


Brushless DC motor fans are engineered to outlast popular AC motor models by as much as
70 percent, reducing the need for replacement. brushless DC motor fans are engineered to
outlast popular AC motor models by as much as 70 percent, reducing the need for
replacement. use up to 74% less power than popular AC motor exhaust fans.

Fig 3.7: Exhaust Fan

3.8 Power Supply


To operate whole project we need power source, in this project we use DC source because
Microcontroller needs DC voltage to operate, In this project we use 220V to 12V adapter. DC
12V is good enough for operate the Arduino UNO.

Fig 3.8: Power Supply

24
3.9 Arduino software
The smart microcontroller unit named as Arduino Uno can be programmed with the Arduino
software. There is no any requirement for installing other software rather than Arduino.
Firstly, Select "Arduino Uno from the Tools , Board menu (according to the microcontroller
on your board).The IC used named as ATmega328 on the Arduino Uno comes pre burned
with a boot loader that allows you to upload new code to it without the use of an external
hardware programmer.

Programming software of this line follower is known as ARDUINO-1.6.8. This is open


source programming platform. The open-source ARDUINO environment makes it easy to
write code and upload it to the input/output board. Here we use ARDUINO-1.6.8 platform.
To configure software, we have to use ARDUINO -1.6.8 named arduino.exe

Fig 3.9 (a): Programming platform for ARDUINO

To configure this programmer with computer we need a USB cable then check serial port and
select the programmer from Aruino-1.6.8 platform such as,

25
Fig 3.9 (b): IDE configuration for ARDUINO UNO Programmer

Serial communication
It is used for the communication between Arduino and a computer or other
devices. Every Arduino board has at least one serial port. This ports
communicates thanks to the digital pins 0 (RX) and 1 (TX), and with the
computer thanks to the USB connection.
Serial.begin(speed)
It establishes the speed of data in bits per second (bauds) for the transmission
of data in serial communication.
Serial.read()
It reads the data from the serial port.
Serial.print(val,[format])
It prints the data to the serial port as ASCII text
Serial.println(val,[format])
It prints the data to the serial port as ASCII text but it jumps to a new line.
Serial.available()

26
It gives back the number of available bytes to be read by the serial port. It refers to data that
has already been received and is available in the buffer of the port.

27
CHAPTER FOUR
IMPLEMENTATION RESULT AND DISCUSSION

4.1 Introduction
The system is an intelligent system, as it does not create nuisance by continuously sounding
alarm but the alarm stops beeping once the concentration of the gas in the atmosphere after
leakage goes below the set point and opens the valve again for operations. This work will
minimize losses occasioned by explosions due to gas leakages and improve safety of life. In
particular gas sensor has been used which has high sensitivity for propane (C3H8) and butane
warns by (C4H10sending) leakage However, system the consists former of fire incident gas
leakage and sends SMS to the householder. This does not make provision for halting further
fire incident and gas leakage. GSM module is used which alert the user by sending an SMS.
Another approach uses a smart security phone attached gas leakage sensor that senses leakage
and sounds an alert alarm as well as sending a SMS to the home owner and emergency
services. The design of a wireless LPG leakage monitoring system is proposed for home
safety. This system detects the leakage of the LPG and alerts the consumer about the leak by
a SMS and as an emergency measure, the system will turn off the power supply, while
activating the alarm. leak detection module consists of MQ-6 gas sensor to detect amount of
combustible gas present in the surrounding.

4.2 Result
The experimental model was made according to the circuit diagram and the results were as
expected. Testing was carried out by releasing LPG into the atmosphere around the sensor.
The gas detector response units are there to detect it. The results of test carried out on the
device at different times and days for concentration gas in the air around the sensors. The last
four values is the case of an endless loop due to high gas concentration. The device was
tested placing near to the LPG device at different distances from the gas source. It was
observed that when the LPG device was test by placing it at different distances from the gas
source, the response time of the LPG system decreased as the distance from the gas source
increased. Also it was observed that the sensitivity of the gas sensor was very high in clean

28
air. The gas sensor sensitivity varied with temperature while the reference voltage remained
constant over time.

4.3 Advantage of GSM Based Fire Alert Gas leakage Detector

 It is Compact and easy to install.


 The sensor has excellent sensitivity combined with a quick fast response time.
 The system is highly reliable and secure.
 In the long run the maintenance cost is very less when compared to the present
system.
 It is possible to get instantaneous result and with the high accuracy.
 Inform owner via message to ensure more safety.
 Electricity and Gas supply auto cut for increase safety.
 Exhaust fan reduce LPG concentration from air.

4.4 Costing
Costing is always a vital issue to make any project. Price of electronics is not stable for a
developing country like Bangladesh, because Bangladesh never produces electronics parts but
import from other developed country and during import price depends upon the stock of
foreign currency. Average price of parts used in this project is given bellow,

Table 5.3: Price list of hardware used at LPG Safety system

Sl. No Parts Name Qty Unit Price Total Price


1 Arduino Uno 1 Unit 650 650
2 LCD display 1 Unit 170 170
3 GSM Module 1 Unit 600 600
4 Power Supply 1 Unit 350 350
5 Backup Battery 1 Unit 450 450
6 Solenoid 1 Unit 1800 1800
7 LPG Gas Sensor 1 Unit 150 150
8 4Ch Relay 1 Unit 380 380
9 Exhaust Fan 1 Unit 150 150

29
10 Bulb 1 Unit 40 40
11 Holder 1 Unit 40 40
12 LiPo Battery 1 Unit 300 300
13 LED 2 Unit 3 6
14 Backup Light 1 Unit 100 100
15 Buzzer 1 Unit 15 15
16 Switch 1 Unit 45 45
17 Socket 1 Unit 45 45
18 Switch Board 1 Unit 15 15
19 DC Jack 1 Unit 12 12
20 Connector 3 Unit 20 60
21 Electric Cable 1 Unit 80 80
22 Plug 1 Unit 25 25
23 Push Button 1 Unit 5 5
24 LiPo Battery Charger 1 Unit 80 80
25 5K Variable 1 Unit 5 5
26 Male-Female Connector 3 Unit 15 45
27 Vero Board 2 Unit 25 50
28 PVC Board 1 Unit 300 300
29 Others 1 Unit 100 100
Total 6068

30
CHAPTER FIVE
CONCLUSION

5.1 Introduction
Fire incident is totally unexpected but we could protect or minimize its happening freuency
and devastating effect by using an automatic control system. Gas leakages resulting into fatal
inferno has become a serious problem in household and other areas where household gas is
handled and used. Gas leakage leads to various accidents resulting in financial loss as well as
human injuries and loss. This system can be use in the industrial areas ( Sub station, Boilar
room, dying room, power control room), shopping malls, hospitals, housing areas, ships,
universities, garments factories etc. The work aims at designing a system that detects
Temperature and gas leakage and alerts this describer through alarm and cell phone message
besides turning off the gas supply valve as a primary safety measure.

5.2 Application
 This project can be used in home and hotel utility (kitchen) area for safety purpose.
 Useful in domestic LPG water heater.
 Very useful in LPG/CNG fitted car to avoid measure accident.
 Prevent measure accident in gas agencies (gas station) where multi cylinder stored.

5.3 Future Scopes of the Work


In addition to the developed system, the system can be enhanced by adding a door control
element which controls the gas leakage rapidly if it exceeds the specified upper explosive
level for the various gases in the plant area. This can be achieved by any gas leakage
indication in any part of the plant alerts the control room and then the control valve is shut
off. Therefore preventing any hazard arising due to gas leakage. IOT can be implemented by
which all leakage information transmits to website via internet.

31
5.4 Conclusion
This project is very useful to prevent accident due to gas leakage. If we implement this in
broad way, it is very successful. We can get message remotely at a fraction of time. This
detection system is not costly, so that everyone can use it.

32
Appendix

References

[1] S. Sharma, V. N. Mishra, R. Dwivedi, R. Das, “ Classification of gases/odours using


Dynamic Response of Thick Film Gas Sensor Array”, IEEE Conference on Sensors Journal,
2013.

[2] Ahuja, R.B., Bhattacharya, S. “An analysis of 11,196 burn admissions and evaluation of
conservative management techniques”, Burns, 2002; Volume 28, Pg – 555 to 561.

[3] Ahuja, R.B., Bhattacharya, S., Rai, “A. Changing trends of an endemic trauma”, Burns,
2009; Volume 35, Pg – 650 to 656.

[4] Rajeev B. Ahuja, Jayant K. Dash, Prabhat Shrivastava, “A comparative analysis of


liquefied petroleum gas (LPG) and kerosene related burns”, Burns, Volume 37, Issue 8,
December 2011, Pg – 1403 to 1410.

[5] S Shyamaladevi, V. G. Rajaramya, P. Rajasekar, P. Sebastin Ashok, “ ARM7 based


automated high performance system for lpg refill booking & leakage detection” , Journal of
VLSI Design and Signal Processing”, Volume 3, Issue 2, 2014.

[6] C. Selvapriya, S. Prabha Sathya, M. Abdulrahim, C. K. Aarthi, “ LPG Leakage


Monitoring and Multilevel Alerting System”, International Journal of Engineering Sciences
& Research Technology, Volume 2, Issue 11, November 2013, Pg – 3287 to 3290.

[7] Arun Raj, Athira Viswanathan, Athul T S, “ LPG Gas Monitoring System”, International
Journal of Innovative Technology and Research, Volume 3, Issue 2, February 2015, Pg –
1957 to 1960.
[8] Technical Data MQ-6 Gas Sensor, Hanwei Sensors, Website – www.hwsensor.com

33
[9] Mr. Sameer Jagtap, Prajkta Bhosale, Priyanka Zanzane, Jyoti Ghogare, “LPG Gas Weight
and Leakage Detection System Using GSM”, International Journal for Research in Applied
Science & Engineering Technology”, Volume 4, Issue 3, March 2016, Pg – 716 to 720.

[10] Piezoelectric Sound Components, Murata Manufacturing Co. Ltd., Cat. No. P37 E-17.

[11] Prof. Pankaj C. Warule, Shivam Upadhyay, Snehal S. Shelke, Sumitra K. Khandade,
“LPG Detection, Metering and Control System Using Microcontroller”, IJARIIE, Volume 2,
Issue 2, 2016, Pg – 648 to 652.

[12] Specifications of LCD Module, Xiamen Amotec Display Co. Ltd.

[13] Shivalingesh B. M, Ramesh C, Mahesh S. R, Pooja R, Preethi K. Mane, Kumuda S, “


LPG Detection, Measurement and Booking System”, IJRSI, Volume 1, Issue 4, November
2014, Pg – 7 to 10.

[14] Ankit Sood, Babalu Sonkar, Atul Ranjan, Mr. Ameer Faisal, “ Microcontroller Based
LPG Gas Leakage Detector Using GSM Module”, International Journal Of Electrical and
Electronics Research, Volume 3, Issue2, April- June 2015, Pg – 264 to 269.

[15] H. Huang, H. Bainand, S. Zhu, “A Greenhouse Remote Monitoring System Based on


GSM”, in Proceedings of IEEE International Conference on Information Management, 2011,
Pg – 357 to 360.

[16] Ashish Shrivastava, Ratnesh Prabhakar, Rajeev Kumar, Rahul Verma, “ GSM Based
Gas Leakage Detection System”, International Journal of Technical Research and
Applications”, Volume 1, Issue2, May- June 2013, Pg – 42 to 45.

[17] V. Abhishek and M. Aierselvam, “ Wireless Auto Power Trip during Gas Leakage”,
Advance in Electronic and Electric Engineering”, Volume 3, Issue 3, 2013, Pg – 327 to 332.

[18] Prof. M. Amsaveni, A. Anurupa, R. S. Anu Preetha, C. Malarvizhi, M. Gunasekaran, “


GSM based LPG Leakage Detection and Controlling System”, The International Journal of
Engineering and Science, March 2015, Pg – 112 to 116.
34
[19] Rahul Kathuria, Mohammed Zaid Ul Qamar, Nivank Mulley, “ Protection from
Leakages of Gas from LPG Cylinders”, International Journal of Engineering Research &
Technology, Volume 3, Issue 10, October 2014, Pg – 161 to 163.

[20] K. Padmaj, M. Surekha, R. Preethi, T. Devika, N. Dhivya, “ Smart Gas Cylinder Using
Embedded System”, International Journal of Innovative Research in Electrical, Electronics,
Instrumentation & Control Engineering, Volume 2, Issue 2, February 2014.

[21] L. Fraiwan, K. Lweesy, A. Bani-Salma, N. Mani, “A Wireless Home Safety Gas


Leakage Detection System”, In the Proceeding of First Middle East Conference on
Biomedical Engineering , 2011, Pg – 11 to 14.

[22] Mohd Zaki Ghazali, Noorhayati Mohamed Noor, Noraziah Ramly, Sulastri Putit,
“Development of Microcontroller Based Mobile Gas Sensing Robot”, Procedia Engineering,
41 (2012), Pg – 1190 to 1196.

35
Programming Code:

#include <LiquidCrystal.h>

#include <Wire.h>

#include<SoftwareSerial.h>

LiquidCrystal lcd(A0,A1,A2,A3,A4,A5);

#define redLed 8

#define greenLed 9

#define Buzzer 7

SoftwareSerial mySerial(10,11);

#define main 2

#define Solenoid 3

#define backuplight 4

#define Exhaust 5

#define Sensor 6

String number1 ="01777719868";

String str="";

char incomingByte;

String inputString;

int flag;

void setup() {

int lpg_sensor = digitalRead(Sensor);

Serial.begin(9600);

mySerial.begin(9600);

lcd.begin(16,2);

pinMode(redLed, OUTPUT);

36
pinMode(greenLed, OUTPUT);

pinMode(Buzzer, OUTPUT);

pinMode(main, OUTPUT);

pinMode(Solenoid, OUTPUT);

pinMode(backuplight, OUTPUT);

pinMode(Exhaust, OUTPUT);

digitalWrite(redLed, LOW);

digitalWrite(greenLed, LOW);

digitalWrite(Buzzer, LOW);

digitalWrite(main, LOW);

digitalWrite(Solenoid, LOW);

digitalWrite(backuplight, HIGH);

digitalWrite(Exhaust, HIGH);

inputString = "";

if (inputString.indexOf("OK") == -1){

mySerial.println("AT+CMGDA=\"DEL ALL\"");

Serial.println("SMS Deleted");

delay(500);

lcd.setCursor(4, 0);

lcd.print("WELCOME");

lcd.setCursor(1, 1);

lcd.print("LPG Safety System");

delay(1000);

lcd.clear();}}

void loop() {

int lpg_sensor = digitalRead(Sensor);

37
if (lpg_sensor==LOW )

digitalWrite(redLed, HIGH);

digitalWrite(greenLed, LOW);

digitalWrite(Buzzer, HIGH);

digitalWrite(main, HIGH);

digitalWrite(Solenoid, HIGH);

digitalWrite(backuplight, LOW);

digitalWrite(Exhaust, LOW);

lcd.setCursor(4, 0);

lcd.print("Alarm:");

lcd.setCursor(1, 1);

lcd.print("LPG Detected");

sendSMS1("LPG Detected");

if (lpg_sensor==HIGH )

digitalWrite(redLed, LOW);

digitalWrite(greenLed, LOW);

digitalWrite(Buzzer, LOW);

digitalWrite(main, LOW);

digitalWrite(Solenoid, LOW);

digitalWrite(backuplight, HIGH);

digitalWrite(Exhaust, HIGH);

lcd.clear();

lcd.setCursor(4, 0);

lcd.print("No LPG");

38
lcd.setCursor(0, 1);

lcd.print("Status: Safe");

sendSMS1("No LPG Detected");

void sendSMS1(String msg)

mySerial.println("AT+CMGF=1");

delay(100);

mySerial.print("AT+CMGS=");

mySerial.print('"');

mySerial.print(number1); // number 1

mySerial.print('"');

mySerial.println();

delay(100);

mySerial.println(msg);

delay(500);

mySerial.write(26);

delay(100);

lcd.clear();

void sendSMS2(String msg)

mySerial.println("AT+CMGF=1");

delay(100);

mySerial.print("AT+CMGS=");

mySerial.print('"');

39
mySerial.print(number2);

mySerial.print('"');

mySerial.println();

delay(100);

mySerial.println(msg);

delay(500);

mySerial.write(26);

delay(100);

lcd.clear();

void sendSMS3(String msg)

mySerial.println("AT+CMGF=1");

delay(100);

mySerial.print("AT+CMGS=");

mySerial.print('"');

mySerial.print(number3);

mySerial.print('"');

mySerial.println();

delay(100);

mySerial.println(msg);

delay(500);

mySerial.write(26);

delay(100);

40
lcd.clear();

void gsmInit()

lcd.clear();

lcd.print("Finding Module..");

boolean at_flag=1;

while(at_flag)

mySerial.println("AT");

while(mySerial.available()>0)

if(mySerial.find("OK"))

at_flag=0;

delay(1000);

mySerial.println("ATE0");

lcd.clear();

lcd.print("Searching Network..");

boolean net_flag=1;

while(net_flag)

mySerial.println("AT+CPIN?");

while(mySerial.available()>0)

if(mySerial.find("READY"))

41
net_flag=0;

break;

delay(1000);

mySerial.println("AT+CNMI=2,2,0,0,0");

delay(1000);

mySerial.println("AT+CMGF=1");

delay(1000);

mySerial.println("AT+CSMP=17,167,0,0");

lcd.clear();

mySerial.flush();

42

You might also like