0% found this document useful (0 votes)
314 views46 pages

Overview: 1.1 ABSTRACT (Problem Statement)

The document describes a gas detector and indicator system that detects LPG gas leaks. Gas leaks can cause accidents resulting in financial losses and injuries. The system uses an MQ-2 gas sensor to detect LPG gas leaks and sends an SMS alert via a GSM module. When gas is detected above a threshold, an alarm is triggered and the gas supply is shut off by a safety solenoid valve to prevent accidents. The system provides quick detection and response to gas leaks for safety in homes and industries.

Uploaded by

Mayank Patil
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)
314 views46 pages

Overview: 1.1 ABSTRACT (Problem Statement)

The document describes a gas detector and indicator system that detects LPG gas leaks. Gas leaks can cause accidents resulting in financial losses and injuries. The system uses an MQ-2 gas sensor to detect LPG gas leaks and sends an SMS alert via a GSM module. When gas is detected above a threshold, an alarm is triggered and the gas supply is shut off by a safety solenoid valve to prevent accidents. The system provides quick detection and response to gas leaks for safety in homes and industries.

Uploaded by

Mayank Patil
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/ 46

GAS DETECTOR AND INDICATOR

1. OVERVIEW

1.1 ABSTRACT (Problem Statement):

Gas leakage leads to various accidents resulting into both financial loss as well as human
injuries. In human’s daily life, environment gives the most significant impact to their health
issues. The risk of firing, explosion, suffocation all are based on their physical properties such
flammability, toxicity etc. The number of deaths due to the explosion of gas cylinders has been
increasing in recent years. The reason for such explosion is due to substandard cylinders, old
valves, worn out regulators and lack of awareness using gas cylinders add to the risks.
Inspections by oil companies found that many LPG consumers are unaware of safety checks
of gas cylinders. Another reason is illegal filling of gas cylinder also causes accidents. There
is a need for a system to detect and also prevent leakage of LPG.

Necessity for detection:

The consumers have to upgrade their safety standards, act in accordance with statutory
requirements on Environmental commitments and most importantly the basic function being
prevented by accidents and protect life and property from disasters.

1 | Page
GAS DETECTOR AND INDICATOR

1.2 INTRODUCTION (Propose System):


The LPG is finding wide range in homes, industries and in automobiles as fuels. In the
year 1910 LPG, first produced by Dr.Walter Snelling the U.S Bureau of mines investigated
gasoline to see why it evaporated so fast and discovered that the evaporating gases were
propane, butane and other light hydrocarbons. Both LPG and natural gas are environmental
friendly they easily be detected. These gases are normally stored in pressurized Steel cylinders
in liquid form and vaporize at normal temperatures. With comparison of air LPG is heavier
therefore it flows along the floor and also settles in low points which make it difficult to
disperse.

LPG consists of mixture of propane and butane which is highly flammable chemical. It
is odorless gas, due to which Ethanoate 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. LPG is also used as an alternate fuel in vehicles due to soaring in the
prices of petrol and diesel. LPG marketed in India shall be governed by Indian Standard Code
IS-4576 and the test methods by IS-1448. Characteristics of this dangerous gas include

Some people have low sense of smell, may or may not respond on low concentration of gas
leakage. In such a case, some high security systems become an essential and help to protect
from gas leakage accidents. Bhopal, Chernobyl, Okishima gas tragedy was an example of gas
leakage accident in India, Russia and Japan. This was world’s worst gas leakage industrial
accident. Gas leakage detection is not only important but stopping leakage is equally essential.
We designed a system which sniffs LPG leakage and emphraxis by the measures such as SMS,
Buzzer sound, LED Blink.

1.3 SCOPE:

Due to the increased cost of the fuel, most of them prefer in hiring the gas cars instead of
petrol/diesel vehicles. Using gas in the cars is highly a risk issue, which will cause major
accidents due to the leakage of LPG Gas. In order to overcome this problem LPG gas leakage
is protected by using a protection system. We designed and developed such type of system, in
order to prevent the number of accidents in gas cars; this project is not only for cars it can be
used for homes or factories too.

2 | Page
GAS DETECTOR AND INDICATOR

2. LITERATURE SERVEY

2.1 RELATED WORKS:

Various research groups are working all over the world for the development of LPG leakage
detectors and response systems. Before the development of electronic household gas detectors
in the 1980s and 90s, gas presence was detected with a chemically infused paper that changed
its colour when exposed to the gas. Since then, many technologies and devices have been
developed to detect, monitor, and alert the leakage of a wide array of gases.

A similar project by Sunithaa and Sushmitha, 2012, has a system that detects the leakage of the
LPG and alerts the consumer about the leak and as an emergency measure. The proposed
system makes use of GSM module in order to alert user about the gas leakage via an SMS.
Whenever the system detects the increase in the concentration of the LPG it immediately alerts
by activating an alarm and simultaneously sending message to the specified mobile phones.

The former systems mentioned above cannot react in time. This project design however gives
an accurate response to the detection of leakage in potential risk area. The system has protection
circuitry consisting of Gas Safety Solenoid Valve. In this system MQ-2 gas sensor is used to
detect poisonous gas and has high sensitivity to LPG and also responds to natural gas.
Hazardous gasses like Liquefied Petroleum Gas and Propane when detected to exceed a certain
threshold or level, an alarm is generated immediately. The safety solenoid valve shuts down
the supply of the LPG and then an emergency SMS is sent through the GSM module to the
consumer. This work modifies the existing safety model installed in industries for domestic
purpose. It offers quick response time and accurate detection.

This project has many advantages which are as follows:

● The Project is easy to use and it gives remote indication to the user;
● The Sensor used in this Project has excellent sensitivity combined with a fast response
time;
● The system is highly reliable, tamper-proof and secure; and
● It is possible to get instantaneous results and with high accuracy.

3 | Page
GAS DETECTOR AND INDICATOR

2.2 FEASIBILITY STUDY:

2.2.1 Technical Feasibility:

With all the necessary background research completed it become clear what basic design
components the entire system would require. The system is a basic motion activated alarm.
First we need the power to be supplied to the designed model which will turn on components.
When the sensor detects any gas/smoke in the air then the LED will turn on and buzzer will
start ringing. Then the microcontroller will generate a message and will send it to the 2
registered mobile number using GSM module. The SMS facility doesn’t work if the person is
in area where there is no network access.

2.2.2 Economical Feasibility:

The primary motive of our project is to provide an economical system that not only saves
valuables but also the human life. Traditionally when any gas leaks use to happen people were
pretty much uninform. And as the gas leak increases it would get converted into fire, which in
turn result in huge property and human loss. So, our project can tackle this issues effectively.
Involving fire fighters would cost huge amount of money. Wherein our system can prevent the
hazards and our security system could be availed at a mere cost of 2100₹

2.2.3 Behavioural Feasibility:

The behaviour of the devices primarily depends on their configuration and their features. We
proposed IOT based Gas Detection using Arduino UNO. In this proposed system, Gas can be
prevented using Raspberry pi. MQ sensors are able to detect the presence of Gas/smoke. After
detecting any gas, relays are triggered to Arduino Uno module. As soon as signals are received
from the sensor, the ADC (analog to digital converter) converts the analog signal to digital
signal. After this the LED will glow and the buzzer will start buzzing and the message packet
will be sent to GSM module. As soon as the message packet reaches the GSM module, it
transmits the message packet to the destination host with the help of an antenna and the micro
sim card which is placed in the gsm module.

4 | Page
GAS DETECTOR AND INDICATOR

3. REQURIEMENT GATHERING

3.1 Hardware Requirement:

1. Arduino Uno Atmega 328


2. LPG Gas sensor Module MQ-2
3. Buzzer
4. GSM Module SIM 900A
5. LCD 16*2 Display Module

Specifications of Components:

ARDUINO UNO

• Microcontroller ATmega328

• Operating Voltage 5V

• Input Voltage (recommended) 7-12V

• Input Voltage (limits) 6-20V

• Digital I/O Pins 14 (of which 6 provide PWM output)

• Analog Input Pins 6

• DC Current per I/O Pin 40 mA

• DC Current for 3.3V Pin 50 mA

• Flash Memory 32 KB of which 0.5 KB used by boot loader

• SRAM 2 KB

• EEPROM 1 KB

• Clock Speed 16 MHz

5 | Page
GAS DETECTOR AND INDICATOR

GSM Module Specifications:

● High Quality Product (Not hobby grade)


● Dual-Band GSM/GPRS 900/ 1800 MHz
● RS232 interface for direct communication with computer or MCU kit
● Configurable baud rate
● Wire Antenna ( SMA connector with GSM Antenna Optional )
● Built in Network Status LED
● Inbuilt Powerful TCP/IP protocol stack for internet data transfer over GPRS.
● Normal operation temperature: -20 °C to +55 °C
● Input Voltage: 12V DC

Gas Sensor MQ2 Module Specifications:

1. Concentration level for LPG is 400-1000ppm.


2. Circuit voltage is 5V.
3. Heating consumption less than 800m W.
4. Load resistance adjustable.
5. Wide detecting scope.
6. High sensitivity to combustible gas in wide range.
7. Fast response.
8. Stable and long life.

3.2 Software Requirements:

Software tools that are used in the project

1) Arduino IDE (v1.0.6)

Arduino programs are written in C or C++. The Arduino IDE comes with a software
library called "Wiring" from the original Wiring project, which makes many common
input/output operations much easier. The users need only to define two functions to make an
executable cyclic executive program:

● setup(): a function run once at the start of a program that can initialize settings

● loop(): a function called repeatedly until the board powers off

6 | Page
GAS DETECTOR AND INDICATOR

4. SYSTEM MODEL

4.1 IMPLEMENTATION AND DESCRIPTION:

ARDUINO UNO

Introduction:

The Arduino Uno is a microcontroller board based on the ATmega328. It has 14 digital
input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz crystal
oscillator, a USB connection, a power jack, an ICSP header, and a reset button.
It contains everything needed to support the microcontroller; simply connect it to a
computer with a USB cable or power it with an AC-to-DC adapter or battery to get started. The
Uno differs from all preceding boards in that it does not use the FTDIUSB-to-serial driver chip.
Instead, it features the Atmega8U2 programmed as a USB-to-serial converter.
"Uno" means one in Italian and is named to mark the upcoming release of Arduino 1.0.
The Uno and version1.0 will be the reference versions of Arduino, moving forward. The Uno
is the latest in a series of USB Arduino boards, and the reference model for the Arduino
platform; for a comparison with previous versions.

7 | Page
GAS DETECTOR AND INDICATOR

TECHNICAL SPECIFICATIONS:
Microcontroller: ATmega328
Operating Voltage: 5V
Input Voltage: 7-12V
Input Voltage (limits): 6-20V
Digital I/O Pins: 14 (of which 6 provide PWM output)
Analog Input Pins: 6
DC Current per I/O Pin 40: mA
DC Current for 3.3V Pin 50 mA
Flash Memory: 32 KB of which 0.5 KB used by boot loader
SRAM: 2 KB
EEPROM: 1 KB
Clock Speed: 16 MHz
THE BOARD:

POWER:

The Arduino Uno can be powered via the USB connection or with an external power supply.
The power source is selected automatically. External (non-USB) power can come either from
an AC-to-DC adapter (wall-wart) or battery. The adapter can be connected by plugging a
2.1mm centre-positive plug into the board's power jack. Leads from a battery can be inserted

8 | Page
GAS DETECTOR AND INDICATOR

in the Gnd and Vin pin headers of the POWER connector. The board can operate on an external
supply of 6 to 20 volts. If supplied with less than 7V, however, the 5Vpin may supply less than
five volts and the board may be unstable. If using more than 12V, the voltage
Regulator may overheat and damage the board. The recommended range is 7 to 12 volts.
The power pins are as follows:
· VIN. The input voltage to the Arduino board when it's using an external power source (as
opposed to5 volts from the USB connection or other regulated power source). You can supply
voltage through this pin, or, if supplying voltage via the power jack, access it through this pin.
· 5V. The regulated power supply used to power the microcontroller and other components on
the board. This can come either from VIN via an on-board regulator, or be supplied by USB or
another regulated 5V supply.
· 3V3. A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50
mA.
· GND. Ground pins.

MEMORY:

The Atmega328 has 32 KB of flash memory for storing code (of which 0,5 KB is used for the
boot loader); It has also 2 KB of SRAM and 1 KB of EEPROM (which can be read and written
with the EEPROM library).
INPUT AND OUTPUT:
Each of the 14 digital pins on the Uno can be used as an input or output, using pin Mode (),
digital Write (), and digital Read () functions. They operate at 5 volts. Each pin can provide or
receive a maximum of 40mA and has an internal pull-up resistor (disconnected by default) of
20-50K ohms’. In addition, some pins have specialized functions:
· Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data. These
pins are connected to the corresponding pins of the ATmega8U2 USB-to-TTL Serial chip.
· EXTERNAL INTERRUPTS: 2 and 3. These pins can be configured to trigger an interrupt
on a low value, a rising or falling edge, or a change in value.
· PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the analog Write() function.
· SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI communication,
which, although provided by the underlying hardware, is not currently included in the Arduino
language.
· LED: 13. There is a built-in LED connected to digital pin 13. When the pin is HIGH value,
the LED is on, when the pin is LOW, it's off.

9 | Page
GAS DETECTOR AND INDICATOR

The Uno has 6 analog inputs, each of which provide10 bits of resolution (i.e. 1024 different
values). By default they measure from ground to 5 volts, though is it possible to change the
upper end of their range using the AREF pin and the analog Reference() function. Additionally,
some pins have specialized functionality:
· I2C: 4 (SDA) and 5 (SCL). Support I2C (TWI) communication using the Wire library.
There are a couple of other pins on the board:
· AREF. Reference voltage for the analog inputs. Used with analog Reference ().
· Reset. Bring this line LOW to reset the microcontroller. Typically used to add a reset button
to shields which block the one on the board.
COMMUNICATIONS:
The Arduino Uno has a number of facilities for communicating with a computer,
another Arduino, or other microcontrollers. The ATmega328 provides UART TTL (5V) serial
communication, which is available on digital pins 0 (RX) and 1 (TX). An ATmega8U2 on the
board channels this serial communication over USB and appears as a virtual com port to
software on the computer. The '8U2 firmware uses the standard USBCOM drivers, and no
external driver is needed. However, on Windows, an *.inf file is required..
The Arduino software includes a serial monitor which allows simple textual data to be sent to
and from the Arduino board. The RX and TX LEDs on the board will flash when data is being
transmitted via the USB-to serial chip and USB connection to the computer (but not for serial
communication on pins 0 and 1). A Software Serial library allows for serial communication on
any of the Uno's digital pins. The ATmega328 also support I2C (TWI) and SPI communication.

PROGRAMMING:
The Arduino Uno can be programmed with the Arduino software (download). Select
"Arduino Uno w/ATmega328" from the Tools > Board menu (according to the microcontroller
on your board).
The ATmega328 on the Arduino Uno provides pre burned with a boot loader that allows
you to upload new code to it without the use of an external hardware programmer. It
communicates using the original STK500 protocol (reference, C header files).
You can also bypass the boot loader and program the microcontroller through the ICSP (In-
Circuit Serial Programming) header.
The ATmega8U2 firmware source code is available. The ATmega8U2 is loaded with a
DFU boot loader, which can be activated by connecting the solder jumper on the back of the

10 | Page
GAS DETECTOR AND INDICATOR

board (near the map of Italy) and then resetting the 8U2. You can then use Atmel's FLIP
software (Windows) or the DFU programmer (Mac OS X and Linux) to load a new firmware.
Or you can use the ISP header with an external programmer (overwriting the DFU boot loader).

AUTOMATIC (SOFTWARE) RESET:


Rather than requiring a physical press of the reset button before an upload, the Arduino
Uno is designed in a way that allow it to be reset by software running on a connected computer.
One of the hardware flow control lines (DTR) of the ATmega8U2 is connected to the reset line
of the ATmega328 via a 100 Nano farad capacitor. When this line is asserted (taken low), the
reset line drops long enough to reset the chip. The Arduino software uses this capability to
allow you to upload code by simply pressing the upload button in the Arduino environment.
This means that the boot loader can have a shorter timeout, as the lowering of DTR can be
well-coordinated with the start of the upload.
This setup has other implications. When the Uno is connected to either a computer
running Mac OS X or Linux, it resets each time a connection is made to it from software (via
USB). For the following half-second or so, the boot loader is running on the Uno. While it is
programmed to ignore malformed data (i.e. anything besides an upload of new code), it will
intercept the first few bytes of data sent to the board after a connection is opened. If a sketch
running on the board receives one-time configuration or other data when it first starts, make
sure that the software with which it communicates waits a second after opening the connection
and before sending this data. The Uno contains a trace that can be cut to disable the auto-reset.
The pads on either side of the trace can be soldered together to re-enable it. It's labelled
"RESET-EN". You may also be able to disable the auto-reset by connecting a 110 ohm resistor
from 5V to the reset line.
USB OVER CURRENT PROTECTION:
The Arduino Uno has a resettable polyfuse that protects your computer's USB ports from shorts
and over current. Although most computers provide their own internal protection, the fuse
provides an extra layer of protection. If more than 500mA is applied to the USB port, the fuse
will automatically break the connection until the short or overload is removed.

11 | Page
GAS DETECTOR AND INDICATOR

ATMEGA328P:

The ATmega328 is a single chip micro-controller created by Atmel and belongs to the
mega AVR series.

SPECIFICATIONS:

The Atmel 8-bitAVRRISC-based microcontroller combines 32 KB ISP flash memory


with read-while-write capabilities, 1 KB EEPROM, 2 KB 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, 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. The device achieves
throughputs approaching 1 MIPS per MHz

ATMEGA328P

Key parameters

PARAMETERS VALUE
Flash 32Kbytes
RAM 2 Kbytes
Pin Count 28
Max. Operating Frequency 20 MHz

12 | Page
GAS DETECTOR AND INDICATOR

8-bit
CPU
AVR
# of Touch Channels 16

Max I/O Pins 26


Ext Interrupts 24
USB Interface No
USB Speed No

Series alternatives

A common alternative to the ATmega328 is the "pico Power" ATmega328P. A


comprehensive list of all other member of the mega AVR series can be found on the Atmel
website.

BLOCK DIAGRAM OF ATMEGA328:

13 | Page
GAS DETECTOR AND INDICATOR

The AVR core combines a rich instruction set with 32 general purpose working registers. All
the 32 registers are directly connected to the Arithmetic Logic Unit (ALU), allowing two
independent registers to be accessed in one single instruction executed in one clock cycle. The
resulting architecture is more code efficient while achieving throughputs up to ten times faster
than conventional CISC microcontrollers. The ATmega32 provides the following features:
32K bytes of In-System Programmable Flash Program memory with Read-While-Write
capabilities, 1024 bytes EEPROM, 2K byte SRAM, 32 general purpose I/O lines, 32 general
purpose working registers, a JTAG interface for Boundary-scan, On-chip Debugging support
and programming, three flexible Timer/Counters with compare modes, Internal and External
Interrupts, a serial programmable USART, a byte oriented Two-wire Serial Interface, an 8-
channel, 10-bit ADC with optional differential input stage with programmable gain (TQFP
package only), a programmable Watchdog Timer with Internal Oscillator, an SPI serial port,
and six software selectable power saving modes. The Idle mode stops the CPU while allowing
the USART, Two-wire interface, A/D Converter, SRAM, Timer/Counters, SPI port, and
interrupt system to continue functioning.

The Power-down mode saves the register contents but freezes the Oscillator, disabling
all other chip functions until the next External Interrupt or Hardware Reset. In Power-save
mode, the Asynchronous Timer continues to run, allowing the user to maintain a timer base
while the rest of the device is sleeping. The ADC Noise Reduction mode stops the CPU and
all I/O modules except Asynchronous Timer and ADC, to minimize switching noise during
ADC conversions. In Standby mode, the crystal/resonator Oscillator is running while the rest
of the device is sleeping. This allows very fast start-up combined with low-power consumption.
In Extended Standby mode, both the main Oscillator and the Asynchronous Timer continue to
run. The device is manufactured using Atmel’s high density non-volatile memory technology.
The On-chip ISP Flash allows the program memory to be reprogrammed in-system through an
SPI serial interface, by a conventional non-volatile memory programmer, or by an On-chip
Boot program running on the AVR core.

The boot program can use any interface to download the application program in the
Application Flash memory. Software in the Boot Flash section will continue to run while the
Application Flash section is updated, providing true Read-While-Write operation. By
combining an 8-bit RISC CPU with In-System Self-Programmable Flash on a monolithic chip,
the Atmel ATmega32 is a powerful microcontroller that provides a highly-flexible and cost-

14 | Page
GAS DETECTOR AND INDICATOR

effective solution to many embedded control applications. The ATmega32 AVR is supported
with a full suite of program and system development tools including: C compilers, macro
assemblers, program debugger/simulators, in-circuit emulators, and evaluation kits.

APPLICATIONS OF ARDUINO:
Today the ATmega328 is commonly used in many projects and autonomous systems
where a simple, low-powered, low-cost micro-controller is needed. Perhaps the most common
implementation of this chip is on the popular Arduino development platform.

MQ-2 GAS SENSOR:

MQ2 is a semiconductor type gas sensor which detects the gas leakage. The sensitive
material of MQ-2 is tin dioxide (SnO2). It has very low conductivity in clean air. MQ-2 gas
sensor has high sensitivity to LPG, concentration level of it is from 400 – 1000ppm and it also
detects the following flammable gases:
1. Propane
2. Hydrogen
3. Methane
4. Butane.
Different concentration level for different gases:

400-1000ppm – LPG and Propane


300-5000ppm - Butane
5000-2000ppm- Methane
300-5000ppm-H2

15 | Page
GAS DETECTOR AND INDICATOR

FEATURES OF MQ2 GAS SENSOR:


1. Wide detecting scope
2. High sensitivity to combustible gas in wide range
3. Fast response
4. Stable and long life
5. Simple drive circuit
6. Low cost and compact size.
The gas sensor senses the analog value according to the concentration of the gas level
in the environment. The concentration range of MQ2 gas sensor is 400-1000ppm for LPG and
use value of Load resistance (RL) about 20 KO (10KO to47KO). When accurately measuring,
the proper alarm point for the gas detector should be determined after considering the
temperature and humidity influence. The voltage that the sensor outputs changes accordingly
to the smoke/gas level that exists in the atmosphere. The sensor outputs a voltage that is
proportional to the concentration of smoke/gas. The resistance of the sensor is different
depending on the type of the gas.

MQ2 sensor senses the flammable gases by the increase in temperature when they are
oxidized by the heating element. Consider the figure given above. If there is any flammable
gas present in the sample, the oxidization of the same gas results in increased temperature and
the resistance of the sensor resistor will drop. That means more current will flow through the
load resistor and so the voltage across it will shoot up.

16 | Page
GAS DETECTOR AND INDICATOR

MQ2 GAS SENSOR PIN DESCRIPTION:

1. DO (digital pin)
2. AO (analog pin)
3. VCC (5V)
4. GROUND

Standard Working Condition:

Technical
Symbol Parameter Name Remarks
Condition

VC Circuit voltage 5V±0.1 AC or DC

VH Heating voltage 5V±0.1 AC or DC

RL Load resistance Adjustable

Room
RH Heater resistance 33Kohm±5%
temperature

Heating
PH Less than 800mW
consumption

17 | Page
GAS DETECTOR AND INDICATOR

SENSITIVE CHARACTERISTICS OF MQ-2 GAS SENSOR:

SENSITIVITY ADJUSTMENT:

Resistance value of MQ-2 is difference to various kinds and various concentration gases. So,
when using these components, sensitivity adjustment is very necessary. Recommended that
you calibrate the detects for 1000ppm liquefied petroleum gas<LPG>, or 1000ppm iso-butane
concentration in air and use value of load resistance that about 20Kilo ohms. When accurately

18 | Page
GAS DETECTOR AND INDICATOR

measuring the proper alarm point for the gas detector should be determined after considering
the temperature and humidity influence.

APPLICATION OF MQ2 GAS SENSOR:


⮚ Domestic gas leakage detector.

⮚ Industrial combustible gas leakage detector.

⮚ Portable gas leakage detector.

GSM MODULE SIM900A:

GSM SIM 900 Quad-band GSM/GPRS engine, works on frequencies 850MHz, 900MHz,
1800MHz. It is very compact in size and designed with RS 232 level converter circuitry, which
allows you to directly interface PC Serial port. GSM uses a combination of Time Division
Multiplexing and Frequency Division Multiplexing. The baud rate can be configurable from
9600-115200 MHz through AT command. Initially Module is in Auto band mode. This
GSM/GPRS RS232 Module is having internal TCP/IP stack to enable you to connect with
internet via GPRS. Using this module, we will be able to make audio call, send & read SMS
and attend the incoming calls through connecting to internet via GPRS through simple AT

19 | Page
GAS DETECTOR AND INDICATOR

commands. SIM900A is an ultra-compact and reliable wireless module. This is a very powerful
single-chip processor integrating AMR926EJ-S core, allowing you to benefit from small
dimensions and cost-effective solutions.

GENERAL FEATURES OF GSM MODULE SIM900A:

● High Quality Product (Not hobby grade)


● Dual-Band GSM/GPRS 900/ 1800 MHz
● RS232 interface for direct communication with computer or MCU kit
● Configurable baud rate
● Wire Antenna ( SMA connector with GSM Antenna Optional )
● SIM Card holder.
● Built in Network Status LED
● Inbuilt Powerful TCP/IP protocol stack for internet data transfer over GPRS.
● Normal operation temperature: -20 °C to +55 °C
● Input Voltage: 12V DC
● Low power consumption: 1.5mA(sleep mode)
● Class 4(2W @900Mhz)
● Class 1(1W @1800Mhz)
● Control via AT command

SPECIFICATIONS FOR SMS VIA GSM/GPRS:

● Point to point MO and MT


● SMS cell broadcast
● Text and PDU mode

SIM900A RS232 + TTL BOARD FEATURES:

● Input voltage :12V


● On board power LED
● On board network LED
● RS232 serial control (TX and RX)
● Modem reset PIN OUT
● Default baud rate :9600, data bits:8

20 | Page
GAS DETECTOR AND INDICATOR

SOFTWARE SPECIFICATIONS:

● Embedded TCP/UDP protocol


● FTP/HTTP
● Embedded AT

INTERFACES:

● I2C
● GPIO
● PWM
● ADC
● Antenna pad
● Two serial interface
● SPI interface
● RTC back up
● Interface to external SIM 3V/1.8V

Compatibility: AT cellular command interface.

INTERFACING GSM MODULE TO ARDUINO

1) Insert the SIM card to the GSM module:

Open the SIM cardholder by sliding it as per the arrow mark and lift up. Insert the SIM card,
so as to align the chamfered corner suits in card holder .After inserting the SIM card, lock the
holder by sliding it to the opposite direction of arrow mark.

2). Connect the antenna:

Fix the Supplied RF antenna to the SMA Antennae connector and tighten it by Rotating the
Nut (Never rotate the antennae for tightening).

3). Connect the pins:

21 | Page
GAS DETECTOR AND INDICATOR

Connect the TX of Arduino to RX of GSM module and RX of Arduino to TX of GSM module.

4). Power the modem:

Give the power supply 12V DC and >1A. And wait for some time (10 minutes) for initializing
the SIM card for network.

5). Check the status of LEDs:

PWR LED - Red LED will lit immediately

STS LED - Green LED will lit after 1-2 seconds

NET LED -Blue LED will starts to blink in fast for few seconds (Searching for Network)
and becomes slow blinking once the Modem registers with the Network.

6). Network LED:

The Network LED indicates the various status of GSM module eg. Power on, Network
registration & GPRS connectivity. When the modem is powered up, the status LED will blink
every second. After the Modem registers in the network (takes between 10-60 seconds), LED
will blink in step of 3 seconds. At this stage you can start using Modem for your application.

7). Baud rate:

The Baud rate supported by the modem is between 9600 and 115200. Make sure the host
system is set to the supported baud rate.

WORKING PRINCIPLE:
Connect TX of Arduino to RX to GSM module and RX of Arduino to TX of GSM module.
Wait for few minutes for connectivity to network of SIM card. Then communication can be
established to send the SMS or receive SMS and call by using suitable AT commands.

22 | Page
GAS DETECTOR AND INDICATOR

Following are the commands:


CHECKING THE OPERATION AND CONNECTION OF GSM SHIELD:

AT Press ENTER
This would print OK which signifies of working connection and operation of the GSM shield.
SENDING A MESSAGE:
For sending SMS in text Mode:
AT+CMGF=1 Press ENTER
AT+CMGS=”mobile number” Press ENTER
Once the AT commands is given’ >’ prompt will be displayed on the screen. Type the message
to be sent via SMS. After this, Press CTRL+Z to send the SMS. If the SMS sending is
successful, “OK” will be displayed along with the message number.

APPLICATIONS:
⮚ For phone communication like text SMS send and read, voice calls.

⮚ By GSM/GPRS RSS 232 modem is having internal TCP/IP stack enables to connect
internet via GPRS.

23 | Page
GAS DETECTOR AND INDICATOR

⮚ Data transfer application by M2M interface.

DISPLAY:

It is necessary requirement to put a display about system monitoring and controlling


performance, which displays the various messages such as leakage of gas detection, booking
of cylinder in case of refilling of cylinder .Additionally the system also, displays the actions
carried out in the microcontroller. For the work of displaying the alert messages Liquid crystal
display (LCD) of 16*2 characters operating on +5 volt supply and operated 4-bit mode is
implemented.

WORKING:

To detect the LPG, MQ2 gas sensor is employed. This sensor can be operated at +5V. The
sensitivity of this sensor is very high and it has quick response time. It can detect the LPG
concentration in the range of 200-10000ppm. The gas sensing layer of this sensor is made of
Tin Dioxide (SnO2) and gold (Au) electrodes. The output of the gas sensor is given to LM358
dual operational amplifier where it is compared with the threshold value for gas density which
is set using pre-set potentiometers and amplified. If the sensed voltage is greater than the pre-
set threshold voltage, the operational amplifier output fires the driver circuit for LED and

24 | Page
GAS DETECTOR AND INDICATOR

Buzzer. As a result, the LED will glow and the buzzer starts to produce alarm sound. Then it
displays status in an LCD using a 16×2 LCD module. Then the message is sent to the 2
registered mobile number

This is how we have done connections in Arduino:

LCD Pins 1, 3 ,5 ,16 ——— GND


LCD Pins 2, 16 ————— VCC (+5V)
LCD Pin 4 ——————– Arduino pin A0
LCD Pin 6 ——————– Arduino pin A1
LCD Pin 11 ——————- Arduino pin A2
LCD Pin 12 ——————- Arduino pin A3
LCD Pin 13 ——————- Arduino pin A4
LCD Pin 14 ——————- Arduino pin A5
MQ-2 Module Pin -GND —— GND
MQ-2 Module Pin +VCC —— VCC
MQ-2 Module Pin A0 — Arduino Pin D8
Buzzer Pin +ve end ————- Arduino PinD13
Buzzer Pin -ve end ————-GND

GSM Pin TX ——————- Arduino pin D2

GSM Pin RX ——————- Arduino pin D3

25 | Page
GAS DETECTOR AND INDICATOR

THE ACTUAL REPRESENTATION OF OUR PROJECT:

26 | Page
GAS DETECTOR AND INDICATOR

FLOWCHART:

27 | Page
GAS DETECTOR AND INDICATOR

4.2 DATAFLOW DIAGRAM:

28 | Page
GAS DETECTOR AND INDICATOR

4.3 CIRCUIT DIAGRAM:

29 | Page
GAS DETECTOR AND INDICATOR

4.4 SNAPSHOTS, HOME SCREEN AND OTHER SCREENS:

PROCEDURE FOR THE ARDUINO SOFTWARE:

Open the arduino software. Select new file.

Write the program code.

30 | Page
GAS DETECTOR AND INDICATOR

Select the appropriate arduino boards. by browsing TOOLS -boards.

Select the appropriate COM port by browsing Tools - Serial port -COM port.

31 | Page
GAS DETECTOR AND INDICATOR

Verify or compile the program code. From sketch verify/compile or “CTRL+R” short cut
command.

Compiling process.

32 | Page
GAS DETECTOR AND INDICATOR

It displays any syntax errors after done compiling. If so check the code once again and
correct it.

Now for dumping into the processor, connect the Arduino kit using USB cable and go for
upload. From sketch, upload. Or “CTRL+U”.
Wait for complete uploading process until it display done uploading.

33 | Page
GAS DETECTOR AND INDICATOR

Can view the results in the serial monitor by browsing from TOOLS-Serial Monitor –
“CTRL+SHIFT+M”.

34 | Page
GAS DETECTOR AND INDICATOR

The below screenshots shows testing before applying gas leak:


Before applying the gas leakage, MQ2 captures atmospheric air concentration only.

The below screenshots shows testing after applying gas leak:


After applying the gas leak, the heating element in the gas sensor will starts heating and
varies its concentration value from 1 to its concentration level by pressing the cigar’s lightly.

35 | Page
GAS DETECTOR AND INDICATOR

SENDING MESSAGE TO PHONE NUMBER USING GSM MODULE:

36 | Page
GAS DETECTOR AND INDICATOR

5. CODING:
#include <SoftwareSerial.h>

#include <LiquidCrystal.h>

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

SoftwareSerial mySerial(9, 10);

int sensor=7;

int speaker=8;

int gas_value,Gas_alert_val, Gas_shut_val;

int Gas_Leak_Status;

int sms_count=0;

void setup()

pinMode(sensor,INPUT);

pinMode(speaker,OUTPUT);

mySerial.begin(9600);

Serial.begin(9600);

lcd.begin(16,2);

delay(500);

void loop()

CheckGas();

CheckShutDown();

37 | Page
GAS DETECTOR AND INDICATOR

void CheckGas()

lcd.setCursor(0,0);

lcd.print("Gas Scan - ON");

Gas_alert_val=ScanGasLevel();

if(Gas_alert_val==LOW)

SetAlert(); // Function to send SMS Alerts

int ScanGasLevel()

gas_value=digitalRead(sensor); // reads the sensor output (Vout of LM35)

return gas_value; // returns temperature value in degree celsius

void SetAlert()

digitalWrite(speaker,HIGH);

while(sms_count<3) //Number of SMS Alerts to be sent

SendTextMessage(); // Function to send AT Commands to GSM module

Gas_Leak_Status=1;

lcd.setCursor(0,1);

38 | Page
GAS DETECTOR AND INDICATOR

lcd.print("Gas Alert! SMS Sent!");

void CheckShutDown()

if(Gas_Leak_Status==1)

Gas_shut_val=ScanGasLevel();

if(Gas_shut_val==HIGH)

lcd.setCursor(0,1);

lcd.print("No Gas Leaking");

digitalWrite(speaker,LOW);

sms_count=0;

Gas_Leak_Status=0;

}}

void SendTextMessage()

mySerial.println("AT+CMGF=1"); //To send SMS in Text Mode

delay(1000);

mySerial.println("AT+CMGS=\"+917276923020\"\r"); // change to the phone number you


using

delay(1000);

mySerial.println("Gas Leaking!");//the content of the message

delay(200);

39 | Page
GAS DETECTOR AND INDICATOR

mySerial.println((char)26);//the stopping character

delay(1000);

mySerial.println("AT+CMGS=\"+917977484726\"\r"); // change to the phone number you


using

delay(1000);

mySerial.println("Gas Leaking!");//the content of the message

delay(200);

mySerial.println((char)26);//the message stopping character

delay(1000);

sms_count++;

40 | Page
GAS DETECTOR AND INDICATOR

6. TESTING TOOLS USED WITH CASES:

6.1. Verification:

GSM MODEM

AT Command Set:

₋ ATE0 --- Echo off


₋ ATE1 --- Echo
₋ ATD --- Call to dial a number.

Syntax: ATD 7276923020;

₋ ATDL --- Redial last telephone number


₋ ATA --- Answer an incoming call
₋ ATH --- Disconnect existing connection
₋ AT+CMGD --- To delete SMS.

Syntax: AT+CMGD=1 -> deletes 1st SMS in sim card

₋ AT+CMGR --- To read SMS


Syntax: AT+CMGR=1 -> reads 1st SMS in sim card
₋ AT+CMGS --- To send SMS

Syntax: AT+CMGS= 7276923020 press enter Type text and press ctrl+z

We used the above mentioned command sets to verify the working of GSM module.

MQ2 Sensor:

MQ2 is a semiconductor type gas sensor which detects the gas leakage. For its verification, we
exposed gas on the sensor with the help of lighter and that time buzzer was buzzed, gas leak
message was displayed on the LCD display and a message was send to the registered mobile
number.

41 | Page
GAS DETECTOR AND INDICATOR

6.2. Validation:

The various components used in designing of the model was verified with the help of
verification process we took out. This components include:

⮚ GSM Modem
⮚ MQ2 Sensor
⮚ Arduino UNO (During the verification of GSM module and MQ2 sensor)
⮚ LM324 (During the verification of MQ2 sensor)

42 | Page
GAS DETECTOR AND INDICATOR

7. SYSTEM ANALYSIS

Features:

● Simple in structure.
● Delay time is adjustable.
● Low power consumption: 1.5mA(sleep mode)
● High sensitivity to combustible gas in wide range
● Stable and long life
● Low cost and compact size.

Comparative analysis with respect to similar apps in market:

At present Sniffer, True Safe, are the most used device for gas leakage detection. They cost up
to three thousand rupees. But they have two limitations. They can detect only CH4 or gases
used for cooking purpose and cannot send alarm through text message. There are some devices
like Gas Flowmeter and Biogas Analyzer that are also used for gas leakage detection. But they
do not send any text alarm also. Besides, both of those devices are highly expensive

Limitations:

The device has become bigger in size. On the other hand, for different industries, some other
kinds of gases may be leaked which will require additional gas sensors to detect leakages.
However, the design can act as a backbone for all these optimizations which are application
specific

Future Scope:

In future more detection system like any gas detection systems can be implemented.
We can include more secure systems like a call will be gone to a registered mobile number.
We can also add automatic door opening application when LPG leakage has sensed. Using DC
motor control automatically turns off the knob of the cylinder. To continuously monitoring the
level of the LPG present in the cylinder using weight sensor and automatically books the
cylinder using a GSM module.

43 | Page
GAS DETECTOR AND INDICATOR

8. COST ANALYSIS:
The below table shows the cost analysis of the proposed Microcontroller Based LPG leakage
detection and response System. The analysis is based on the lowest individual cost of each
component used in the model while taking into consideration quality, in order to minimise the
cost of building the system. This in turn makes the system economical and affordable for
domestic use. This analysis is an estimate of the prices of components used in the simulation
based on review of online prices.

44 | Page
GAS DETECTOR AND INDICATOR

9. CONCLUSION:
This work sets out the problem of LPG leakages that have resulted in numerous fatal casualties
as well as damages to properties worth billions of dollars. As such a device that is capable of
detecting such leakages and alerting people was designed and simulated successfully.

Project uses Arduino controller at the gas sensor to sense the leakage of the gas, detects it
and send the information to the users by SMS. GSM module is used as the communication
purpose for sending the information to predefined number which can alert to prevent the
accident. Gas sensor is used to detect the gas leakage. Buzzer is used to buzzing the sound
which can also alert the people nearby

45 | Page
GAS DETECTOR AND INDICATOR

10. REFERENCES:

● In the year 2011, A. MAHALINGAM, R. T. NAAYAGI,1, N. E. MASTORAKIS, “Design


and Implementation of an Economic Gas Leakage Detector”.
● For Arduino Programming: forum.arduino.cc
● Lopes dos Santos, P.; Azevedo-Perdicoúlis,T,P.Ramos,J.A.; Martins de Carvalho, J.L.;
Jank, G.; Milhinhos, “An LPV modeling and identification approach to leakage detection
in high pressure natural gas transportation networks”, IEEE Transactions on Control
Systems Technology, vol. 19, pp. 77-92, 2011.
● http://www.circuitstoday.com/gas-leakage-detector-using-arduino-with-sms-alert.
● https://www.irjet.net/archives/V5/i4/IRJET-V5I4709.pdf
● https://www.slideshare.net/circuitstoday/gas-leakage-detector-using-arduino-with-sms-
alert-engineering-project
● https://circuitdigest.com/microcontroller-projects/arduino-based-lpg-gas-leakage-
detector-alarm
● https://in.pinterest.com/pin/496381190161195419/?lp=true
● https://www.scribd.com/document/330086612/Lpg-Detection-Alarm-mini-project-report

46 | Page

You might also like