Download as pdf or txt
Download as pdf or txt
You are on page 1of 30

Table of Contents

Chapter 1. Introduction ...................................................................1


1.1 Background.................................................................................................. 1
1.2 Objectives .................................................................................................... 2
1.3 Purpose,Scope and Applicability ............................................................. 2
1.3.1 Purpose ...................................................................................................................................2
1.3.2 Scope .......................................................................................................................................3
1.3.3 Applicability ............................................................................................................................3

1.4 Achievements .............................................................................................. 3


1.5 Organisation of report................................................................................. 4
Chapter 2. SURVEY OF TECHNOLOGIES ............................................ 5
2.1 Existing Systems .......................................................................................... 5
2.2 Proposed Systems ....................................................................................... 5
2.3 Justification of Platform .............................................................................. 6
2.3.1 Arduino ...................................................................................................................................6
2.3.2 Raspberry Pi ............................................................................................................................7
2.3.3 Why Arduino not Raspberry pi? .............................................................................................8
2.3.4 Arduino over Raspberry Pi ......................................................................................................9

Chapter 3.REQUIREMENT AND ANALYSIS ...................................... 10


3.1 Problem Definition .................................................................................... 10
3.2 Requirements Specification: ..................................................................... 11
3.3 Planning and scheduling............................................................................ 12
3.4 Hardware and Software Requirements: ................................................... 14
3.4.1 Hardware Requirements: .....................................................................................................14
3.4.2 Software Requirements: ......................................................................................................18

3.5 Preliminary Product Description: ............................................................. 19


3.5.1 Requirements: ......................................................................................................................19
3.5.2 Objective: ..............................................................................................................................20

3.6 Conceptual Models: .................................................................................. 20

i
4. SYSTEM DESIGN ......................................................................... 23
4.1 Basic Models.............................................................................................. 23
4.2 Security ...................................................................................................... 26
4.3 Test Cases .................................................................................................. 26
References and Biblography .......................................................... 27

ii
TABLE OF FIGURES

FIGURE 1:ARDUINO UNO .................................................................... 6


FIGURE 2:RASPBERRY PI 3 ................................................................... 7
FIGURE 3:RASPBERRY PI VS ARDUINO................................................ 8
FIGURE 4: GANTT CHART ................................................................... 13
FIGURE 5: ARDUINO CIRCUIT DIAGRAM ............................................ 14
FIGURE 6:MQ-2 GAS SENSOR CIRCUIT ............................................... 15
FIGURE 7:SIM 900A CIRCUIT .............................................................. 16
FIGURE 8: BUZZER CIRCUIT ............................................................... 17
FIGURE 9:ARDUINO IDE .................................................................... 19
FIGURE 10:FLOW CHART .................................................................... 21
FIGURE 11:USE CASE DIAGRAM ........................................................ 22
FIGURE 12:ARDUINO AND BUZZER CONNECTION ............................... 23
FIGURE 13:ARDUINO AND GSM SIM MODULE CONNECTION ........... 24
FIGURE 14:ARDUINO AND MQ-2 GAS SENSOR .................................. 25

iii
Chapter 1. Introduction

1.1 Background
In today’s world every home has a LPG gas cylinder , and there are many accidents that
happens because we are unable to detect the leakage of the gas. Earlier there were no means
to detect the leakage of the Gas ,so the accidents due to gas leakage were taking place. There
were no means to avoid these accidents ,as if the leakege is not detected then it can be
dangerous. The detector helps to detect the leakage the gas and take the appropriate measure
that is to be taken when it detects the leakage.

A LPG gas detector is a device that sense the leakage of LPG gas and start an alarm and send
the SMS to the owner of the House and the Gas Comapany about the leakage of the gas, so
that if owner is outside the house then they can come fast or if they are in house they can use
appropriate action. The buzzer also makes the neighbor careful, if no one is in house so they
can also prevent the damage may happen due to neglecting the problem. In today’s time we
use gas in vehicles also since there is a significant rise in rate of Petrol/Deisel many drivers
are using vehicles with gas.

What is LPG and what is LPG Gas sensor?


LPG is a liquified petroleum gas which is used in houses to cook food. It is also referred to
as propane and butane , are flammable mixtures of both and other hydrocarbon gases used
as fuel in heating appliances , cooking equipment, and vehicles . In today’s time LPG is
essential need of every house hold, it’s leakage could lead to disasater. Butane and propane
both are odorless gas due to which detection is difficult, so ethanethoil is added as powerful
odorant, so that leakage can be easily detected and we understand that there is leakage. To
prevent these disaster from happenning this device helps in detection of gas leakage. Lpg gas
sensor is a device that is used to detect the presence of gas in nearby environment that can
cause damage to life and property. The sensor is attached to an alarm circuits to give an alert
to an operator through a buzzer by activating sound alarm in the area where gas leakage is
occuring. The gas sensor is use to detect many other gases that are persent nearby which are
hazardous to life.

1
1.2 Objectives
The main objective of this project is to detect the gas leakage by gas sensor and it makes the
alarm while gas detection. It will detect the leakage and will give sound signals to alert the
people around as well as it will send a message to the owner and the LPG company. Gas
sensors are nowadays being used in wide range of applications in the field like safety, health,
instrumentation etc.The intensity values are compared with two predetermined thresholds and
based on that, it classifies it into three different classes of concentration of leakage.

The project allows the user to set the low, medium and dangerous level for leakage based on
the some digital measure. The gas sensor detects the concentration of gas in ppm. LPG is also
used as an alternate fuel in vehicles due to rise 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. This device can be attached in vehicles so that gas leakage can be detected.

1.3 Purpose,Scope and Applicability


1.3.1 Purpose
The main purpose of this sytem is to detect the gas leakage in the area and response it fast by
alarming the people in that area.This alarm is given by activating the alarm .The owner gets
the message that there is leakage in his/her house and the LPG company gets the message that
there is leakage in a particular address. This project helps to detect the leakage and helps to
avoid the disaster that may happen. Bhopal gas tragedy was an example of gas leakage
accident in India. This was world’s worst gas leakage industrial accident. Gas leakage
detection is not only important but stopping leakage is equally essential. The main purpose is
to detect the gas leakage and avoid such disasters to happen in future. Such gas leakge
disaster cause loss of life and property so this helps in detcting the gas leakage and avoid
disaster.

2
1.3.2 Scope
In home ,when there are no member then also we are assure that if any sort of problem is
there due to leakage then it can be solve. Suppose it a person is in village and due to some
reason there may happen a leakage and he/she gets a message then they can’t come at such
time the LPG company can come and do the repair and it can save the tragedy. In big
industries suppose there is gas leakge then it can alarm the workers and thus they may stop
doing electrical works. Due to the increased cost of the fuel, most of the drivers prefer in
using the vehicles that runs on gas, instead of petrol/diesel vehicles as there price are
increasing rapidly. Using gas in the cars is highly a risk issue, which will cause major
accidents due to the leakage of LPG Gas. This system helps in detecting and avoiding the gas
leakage.

1.3.3 Applicability
The project can be insatlled in the houses and in the automobiles industries,chemical
industries as well as in gas industries .We can Install it in our vehicles also ,as in todays time
every vehicles are running on gases instead of petrol and deisel.

1.4 Achievements
This project helps in understanding how gas leakage can happen and how we can stop any big
disaster by early detecting it and take preventive measures. Due to use of such devices we can
stop big disasters that may happen due to gas leakage . If the detector detects the gas leakage
early the we can take appropriate measures.
There are already many systems that detects the leakage of gas and gives the alarm. The
different in the system that are there and this system is that it also sends the message to the
LPG gas company and the owner of the house.

3
1.5 Organisation of report
In further chapters we are going to learn about what are the components used in this project and
what they can do. Where we can use this project and what are its appilcation and uses .
Requirements and analysis, which will give detail idea about problem definition, requirement
specification, hardware and software requirements etc. System design, which describes
desired features and operation’s in detail, including layout, various diagrams etc.

4
Chapter 2. SURVEY OF TECHNOLOGIES

2.1 Existing Systems


There are many cases in which fire is caused due to gas leakage in house or in a industry that
happens because there are either no gas leakage system or the system that are there may not
be that useful as this system.this system consist of SMS alert that sends the message to a
person as well as the LPG company this means that the owner a is not there in his house or
company then also he will came to know that there is a leakage of gas in house or company.
The leakage of gas is a big disaster as it may cause a loss of life and property.

The main cause of gas leakage is that the connection may not be proper and there may have
been some sort of damage in the gas pipeline.

2.2 Proposed Systems


This system consists of a gas sensor that sense the LPG gas if there is any leakage. It also
consists of a GSM SIM module that sends the SMS to the LPG company and the owner about
the leakage and it also consists of a buzzer that starts the alarm on leakage detection . This
system consists of three components this a gas sensor, a sim module and a buzzer along with
an arduino which all are connected through connecting wires and [programmed so that the
detector perfectly works and the owner gets the message when there is a Leakage of gas.

The sensors detects the leakage of gas and sends the message. Due to its high sensitivity and
fast response time, measurement can be taken as soon as possible. MQ-2 Gas sensor is used
to detect the gas level around the area. This sensor able to use as home or factory gas leak
monitoring, suitable for gas, butane, propane, methane, alcohol, hydrogen, smoke and other
monitoring devices.

5
2.3 Justification of Platform
2.3.1 Arduino
An Arduino is a microcontroller motherboard. A microcontroller is a simple computer that
can run one program at a time, over and over again. It is very easy to use.

An Arduino board is best used for simple repetitive tasks: opening and closing a garage door,
reading the outside temperature and reporting it to Twitter, driving a simple robot.

Figure 1:Arduino UNO

6
2.3.2 Raspberry Pi
A Raspberry Pi is a general-purpose computer, usually with a Linux operating system, and
the ability to run multiple programs. It is more complicated to use than an Arduino.
Raspberry Pi is best used when you need a full-fledged computer: driving a more complicated
robot, performing multiple tasks, doing intense calculations (as for Bitcoin or encryption).

Figure 2:Raspberry Pi 3

7
2.3.3 Why Arduino not Raspberry pi?

Arduino board consists of analog pins whereas Raspberry does not have analoge pins. For
anolgue input and output we need to attach different devices in rapberry pilike
ADC(Analogue to digital converter) or DAC(Digital to analogue Converter) where as due to
present of analoge pins we don’t need to add different devices. Arduino is a simple
microcontroller board whereas raspberry pi is a whole system. Since Arduino is best used for
repetitive programs and gas leakage is done continuously ,so I had preferred Arduino over
Raspberry pi. Even though Raspberry Pi can perform different tasks, there are some
limitations due to its hardware. Because of its processor, it cannot run X86 operating systems.
Some common ones like Windows and Linux distros are not compatible. In addition, some
applications which require high demands on CPU processing are off-limits. “Model B took
107 ms to complete one calculation of the purely synthetic prime number test; a mid-range
desktop Core 2 Duo E8400 took only 0.85ms.” (Collins, 2012) Users must not use normal
computer standards to judge Raspberry Pi. It can work as a personal computer, but cannot
replace it.

Figure 3:Raspberry Pi VS Arduino

8
2.3.4 Arduino over Raspberry Pi
• POWER:
In raspberry Pi it is difficult to power using a battery pack whereas Arduino can be
powered using a battery pack.

• COST:
Raspberry pi is expensive.
Arduino is available at low cost which makes it an important element for
experimentation purpose.

• INTERFACING:
Raspberry pi requires complex tasks like installing libraries and software for
interfacing sensors and actuators.
It is very simple to interface sensors and other electronic components to the Arduino.

• ON-BOARD STORAGE:
Raspberry pi does not have storage on board. It provides an SD card port.
Arduino can however provide on-board storage.

• INVIOLABILITY:
Raspberry Pi should be properly shutdown otherwise there is a risk of files corruption
and software problems.
Arduino is just a plug and play device. If power is connected it starts running the
program and if disconnected it simply stops.

9
Chapter 3.REQUIREMENT AND ANALYSIS

3.1 Problem Definition

The problem that may arise while making the project may have different reasons but
ultimatly those small problems affect the project in major way. It is necessary that a person
should go through all the problems that may arise in making the project and should take the
measures to eradicate those problems.

The problem that may arise during making of the projects are : connection problems,
incomplete requirements,Device may be faulty, network problem.

1. Connection Problems:
• There may be a some loose connection betwwen the devices that can cause
malfunction and it may not be able to detect the leakage .
• The connction that is done it may not be correct and may cause problem in
detecting the leakage.
2. Incomplete requirement:
• Person may have not been able to correctly identify what are the things that
are required.
• The requirement that he have may be wrong or incomplete.
• The person may not be able to get the requirement correctly.
3. Device may be faulty:
• The devices that he have may have some problem or may not be working
properly.
• While connecting the devices the pins must hane broken that can make the
device faulty.
4. Network problem:
• We need network for calling and sending messages ther might be chances that
there is a network error.
• It should be installed in such a place where the device can fdetect the gas and
be able to send the message to the person.

10
3.2 Requirements Specification:

The Gas leakge system require an Arduino, MQ-2 Gas Sensor,Buzzer,GSM Sim module,
buzzer and connecting wire and it also require a working sim card. The Arduino is the central
core of the project as it is a microcontroller and every devices are connected to it. The devices
and Arduino connected together are known as circuit. The devices that are connected works
together as per the code written.

The Arduino is designed with the program that is written in either C or C++ which runs the
code. When the whole project is done designing and coding the Device is ready to be
deployed but before deploying it is tested. The main thing comes is where to install this
devices so,it is necessary that device should be installed near the place where there is chance
of gas leakage so the disaster that may happen can be prevented. The main work of this
device will be that it detects the leakage of LPG gas and sends an SMS to owner of the house
and LPG company and further it starts alarm. Like we have seen that many a times fire
catches due to leakage of Gases so this can help us to prevent that as it will detect the leakage
and starts the alarm as well as sends the message to person it is the problem can be solved .

This can be done by switching off the main gas supply. Another problem that may arise in
this is that the number that is saved in program is either switch off or not in the area where
the quality of network is good this may cause problem as they may not get message so this
problem is eradicated by using buzzer. When the buzzer starts alarming the neighbourhood
may get alert that there is some problem in house and they may do something that can avoid
the fire disaster.

11
3.3 Planning and scheduling
Gantt Chart
A Gantt chart is a one of the type of bar chart which is used to describe the schedule of a
project. It follows work breakdown structure. Gantt charts are created initially using an early
start time approach, where each task is scheduled to start immediately as thye previous task is
completed. Due to early start time approach it reduces the float time in project. The Gantt
chart in the next page is shows how the planning of this project is done .

We can see in the gantt chart that what are the different works that are needed to be done and
how much time is required to do a particular work. The different phases of projrct
development are shown along with the time taklen to com[plete that task. The other task
starts as the previous task ends so there is to time gap, and as a result the floating time is
reduced from the projects. As it follows the workbreak down structure the time management
is easy and the project is done on time.

12
Figure 4: Gantt Chart

13
3.4 Hardware and Software Requirements:
3.4.1 Hardware Requirements:

Arduino:

• The operating voltage is 5V


• The recommended input voltage will range from 7v to 12V
• The input voltage ranges from 6v to 20V
• Digital input/output pins are 14
• Analog i/p pins are 6
• DC Current for each input/output pin is 40 mA
• DC Current for 3.3V Pin is 50 mA
• Flash Memory is 32 KB
• SRAM is 2 KB
• EEPROM is 1 KB
• CLK Speed is 16 MHz

Figure 5: Arduino Circuit Diagram

14
MQ-2 Gas sensor:
• Operating Voltage is +5V
• Can be used to Measure or detect LPG, Alcohol, Propane, Hydrogen, CO and even
methane
• Analog output voltage: 0V to 5V
• Digital Output Voltage: 0V or 5V (TTL Logic)
• Preheat duration 20 seconds
• Can be used as a Digital or analog sensor
• The Sensitivity of Digital pin can be varied using the potentiometer

Figure 6:MQ-2 gas sensor circuit

15
GSM Sim900A:
• Dual-Band 900/ 1800 MHz.
• GPRS multi-slot class 10/8.
• GPRS mobile station class B.
• Compliant to GSM phase 2/2+ Class 4 (2 W @ 900 MHz) Class 1 (1 W @ 1800MHz)
• Dimensions: 24x24x3mm.
• Weight: 3.4g.
• Control via AT commands (GSM 07.07 ,07.05 and SIMCOM enhanced AT
Commands)
• SIM application toolkit.

Figure 7:Sim 900A circuit

16
Buzzer
• Rated Voltage: 6V DC.
• Operating Voltage: 4-8V DC.
• Rated current: <30mA.
• Sound Type: Continuous Beep.
• Resonant Frequency: ~2300 Hz.

Figure 8: Buzzer Circuit

17
3.4.2 Software Requirements:
Arduino IDE:

The different tasks that an Arduino IDE can performs are:

Arduino IDE has its own

• Sketch Editing Tools


• Libraries
• Serial Monitor
• Programmer Functions
• Burn Bootloader
• Sketches Management
• Sharing
• Auto Format
• User Preferences
• Fix Encoding & Reload
• Board Selection & Management
• Project Documentation
• Sketch Archive
• Port Menu
• Sketchbook
• Sketches Management

18
Figure 9:Arduino IDE

3.5 Preliminary Product Description:

3.5.1 Requirements:
Project requirements are tasks that must be completed to ensure the successful completion of
the project.
These requirements provide a clear picture of the work that needs to be done and how the
project will be looking after completion as per the requirement.
The requirement for this project are: Arduino Uno ,MQ-2 Gas sensor, buzzer, GSM Sim
Module, connecting wires. For doing programming we need Arduino IDE.

19
3.5.2 Objective:
The main aim of this project is to make a good and better quality gas leakage detector that
alarm the user when there is leakage.
In today’s world safety is one of the most important aspectr of our livelihood.
Every house has a gas cylinder or in big buildings there are gas pipelines that we use.
But, we don’t see to what will happen if there is gas leakage, of we should be ready.
This project basically detects the gas and sends the SMS to owner of the house and gas
company and start the buzzer to alert the person that there is gas leakage and gas should be
turned off imediately.

3.6 Conceptual Models:

Flowcharts:
A flowchart is a type of diagram that represents a process of the word that is to be done and
what should be result according to probability.
A flowchart can also be defined as a diagrammatic representation of an algorithm, a step-by-
step approach to solving a task or a systemetic way of doing work.
The flowchart shows the steps as boxes of various kinds, and their order by connecting the
boxes with arrows.
This diagrammatic representation illustrates a solution model to a given problem, flowcharts
are used in analysis, designing, documenting or managing a process or program in various
fields.

20
Figure 10:Flow chart

In the above flow chart we can see that when the gas leakage detector is installed and the user
switch on the detector.
The detector detects the leakage and if there is a leakage of gas then it tsrts the alarm and
send the SMS to the owner and the LPG Gas Company.
But if there is no Leakage of gas then the the detector is remained on it do not switch off and
continously detects the leakage of Gas.
There is a certain amount of Gas ppm in air and if that exceeds the the buzzer starts alarming.

21
Use Case Diagram:
Gas Leakage detector is a detecting system which checks whether there is leakage or not.
If there is a gas leakage then it sends SMS to LPG company and Owner of the house.
In this case the Gas leakage detector nad LPG ciompany are Systems and the owner of house
is actor and leaking of Gas is one of the case.
The collaboration in it is the alarm buzzer.

Figure 11:Use Case Diagram

Algorithm of how the Gas Leakage Detector Works:


➔ Installing the Gas Leakage Detector.
➔ Switch on the Detector.
➔ If the gas leak happens then switch on the buzzer and send an SMS to L{G gas
company.
➔ Else continue the detection don’t switch off the gas sensor.

22
4. SYSTEM DESIGN
4.1 Basic Models
Circuit Diagram
A circuit diagram which can also be called as an electrical diagram or an elementary diagram
or an electronic schematic diagram, is a graphical representation of an electronic circuit.

A pictorial circuit diagram uses simple images of components, while a schematic


diagram shows the components and interconnections of the circuit using standardized
symbolic representations.

The presentation of the interconnections between circuit components in the schematic


diagram does not necessarily correspond to the physical arrangements in the finished device.

Interfacing Arduino with buzzer:

Figure 12:Arduino and buzzer connection

The circuit diagram shows the connection between the Arduino and buzzer.

A piezoelectric element may be driven by an oscillating electronic circuit or other audio


signal source, driven with a piezoelectric audio amplifier. In this project it is used to alert the
people that there is leakage of gas in the house, industry.

It will act as an alert for the surroundings and the people need to act fast as this may cause a
big problem.This will however help to reduce loss of human life.It works as output device.

23
Interfacing Arduino with GSM Sim Module:

Figure 13:Arduino and GSM SIM Module Connection

This is done for sending some important message or a call to the person when there is
emergency.

In this project the SMS is send to the owner of the house and the LPG Company about the
gas leakage .

This is done so that the person may know that there is leakage and Action can be taken as fast
as possible.

It works as an output device .

24
Interfacing Arduino with MQ-2 Gas Sensor

Figure 14:Arduino and MQ-2 Gas sensor


This sensor detects the different types of gasses like methane, propane, butane, CO, Alcohol,
LPG as well as smoke.

In this project it is used to detect the leakage of LPG gas .

It works as a input device in this project.

This whole interfacing and circiut connection works on code .

Coding is done by Arduino IDE ,it is easy as it uses C and C++ languages.

25
4.2 Security
If the device is not set properly then there are chances that it may not detect the Leakage
properly.

One of main thing to check is to see that there sholud not be any kind of leakage in the gas
pipeline and the joints should be tight properly.

The device should be place in such a place from where it can detect the leakage as well as it
should get proper network to send the messages.

The device should not contain any such equipment that may cause sparks .

It should be made by taking all the precautionary measures so that the leakage may not cause
any problem to humans as well as property.

4.3 Test Cases

Possibilities Output

If gas leaks and the detector detects the Then it will send message to owner and LPG
leakage. Gas Company and starts the alarm.

If gas is leaking and the detector is unable to It may cause big accident.
detect.

The gas detector may get damage due to It may not be able to detect the leakage
some reasons. properly.

26
References and Biblography

Websites:
• https://www.lucidcharts. Com
• https://en.wikipedia.org/wiki/Arduino
• https://en.wikipedia.org/wiki/Raspberry_Pi
• http://wiki.seeedstudio.com/Grove-Gas_Sensor-MQ2/
• https://en.wikipedia.org/wiki/Gantt_chart
• https://en.wikipedia.org/wiki/Flowchart
• https://en.wikipedia.org/wiki/Use_case_diagram
• https://www.arduino.cc/
• https://www.raspberrypi.org

27

You might also like