Anda di halaman 1dari 22

AUTOMATIC GAS LEAKAGE DETECTION USING

GSM
Project report submitted to
Birla Institute of Technology, Mesra, Ranchi, India
in partial fulfilment of the requirements for the award of the degree of
BACHELOR OF ENGINEERING
IN
ELECTRONICS AND COMMUNICATION
ENGINEERING
By
Tushya Sharma - (BE/25179/12, ECE-VII)
Deepika Agarwal - (BE/25182/12, ECE-VII)

BIRLA INSTITUTE OF TECHNOLOGY


MESRA-835215, RANCHI
Extension Centre, Jaipur
(December 2015)

DECLARATION CERTIFICATE
This is to certify that the project entitled Automatic Gas Leakage Detection Using GSM
submitted by Tushya Sharma (BE/25179/12),Deepika Agarwal (BE/25182/12) in partial
fulfilment of the requirements for the award of the degree of Bachelor of Engineering in
Electronics and Communication Engineering of Birla Institute of Technology Mesra, Ranchi
is an authentic work carried out under my supervision and guidance.
To the best of my knowledge, the content of this project report does not form a basis for
the award of any previous degree to anyone else.
Date:(Project Guide)
Mr.Deepak Chaturvedi
Asst.Professor
Department of Electronics and Communication Engineering
Birla Institute of Technology
Mesra, Ranchi
Extension Centre, Jaipur
Ms Jyoti Sharma
Department In charge
Birla Institute of Technology
Mesra, Ranchi
Extension Centre, Jaipur

STUDENT DECLARATION
We, Tushya Sharma (BE/25179/12) and Deepika Agarwal(BE/25182/12), hereby declare that
the project entitled Automatic Gas Leakage Detection Using GSM , submitted in partial
fulfilment of the requirements for the award of the degree of Bachelor of Engineering In
Electronics and Communication Engineering of Birla Institute of Technology Mesra, Ranchi,
India is an authentic work carried out by us under the supervision of Mr Deepak Chaturvedi.
We also declare that the content of this project report does not form a basis for the award of
any previous degree to anyone else.
Date:(Students' name and signature)
1

Tushya Sharma
(BE/25179/12)

2. Deepika Agarwal
(BE/25182/12)

ACKNOWLEDGMENT
We would like to gratefully acknowledge the kind guidance and expert supervision of Mr.
Deepak Chaturvedi throughout this project work. His consistent support has always been an
immense source of motivation and encouragement.
We sincerely express our thankfulness to Mrs. Jyoti Sharma, Department In charge- ECE for
allotting us this project and also for resources that were made available to us whenever we
needed them. We would like to thank all the lab in-charges for bearing with us every now and
then for the work.
Lastly, we would like to thank all the people who have contributed to the successful
completion of this project.

CONTENTS
1. ABSTRACT

2. INTRODUCTION

3. PROJECT BACKGROUND

4. SYSTEM SPECIFICATION

5. SYSTEM ANALYSIS and DESIGN

12

6. SYSTEM PROCEDURE AND RESULTS

15

7. PCB DESIGN

17

8. RESULTS OBTAINED

17

9. FUTURE WORK

19

10. BIBLIOGRAPHY and REFERENCES

20

1. ABSTRACT
Gas leakage is a major problem with industrial sector, residential premises and gas powered vehicles
like CNG (compressed natural gas) buses, cars. One of the preventive methods to stop accident
associated with the gas leakage is to install gas leakage detection kit at vulnerable places. The aim of
this project is to present such a design that can automatically detect gas leakage in vulnerable
premises. In particular gas sensor has been used which has high sensitivity for propane (C3H8 ) and
butane (C4H10). Gas leakage system consists of GSM (Global System for mobile communications)
module, which warns by sending SMS.

2. INTRODUCTION
LPG consists of mixture of propane and butane which is highly flammable chemical. It is odorless gas
due to which Ethaneth oil is added as powerful odorant, so that leakage can be easily detected. There
are other international standards like EN589, amyl mercaptane and tetrahydrothiophene which are
most commonly used as odorants. LPG is one of the alternate fuels used now days. Sometimes
liquefied petroleum gas is also known as LPG, LP gas, Auto gas etc. This gas is commonly used for
heating appliances, hot water, cooking, and various other purposes also. LPG is also used as an
alternate fuel in vehicles due to soaring in the prices of petrol and diesel.
Some people have low sense of smell, may or may not respond on low concentration of gas leakage.
In such a case, gas leakage security systems become an essential and help to protect from gas leakage
accidents. Embedded system for Hazardous gas detection and Alerting has been proposed in which the
alarm is activate immediately, if the gas concentration exceeds normal level.
Bhopal gas tragedy was an example of gas leakage accident in India. This was worlds worst gas
leakage industrial accident

3. PROJECT BACKGROUND
Microcontroller has been used over decades to automate the different devices and

machines in the

factories and offices etc. It was during 1970 and 1971 when the first microcontroller was invented.
Since then there has been a lot of development in the field of microcontrollers. There are very
different microcontrollers in this market since then. The present day microcontrollers have become
smaller and sleeker yet more and more powerful.
The microcontroller used in this project is ATMEGA8 microcontroller.
The microcontroller takes the input from MQ-6 sensor and gives output to LED, buzzer and GSM
module.

4. SYSTEM SPECIFICATION
Basic components used in our project are
4.1 GAS SENSOR MQ-6
A LPG SENSOR is ideal sensor for use to detect the presence of a dangerous LPG leak in
kitchen, your car or in a service station, storage tank environment. This unit can be easily incorporated
into an alarm unit, to sound an alarm or give a visual indication of the LPG concentration. The sensor
has excellent sensitivity combined with a quick response time. The sensor can also sense iso-butane,
propane, LNG and cigarette smoke.

FEATURES:

High sensitivity to LPG, iso-butane, propane


Small sensitivity to alcohol, smoke.
Fast response.

Simple drive circuit

STRUCTURE AND CONFIGURATION:


Sensor composed by micro AL2O3 ceramic tube, Tin Dioxide (SnO2) sensitive Layer , measuring
electrode and heater are fixed into a crust made by plastic and stainless steel net. The heater provides
necessary work conditions for work of sensitive components. The enveloped MQ-6 have 6 pin ,4 of
them are used to fetch signals, and other 2 are used for providing heating current.

PRECAUTIONS TO BE TAKEN WHEN GAS LEAKAGE


DETECTED:
What to do if your gas detector alerts you to a natural gas leak
1

Leave the house immediately.

DO NOT make calls from your home. Phones are capable of producing a spark, which could start
a fire or explosion. Contact your local gas utility company or call 911 from a
phone outside and away from your home.

DO NOT light a match or other combustible material. Likewise, DO NOT turn any light switches
on or off, and DO NOT plug or unplug electrical appliances such as a television or vacuum
cleaner. These activities also can produce a spark that could start a fire or explosion.
7

Do not re-enter the house until the gas company finds the source of the leak and corrects it.

SOURCES OF NATURAL GAS SENSORS:


1

Leaks from gas appliances, heating systems, and water heaters

Leaks from interior natural gas piping systems

Migration of natural gas indoors from leaks in outdoor piping systems

4.2 GSM MODULE


The Global System for Mobile Communications (GSM: originally from Group Special
Mobile) is the most popular standard for mobile phones in the world. GSM service is used by over 2
billion people across more than 212 countries and territories. The ubiquity of the GSM standard
makes international roaming very common between mobile phone operators, enabling subscribers to
use their phones in many parts of the world. GSM differs significantly from its predecessors in that
both signaling and speech channels are Digital call quality, which means that it is considered a second
generation (2G) mobile phone system.
From the point of view of the consumers, the key advantage of GSM systems has been higher
digital voice quality and low cost alternatives to making calls such as text messaging. The advantage
for network operators has been the ability to deploy equipment from different vendors because the
open standard allows easy inter-operability. Like other cellular standards GSM allows network
operators to offer roaming services which mean subscribers can use their phones all over the world.

AT COMMANDS:
1. +CMGD - Delete SMS Message

Exec Command: +CMGD=<index> Execution command deletes message from


preferred message storage <mem1> (<mem1> is the selected message storage from the
+CPMS command) location <index>
2. +CMGF - SMS Message Format
Set Command: +CMGF= [<mode>]

Set command tells the phone, which input and output format of messages to use. <Mode>
indicates the format of messages used with send, list, read and write commands and unsolicited result
codes resulting from received messages. Mode can be either PDU mode (entire TP data units used) or
text mode (headers and body of the messages given as separate parameters). Only PDU mode is
supported at this time.
Valid values for <mode> are:

0 PDU mode (default)

Read Command: +CMGF?

Read command returns the current <mode> set. Response is in the form

3. +CMGR - Read SMS Message


Exec Command: +CMGR=<index>
Execution command returns the SMS message with location value <index> from message
storage <mem1> (<mem1> is the selected message storage from the +CPMS command.
4.TO SEND A MESSAGE IN TEXT MODE:
To send an SMS message in text mode use the AT+CMGS command.
The format of this command is:AT+CMGS=<destination number> [, <type of destination] <CR>
The GSM engine will then respond with a > prompt, next enter the message to send followed by
Control-Z. The Engine will then respond with a reference number or and error.

Example:
At+cmgs="+61418400200"
> test^Z
+CMGS:188
OK
4.3 AVR MICROCONTROLLER ATMEGA 8
9

Features: High-performance, Low-power AVR 8-bit Microcontroller


Advanced RISC Architecture
130 Powerful Instructions Most Single-clock Cycle Execution
32 x 8 General Purpose Working Registers
Fully Static Operation
Up to 16 MIPS Throughput at 16 MHz
High Endurance Non-volatile Memory segments
8K Bytes of In-System Self-programmable Flash program memory
512 Bytes EEPROM
1K Byte Internal SRAM
Peripheral Features
Two 8-bit Timer/Counters with Separate Prescaler, one Compare Mode
One 16-bit Timer/Counter with Separate Prescaler, Compare Mode, and Capture
Mode
Byte-oriented Two-wire Serial Interface
Programmable Serial USART Master/Slave SPI Serial Interface
On-chip Analog Comparator
Special Microcontroller Features
Power-on Reset and Programmable Brown-out Detection
I/O and Packages
23 Programmable I/O Lines
28-lead PDIP, 32-lead TQFP, and 32-pad QFN/MLF
Operating Voltages
2.7 - 5.5V (ATmega8L)
4.5 - 5.5V (ATmega8)

4.4 BUZZER
10

When buzzer is blowing, this indicates the leakage of LPG gas. It is 12V DC operated buzzer.

4.5 LED
When LED is glowing, this indicates the leakage of LPG gas. It is 1.2V DC operated LED.

4.6 AVR STUDIO 4 SOFTWARE


AVR Studio is a Development Tool for the AT90S Series of AVR microcontrollers. AVR Studio
enables the user to fully control execution of programs on the AT90S In-Circuit Emulator or on the
built-in AVR Instruction Set Simulator. AVR Studio supports source level execution of Assembly
programs assembled with the Atmel Corporation's AVR Assembler and C programs compiled with
IAR Systems ICCA90 C Compiler for the AVR microcontrollers. AVR Studio runs under Microsoft
Windows95 and Microsoft Windows NT.
AVR Studio enables execution of AVR programs on an AVR In-Circuit Emulator or the built-in
AVR Instruction Set Simulator. In order to execute a program using AVR Studio, it must first be
compiled with IAR Systems' C Compiler or assembled with Atmel's AVR Assembler to generate an
object file which can be read by AVR Studio.

4.7 COMPILER WIN AVR


WinAVRTM (pronounced "whenever") is a suite of executable, open source software development
tools for the Atmel AVR series of RISC microprocessors hosted on the Windows platform. It includes
the GNU GCC compiler for C and C++.
WinAVRTM contains all the tools for developing on the AVR. This includes avr-gcc (compiler),
avrdude (programmer), avr-gdb (debugger), and more! WinAVR is used all over the world from
hobbyists sitting in their damp basements, to schools, to commercial projects.
WinAVRTM is comprised of many open source projects. If anyone feel adventurous, volunteers are
always welcome to help with fixing bugs, adding features, porting, writing documentation and many
other tasks on a variety of projects.

4.8 EXPRESS PCB SOFTWARE


EXPRESS PCB is a free and open-source software suite for electronic design automation(EDA) for printed circuit board (PCB) layout. It uses GTK+ for its GUI widgets.

FEATURES:

Scalable fonts

Layer groups to keep signals together.

Centroid (X-Y) data output

PostScript and Encapsulated PostScript output

11

Rats-nest generation from simple net lists

Automatic clearance around pins that pierce a polygon

Flags for pins and vias

Groups of action commands can be undone by a single undo

Simple design rule checker (DRC) - checks for minimum spacing and overlap rules

Drawing directly on the silk layer

Viewable solder-mask layers and editing

Netlist window

Netlist entry by drawing rats

Auto router

Snap to pins and pads

Element files and libraries that can contain whole sub-layouts, metric grids

Up to 16 copper layer designs by default

Trace optimizer

Rats nest

5. SYSTEM ANALYSIS AND DESIGN


In the initial step, the gas leakage is detected by the gas sensor MQ-6. This detects the gas leakage
and gives the signal to the microcontroller with the help of ADC. After that in second step the
microcontroller receive the signal, send by gas sensor. It sends activation signal to other external
devices attached with it. Such as LED, buzzer and GSM module . In the last step, many tasks have
been performed such as buzzer activates, GSM module activated, which send warning SMS to the
user.

12

Microcontroller used here is ATmega8. Its pin diagram and description is given below-

13

VCC

Digital supply voltage.

GND

Ground.

Port B

(PB7..PB0)

XTAL1/XTAL2/TOSC1/
TOSC2
Port B is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit).

Port B output buffers have symmetrical drive characteristics with both high sink and source
capability. As inputs, Port B pins that are externally pulled low will source current if the pull-up
resistors are activated. The Port B pins are tri-stated when a reset condition becomes active, even if
the clock is not running. We have used port B for programming.

14

Port C (PC5..PC0) Port C is an 7-bit bi-directional I/O port with internal pull-up resistors (selected
for each bit). The Port C output buffers have symmetrical drive characteristics with both high sink
and source capability. As inputs, Port C pins that are externally pulled low will source current if the
pull-up resistors are activated. The Port C pins are tri-stated when a reset condition becomes active,
even if the clock is not running.
We have used it for converting analog output of MQ-6 sensor to digital input for microcontroller
ATMEGA8.
Port D (PD7..PD0) Port D is an 8-bit bi-directional I/O port with internal pull-up resistors (selected
for each bit). The Port D output buffers have symmetrical drive characteristics with both high sink
and source capability. As inputs, Port D pins that are externally pulled low will source current if the
pull-up resistors are activated. The Port D pins are tri-stated when a reset condition becomes active,
even if the clock is not running.
RESET input. A low level on this pin for longer than the minimum pulse length will generate a reset
even if the clock is not running.

15

6. SYSTEM TEST PROCEDURE AND RESULTS

PROGRAMMING:

At the first step programming is done for the calculation of revolution per minute. . Programming has
been done on AVR studio 4.

AVR STUDIO 4:
AVR studio is an integrated development environment (IDE) for writing and debugging AVR
applications in windows environments. AVR studio provides a project management tool,
source file editor, simulator, assembler and front end for C/C++, programming, emulation and
on-chip debugging.
The programming in AVR studio is done as follows:

First AVR studio is opened and select project-> new project from the menu, and the dialog
box below will appear.

16

17

DEVICE SELECTION
Debug platform and device selection can be done by selection debug->select debug platform and
device. All on system debug platforms and devices are listed. Select ATmega8 in the device menu.

WRITE A PROGRAM
Now, write the code into open editor window. You should now be ready to start
debugging the code by pressing the start debugging button.

18

After program is written select build option from menu. The software will compile the program
and will give errors if any. Once the program is compiled we need to simulate it to see the results.

7. PCB DESIGN
A printed circuit board (PCB) mechanically supports and electrically connects electronic components
using conductive tracks, pads and other features etched from copper sheets laminated onto a nonconductive substrate. PCBs can be single sided (one copper layer), double sided (two copper layers)
or multi-layer (outer and inner layers). Multi-layer PCBs allow for much higher component density.
Conductors on different layers are connected with plated-through holes called vias. Advanced PCBs
may contain components - capacitors, resistors or active devices - embedded in the substrate.
Software used for PCB designing is EXPRESS PCB. The first step is to make the schematics. Now
we need to draw the circuit board and we need to draw the wires that connect the different
components. When we drew the circuit diagram in the previous step, we tell the program which
components are going to be connected. Now we connect everything by drawing lines, and the
program will tell if we did it correctly.

8. RESULTS OBTAINED
The message has been send to user and led and buzzer gets activated.

19

20

9. FUTURE WORK

In future, more detection systems like any gas detection system can be implemented.

Additional features include more secure systems like a call will be gone to a telephone number
if a gas leakage and fire in a network area like LAN and internet used to worldwide.

The detection system can upgraded to control system as well.

21

10. BIBLIOGRAPHY AND REFERENCES

Fraiwan L, Lweesy K, Bani-Salma, A Mani N (2011), A Wireless Home Safety Gas Leakage
Detection System, Proc. of 1st Middle East,

. A CheSoh, M K Hassan, and A J Ishak Vehicle Gas Leakage Detector.

D M Han and J H Lim (2010), Smart Home Energy Management System Using IEEE 802.15.4
and Zigbee, IEEE Trans. on Consumer Electronics, Vol. 56, No. 3, pp. 1403-1410

G V Hippel (2005), Democratizing Innovation, MIT press, Cambridge, MA.

Hanwei Electronics Co. Ltd (2002), MQ-6 GasSensor Technical Data.

Kelvin R Sullivan, Understanding Relays, A tutorial on relays.

M B Fish, R T Wainer, Standoff Gas Leakage Detectors Based on Tunable Diodes Laser
Absorption Spectroscopy.

Nasaruddin N M B, Elamvazuthi I, Hanif N H H B M (2009), Overcoming Gas Detector Fault


Alarm Due to Moisture, Proc. of IEEE Student Conference on Research and Development, pp.
426-429.

. National Institute of Health (2004), What You Need to Know About Natural Gas Detectors,
http://www.nidcd.nih.gov/health/smelltaste/ gas

22