LPG Leakage Detector
LPG Leakage Detector
Protection System
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
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
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
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
vi
4.3 Advantage of GSM Based Fire Alert Gas leakage Detector 29
4.4 Costing 29
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.
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.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.
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.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.
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.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.
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:
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.
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.
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.
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.
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.
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
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
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.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.
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.
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.
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
21
Fig 3.4 (a): 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.
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.
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.
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.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,
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.
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
[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.
[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.
[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.
[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.
[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.
[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 str="";
char incomingByte;
String inputString;
int flag;
void setup() {
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);
delay(1000);
lcd.clear();}}
void loop() {
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");
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();
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();
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