82
WIRELESS GAS MONITORING SYSTEM OF GAS DETECTOR ZULAIKA BINTI HAMDON UNIVERSITI TEKNOLOGI MALAYSIA

MQ3 Theory

Embed Size (px)

Citation preview

Page 1: MQ3 Theory

WIRELESS GAS MONITORING SYSTEM OF

GAS DETECTOR

ZULAIKA BINTI HAMDON

UNIVERSITI TEKNOLOGI MALAYSIA

Page 2: MQ3 Theory

UNIVERSITI TEKNOLOGI MALAYSIA

DECLARATION OF THESIS / UNDERGRADUATE PROJECT PAPER AND COPYRIGHT

Author’s full name : ZULAIKA BINTI HAMDON

Date of birth : 20 JULAI 1989

Title : WIRELESS GAS MONITORING SYSTEM OF GAS DETECTOR

Academic Session: 2010/2011

I declare that this thesis is classified as:

CONFIDENTIAL (Contains confidential information under the

Official Secret Act 1972)*

RESTRICTED (Contains restricted information as specified by

the organization where research was done)*

OPEN ACCESS I agree that my thesis to be published as online

open access (full text)

I acknowledged that Universiti Teknologi Malaysia reserves the right as follows:

1. The thesis is the property of Universiti Teknologi Malaysia.

2. The Library of Universiti Teknologi Malaysia has the right to make copies for the

purpose of research only.

3. The Library has the right to make copies of the thesis for academic exchange.

Certified by:

SIGNATURE SIGNATURE OF SUPERVISOR

890720-06-5310 MRS. NORHAFIZAH RAMLI

(NEW IC NO. /PASSPORT NO.) NAME OF SUPERVISOR

Date: 6th JULY 2012 Date: 6th JULY 2012

NOTES :*If the thesis is CONFIDENTAL or RESTRICTED, please attach with the letter from

the organization with period and reasons for confidentiality or restriction

PSZ 19:16 (Pind. 1/07)

Page 3: MQ3 Theory

“I hereby declare that I have read this thesis and in my

opinion this thesis is sufficient in terms of scope and quality for the

award of the degree of Bachelor of Engineering (Electrical – Medical Electronics)”

Signature : ………………………………………...

Name : MRS. NORHAFIZAH BINTI RAMLI

Date : 6th

JULY 2012

Page 4: MQ3 Theory

i

WIRELESS GAS MONITORING SYSTEM OF

GAS DETECTOR

ZULAIKA BINTI HAMDON

A report submitted in partial fulfillment

of the requirements for the award of the degree of

Bachelor of Engineering (Electrical – Medical Electronics)

Faculty of Electrical Engineering

UNIVERSITI TEKNOLOGI MALAYSIA

JUNE 2012

Page 5: MQ3 Theory

ii

I declare that this thesis entitled “WIRELESS GAS MONITORING SYSTEM OF

GAS DETECTOR” is the result of my own research except as cited in the

references. The thesis has not been accepted for any degree and is not concurrently

submitted in candidature of any other degree.

Signature : ....................................................

Name : ....................................................

Date : ...................................................

ZULAIKA BINTI HAMDON

27 JUNE 2012

Page 6: MQ3 Theory

iii

To my beloved

parents

Hamdon bin Kahar and Faridah bt Ab. Kadir

siblings,

Siti Norfazlin, Siti Norazelah, Farrahana, Syamimi Waznah, Nabihah and Iskandar Fitri

Dedicated in thankful appreciation for your supporting, encouragement and best wishes.

Page 7: MQ3 Theory

iv

ACKNOWLEDGEMENT

In preparing this thesis, I dealt with many people and they have a great

contribution towards my understanding and thoughts.

First and foremost, I would like to acknowledge and extend my gratitude to my

main supervisor, Puan Norhafizah Ramli, for the encouragement, guidance and

enthusiasm given throughout the completion of this project. In particular, I also wish to

express my sincere appreciation to, Dr. Fauzan Khairi Che Harun who is willing to

spend his precious time to give some ideas and suggestion towards this project. This

thesis would not have been the same as presented here without continued support and

interest from them.

My appreciation also goes to my family who has been so tolerant and supports

me all these years. Thanks for their encouragement, love and emotional supports that

they had given to me.

Furthermore, my great appreciation dedicated to my SEP members batch 2007

and those who involve directly or indirectly with this project. Their views, tips, support,

and assistance in various conditions are useful indeed.

Page 8: MQ3 Theory

v

ABSTRACT

The purpose of this project is to develop data monitoring system of alarm system

for gas detector. The gas sensor used in this project is MQ3 and MQ9 which are detect

the present of alcohol and Liquefied Petroleum Gas (LPG). These sensors will detect the

concentration of the gas according the voltage output of the sensor. To make the sensors

operate in the alarm system and data monitoring system, Arduino Uno was used as the

microcontroller for the whole system. The circuit also includes LEDs, buzzer, exhaust

fan and Zigbee. Zigbee will send the data reading from gas sensor to data monitoring

system that display on LABVIEW by wireless. A graphical user interface (GUI) was

created using LABVIEW for end user monitoring purpose.

Page 9: MQ3 Theory

vi

ABSTRAK

Tujuan projek ini adalah untuk membangunkan sistem pemantauan data sistem

penggera untuk pengesan gas. Sensor gas yang digunakan dalam projek ini adalah MQ3

dan MQ9 yang akan mengesan kehadiran gas alkohol dan Gas Petroleum Cecair (LPG).

Sensor ini juga akan mengesan kepekatan gas mengikut output voltan sensor yang

ditunjukkan. Untuk membuat sensor beroperasi dalam sistem penggera dan data sistem

pemantauan, Arduino Uno yang bertindak sebagai mikropengawal bagi seluruh sistem

digunakan dan disambungkan bersama-sama sensor gas dan juga sistem penggera. Litar

ini juga termasuk LED, buzzer, kipas ekzos dan ZigBee. ZigBee akan menghantar data

dari sensor gas kepada sistem pemantauan data paparan pada LabVIEW secara tidak

berwayar. Antara muka pengguna grafik (GUI) telah dicipta menggunakan LabView

untuk tujuan pemantauan pengguna akhir.

Page 10: MQ3 Theory

vii

TABLE OF CONTENTS

CHAPTER TITLE PAGE

TITLE PAGE i

DECLARATION OF THESIS ii

DEDICATION iii

ACKNOWLEDGEMENT iv

ABSTRACT v

ABSTRAK vi

TABLE OF CONTENTS vii

LIST OF TABLES x

LIST OF FIGURES xi

LIST OF SYMBOLS xiv

LIST OF APPENDICES xvi

1 INTRODUCTION

1.1 Background 1

1.2 Problem Statement 2

1.3 Objectives 3

1.4 Scope of the Project 3

1.5 Thesis Outlines 5

2 LITERATURE REVIEW

Page 11: MQ3 Theory

viii

2.1 Introduction 6

2.2 The Hazardous Gas 10

2.3 Sensor and Instrumentation 10

2.3.1 Gas Sensor Working Principle 11

2.3.2 Zigbee 12

2.4 Programming Tools 13

2.4.1 LABVIEW 13

2.4.2 Arduino 14

2.5 Indicator 15

2.5.1 Buzzer 16

2.5.2 LED 17

2.5.3 Exhaust Fan 18

3 METHODOLOGY

3.1 Introduction 19

3.2 Hardware Implementation 23

3.2.1 Gas Sensor Circuit 23

3.2.2 Output circuit 25

3.2.3 PCB devolopment 28

3.3 Software Implementation 29

3.3.1 Gas Concentration Calculation 29

3.3.2 Arduino Programming 35

3.3.3 Zigbee Programmimg 40

3.3.4 LABVIEW 43

4 RESULT AND DISCUSSION

4.1 Introduction 50

4.2 Project Description 50

4.3 Project Result 51

5 CONCLUSION AND RECOMMENDATION

Page 12: MQ3 Theory

ix

5.1 Introduction 56

5.2 Conclusion 56

5.3 Recommendation 57

REFERENCES 58

APPENDICES 60

Page 13: MQ3 Theory

x

LIST OF TABLES

TABLE NO. TITLE PAGE

3.1 Threshold Value for Gas Concentration MQ3

and MQ9

26

3.2 Gas Sensor input and output voltage range 29

3.3 Threshold Value for MQ9 and MQ3 34

Page 14: MQ3 Theory

xi

LIST OF FIGURES

FIGURE NO. TITLE PAGE

2.1 The overall system of Carbon Monoxide

Detection and Autonomous Countermeasure

System for a mill use Wireless sensor and

Actuator Network

7

2.2 Design of the sensor location 8

2.3 Result of the gas concentration based on the

sensor replacement

9

2.6 Gas sensor working principle 11

2.7 Zigbee module 12

2.8 LabVIEW icon image 13

2.9 Arduino board 15

2.10 Buzzer model 16

2.11 LEDs images 17

2.12 Exhaust Fan Images 18

Page 15: MQ3 Theory

xii

3.1 Methodology of the Project 20

3.2 Block Circuit Diagram 21

3.3 Experiment Diagram of the Project 22

3.4 Circuit Diagram for Gas Detector 22

3.5 MQ3 and MQ6 image 23

3.6 Gas Sensor Circuit Diagram 24

3.7 The Gas Sensor Connection to Arduino Pins. 25

3.8 Output Circuit Diagram 26

3.9 Relay Connection Circuit Diagram 27

3.10 Zigbee Output Connection Circuit 28

3.11 Voltage Output of Gas Sensor Versus

Reading of Bits in Arduino.

30

3.12 Resistance Ratio versus Concentration Gas

for MQ9

32

3.13 Flow chart for the Arduino Programming for

MQ9

36

3.14 Arduino input and output port initialization 37

3.15 Declaration of the pin 38

3.16 Programming process in Arduino 40

3.17 Zigbee receiver Connection to USB Port 40

3.18 Test the COM Of Each Zigbee 41

Page 16: MQ3 Theory

xiii

3.19 Result Output for Com Test 40

3.20 Setting the Programming 1 42

3.21 Setting the Programming 2 42

3.22 Test The Connection of Both Zigbee. 43

3.23 Visa Interfacing Block Diagram 44

3.24 Visa Read Output 44

3.25 Converter Process 45

3.25 Web Publishing Tools LABVIEW 46

3.27 Step 1 47

3.28 Step 2 48

3.29 Step 3 49

4.1 Alarm indicator of the project 51

4.2 Overall Project Configuration 52

4.3 Monitoring System for MQ9 53

4.4 Monitoring System for MQ3 53

4.5 System Monitoring in Internet Server 54

4.6 Packaging of the project 55

Page 17: MQ3 Theory

xiv

LIST OF SYMBOLS

CO - Carbon Monoxide

LPG - Liquefied Petroleum Gas

CO2 - Carbon Dioxide

CH4 - Ammonia

GSM - Global System For Mobile Communications

LED - Light Emitting Diode

GUI - Graphical User Interface

WSN - Wireless Sensor Network

PIR - Pyroelectric Infrared

LCD - Liquid Crystal Display

OSHA - Occupational Safety And Health Administration

SNO2 - Tin Oxide

V - Voltage Value (Volt)

I - Current In The Circuit (A)

Page 18: MQ3 Theory

xv

R - Resistance (Ohm)

RF - Radio Frequency

Vo - Output Voltage (Volt)

PPM - Parts Per Million

Page 19: MQ3 Theory

xvi

LIST OF APPENDICES

APPENDIX TITLE PAGE

1 Block diagram for MQ6 in LABVIEW 63

2 Block diagram for MQ3 in LABVIEW 64

3 Arduino programming for MQ3 65

4 Arduino programming for MQ6

66

Page 20: MQ3 Theory

1

CHAPTER 1

INTRODUCTION

1.1 Background

In human‟s daily life, environment gives the most significant impact to their

health issues. Therefore, environment and industry air quality issues are critically

discussed to increase the awareness and responsibility regarding the threat on the

environment towards public and workers health. Most of the dangerous gas such as

carbon monoxide (CO), refrigerant gas and liquefied petroleum gas (LPG) are colorless

and odorless compound that are produced by incomplete combustion. Therefore, gas

detector device is needed in order to inform the safety situation continuously.

Carbon monoxide (CO), often referred to as a "silent killer" is an injurious gas

and its prolonged exposure to living beings can lead to brain damage and even death.

The harmfulness of CO is dependent on both, the concentration of the gas and the

exposure time. Thus, a small concentration of the CO when exposed for a long period of

time can be fatal just like a large concentration of the CO for a small period of time.

Fires are the most common source of CO [1]. In smaller quantities (e.g. 100 ppm) it

may cause a headache and dizziness after a couple of hours of exposure. Higher

concentrations (example 3200 ppm) may causes headaches and dizziness after 5–10

Page 21: MQ3 Theory

2

min, and death within 30 min. Very high concentrations (e.g. 12800 ppm) causes

unconsciousness after a couple of breaths, followed by death in less than 3 min. [2] The

indoor dangerous sources are the leak source of CO, CO2 and CH4, which may be gas

tank or the fire site. The essential component of coal gas or nature gas is CO or alkanes

gas. The burning of chemical materials or decorative materials will emanate CO, CO2

and alkanes gas. The danger of these gases arising is from two aspects, one is the

toxicity of these gases themselves, the other side is that the accumulation of these gases

will easy be ignited. The position of gas tank or pipeline is usually fixed, so it is easy to

inspect, yet the fire site is random, and it will be difficult for inspection. [3] The danger

of the CO gas is the same as the LPG and others dangerous gas in the environment.

Gas detector is a gas detecting device. It only can detect if there is a gas leakage

or the leaking concentration. Meanwhile, the monitoring system is a system that is used

for displaying how much concentration of gas is in that place but viewing take place in

another remote computer, GSM networking or internet server. Therefore, monitoring

system give the advantages to users such that they can monitor the situation of the room

or the place where leakage occurrence may happened at safe distance continuously. .

1.2 Problem Statements

There are so many health issues related to dangerous gas in industrial area. Thus,

the atmosphere of a workplace should be regularly monitored and controlled in order to

maintain clean air environment. However, efforts in industrial air quality control have

been impeded by the lack of science-based approaches to identify and assess atmosphere

air quality and level of dangerous gas.

Page 22: MQ3 Theory

3

As a solution for the problem, a monitoring system of gas detector by wireless

system needs to be developed in order to solve the problem. By monitoring system

wirelessly, user can remotely view the condition of the room or office without them

being there themselves.

1.3 Objectives of Project

The objectives of this project are:

i. To analyze gas sensor in detecting the LPG and alcohol gas based on the

two gas sensor.

ii. To design gas control system that shows the indicator alarm to the user.

iii. To develop a system that can automate monitoring using LABVIEW.

1.4 Scopes of Project

This project are divided into software programming and hardware. For the

hardware, it can be categorized into four systems:

i. The sensing system

ii. Arduino Uno Board

iii. Output system

Page 23: MQ3 Theory

4

iv. Zigbee

Arduino Uno is a device that acts similarly to a microcontroller unit. In this

project, Arduino is the perfect microcontroller due to its high performance and special

features. The Arduino Uno is an open-source electronic prototyping platform based on

flexible, easy-to-use hardware and software. Further explanation on this unit is discussed

in chapter 2 and 3. The sensing circuit system consists of Liquefied Petroleum Gas

(LPG) sensor, MQ 6 and alcohol gas sensor, MQ 3. These sensors are used to detect the

presence of specified gas in the surroundings area. The output system consists of LEDs,

buzzer and exhaust fan. Zigbee or xbee will transfer sensor data read from Arduino port

to a computer in a wireless connection.

The software design are divided into three parts that are:

i. Arduino programming

ii. Zigbee programming

iii. LABVIEW design

Arduino software is used to write the programming for the Arduino board

microcontroller. On the other hand, X-CTU is used to program zigbee in order for the

data to be transferred. Meanwhile, the LABVIEW Graphical User Interface (GUI) is

used to monitor the level of gas concentration.

Page 24: MQ3 Theory

5

1.5 Thesis Outlines

There are five chapters in this thesis which are introduction, literature review,

methodology, result and discussion and finally conclusion and recommendation. Each

chapter will discuss its own aspects related to the project.

Chapter one is the introduction for the project. Problem statement, object and

scope of the project along with the summary of works have been discussed in this

chapter. Then, chapter two discusses more on the theory and literature reviews that has

been done before by another person or group. Besides that, this chapter also discusses

the type of Arduino used for the project, the sensor chosen, and also the software involve

in programming the zigbee and Arduino.

Chapter 3 focuses on the methodology and approaches on the project. This

includes the software implementation and hardware development of the project. Results

and discussion are presented in chapter four. Lastly, chapter five is the conclusion for

the whole project. Some future suggestions such as a functional addition and hardware

improvement the project are also mentioned.

Page 25: MQ3 Theory

6

CHAPTER 2

LITERATURE REVIEW

2.1 Introduction

This chapter will discuss in details on the components and instruments used for

this project in general. Besides that, there are couple more of past related project or

paper work that is related to this project.

A related project of detecting of gas detector is project paper by titled “Carbon

Monoxide Detection and Autonomous Countermeasure System for a mill use Wireless

sensor and Actuator Network” by University of Engineering and Technology from

Peshawar, Pakistan [4]. The central controller is a high-end PC is connected to the

TelosB wireless sensor module via USB and to the actuator circuit via RS232.. The CO

sensor module is connected to a TelosB node and interface with zigbee wireless

connectivity to the central controller. The CO concentration was recorded and

transferred to a central computer.

Page 26: MQ3 Theory

7

Figure 2.1: The overall system of Carbon Monoxide Detection and Autonomous

Countermeasure System for a mill use Wireless sensor and Actuator Network [4]

Figure 2.1 show the overall system for the project[4]. The main system is the

computer which is called as the base station. This is because, the computer will receive

the signal from the sensor by TelosB, then send the command to the alarm system and

internet server. Actuator will control siren and exhaust fan as the alarm system for the

gas detector. In the final result, when the CO concentration crosses the threshold value

Page 27: MQ3 Theory

8

(which is 300ppm), the actuator circuit comes into action and the siren and exhaust fan

are autonomously turned on through relay[].

Besides that, there is another related paper “Design, Characterization and

Management of a wireless sensor Network for Smart Gas monitoring” by Faculty of

Electrical Engineering and Computing, University of Zagreb, Croatia[5]. The system

represent with energy management that involves three levels which are sensor level,

node level and lastly network level. The sensor board is designed with a wireless sensor

network (WSN) node that can autonomously send the recorded data by wireless [5]. The

sensor board also contains with two modalities which are gas sensor and Pyroelectric

Infrared (PIR) sensor. The network is multimodal that used information from the PIR

sensor and neighbor nodes to detect the present of gas concentration and modulate the

duty cycle of the node. Figure 2.2 below shows the design of the location of sensor

placed in a different room.

Figure 2.2: Design of the sensor location [5]

Page 28: MQ3 Theory

9

Figure 2.3: Result of the gas concentration based on the sensor replacement [5]

Figure 2.3 above shows the result of the system operation. The concentrations of

CO are depending on the time of sensor senses the gasses. Between 1300 and 1400,

kitchen room gave the highest reading of CO concentration from the analysis of the

graph. Meanwhile, bedroom with door closed mostly detect zero percent of CO gas.

The third paper that is related to this project is “Toxic Gas Release Alarm

System Using PIC Microcontroller” by Zarith Sofia Suraya Bt Hj Bakeri from Universiti

Teknologi Malaysia[6]. This project was created to detect carbon monoxide using TGS

2442 gas sensor and generate an alarm signal when the detected gas reaches its

hazardous level. Powered by Microchip‟s PIC18F2550, this project alarmed when the

carbon monoxide gas reach a hazardous level and be aware of the gas concentration

level displayed on the LCD system.

Page 29: MQ3 Theory

10

2.2 The hazardous gases

Based on Occupational Safety and Health Administration (OSHA), the definition

of hazardous gas is defined as those chemical present in the workplace which are

capable of causing harm. From the definition of the hazardous gas, the chemical term

refer to dust, mixtures and common materials such as paints, fuels and solvents.

According to the limitation of the LPG gas, OSHA mentioned that exposes over

1000ppm of LPG gas will cause hazard to the human respiration system[7]. Therefore,

this value is used as the threshold value for the project. Meanwhile, the alcohol gas

threshold value was chosen to be half value from the graph of the gas sensor

2.3 Sensors and Instrumentation

The initial data receiver came from the gas sensor. Study on the working

principle of gas sensor needs to be done in order to understand where the voltage output

came from. Besides that, zigbee will also be an important component that needs to be

analyzed for data transferring by wireless. Therefore, the following subsection explained

the gas sensor and zigbee working principle working.

Page 30: MQ3 Theory

11

2.3.1 Gas sensor working principle

Figure 3.6 illustrates the working principle of the gas sensor such that when a

metal oxide crystal such as SnO2 is heated gas is adsorbed on the crystal surface with a

negative charge. Then donor electrons in the crystal surface are transferred to the

adsorbed oxygen, resulting in leaving positive charges in a space charge layer. Thus,

surface potential is formed to serve as a potential barrier against electron flow. Inside the

sensor, electric current flows through the conjunction parts (grain boundary)[]. At grain

boundaries, absorbed oxygen forms a potential barrier which prevents carriers from

moving freely. The reduced barrier height decreases sensor resistance.

Figure 2.6: Gas sensor working principle [8]

V = IR ------------(2.1)

V = voltage value (volt)

I = current in the circuit (A)

R = resistance (ohm)

Page 31: MQ3 Theory

12

From Ohms Law in equation 2.1, voltage value is directly proportional to the

current and resistance value in the circuit. Therefore, as the sensor detect higher of

concentration gas level, resistance value in the grain boundary will increase. As the

resistance increase, the output voltage will also be increase.

2.3.2 Zigbee

Figure 2.7 : Zigbee module

Zigbee wireless protocol as shown in Figure 2.7 provides means to network a set

of autonomous devices with standard radio frequency transceiver to perform some

networked task. In the proposed system a vehicular RF takes the role of a Zigbee end

devices while tas reader and writer module takes the role of Zigbee coordinates[9].

Zigbee series 1 is used in this projet. To ensure the data are succesfully transfered with

the other Zigbee receiver, some programming needs to be installed for both the zigbee

using X-CTU software. This is will be explained further in the chapter 3.

Page 32: MQ3 Theory

13

2.4 Programming Tools

LabVIEW and Arduino are the programming tools used for this project. But, the

writing programming is mostly used in Arduino. Meanwhile, LabVIEW use

programming type of block diagram.

2.4.1 LABVIEW

Figure 2.8: LabVIEW icon image

LabVIEW (Laboratory Virtual Instrument Engineering Workbench) as in Figure

2.8 is a graphical programming environment used by millions of engineers and

scientists to develop sophisticated measurement, test, and control systems using intuitive

graphical icons and wires that resemble a block diagram. It offers unrivaled integration

with thousands of hardware devices and provides hundreds of built-in libraries for

Page 33: MQ3 Theory

14

advanced analysis and data visualization – all for creating virtual instrumentation. The

LabVIEW platform is scalable across multiple targets and functions, and, since its

introduction in 1986, it has become an industry leader [10].

LabVIEW programs are called virtual instruments, or VIs, because their

appearance and operation imitate physical instruments, such as oscilloscopes and

multimeters [10]. LabVIEW departs from the sequential nature of traditional

programming languages and features an easy to use graphical programming

environment, including all of the tools necessary for data acquisition(DAQ), data

analysis, and presentation of results [10].

A LabVIEW VI consists of two major components which is a Block Diagram

and a graphical user interface (GUI), known as Front Panel. Block Diagram is a window

where the graphical source code is developed and the Front Panel is a window that

serves as the user interface which allows user to customize it with objects like graphs,

knobs and buttons (National Ins., 2006).

2.4.2 Arduino

The Arduino Uno as shown in Figure 2.9 is a microcontroller board based on the

ATMEL microcontroller ATmega328. It has 14 digital input or 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 [11]. It contains everything

needed to support the microcontroller; simply connect it to a computer with a USB cable

or power it with a AC-to-DC adapter or battery to get started. The Arduino Uno can be

Page 34: MQ3 Theory

15

powered via the USB connection or with an external power supply. The power source is

selected automatically.

Figure 2.9: Arduino board [11]

The focus of this project is on the programming of Arduino. Arduino is the open

source software used to create the language programming in order to run the system.

2.5 Indicator

Some indicators have been installed with the system in the project. There are

including buzzer, LED and exhaust fan. The information details on the devices use

explained in the following subsections.

Page 35: MQ3 Theory

16

2.5.1 Buzzer

Figure 2.10: Buzzer model

Buzzer as shown in Figure 2.11 is an audio signaling device. The typical uses of

buzzers are for alarms, timers and confirmation of user input such as a mouse click or

keystroke. The project used an electronic type of buzzer which is a piezoelectric element

that driven by an Arduino microcontroller signals.

Page 36: MQ3 Theory

17

2.5.2 LED

A light emitting diode (LED) as shown in Figure 2.12 is a semiconductor light

source. LED is used as the indicator lamp in the many devices and is increasingly used

for lighting. The LED is based on the semiconductor diode.

Figure 2.11: LEDs images

When a diode is forward biased which is switch on, electron are able to

recombine with holes within the devices, releasing energy in the form of photon. This

effect is called electroluminescence and the colour of the light is determined by the

energy gap of the semiconductor. LED are usually integrated optical components are

used to shape its radiation pattern and assist in the reflection.

Page 37: MQ3 Theory

18

2.5.3 Exhaust Fan

Exhaust fan as shown in Figure 2.13 is a fan for ventilating an interior by

drawing air from the interior and expelling it outside. This project needs a system

combination with exhaust fan as the precaution step before entering the dangerous level.

Exhaust fan will suck out all the air inside the room or building that had been installed

with the system to the outside of the building. Therefore, the air quality inside the

building will maintain in the safe air quality.

Figure 2.12: Exhaust fan model

Page 38: MQ3 Theory

19

CHAPTER 3

METHODOLOGY

3.1 Introduction

Figure 3.1 shows the basic flow of methodology and approach for the project.

The the project is divided into two parts which are hardware and software. For the

software implementation, it involves writing code and programming the Arduino and

zigbee. Meanwhile, hardware implementation involves designing the circuit of the

project and PCB development. After both parts was completethe next was the testing

and debugging proces. Each part of the project will be discussed in details in this

chapter.

Page 39: MQ3 Theory

20

Figure 3.1: Methodology of the Project

Start

Programming the

zigbee connection

Writing programming and

compiling the program to

Arduino

Circuit design and basic

connection

PCB development

Testing and debugging &

circuitry

Error

Interfacing with

LABVIEW

Display

data

Interface with

internet server

End

Yes

No

Page 40: MQ3 Theory

21

Figure 3.2: Block Circuit Diagram

As shown in Figure 3.2, the block diagram is about the connection of the gas

detector implementation. In this project, output voltage from the gas sensor will be

delivered to the Arduino board. The heart of the system is the Arduino board. All the

inputs and the outputs will be connected to the Arduino. When the gas sensor MQ6 or

MQ3 detect the presence of gas, it will send analogue signal to an analog digital

converter (ADC) inside the Arduino. An Arduino will process this signal and transfer to

the LABVIEW using zigbee. In the same time, Arduino also will analyze the signal

according the threshold value of gas concentration. The gas concentration value will

determine which LEDs will be lit up and if the red LED light up, this will also triggers

the buzzer to warn the users of gas concentration in the dangerous level. On the other

hand, as the yellow LED light up, this will also triggers the relay for switching on the

exhaust fan to suck out all the dangerous gas in the room and as the precaution before

dangerous level.

DC power

supply

Alarm

Indicator

Gas Sensor

Arduino

Board

LABVIEW

(GUI)

Page 41: MQ3 Theory

22

Figure 3.3: Experiment Diagram of the Project

Figure 3.3 shows the image of the hardware built and Figure 3.4 is an illustration

of the circuit diagram of the hardware. Xbee in the circuit diagram act as the transmitter

for transfer the data wirelessly.

Figure 3.4: Circuit Diagram for Gas Detector

ARDUINO

BOARD

BUZZER

RED LED

GREEN LED

YELLOW

LED

XBEE

GND

relay

5V 5V

exhoust

fanVCC

GND

1S

5V

3.3V

GND

A0

13

12

11

RX

TX

3.3V

Vout

Vin

Page 42: MQ3 Theory

23

3.2 Hardware implementation

In the wireless monitoring system of gas detector, there are a few parts of

hardware involved. This section will discuss on the design and function of each

component that are connected to the Arduino in order to build the project. Along with

that this section also explains how the circuitry connection between the components and

microcontroller is made. This includes the sensor circuit and also the output circuit

which comprises of LEDs, exhaust fan and a buzzer.

3.2.1 Gas sensor circuit

Figure 3.5: MQ3 and MQ6 image [12]

In this project, MQ 6 is used to detect the liquefied Petroleum Gas (LPG),

meanwhile MQ3 is used as the replacement of MQ 6 in detecting alcohol gas. The

replacement of gas sensor in the project to show that level of different dangerous gas can

be obtain by using the same method. Figure 3.5 shows the image of both the gas sensor.

Page 43: MQ3 Theory

24

Figure 3.6: Gas Sensor Circuit Diagram [13]

The circuit diagram for both the sensor is the same as shown in Figure 3.6.There

are three output pins from this sensor which are reference voltage (VCC), ground pin

(GND) and the output voltage pin. RL shown in the Figure 3.5 is the adjustable

resistance. The connection between protection resistor in the sensor circuit and

adjustable resistor are in serial which form a load resistor (RL). The sensor‟s resistance

between Rs and RL form a voltage divider. Based on the chart provided in the MQ3 and

MQ6 data sheet, Rs in the clean air under given temperature and humidity constant.

Figure 3.6 also shows the sensor come out with 6pins. Pin H act as the coil of the gas

sensor. Meanwhile, pin A and B are connected in pairing and was connected as in the

circuit diagram above. The calculation for gas concentration is described in detailed in

section 3.3.1.

GAS SENSOR

VCC

GND

1S A0

5V

GND

Figure 3.7: The Gas Sensor Connection to Arduino Pins.

Page 44: MQ3 Theory

25

Figure 3.7 above shown gas sensor connection to the Arduino pins. The A0 pin

connected at the Arduino will read the output voltage from the sensor.

3.2.2 Output circuit

The output circuit consists of four type components:

i. Light-Emitting Diode (LED)

ii. Buzzer

iii. Exhaust Fan

iv. Zigbee

All of four components have their own purpose for the project in order to inform

the users that the level of dangerous gas in the surrounding areas continuously. There are

three LEDs used namely as red LED, yellow LED and green LED. All of these LED

indicate three different level of gas concentration in the atmosphere as listed in Table

3.1.

Page 45: MQ3 Theory

26

Table 3.1: Threshold Value for Gas Concentration MQ3 and MQ9

LED Gas concentration value (ppm)

LPG (MQ6) Alcohol (MQ3)

Green < 500 < 0.4

Yellow 500 > = x = > 1000 0.4 > = x = > 1

Red > 1000 > 1

When the red LED is light up, buzzer will also be trigged to inform user that the

surrounding areas have reached a dangerous level and emergency evacuation is needed.

Meanwhile, exhaust fan will turn on along with the yellow LED to show the level

concentration in the warning stage and exhaust fan is used to suck out the dangerous gas

as the precaution before entering the dangerous level.

BUZZER

RED LED

GREEN LED

YELLOW

LED

relay

5V 5V

exhaust

fan13

12

11

330k ohm

330k ohm

330k ohm

2N22

Figure 3.8: Output Circuit Diagram

Page 46: MQ3 Theory

27

Figure 3.8 show the output circuit diagram which act as the alarm system to the

system. Red LED and buzzer are connected in the same pin from the Arduino, 13. Same

as the yellow LED and exhaust fan at the pin 11. At the same time, pin 11 includes the

relay circuit act as a switch tothe exhaust fan. All the LEDs are covered with a light

transparents casing in previously shown in Figure 3.3 to give visibility to the brightness

when the LEDs light up. The output for pin 12 from Arduino is green LED only.

normally open

normally closed

5V exzos

fan

9V

RRELAY

11 Transistor

1

2

3 4

5

Figure 3.9: Relay Connection Circuit Diagram

Figure 3.9 show the relay connection circuit diagram from the Arduino to the

exhaust fan.Relay is need in this project because exhaust fan require a 9V battery. Relay

is an electromagnetic device that works on the magnetic field interfacing. Relay should

be checked first before making the connection circuit to test whether the connection in

the normally open or closed by using multimeter. If the multimeter sounds up with a

„bit‟ that‟s mean the pin in the normally closed. Meanwhile, if the connection pin 2 and

4 are tested, no sound will be heard at the multimeter. Exhaust fan is connected at the

normally open pin because it will be turned on when it gets the information from

Arduino pin only. Therefore, pin 5 at the relay will be not connected with any

component in the circuit.

Page 47: MQ3 Theory

28

Last but not least, the output circuit from the Arduino is zigbee. Zigbee from the

output pin RX and TX in the Arduino acts as the transmitter. All the data from the

sensor reading will be transferred to another zigbee receiver to interface with

LABVIEW in the computer by wireless. Figure 3.10 below shows the circuit output

diagram for zigbee from the Arduino.

XBEE

VCCDOUT

GND

DIN

RX

TX

3.3V

Figure 3.10: Zigbee Output Connection Circuit

3.2.3 PCB development

For the PCB development, donut board is used in this project. Before soldering

all the components on the board, bread board was first used to ensure that the connection

between each component is functional for this project. Donut board does not have

connection to each hole like the strip board. In order to make the connection, solder

method is used to connect all components. Besides that, female holders are uses to

connect the jumper wires from Arduino to the board circuit. The PCB development

circuit diagram is shown in Figure 3.4.

Page 48: MQ3 Theory

29

3.3 Software Implementation

This section will specifically discuss the methodology to interface the sensor and

hardware module. The most important part is to enable the analog sensor to send analog

data to Arduino then transfer to the LABVIEW. The first technique to interface the

analog output to Arduino is to produce the relation between the sensor analog range and

Arduino analog to digital converter (ADC) specification. This relation is based on gas

concentration calculation and will be explained in details the following section.

3.3.1 Gas Concentration Calculation Process

The following calculation will be clarified in numbering step to construct an

equation for this sensor. Based on the datasheet of MQ3 and MQ9 the input and output

voltage range shown in Table 3.2.

Table 3.2: Gas Sensor input and output voltage range

Specification Gas sensor

MQ 9 MQ 3

Input voltage range DC 5.0 ± 0.2 V DC 5.0 ± 0.2 V

Output voltage range DC 0 – 5.0 V DC 0 – 5.0 V

Page 49: MQ3 Theory

30

As mention in chapter 2, Arduino is 10 bit analog to digital converter

microcontroller. Therefore, based on the hardware, the real input voltage of gas sensor is

5V.

i. Step 1:

Since the binary for Arduino is 10-bit, it is equal to 2^10= 1024 steps or levels of the

resolution. The maximum output from the gas sensor, 5V is then divided into 1024.

From the calculation above, 1-bip output is equal to 4.88mV in the real voltage output.

Figure 3.12 below shows the relation between voltage output from gas sensor and

Arduino reading more clearly.

digital ouput (bit)

voltage output (V)

1

2

3

4

5

204.8 409.6 614.4 819.2 1024

Figure 3.11: Voltage Output of Gas Sensor Versus digital output in

Arduino.

Page 50: MQ3 Theory

31

ii. Step 2:

The value of gas concentration can be obtained by calculating the value of sensor

resistor (Rs). The value of Rs is calculated using voltage divider in the gas sensor circuit

diagram as the the equation below:

From the Rs value, we can compute the gas concentration. Vo represents the voltage

output from the gas sensor. Equation 3.2 is obtained from the gas sensor calibration

datasheet. Once the Rs value is calculated, it will proceed to the next step.

Page 51: MQ3 Theory

32

iii. Step 3:

Figure 3.12: Resistance Ratio versus Concentration Gas

for MQ9 [13 ]

Figure 3.13 shows the graph of sensor resistance ratio (Rs/Ro) versus concentration gas

in ppm for MQ9. Ro is the sensor resistance (Rs) value at 1000ppm. Therefore, based on

the graph above, Ro is equal to 1 (Rs/ Ro). From graph, we can get the relationship

between Rs and LPG concentration in ppm. Equation 3.3 shows the relationship between

Rs and LPG concentration value.

(1000, 1)

(200, 2)

Page 52: MQ3 Theory

33

Alpha (𝛼) in the equation 3.3 shows the graph in Figure 3.13 is slope value. The slope

value can be obtained using the equation 3.4.

𝛼

𝛼

By taking the two points from the linear graph, we can calculate the slope of the LPG

concentration gas which is equal to -1. Therefore, with the slope value equal to -1,

equation 3.3 can be simplified into equation 3.5 by substitute the value of slope value of

graph.

The same methods are applied to the gas sensor MQ3 in the step 3 from the beginning to

obtain and calculate the concentration of alcohol gas. The equation for alcohol gas

concentration is in equation 3.6 below.

Page 53: MQ3 Theory

34

iv. Step 4:

Since Arduino only read in the 10-bit numbering, the threshold value for alarm system to

be functional as well as the project set up, concentration value need to convert into 10-

bit data to programmed the Arduino programmer. The threshold values are based on the

OSHA organization standard value. By using the equation 3.5 and 3.6 in step 3, value of

gas concentration can be obtain. Table 3.3 below shows all the threshold value for the

both gas sensor which are taken from OSHA.. The calculation for converting the value

of voltage output to digital output is based on the equation 3.7 below.

-

Table 3.3: Threshold Value for MQ9 and MQ3

Mode Gas sensor

MQ 9 MQ 3

Vo 10-bit reading Vo 10-bit reading

Green < 1.67 <342 < 1.24V < 254

Yellow Vo < = 1.67V

Vo > = 2.5V

Vo < = 342

Vo > = 512

Vo < = 1.24V

Vo > = 2.5V

Vo < = 254

Vo > = 512

Red > 2.5V > 512 > 2.5V > 512

Page 54: MQ3 Theory

35

3.3.2 Arduino Programming

Arduino programming is the heart of this project. This is because, all the data

from sensor to LABVIEW monitoring system and alarm system controlled by Arduino.

Besides that, Arduino also trigger alarm system when detect the threshold value that

have been set up. Moreover, Arduino will send the data to the computer in LABVIEW

by wireless with zigbee device.

Figure 3.13 show the whole process includes in the gas sensor MQ 9 for

detecting the LPG concentration level.

Page 55: MQ3 Theory

36

start

read the output

voltage by arduino

from gas sensor

MQ6

Vo > 1.67v ?

MQ6

Vo > 2.5v ?

yes

no

yes

noturn on the yellow

led and exhaust

fan

turn on the red

led and buzzer

end

send data to

LabView using xbee

turn on the

green led

Figure 3.13: Flow Chart for The Arduino Programming for MQ9

Firstly, all the input and output pin in Arduino must be declare. Then, initial

sensor value must be set as 0. The data receive from sensor can calculate in the decimal

Page 56: MQ3 Theory

37

place as the float sensor declare in line 6 below. Analog input pin that the potentiometer

of gas sensor is attached to pin A0. The declaration programming for this step shows as

Figure 3.14.

constintanalogInPin = A0;

constintledred = 13;

constintledgreen = 12;

constintledyellow = 11;

intsensorValue = 0;

float sensor;

figure 3.14: Arduino input and output port initialization

After that, loop is very important which represent all the data will continuously

repeat by time. In this project, there are 2 loop include. First loop is to initialize serial

communication at the bound rate 9600. This is also sets the digital pin as the output as

shown in Figure 3.15.

Page 57: MQ3 Theory

38

void setup()

{

Serial.begin(9600);

pinMode(ledgreen, OUTPUT);

pinMode(ledred,OUTPUT);

pinMode(ledyellow,OUTPUT);

}

Figure 3.15 : Declaration of the pin

Meanwhile, the second loop is mostly the main process for the alarm system

trigger. All the threshold value is declared in this loop. First of all, the system read the

sensor value as shown in Figure 3.16. If the sensor value is over or under the limitation

of threshold value, some indicator as the output system will be turning on. Finally, the

result from the sensor value will be print to the serial monitor. The flow chart of the

programming show in the Figure 3.13.

Page 58: MQ3 Theory

39

void loop() {

sensorValue = analogRead(analogInPin);

if (sensorValue>= 512)

{

digitalWrite(ledgreen, LOW);

digitalWrite(ledyellow, LOW);

digitalWrite(ledred, HIGH);

delay(50);

digitalWrite(ledred, LOW);

delay(50);

}

else if (sensorValue> 342 &&sensorValue< 512)

{

digitalWrite(ledgreen, LOW); // sets the LED on

digitalWrite(ledyellow, HIGH);

digitalWrite(ledred, LOW); // sets the LED off

}

else if (sensorValue<= 342)

{

digitalWrite(ledgreen, HIGH); // sets the LED on

Set the LED blinking

Page 59: MQ3 Theory

40

digitalWrite(ledyellow, LOW);

digitalWrite(ledred, LOW); // sets the LED off

}

Serial.print(sensorValue);

delay(500);

}

Figure 3.16: Programming Process in Arduino

3.3.3 Zigbee Programming

XBEEVCCDOUT

GND

DIN3.3

V

RX

TX

5V

GN

D

210x

Figure 3.17: Zigbee receiver Connection to USB Port

Figure 3.17 shows the connection diagram for Zigbee receiver. Both of the

zigbee receiver and transmitter must be set up with the programming in order to transfer

Page 60: MQ3 Theory

41

data from Arduino successfully. Therefore, the Zigbee must be connected as of Figure

3.17.

Driver microchip 210x for USB port must be installed in the computer in order to

read the port. After that, XCTU software is needed to run the programming with Zigbee.

Once the XCTU software is installed and executed in the computer, each COM for each

zigbee must be tested by clicking on the button Test/Query as shown in Figure

3.18.XCTU software is support for programming and configuring Zigbee, WIFI

modules. After that a dialog box will popped up to inform that the COM connection is

successful. Figure 3.19 shows the result output for Com test.

Figure 3.18: Test the COM Of Zigbee

Figure 3.19: Result Output for Com Test

Page 61: MQ3 Theory

42

The set up for the Zigbe data transfer is done by opening the modem

configuration at the up right corner of the window XCTU. This step is very important to

make sure that the data has been transfer to the exact location. There were four items

that need to be considered. First is PAN ID. This is to show the location number of the

port. The value of the ID must be the same. As shown in figure 3.20, the ID for this

zigbee is 111. Then set the destination address high as 0 and the destination address low

as FFFF. Serial interfacing will also be the most important things in this step. As we set

the bound rate at the Arduino at 9600, the interfacing data rate also must be 9600. Figure

3.21 shows the interfacing data rate at 3 which is equal to 9600.

Figure 3.20: Setting the Programming 1

Figure 3.21: Setting the Programming 2

Page 62: MQ3 Theory

43

The last step is to test the connection between two zigbee. Figure 3.22 shows the

data transfer between two zigbee is succesful. As shown in figure 3.22, the writing in

blue colour is the data transfer at COM40. Meanwhile, the red colour in COM44 is the

receiver and vice versa. Therefore, both of the Zigbee can be used as the receiver and

transmiter terminal.

Figure 3.22: Test The Connection of Both Zigbee.

3.3.4 LABVIEW

Labview is used in the monitoring system in this project. Therefore, for

interfacing the data transfer by zigbee in the LABVIEW, Virtual Instrument Software

Architecture (VISA) configuration serial ports are required. VISA is the lower layer of

functions in the LabVIEW instrument driver VIs that communicates with the driver

software to communicate with extenal I/O devices such as zigbee modules. Figure 3.23

shows the VISA interfacing block diagram connection. There are three levels for the

visa interface which are configure serial port, visa read and VISA closed. All three of the

parts are a must have for the interfacing process.

Page 63: MQ3 Theory

44

Figure 3.23: VISA Interfacing Block Diagram

The first level visa configure serial port is for initializes the serial ports specified

by visa resources name to a specified settings. Wire data to the visa resources name

input to determine the polymorphic instance to use or manually sellect the instance. In

this project, COM 40 has been chosed as the zigbee port in that location. Besides that,

the value of 9600 in the Figure 3.23 shows the bound rate of the project system from

arduino and zigbee. From the Figure 3.23 also, the grey line in the figure shows the

while loop for repeating the subdiagram inside it untill conditional terminal, an input

terminal receives a particular Boolean value. The Boolean value depends on the

continuation behaviour of the loop.

Figure 3.24: VISA Read Output

Page 64: MQ3 Theory

45

After interfacing the data transfer and LABVIEW was done, the next process is

to read the data transfer. From the figure 3.24, decimal string to number is needed for

converting the numeris characters in string thats starting at offset to a decimal interger

and return it in number. Once the string number from visa has been changed, the output

number needs to convert back into the original of voltage value. The converter process is

shown in Figure 3.25. As mentioned before, Arduino will read the data in the 10-bit data

only. Therefore, to convert the value in the original voltage is by the equation in 3.7.

Figure 3.25: Converter Process

The next step in LABVIEW process is to show the LED indicators for user

monitoring. The range will conduct the voltage value according to the threshold value

that has been set before.

Finally, the last step is to monitor the concentration value of the gas. In this step,

the concentration value is calculate based on the graph analysis as mentioned before.

Therefore, to calculate the gas concentration for LPG and alcohol gas are using the

equation 3.8 and 3.9 as below.

Page 65: MQ3 Theory

46

The last stage in the data monitoring system is interface the system with internet

server. There are very easy step in this project because LABVIEW software already

provide built-in function process. To start turning data into internet server, first at all

find the web publishing tool at at menu tools as show in Figure 3.26.

Figure 3.26: Web Publishing Tools LABVIEW

Page 66: MQ3 Theory

47

The the window of web publishing tool will be come out as show in Figure 3.27.

From Figure 3.27, the first step browse the VI name of the project and set it as

embedded viewing mode.

Figure 3.27: Step 1

The second step is shown in Figure 3.28. Document title and summary of this

project need to be add in this step for the data monitoring in the internet server.

Page 67: MQ3 Theory

48

Figure 3.28: Step 2

Then, the final step is save the new web page as show in Figure 3.29. by saving

the data of web page, this system can automatically running in the internet server at the

web address(URL) given by LABVIEW.

Page 68: MQ3 Theory

49

Figure 3.29: Step 3

Page 69: MQ3 Theory

50

CHAPTER 4

RESULT AND DISCUSSION

4.1 Introduction

This chapter explains about the results achived in the project and a few

discussions on problem solving during process and experiment of completing this

project. The data collection is using types of gas sensor MQ3 and MQ9 for Alcohol and

LPG gas exposes. Then the data analyzed and compared with information obtain from

the several reference sources from OSHA.

4.2 Project Description

Project done is based on the objectives started before whichis analyzing a sensor

circuit for the gas sensor. This sensor node will detect the level of concentration of the

gas exposed and convert it into analog voltage and directly sending it into Arduino.

After transferring the data, Arduino will read the data into the digital format. Arduino

Page 70: MQ3 Theory

51

processes analog to digital converter (ADC) from 0 to 1024 which are in 10 bits.

Voltage output from the gas sensor (0-5)V will be read as (0-1024) decimal output in

Arduino. Furthermore, this system will enable data transfer in LABVIEW by wireless

using zigbee device and complete with the alarm system.

4.3 Project Result

Figure 4.1 show the output result of the alarm system when Arduino threshold in

the warning mode. Yellow LED and exhaust fan will be turn on as the initially system

set up in order to control the air quality in the building. Yellow LED means warning in

the system.

Figure 4.1: Alarm indicator of the project.

Page 71: MQ3 Theory

52

The overall project set up shown in the Figure 4.2. the system are divided into

two part. First part is on the alarm system. The second part is on the software system

which is monitoring system.

Figure 4.2: Overall Project Configuration

An experimented was carried out using two type of gas sensor with two different

kinds of gasses. The first experiment was done with MQ9 gas sensor. This sensor detects

the concentration of the LPG gas. The result for monitoring system of MQ9 gas sensor is

shown in the Figure 4.3 below. The second experiment is to detect the level of

concentration alcohol gas by using MQ3 gas sensor. Figure 4.4 shows the outcome result

for second gas sensor, MQ3.

Page 72: MQ3 Theory

53

Figure 4.3: Monitoring System for MQ9

Figure 4.4: Monitoring System for MQ3

Voltage output graph

Expose in the high

concentration of gas

Back in normal

Indicator for level

of safety

Detect the gas

Page 73: MQ3 Theory

54

After that, the system of gas monitoring sensor has been transferred to the

internet server. Figure 4.5 shows the data monitoring system in the internet browser. The

interface of the data monitoring with internet server will give an advantages to user for

monitoring the building or industrial air environment quality in the long distance

continuously.

Figure 4.5: System Monitoring in Internet Server

Figure 4.6 shows the packaging of the hardware and the wireless gas monitoring

system. This system is smell and portable that can be continuously installed in the

building. The size of suitable building is depends on the type of the Zigbee used. The

room size that suitable in this project is 100m x 100m.

Page 74: MQ3 Theory

55

Figure 4.6: packaging of the project

Page 75: MQ3 Theory

56

CHAPTER 5

CONCLUSION AND RECOMMENDATION

5.1 Introduction

This section will conclude the whole project and future recommendations for

students or individual who is interested in continuing this project as their research.

5.2 Conclusion

As a conclusion, reading of the output voltage from the gas sensor shows the

value of concentration and level of dangerousness in red LED. Control system that

reacts as the alarm system has been design based on the indicator for user. Data

reading from the gas sensor was successfully transferred to LABVIEW using Zigbee

and easily monitored without wire and displayed in the internet.

Page 76: MQ3 Theory

57

This system is built to help user to feel comfortable in a work place and easy

to monitor the range of air quality in the environment from their own figure via

LEDs, exhaust fan and buzzer. This system device also gives an advantage to the

user to easily get the information about the air quality in their building or industrial

area by monitoring the system by using PC via Zigbee wireless.

5.3 Recommendation

For further improvement, the research can add some features that enables the

master controller to control the sensing element. This is to guarantee there is a

reliable back-up system for this project if any emergency occurs. In addition, this

system was able to monitor and control air condition for various implementations

with some system alterations.

The toxic gas release alarm system safety features can also be improved by

adding another function to check the sensor‟s condition in case the sensor is not

working properly or if the sensor‟s calibration has been displaced.

A power saving features and power supply back-up would also be an

essential addition to the system in case the main power supply is down. The alarm

system can also be hooked up to a timer and a phone that dials directly to the owner

and also the authorities if the dangerous CO concentration levels are detected

continuously for more than one or two hours.

Page 77: MQ3 Theory

58

REFERENCES

[1] Incorporated, C. T., Technologies, C., & Technologies, C. (2011). Cytron

USB to UART Converter User ‟ s Manual, (June), 1-23.

[2] Dissanayake, S. D., Karunasekara, P. P. C. R., Lakmanaarachchi, D. D.,

Rathnayaka, a J. D., & Samarasinghe, a T. L. K. (2008). Zigbee Wireless

Vehicular Identification and Authentication System. 2008 4th International

Conference on Information and Automation for Sustainability, 257-260.

[4] F. He, Z. Du, and Y. Sun, “Indoor Dangerous Gas Environment Detected by

Mobile Robot,” 2009

[4] M. F. Jan, Q. Habib, and M. Irfan, “Carbon Monoxide Detection and

Autonomous Countermeasure System for a Steel Mill using Wireless Sensor

and Actuator Network,, pp. 405-409, 2010.

[5] Somov, A., Baranov, A., Savkin, A., Spirjakin, D., Spirjakin, A., &

Passerone, R. (2011). Development of wireless sensor network for

combustible gas monitoring. Sensors & Actuators: A. Physical, 1-8.

[6] Sofia, Z., Binti, S., & Bakeri, H. J. (2010). UNIVERSITI TEKNOLOGI

MALAYSIA (April).

[8] Characteristics, S., Design, D., & Detectors, M. ,Technical Information on

Usage of TGS Sensors for, 1-12.

[9] ]Jeliˇ, V., Magno, M., Paci, G., Brunelli, D., & Benini, L. (2011). Design

Characterization and Management of a Wireless Sensor Network for Smart

Gas Monitoring. Sciences-New York, 4, pg 115-120.

[10] Health, E., & Elements, L. (2012). Liquefied Petroleum Gas (Canada)

Section 1 : Identification of the substance or mixture and of the supplier

Page 78: MQ3 Theory

59

Section 2 : Hazard ( s ) Identification Section 3 : Composition / Information

on Ingredients Section 4 : First Aid Measures, 1-8.

[11] Datasheet, Uno, T. A. Arduino Uno, 328.

[12] Datasheet MQ-6 Semiconductor Sensor for LPG, 2-4.

[13] Datasheet MQ-3 Semiconductor Sensor for Alcohol, 3-5.

Page 79: MQ3 Theory

60

APPENDIX

1. Block diagram for MQ6 in LABVIEW

Page 80: MQ3 Theory

61

2. Block diagram for MQ3 in LABVIEW

Page 81: MQ3 Theory

62

3. Arduino programming for MQ3

Page 82: MQ3 Theory

63

4. Arduino programming for MQ6