gas leakage detector

14
7/23/2019 Gas Leakage Detector http://slidepdf.com/reader/full/gas-leakage-detector 1/14  GAS LEAKAGE DETECTOR Gas leakages have become one of the important concerns in our day to day lives. It is necessary to make some system that helps us to identify gas leakages so that necessary action can be taken. Gas leakages have taken a toll on the number of deaths, injuries losses and so on. Thus this project gives a basic idea on have to implement a gas sensor using one of the most commonly used microcontrollers, the Arduino along with the help of labVI!. "abview is one of the most commonly used virtual instrument platform that has seen a growing demand and is of particular instruments to scientists and engineers of the present era. This project will show how to implement a gas sensor with the help of Arduino and labVI!. !e use the G programming of the labVI! along with necessary packages to link the Arduino and labVI!. #irst a brief introduction about Arduino is given and how the Arduino was linked with the labVI!. $e%t we discuss about the the G code and the components that have been used. #inally we discuss about how the entire circuit works&  THE ARDUINO Arduino is an open'source prototyping platform based on easy'to' use hardware and software. Arduino boards are able to read inputs ' light on a sensor, a (nger on a button, or a Twitter message ' and turn it into an output ' activating a motor, turning on an "), publishing something online. *ou can tell your board what to do by sending a set of instructions to the microcontroller on the board. To do so you use the Arduino programming language +based on !iring, and the Arduino -oftware +I) , based on rocessing. /ver the years Arduino has been the brain of thousands of projects, from everyday objects to comple% scienti(c instruments. A worldwide community of makers ' students, hobbyists, artists, programmers, and professionals ' has gathered around this open' source platform, their contributions have added up to an

Upload: sharath-s

Post on 17-Feb-2018

242 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Gas Leakage Detector

7/23/2019 Gas Leakage Detector

http://slidepdf.com/reader/full/gas-leakage-detector 1/14

  GAS LEAKAGE DETECTOR

Gas leakages have become one of the important concerns in our

day to day lives. It is necessary to make some system that helpsus to identify gas leakages so that necessary action can be taken.

Gas leakages have taken a toll on the number of deaths, injuries

losses and so on. Thus this project gives a basic idea on have to

implement a gas sensor using one of the most commonly used

microcontrollers, the Arduino along with the help of labVI!.

"abview is one of the most commonly used virtual instrument

platform that has seen a growing demand and is of particular

instruments to scientists and engineers of the present era. This

project will show how to implement a gas sensor with the help of Arduino and labVI!. !e use the G programming of the labVI!

along with necessary packages to link the Arduino and labVI!.

#irst a brief introduction about Arduino is given and how the

Arduino was linked with the labVI!. $e%t we discuss about the

the G code and the components that have been used. #inally we

discuss about how the entire circuit works&

 THE ARDUINO

Arduino is an open'source prototyping platform based on easy'to'use hardware and software. Arduino boards  are able to readinputs ' light on a sensor, a (nger on a button, or a Twittermessage ' and turn it into an output ' activating a motor, turningon an "), publishing something online. *ou can tell your boardwhat to do by sending a set of instructions to the microcontrolleron the board. To do so you use the Arduino programminglanguage  +based on !iring, and the Arduino -oftware +I),based on rocessing.

/ver the years Arduino has been the brain of thousands of projects, from everyday objects to comple% scienti(c instruments.A worldwide community of makers ' students, hobbyists, artists,programmers, and professionals ' has gathered around this open'source platform, their contributions have added up to an

Page 2: Gas Leakage Detector

7/23/2019 Gas Leakage Detector

http://slidepdf.com/reader/full/gas-leakage-detector 2/14

incredible amount of accessible knowledge that can be of greathelp to novices and e%perts alike.

Arduino was born at the Ivrea Interaction )esign Institute as an

easy tool for fast prototyping, aimed at students without abackground in electronics and programming. As soon as itreached a wider community, the Arduino board started changingto adapt to new needs and challenges, di0erentiating its o0erfrom simple 1'bit boards to products for IoT applications,wearable, 2) printing, and embedded environments. All Arduinoboards are completely open'source, empowering users to buildthem independently and eventually adapt them to their particularneeds. The software, too, is open'source, and it is growingthrough the contributions of users worldwide.

Why Arduino?

 Thanks to its simple and accessible user e%perience, Arduino hasbeen used in thousands of di0erent projects and applications. TheArduino software is easy'to'use for beginners, yet 3e%ible enoughfor advanced users. It runs on 4ac, !indows, and "inu%. Teachersand students use it to build low cost scienti(c instruments, to

prove chemistry and physics principles, or to get started withprogramming and robotics. )esigners and architects buildinteractive prototypes, musicians and artists use it forinstallations and to e%periment with new musical instruments.4akers, of course, use it to build many of the projects e%hibited atthe 4aker #aire, for e%ample. Arduino is a key tool to learn newthings. Anyone ' children, hobbyists, artists, programmers ' canstart tinkering just following the step by step instructions of a kit,or sharing ideas online with other members of the Arduinocommunity.

 There are many other microcontrollers and microcontrollerplatforms available for physical computing. aralla% 5asic -tamp,$etmedia6s 57'89, hidgets, 4IT6s :andyboard, and many otherso0er similar functionality. All of these tools take the messy detailsof microcontroller programming and wrap it up in an easy'to'use

Page 3: Gas Leakage Detector

7/23/2019 Gas Leakage Detector

http://slidepdf.com/reader/full/gas-leakage-detector 3/14

package. Arduino also simpli(es the process of working withmicrocontrollers, but it o0ers some advantage for teachers,students, and interested amateurs over other systems;

Ine%pensive ' Arduino boards are relatively ine%pensivecompared to other microcontroller platforms. The leaste%pensive version of the Arduino module can be assembledby hand, and even the pre'assembled Arduino modules costless than <=>

• ?ross'platform ' The Arduino -oftware +I) runs on

!indows, 4acintosh /-7, and "inu% operating systems. 4ostmicrocontroller systems are limited to !indows.

• -imple, clear programming environment ' The Arduino-oftware +I) is easy'to'use for beginners, yet 3e%ibleenough for advanced users to take advantage of as well. #orteachers, it6s conveniently based on the rocessingprogramming environment, so students learning to programin that environment will be familiar with how the Arduino I)works.

• /pen source and e%tensible software ' The Arduino software

is published as open source tools, available for e%tension bye%perienced programmers. The language can be e%pandedthrough ?@@ libraries, and people wanting to understand thetechnical details can make the leap from Arduino to the AV? programming language on which it6s based. -imilarly, youcan add AV'? code directly into your Arduino programs if you want to.

• /pen source and e%tensible hardware ' The plans of the

Arduino boards are published under a ?reative ?ommonslicense, so e%perienced circuit designers can make their ownversion of the module, e%tending it and improving it. venrelatively ine%perienced users can build the breadboardversion of the module in order to understand how it worksand save money. :ere in particular we have

Page 4: Gas Leakage Detector

7/23/2019 Gas Leakage Detector

http://slidepdf.com/reader/full/gas-leakage-detector 4/14

used the Arduino 4GA 8=B>.!e have discussed a fewdetails about the Arduino 4GA 8=B>.

Arduino MEGA 2560

 The 4GA 8=B> is designed for more comple% projects. !ith=9 digital IC/ pins, DB analog inputs and a larger space foryour sketch it is the recommended board for 2) printers androbotics projects. This gives your projects plenty of room andopportunity.

ach of the =9 digital pins on the 4ega can be used as an input oroutput, using pin4ode+, digital!rite+, and digitalead+functions. They operate at = volts. ach pin can provide or receivea ma%imum of 9> mA and has aninternal pull'up resistor +disconnected by default of 8>'=>k/hms. In addition, some pins have specialiEed functions;

Sri!"# > +7 and D +T7F -erial D; D +7 and D1 +T7F -erial 8;DH +7 and DB +T7F -erial 2; D= +7 and D9 +T7. sed to receive+7 and transmit +T7 TT" serial data. ins > and D are alsoconnected to the corresponding pins of the ATmega18 -5'to'

 TT" -erial chip .

E$%rn!" In%rru&%'# 8 +interrupt >, 2 +interrupt D, D1 +interrupt=, D +interrupt 9, 8> +interrupt 2, and 8D +interrupt 8. Thesepins can be con(gured to trigger an interrupt on a low value, arising or falling edge, or a change in value. -ee theattachInterrupt+ function for details.

Page 5: Gas Leakage Detector

7/23/2019 Gas Leakage Detector

http://slidepdf.com/reader/full/gas-leakage-detector 5/14

(WM# > to D2. rovide 1'bit !4 output with the analog!rite+function.

S(I# => +4I-/, =D +4/-I, =8 +-?J, =2 +--. These pins support-I communication, which, although provided by the underlyinghardware, is not currently included in the Arduino language. The-I pins are also broken out on the I?- header, which isphysically compatible with the )uemilanove and )iecimila.

LED# D2. There is a built'in ") connected to digital pin D2. !henthe pin is :IG: value, the ") is on, when the pin is "/!, it6s o0.I8?; 8> +-)A and 8D +-?". -upport I8? +T!I communicationusing the !ire library +documentation on the !iring website.

$ote that these pins are not in the same location as the I8? pinson the )uemilanove. The 4ega8=B> has DB analog inputs, each of which provide D> bits of resolution +i.e. D>89 di0erent values. 5ydefault they measure from ground to = volts, though is it possibleto change the upper end of their range using the A# pin andanalogeference+ function.There are a couple of other pins onthe board;

ARE)#  eference voltage for the analog inputs. sed with

analogeference+.

R'%# 5ring this line "/! to reset the microcontroller. Typicallyused to add a reset button to shields which block the one on theboard.

 The Arduino 4ega8=B> has a number of facilities forcommunicating with a computer, another Arduino, or othermicrocontrollers. The ATmega8=B> provides four hardware ATsfor TT" +=V serial communication. An ATmega18 on the boardchannels one of these over -5 and provides a virtual com port tosoftware on the computer +!indows machines will need a .inf (le,but /-7 and "inu% machines will recogniEe the board as a ?/4port automatically. The Arduino software includes a serial monitorwhich allows simple te%tual data to be sent to and from the board.

 The 7 and T7 ")s on the board will 3ash when data is beingtransmitted via the ATmega18 chip and -5 connection to the

Page 6: Gas Leakage Detector

7/23/2019 Gas Leakage Detector

http://slidepdf.com/reader/full/gas-leakage-detector 6/14

computer +but not for serial communication on pins > and D. A-oftware-erial library allows for serial communication on any of the 4ega6s digital pins. The ATmega8=B> also supports I8? +T!Iand -I communication. The Arduino software includes a !ire

library to simplify use of the I8? busF see the documentation onthe !iring website for details. To use the -I communication,please see the ATmega8=B> datasheet.

Ho* %o in%r+!, Arduino *i%h LA-.IEW??

 The Arduino can be interfaced with the labVI! using $I'VI-A and"I$7. The $I'VI-A and "I$7 packages and drivers have to bedownloaded and installed to interface the Arduino with labVI!.

 The Arduino can be programmed using the Arduino cc software asper the reKuirement with the help of Arduino codes.$I'VI-A The Virtual Instrument -oftware Architecture +VI-A is astandard for con(guring, programming, and troubleshootinginstrumentation systems comprising GI5, V7I, 7I, -erial,thernet, andCor -5 interfaces. VI-A provides the programminginterface between the hardware and development environmentssuch as "abVI!, "ab!indowsC?VI, and 4easurement -tudio for4icrosoft Visual -tudio. $I'VI-A is the $ational Instruments

implementation of the VI-A IC/ standard. $I'VI-A includessoftware libraries, interactive utilities such as $I IC/ Trace and theVI-A Interactive ?ontrol, and con(guration programs through4easurement L Automation %plorer for all your developmentneeds. $I'VI-A is standard across the $ational Instrumentsproduct line. !ith $I'VI-A, you can feel con(dent that yoursoftware development will not become obsolete as yourinstrumentation interface hardware needs evolve into the future.

A typical VI-A application would go through the following steps.

D. /pen a -ession to a given esource.8. )o any con(guration on the given resource +setting baudrates, termination character, etc....2. erform writes and reads to the device.

Page 7: Gas Leakage Detector

7/23/2019 Gas Leakage Detector

http://slidepdf.com/reader/full/gas-leakage-detector 7/14

9. ?lose the -ession to the esource.=. :andle any errors that may have occurred.

 The following is a "abVI! application that opens a session to a

GI5 Instrument, performs a write of MNI)$OPnM and then Kueriesthe device for its response.

 This e%act same format would be used in a te%t based languagelike ?@@ or 5asic. *ou would also follow this e%act same format if 

the instrument was -erial, -5, thernet, I'D29, or any of theother buses VI-A supports. All you would have to change is theInstrument )escriptor connected to the VI-A /pen. This codewould run on any operating system that supports "abVI! and $I'VI-A.

LIN/ y L!.IEW M!1rHu

 The "I$7 by "abVI! 4aker:ub makes it easy to interface with

common embedded platforms such as chipJIT, Arduino, and $ImyI/ as well as common sensors including accelerometers,temperature sensors, and ultrasonic distance sensors.

!ith this toolkit and $I "abVI! software, you can control oracKuire data from common embedded platforms. /nce theinformation is in "abVI!, you can analyEe it using the hundredsof built'in "abVI! libraries, develop algorithms to controlsupported hardware, and present your (ndings on a polished I.

"I$7 provides (rmware for common embedded platforms thatacts as an IC/ engine and interfaces with "abVI! VIs through aserial, -5, wireless, or thernet connection. This helps youKuickly move information from an embedded device such as achipJIT to "abVI! without adjusting the communication,synchroniEation, or even a single line of ? code. sing the

Page 8: Gas Leakage Detector

7/23/2019 Gas Leakage Detector

http://slidepdf.com/reader/full/gas-leakage-detector 8/14

common /pen, eadC!rite, ?lose convention in "abVI!, you canaccess the digital, analog, !4, I8?, and -I signals of manycommon embedded platforms or use higher level VIs to directlycontrol sensors and actuators. "I$7 is open source so you can dig

in and see how "I$7 works, or even contribute to the "I$7project.

-o we have seen how the Arduino can be linked with"abVI!.$e%t we will move onto the G code that has been used toimplement the gas sensor.5efore that a brief introduction aboutthe 4Q'B gas sensor is given&

THE M36 GAS SENSOR 

4Q'B gas sensor modules are used in gas leakage detectingeKuipments in family and industry, are suitable for detecting of "G, iso'butane, propane, "$G, avoid the noise of alcohol andcooking fumes and cigarette smoke.

)!%ur' #

• :igh sensitivity to ?:9,$atural gas

• -mall sensitivity to alcohol, smoke

• #ast response

• -table and long life• -imple drive circuit

  The 4Q'B sensor is shown below along withits con(guration.

Page 9: Gas Leakage Detector

7/23/2019 Gas Leakage Detector

http://slidepdf.com/reader/full/gas-leakage-detector 9/14

Ho* %o ,onn,% %h Arduino *i%h 4!' 'n'or????

 The circuit connection for connecting the Arduino with the gas

sensor is shown below.The analog input pin of the gas sensor can

be connected to any one of the analog pins of the

Arduino.?orrespondingly the Arduino code has to be changed for

using di0erent analog pins of the Arduino.

Page 10: Gas Leakage Detector

7/23/2019 Gas Leakage Detector

http://slidepdf.com/reader/full/gas-leakage-detector 10/14

 Th G ,od u'd

 The G code that has been used here is shown below.#irst the

front panel is shown below. "ater the block diagram is

shown.

THE )RONT (ANEL

Page 11: Gas Leakage Detector

7/23/2019 Gas Leakage Detector

http://slidepdf.com/reader/full/gas-leakage-detector 11/14

 The front panel consists of input and output controls and

indicators.This front panel consists of features like -erial ort,

Interface, latform and Analog ?hannel to interface with the

Arduino.

• -erial port is the port of the computer to which Arduino is

connected .

• latform tells us which software we are using to connect the

Arduino to labview.

•  The pin from which we are getting analog values is

determined by the analog channel.

• "ed indicates whether there is "G gas leakage or not.

•  The waveform graph gives the voltage across the mK B gas

sensor at various instant of time.

THE -LOCK DIAGRAM

Page 12: Gas Leakage Detector

7/23/2019 Gas Leakage Detector

http://slidepdf.com/reader/full/gas-leakage-detector 12/14

5lock diagram is the place where actual processing of data takes

place.

!e have used 4akerhub "in% driver to interface with the Arduino

4ega 8=B>. sing "in%, certain parameters are initialiEed. They

include setting up of -erial port, latform of the software and the

interface. Analog values from the gas sensor are read from the

Analog pin of the Arduino 4ega. To set this up, RAnalog eadS

function is used and the analog pin number of the Arduino is

initialiEed. -ince, Analog values from the gas sensor are to be

read, Analog ead function is inserted inside R#orS loop running RnS

times. The Analog values are compared with the threshold voltage

reKuired for the "ed and beep to trigger. If the condition is RTrueS,

"ed and 5eep starts working until the condition becomes R#alseS.

!aveform Graph is used to plot the voltage change with respect

to time. The code is terminated by the "in% tool.Ho* %o ,o&"% %h ,ir,ui% ?

 The circuit can be completed by connecting the Arduino to the

gas sensor as shown above and connecting the Arduino to the

-5 port of the ? or the laptop. The above shown could be run

and the gas sensor senses any gas leakages and if a gas leakage

Page 13: Gas Leakage Detector

7/23/2019 Gas Leakage Detector

http://slidepdf.com/reader/full/gas-leakage-detector 13/14

is detected, then the ") glows and a beep tone is produced

alerting the user of a gas leakage.

  A&&"i,!%ion'#

D. rotection from any gas leakage in cars.8. #or safety from gas leakage in heating gas (red appliances

like boilers, domestic water heaters

2. #or safety from gas leakage in ?ooking gas (red appliances

like ovens, stoves etc

9. "arge industries which uses gas as their production.

=. They are used in gas leakage detecting eKuipments in

family, ?ar and industry, are suitable for detecting of "G,

iso'butane, propane, "$G, avoid the noise of alcohol and

cooking fumes and cigarette smoke.

Ad!n%!4'#

D. #ast response

8. !ide detection range

2. -table performance and long life

9. -imple drive circuit

=. The sensor has e%cellent sensitivity combined with a Kuick

response time.

Di'!d!n%!4'#

D. If this system is used in a place where there is smoke, then

the sensor is not that much e0ective.

8. Its sensitivity depends on :umidity and temperature.

Page 14: Gas Leakage Detector

7/23/2019 Gas Leakage Detector

http://slidepdf.com/reader/full/gas-leakage-detector 14/14

CONCLUSION#

 The gas sensor was successfully designed with the help of the

"abVI! software and the Arduino. It is found to be a more

ecient system. The program that was used here is indeed

simple and hence such systems can be used where such needis reKuired. The use of Arduino has also indeed made the

software made much more simpler. The gas sensor used here

that is the 4Q'B, is also cheap and also stable and can be used

in the gas detection system. It is able to work signi(cantly well

in di0erent conditions and is also stable. The use of such

systems can signi(cantly reduce accidents due to gas leakages

and alert the user of gas leakages so that he can necessary

action.