You are on page 1of 47

A MINI PROJECT REPORT

ON
AIR POLLUTION MONITORING SYSTEM USING
LABVIEW
Submitted By
K AKAMSHA REDDY 17B81A1001
D SNEHA 17B81A1047
CH VIJENDER REDDY 17B81A1058
BACHELOR OF TECHNOLOGY
IN
ELECTRONICS AND INSTRUMENTATION ENGINEERING

DEPARTMENT OF
ELECTRONICS AND INSTRUMENTATION ENGINEERING

CVR COLLEGE OF ENGINEERING


(An Autonomous Institution)
Approved by AICTE & Affiliated to JNTU , Hyderabad ,
Vastunagar , Mangalpalli(V) , Ibrahimpatnam(M)
RR District , Telangana , India
2017-2021
A MINI PROJECT REPORT
ON
AIR POLLUTION MONITORING SYSTEM USING
LABVIEW
Submitted By
K AKAMSHA REDDY 17B81A1001
D SNEHA 17B81A1047
CH VIJENDER REDDY 17B81A1058
BACHELOR OF TECHNOLOGY
IN
ELECTRONICS AND INSTRUMENTATION ENGINEERING
Under the guidance of
Ms. V. Sreelatha Reddy
Assistant Professor , EIE Department

DEPARTMENT OF
ELECTRONICS AND INSTRUMENTATION ENGINEERING

CVR COLLEGE OF ENGINEERING


(An Autonomous Institution)

CVR COLLEGE OF ENGINEERING


DEPARTMENT OF ELECTRONICS AND INSTRUMENTATION ENGINEERING
Vastunagar , Mangalpalli(V) , Ibrahimpatnam(M) , RangaReddy(D) Telangana 01510

CERTIFICATE

This is to certify that the dissertation work entitled “ AIR POLLUTION


MONITORING SYSTEM USING LABVIEW “ is the work completed and
submitted by

K AKAMSHA REDDY 17B81A1001

D SNEHA 17B81A1047

CH VIJENDER REDDY 17B81A1058

This report is submitted in Electronics and Instrumentation Engineering from CVR


College Of Engineering affiliated to JNT University , Hyderabad is bonafide project
work carried out by them during the academic year 2020-2021.

PROJECT GUIDE HEAD OF THE


DEPARTMENT

Ms. V. Sreelatha Reddy , Asst prof Dr. S. Harivardhagini

ACKNOWLEDGEMENT
The satisfaction and euphoria that accompany the successful completion of any
task would be incomplete without the mentioning of the people whose constant
guidance and encouragement made it possible.

We express our utmost gratitude to Dr. K. S. Nayanathara , Principal of our


college , for constant encouragement and motivation throughout the academic.

We derive great pleasure in expressing our sincere gratitude to our Head Of


The Department , Dr. S. Harivardhagini for her timely suggestions which
helped us to complete this work successfully.

We express our sincere thanks to our internal guide Ms. V. Sreelatha Reddy ,
Assistant professor , Department of EIE , for giving us support , kind attention
and valuable guidance throughout the project.

ABSTRACT
Air pollution is a major concern in modern cities and in developing countries .
It has a significant influence on the concentration of constituents such as CO2,
CO, SO2, H2S, etc. in the atmosphere and that is location-independent .
Atmospheric pollutants are responsible for many environmental problems such
as acid rain and ozone layer depletion which make it difficult for plants and
animals to survive. Hence , to avoid such adverse effects an air pollution
monitoring system is vital especially in the urban and industrial areas . A
Wireless Sensor Network (WSN) is developed with gas , temperature and
humidity sensors for monitoring the environmental parameters in the area where
it is installed . Wireless sensor networks have various applications - from across
the indoor climate control , fire and flood detection to medical diagnostics ,
biocomplexity mapping and precision agriculture. The monitored values from
different sensors are sent to the Zigbee module through a PIC16F876
microcontroller . Based on the information , the Zigbee module operates under
Normal operating conditions and Alert conditions by consuming low-power at
low-cost . The analog values issued from different sensors are transmitted to a
pc through the ZigBee module . The case of an exceeding level of gas displays
a flashing window that contains an alert message with alarm sound otherwise
no alarm signal is sent . The gas monitoring system communicates with the PC
via RS232 which is chosen based on LabVIEW simulation software to make
the link configuration and this is called interfacing of LabVIEW software with
Zigbee module . Therefore , pollution monitoring is a very wide field and this
project is an attempt to minimize the problem by providing real time
acquisition and monitoring systems.
CONTENTS

ACKNOWLEDGEMENT…………………………………………… i

ABSTRACT……………………………………………………………. ii

LIST OF FIGURES…………………………………………………….

LIST OF TABLES……………………………………………………..

1 . INTRODUCTION………………………………………………….

1.1 INTRODUCTION…………………………………………….

1.2 OBJECTIVE…………………………………………………..

1.3 THESIS OF ORGANIZATION………………………………

1.4 CONCLUSION……………………………………………….

2 . WIRELESS SENSOR NETWORKS……………………………….

2.1 INTRODUCTION……………………………………………

2.2 WIRELESS SENSOR NETWORK ARCHITECTURE……..

2.2.1 DEFINITION………………………………………...

2.2.2 ARCHITECTURE OF A SENSOR NODE…………….

2.3 CONCLUSION…………………………………………
3 . WIRELESS TECHNOLOGIES………………………………...

3.1 INTRODUCTION………………………………………………

3.2 CHARACTERISTICS OF WIRELESS TECHNOLOGIES……

3.3 ZIGBEE TECHNOLOGY……………………………………………

3.4 CONCLUSION…………………………………………………

4 . DESIGN AND IMPLEMENTATION…………………………

4.1 INTRODUCTION……………………………………………………………

4.2 SYSTEM HARDWARE ARCHITECTURE………………………………...

4.3 GAS SENSORS……………………………………………………………...

4.3.1 CO SENSOR…………………………………………………

4.3.2 HYDROGEN SENSOR………………………………………

4.3.3 METHANE SENSOR………………………………………..

4.4 CONCLUSION……………………………………………………………...

5 . SIMULATION AND ALGORITHM……………………………….

5.1 INTRODUCTION …………………………………………………..

5.1.1 LABVIEW SOFTWARE…………………………………….

5.1.2 LABVIEW ENVIRONMENT TOOLS……………………....


5.1.3 LABVIEW VIRTUAL ENVIRONMENT……………………

5.1.4 LABVIEW APPLICATIONS………………………………...

5.1.5 LABVIEW ADVANTAGES/DISADVANTAGES………….

5.2 ZIGBEE TECHNOLOGY…………………………………………...

5.3 ALGORITHM OF WIRELESS SENSOR NETWORK……………..

5.4 CONCLUSION……………………………………………………….

6 . GATEAWAY DESIGN WITH LABVIEW INTERFACE…….

6.1 INTRODUCTION………………………………………….

6.2 GRAPHICAL INTERFACE…………………………………..

6.3 CONCLUSION……………………………………………

7 . RESULTS…………………………………………………………………..

8 . CONCLUSION…………………………………………………...

9 . SCOPE FOR FUTURE WORK………………………………….

10 . BIBLIOGRAPHY………………………………………………..
LIST OF FIGURES

Fig 2.1 A Sensor Network……………………………………….

Fig 2.2 Wireless Sensor Network Architecture………………….

Fig 2.3 Architecture of a Sensor Node…………………………..

Fig 3.1 ZigBee Module………………………………………….

Fig 4.1 System Hardware Architecture Block Diagram………....

Fig 4.2 PIC16F876 Microcontroller……………………………..

Fig 4.3 CO Gas Sensor MQ7…………………………………….

Fig 4.4 Hydrogen Gas Sensor MQ8……………………………..

Fig 4.5 Methane Gas Sensor MQ4………………………………

Fig 5.1 Example of a LabVIEW VI Front Panel………………...

Fig 5.2 Example of a LabVIEW VI Block Diagram………………….

Fig 5.3 Algorithm of WSN for Monitoring Gas Concentration…

Fig 5.4 Circuit Schematic of Wireless Sensor Nodes


in Normal Conditions………
Fig 5.5 Circuit Schematic of Wireless Sensor Nodes
in Alert conditions………….
Fig 5.6 Detection Circuit…………………………………………

Fig 6.1 Communication XBEE module – LabVIEW Interface….


Fig 6.2 Interface gas detection system in Normal conditions……

Fig 6.3 Interface gas detection system in Alert conditions………..

Fig 6.4 VISA Configure serial Port……………………………….

Fig 7.1 Architecture of Proposed Model………………………….

Fig 7.2 System Design with three Sensors………………………..

Fig 7.3 Schematic Diagram of a proposed Architecture………….

Fig 7.4 Block Diagram of Air Pollution Monitoring System…….

Fig 7.5 Front panel showing indicators of sensors output and

read buffer output In Normal conditions……………

Fig 7.6 Front panel showing indicators of sensors output and

Read buffer output In Alert conditions……………...

LIST OF TABLES

Table 1 Comparison Of Wireless Technologies………………………..

1. INTRODUCTION
1.1 INTRODUCTION
Air pollution is one the most crucial factors affecting life and health of
human, animals and plants . It has significant influence on the concentration of
constituents in the atmosphere . It occurs when any harmful gases, dust, smoke
enters into the atmosphere and makes it difficult for plants, animals and humans
to survive as the air becomes dirty . Also atmospheric pollutants are responsible
for many environmental problems such as acid rain and ozone layer depletion .
Hence , to avoid such adverse imbalances in the nature , an air pollution
monitoring system is vital especially in the urban and industrial areas . In this
paper , a wireless solution is proposed for monitoring the level of harmful gases
. The proposed system enables measurement of the levels of H2S, temperature,
and humidity . The software part of the project has been developed under
LabVIEW environment . The experimental results demonstrate the efficacy of our
project in terms of fast detection and real time response.

1.2 OBJECTIVE

The objective of this chapter is to report on the implementation of low cost


and energy-efficient Air Pollution Monitoring System using Wireless Sensor
Network(WSN) that is deployed in highly polluted areas .

The WSN system can be deployed in the cities to monitor the air pollution level . The
air quality measurement is processed and presented to the end user in real time in a
user friendly manner .

The nodes that make up the WSN can range from a few to several hundreds , where
each node is connected to its sensor.

1.3 THESIS OF ORGANIZATION


As a first step towards a realisation of a complete wireless sensor network air
pollution monitoring system, we present in this paper a design and an implementation
of one sensor node and the WSN Gateway. The rest of the paper is organized as
follows: Section II is a brief overview of wireless sensor networks. Section III
describes different wireless technologies. The hardware architecture of the sensor
node and the WSN gateway are presented in section IV. Section V presents and
discusses simulation results from the proposed system using ISIS. Section VI shows
the graphic interface LabVIEW used for acquiring signals, measurement analysis, and
data presentation at the gateway. Finally, section VII unites the main conclusion
drawn from this work.

1.4 CONCLUSION
Thus , in this chapter the objective of proposed model is known.
2. WIRELESS SENSOR NETWORKS

2.1 INTRODUCTION
A sensor network is a term referring, in general, to a collection of networked
embedded systems. Each of the systems constituting the network is called a sensor
node or just a node.

Fig 2.1 : A Sensor Network

Each sensor node has the following basic functions:

• Data Sampling : Gather data from the environment.

• Data Processing : Process the data using the node’s processing capabilities.

• Data Communication : Relay data to other nodes through the network.

Although computer-based instrumentation has existed for a long time, the density of
instrumentation made possible by a shift to mass-produced intelligent sensors and the
use of pervasive networking technology gives sensor networks a new kind of scope
that can be applied to a wide range of uses.
2.2 WIRELESS SENSOR NETWORK ARCHITECTURE
Wireless sensor networks (WSN) facilitate monitoring and controlling of physical
environments from remote locations with better accuracy . They have applications in
a variety of fields such as environmental monitoring, indoor climate control, fire and
flood detection, medical diagnostics, biocomplexity mapping and precision
agriculture . The concentration of air pollutants such as CO2, CO, SO2, H2S, etc. is
highly location-dependent. The urban areas with heavy traffic concentration and
industrial areas have a considerable impact on the local air pollution. Since the air
pollution monitoring stations are costly and so are limited in number, it is more
convenient to replace these stations by a small and portable measurement system
which includes various gas sensors and microcontroller. The use of WSN can make
air pollution monitoring less complex and more instantaneous readings can be
obtained. Moreover, accurate data with indexing capabilities will be able to obtain by
using WSN .

Fig 2.2 : Wireless Sensor Network Architecture

A WSN is, traditionally, consisting of a few to dozens and in some cases thousands of
sensor nodes, connected to one or more sensors. It also includes a base station (BS)
which acts as gateway between the WSN and the end users . (See Fig.1).
2.2.1 DEFINITION

As seen in the introduction (Fig.1), a Wireless Sensor Network (WSN) is a collection


of very small devices, named sensor nodes, variants of a few dozen to several
thousand elements. In these networks, each node is able to monitor their environment
and respond when needed by sending the collected information to one or more
collection points, using a wireless connection .

2.2.2 ARCHITECTURE OF A SENSOR NODE

The architecture consists of four major parts :

1. The acquisition unit:

It is generally composed of two subunits which are sensors and analog-to-digital


converters ADCs (Analog To Digital Converter). The sensors get action on
environmental parameters and convert them into analog signals. The ADCs convert
these analog signals into digital.

2. The processing unit:

It consists of two interfaces which are interface with the acquisition unit and another
with the transmission module. The control methods for the node to collaborate with
other nodes to perform the tasks of acquisition and store the collected data.

3. A communication module (Transceiver):

It consists of a transmitter / receiver for communication between network nodes via a


radio communication medium.
Fig 2.3 : Architecture of a Sensor Node

4. Battery:

The battery powers the units we have cited, and is generally not rechargeable or
replaceable.

2.3 CONCLUSION
Thus, in this chapter we came to know about the Wireless Sensor Networks and its
Architecture.
3. WIRELESS TECHNOLOGIES

3.1 INTRODUCTION

Bluetooth , ultra-wideband (UWB), ZigBee , and Wi-Fi are four protocol standards
for short range wireless communications with low power consumption.

3.2 CHARACTERISTICS OF WIRELESS TECHNOLOGIES

Bluetooth is a very popular wireless technology intended for short-range


communications in the 2.4 GHz ISM band. It is often employed in mobile phones due
to its coexistence with other 2.4 GHz devices.

Wireless LAN (WLAN, also known as Wi-Fi) is a set of low tier, terrestrial, network
technologies for data communication. The WLAN standards operates on the 2.4 GHz
and 5 GHz Industrial, Science and Medical (ISM) frequency bands. It is specified by
the IEEE standard.

ZigBee , defines specifications for low rate wireless personal area network (LR-
WPAN) for supporting simple devices that consume minimal power and typically
operate in the personal operating space (POS) of 10m. ZigBee provides self-
organized, multi-hop, and reliable mesh networking with long battery lifetime.

Table 1 summarizes various characteristics of these technologies.

TABLE 1 : COMPARISION OF WIRELESS TECHNOLOGIES


BLUETOOTH WI-FI ZIGBEE

Application PC peripherals Enterprise, Sensors , home


networking
(internet)

Range 10 m 50-100 m 10-100 m

Data rate 1Mb/s 54Mb/s 250Kb/s

Nodes per 7 32 >65,000


network

Battery life Days Hours Years

Frequency band 2.4 GHz 2.4 GHz , 5 GHz 2.4 GHz

Power Medium High Very low


consumption

Complexity High High Low

In fact, each protocol is based on an IEEE standard. On the one hand, Wi-Fi provide a
higher data rate (54Mb/s) while Bluetooth and ZigBee give a lower one (1Mb/s and
250 Kb/s respectively). On the other hand, ZigBee and Bluetooth are intended for
WPAN communication (about 10m), while the nominal range for Wi-Fi is about 100
metres.

Moreover, the ZigBee wireless nodes can reach 65.000 whereas this number is limited
to 7 and 32 nodes respectively for Bluetooth and Wi-Fi technologies.
3.3 ZIGBEE TECHNOLOGY

The major objective of the present work is design the wireless sensor node required
for Wireless Sensor Network (WSN), which needs RF module. On survey of various
RF modules like Bluetooth , Zigbee , Wi-Fi , for short range wireless communication
with low power consumption, it is found that Bluetooth is intended for very low data
rate communication. However, the Zigbee is designed for reliable wireless
monitoring and control of the networks. Bluetooth uses Frequency Hopping Spread
Spectrum (FHSS) with 79 channels and 1 MHz bandwidth, while Zigbee uses Direct
Sequence Spread Spectrum (DSSS) With 16 channels and 2MHz bandwidth. The
major advantage of Zigbee over Bluetooth and Wi-Fi is its support up to 6500 nodes
in network, and multi hopping technique. The Zigbee, as shown in Figure 3.1, is a
wireless communication module launched by Digi corporation and it is built to
support the 802.15.4 standard. There are two versions of the Zigbee modules;
(DigiMesh 2.4) and ZB ZigBee. The difference is that the ZB modules are compatible
with normal ZigBee networks, whereas the DigiMesh is a proprietary mesh solution.
Each module comes in 2 versions: ZigBee and ZigBee-Pro. The ZigBee-Pro modules
ensures more powerful radio, for long range. Zigbee module designed for extremely
low cost than other RF models and it is easy to deploy. It consumes very low power
due to sleep mode and operates on low power supply typically 2.8V to 3.3V,
chargeable batteries. Zigbee can cover wide area to be monitored. Based on
multihoping the outdoor range may be enhanced. Salient Features of Zigbee modules
are:

 Power output: 1 mW (+0 dBm)

 Indoor/Urban range: Up to 90 m.

 Outdoor/RF line-of-sight range: Up to 1.6Km)

 RF data rate: 250 Kbps

 Interface data rate: Up to 115.2 Kbps


 Operating frequency: 2.4 GHz

 Receiver sensitivity: -92 dBm

Fig 3.1 : ZigBee Module

3.4 CONCLUSION
Thus , The choice of ZigBee protocol for our application has several reasons. In fact
ZigBee is a very attractive technology for implementing low-cost, low-power wireless
control networks requiring high flexibility in node placement.

4. DESIGN AND IMPLEMENTATION

4.1 INTRODUCTION
In this section, general system architecture Gas Detection explaining the steps
beginning of the three sensors on arrival at the LABVIEW interface is detailed.
The functions desired for our application are :

 Acquisition of data: reading the concentration values of H2S (PPM) and the
temperature value (° C) and humidity (% RH) in the area where the sensor is installed.

 Wireless transmission: sending values of H2S concentration, temperature and


humidity in real time through the Zigbee-pc connection .

 Processing of data: for exceeding the critical values (50 PPM) which indicates the
presence of danger, our system will send an alert with an audible signal to show the
overrun. In general, for intermittent but repeated exposures at concentrations of 50 to
100 ppm (69.5 to 139 mg / m3), subjective and variable manifestations of "malaise"
(headache, fatigue, blurred memory, nausea, anorexia, ...) are described . Our system
will send an alert with an audible signal to show the overrun.

4.2 SYSTEM HARDWARE ARCHITECTURE


Figure 4.1 shows typical composition of our architecture. Wireless sensor nodes
monitor environmental parameters and send data to remote server through the
wireless communication unit.
Fig 4.1 : System Hardware Architecture Block Diagram

PIC16F876 microcontroller has been chosen for this application. It is a 28 pin, 8-bit
microcontroller. It requires 5V supply .

Fig 4.2 : PIC16F876 Microcontroller


4.3 GAS SENSORS
From the above Fig 4.1 , The System Hardware Architecture consist of three types of
sensors.

4.3.1 CO SENSOR

The CO Gas sensor MQ7 suitable for sensing CO concentrations in the air . It can
detect CO gas concentrations anywhere from 20 to 2000 ppm . MQ7 is a high
sensitive to carbon monoxide and stable and long-life span .

Fig 4.3 : CO Gas Sensor MQ7

SPECIFICATIONS :

1. circuit voltage: 5V±0.1

2. Heating voltage (high): 5V±0.1

3. Heating voltage (low): 1.4V±0.1

4. Load resistance: Adjustable

5. Heating resistance: 33Ω±5%

6. Heating time (high): 60±1 seconds


7. Heating time (low): 90±1 seconds

8. Heating consumption: About 350mW

9. Using temperature: -20°C-50°C

10. Storage temperature: -20°C-50°C

11. Relative humidity: Less than 95%RH

12. Oxygen concentration: 21%(stand condition) the oxygen


concentration can affect the sensitivity characteristic

4.3.2 HYDROGEN SENSOR

The HYDROGEN Gas Sensor MQ8 suitable for sensing hydrogen


concentrations in the air . The MQ8 can detect hydrogen gas
concentrations anywhere from 100-10000ppm . This sensor has a high
sensitivity and fast response time. The sensor’s output is an analog
resistance . The drive circuit is very simple; all you need to do is power
the heater coil with 5V, add a load resistance, and connect the output to an
ADC.

Fig 4.4 : Hydrogen Gas Sensor MQ8

SPECIFICATIONS
1. Power supply needs: 5V

2. Interface type: Analog, Digital

3. High sensitivity to Hydrogen (H2)

4. Small sensitivity to alcohol, LPG , cooking fumes

5. Stable and long life

6. Size: 32x20mm

7. Circuit voltage: 5V±0.1

8. Heating voltage: 5V±0.1

9. Load resistance: 10KΩ

10. Heater resistance: 31±5%

11. Heating consumption: less than800mW

12. Using Temperature: -10°C-50°C

13. Storage Temperature: -20°C-70°C

14. Related humidity: less than 95%Rh

15. Oxygen concentration: 21%(standard condition)Oxygen


concentration can affect sensitivity

4.3.3 METHANE SENSOR

The METHANE Gas Sensor MQ4 suitable for sensing natural gas ( Composed of
Mostly methane [CH4] ) concentrations in air . The MQ4 can detect natural gas
concentrations anywhere from 300 to 10000 ppm . This sensor has a high sensitivity
and fast response .
Fig 4.5 : Methane Gas Sensor MQ4

SPECIFICATIONS

1. Input power: 5VDC, 150mA

2. Output: Analog or Digital

3. Size: 32x20x22mm

4. Circuit voltage: 5V±0.1

5. Heating voltage: 5V±0.1 

6. Load resistance: 20KΩ

7. Heater resistance: 33Ω±5% 

8. Heating consumption: less than 750mw  

9. Using Temperature: -10℃-50℃

10. Storage Temperature: 20℃-70℃

11. Related humidity: less than 95%Rh

4.4 CONCLUSION
Thus , in this chapter we came to know about the Design Architecture Of Wireless
Sensor Network.

5. ALGORITHM AND SIMULATION


5.1 INTRODUCTION

5.1.1 LABVIEW SOFTWARE

LabVIEW (Laboratory Virtual Instrument Engineering Workbench) is a graphical


programming language which was developed in 1986 by National Instruments [6].
LabVIEW programming environment is the leader in the field of computer based
measurement and data acquisition. It features exceptional compatibility with National
Instruments hardware and also other devices. Moreover it offers easy construction of
graphical user interface. There are also plenty of add-ons which can be used to deploy
code to standalone devices, analyse and process signals, control, simulation, system
analysis, report creation and data base connection. The biggest advantage of
LabVIEW is fast and simple construction of the graphical user interface that
facilitates the updating of parameters (no need to interfere with the code) and elegant
presentation of results.

LabVIEW is a graphical programming language and hence all programming is made


with blocks representing functions, icons representing variables (called ‘‘Controls” or
‘‘Indicators” which are depicted in the front panel) and lines representing variables
being passed between different functions.

5.1.2 LABVIEW ENVIRONMENT TOOLS

Within the LabVIEW environment there is a good selection of tools to assist the
development of the overall programs.

These tools include:

 Templates & sample projects:   This is a tool that features some of the
common templates that can be used for starting projects along with some fully
formed projects that can be used to see how projects may work, or to be
customized for particular applications.

 Example finder:   This has many hundreds of code snippets that illustrate the
methodology behind a huge variety of different tasks. These can be used or
customized as appropriate.

 Debugging tools:   As with any project, debugging is an essential element of


any development. The LabVIEW environment provides some comprehensive tools
to assist with the speedy debug of programs. The tools include elements like
probes, breakpoints,, single step, highlighting execution (the ability to slow
execution to see how the system operates and thereby isolate issues in a dynamic
manner).

 Hardware manager(Measurement & Automation Explorer):   This is a


complementary tool to LabVIEW. It enables drivers to be managed – updated and
monitored. It also allows the monitoring of validity of the connection to hardware
before running the program.

 Source control:   The LabVIEW environment has several tools to provide


configuration management. This enables larger teams to work together on an
applications whilst still retaining proper configuration management to be
undertaken.

 LabVIEW tools network:   This element of the LabVIEW environment


enables the downloading of specialized toolkits for specific applications. Some are
provided by National Instruments, whereas others may be provided by NI partners.

5.1.3 LABVIEW VIRTUAL ENVIRONMENT


LabVIEW VIs, or LabVIEW Virtual Instruments form the key element within the
overall environment.

The virtual instrument provides a visual method of creating the algorithm and it can
be used on its own or within a larger overall program. In one aspect, the LabVIEW
Virtual Instrument could be likened to a subroutine used in some programming
languages.

The LabVIEW VI consists of two main elements:

VI Front Panel:   The LabVIEW front panel is what the user of the completed
application will see. It enables them to interact with the VI, inputting controls and also
seeing results. It can be likened to the font panel of a test instrument or other piece of
equipment.

The LabVIEW VI front panel can be built up from scratch using the palette of
different controls, indicators and data types.

Fig 5.1 : Example of a LabVIEW VI Front Panel

LabVIEW VI front panels can be completely customized. By having a totally


customized front panel, it is possible to simplify the operation to provide exactly what
is needed without unnecessary controls that may not be required.

VI block diagram:   The LabVIEW VI block diagram is where the functionality of


the VI is programmed in G. The block diagram defines the functionality whilst also
providing a visual representation of it. In this way the block diagram is similar to a
flow diagram within a program.

There is an associated functions palette within the block diagram space where all the
elements needed to build the program can be found. This enables swift accurate
programming to be achieved.
Fig 5.2 : Example of a LabVIEW VI Block Diagram

5.1.4 LABVIEW APPLICATIONS

LabVIEW provides a powerful platform for undertaking a wide variety of different


applications. It started as an environment for managing test programming, but since
its inception, the applications for which it can be used have considerably expanded. It
has expanded from being a graphical test management language to become a
graphical system design environment.

This means that it can be used for an enormous variety of interesting and diverse
applications. Not only can it be used for equipment control (including the control of
the large Hadron Collider at CERN) and a variety of data acquisition applications
(including car development simulation where Big Data monitoring is undertaken) to
the system design arena where it has been used for development of projects from RF
circuitry to biomedical equipment, green technology and much more.

5.1.5 LABVIEW ADVANTAGES/DISADVANTAGES

Like any product or platform, LabVIEW has its advantages and disadvantages. These
must be carefully considered before starting its use.

LABVIEW ADVANTAGES
 Graphical interface is flexible and simple to use. Most engineers and scientists
can learn to use it quickly.

 LabVIEW provides a universal platform for numerous applications in diverse


fields.

 LabVIEW can be used with 3rd party hardware: it can be interfaced with C/C+
+, VB, Fortran etc.

 Easy to interface to many hardware items like data acquisition and test
equipment products.

 It has excellent customer support and a large active community forum.

LABVIEW DISADVANTAGES
 LabVIEW is single sourced and some companies may not like to use a product
that is single sourced and not standardized by the industry.

 Cost of ownership – although in line with many other industry products of a


similar nature, its cost should be considered before it is introduced.

 For those more accustomed to text programming, graphical programming can


take a little familiarization time.

5.2 ALGORITHM OF WIRELESS SENSOR NETWORK

The simulations have been performed using the Proteus software and MicroC Pro for

PIC. The sensing circuit is based on the designed sensor array consist of CO gas
sensor, H2 gas sensor, CH4 gas sensor, PIC16F876 microcontroller, an Zigbee
communication module and a virtual terminal for displaying data in local., as shown in
Fig 5.4 below .

Fig 5.3 : Algorithm of WSN for Monitoring Gas Concentration

Figure 5.3 is the main function for the system designed.


Three potentiometers fed by three power sources to buy the supposed tensions
provided by the GS05, LM35 and HIH4000. A virtual terminal will be connected to
the output of the latter port (RC6 / TX and RC7 / RX UART port PIC) to see the data
that will be sent to the PIC wireless module through the UART port, In this way all
the information such as the concentration of CO gas , Hydrogen gas , CH4 gas
(Methane) which will be sent by the Zigbee modules can be seen with the virtual
terminal.

There are two cases :

 Normal operating conditions where the voltage at the GS05 is less than 4.5V, 2.5V
at the LM35 and 1.5V at the HIH-4000. In this case, we have not exceeded level of
gas so the alarm is triggered (as shown if fig 5.4, the terminal bound N°7 of the alarm,
connected to the RC3 pin of the pic, is red which lead to an output voltage of 5V.
Thus, no alarm signal is sent).

Fig 5.4 : Circuit schematic of Wireless Sensor Nodes


in Normal Conditions

 Alert conditions where the voltage at the GS05 is greater or equal to 4.5V, 2.5V
at the LM35 and 1.5V at the HIH-4000. We have an exceeded level of gas so the
alarm is activated (it can be seen in Fig. 5.5 that the terminal bound N°7 of the
alarm, connected to the RC3 pin of the pic , is blue which lead to an output voltage
of 0V. Thus, an alarm signal is sent).
Fig 5.5 : Circuit Schematic of Wireless Sensor Nodes in
Alert conditions

The simulator board is depicted in Fig 5.6. It's allows to collect analog values issue
from different sensors which will be transmitted to a pc through the Zigbee module.

Fig 5.6 : Detection Circuit

5.3 CONCLUSION

Thus , in this chapter we came to know about the LABVIEW environment , Zigbee
technology and the process of simulation .

6. GATEAWAY DESIGN WITH

LABVIEW INTERFACE

6.1 INTRODUCTION
In order to realize a real time acquisition of data and results , a mechanism using
LabVIEW is introduced . This mechanism will automatically monitor when there is
an alert affecting the system . LabVIEW software is used to implement the system.
The system investigates level H2S gas, temperature and humidity.

Fig 6.1 : Communication XBEE module – LabVIEW Interface

6.2 GRAPHICAL INTERFACE

LabVIEW is a graphical programming language that uses icons instead of lines of text
to create applications; it uses a dataflow programming data to determine performance.
This software is easy to handle as it does not require great programming skills. Just
choose the blocks for achieving the desired functions and have them connect and
configure, is the reason for which all modules are created with LabVIEW called
VI (virtual instrument).

The graphic interface achieved is summarized by:


- Three curves showing changes in gas concentration , temperature and humidity with
time.

- Two Start and Stop buttons that control the map,


- Configuration of the port used (port / baud rate)
- Three newspapers to record acquired values
- An animation window that shows system status (normal operation / alarm function)
- A window that displays the date and time of simulation
- Two buttons indicating information of our project and the report
- A counter indicating the variation of gas concentration
- Two blocks indicating the levels of temperature and humidity
Fig 6.2 : Interface gas detection system in Normal conditions
Fig 6.3 : Interface gas detection system in Alert conditions

Figure 6.3 presents the case of an exceeding level of gas (> =4.5V) thus displaying a
flashing window that contains an alert message with alarm sound . Our card
communicates with the PC via the RS232 which is chosen based on LabVIEW VISA
to make the link configuration shown in Fig.6.4 The VISA Configure Serial Port VI
initializes the port identified by VISA resource name to the specified settings.
Timeout sets the timeout value for the serial communication . Baud rate, data bits,
parity, and flow control specify those specific serial port parameters .

Fig 6.4 : VISA Configure serial Port

6.3 CONCLUSION
Thus , in this chapter we came know to about the interfacing ZigBee Module with
LabVIEW .
7. RESULTS

The project depends on the basic principle of wireless sensor networks . The system
under investigation designed for air pollution monitoring in polluted areas was
successfully tested . In fact wireless sensor nodes have been designed . Nodes have
been calibrated to the respective unit by adopting scientific method .

Fig 7.1 : Architecture of Proposed Model

The architecture of the proposed air quality monitoring system is shown in Figure 7.1
which consists of ZigBee end nodes, LCD, ATMEGA16, MQ-4, MQ-7, MQ-8 and a
wireless gateway including associated software for system devices and a LabVIEW
graphical user interface (GUI) for display of data on a remote computer/laptop. The
end nodes (also known as sensor nodes) positioned at different poles in the traffic area
scan simultaneously measure air quality parameters in an ambient environment. The
coordinator is used to receive data transmitted from routers or end devices. The
gateway provides data to a computer where the sensing data is stored and integrated
into a database. The user can thus make inquiries for the history and latest data
through the LabVIEW interface. By using different indicators in LabVIEW the output
of analog data from the sensor is seen and plotted in charts .
Fig 7.2 : System Design with three sensors

Embedded system kit with different air pollutants sensors are shown in Figure 7.2 .
Initially, the hardware kit is switched ON, with the help of step down transformer ,
rectifier and voltage regulator 230V AC is stepped down to 12V DC . Here three
different sensors such as MQ7, MQ4, MQ 8 are used to monitor the air pollution
which captures the analog signal . The MQ-7 can detect CO-gas concentrations
anywhere from 20 to 2000ppm. The MQ-4 gas sensor has high sensitivity to Methane,
also to Propane and Butane . The sensor could be used to detect different combustible
gas, especially Methane . MQ-8 gas sensor has high sensitivity to Hydrogen , also
sensitive to smoke and other harmful gases Each sensor is connected to
microcontroller which has four ports, port B is left alone. Zigbee module is used
which is software based protocol and it is connected to the laptop through a serial
cable. The VISA driver software is installed in laptop which supports serial
communication. Liquid crystal displays a type of display used in digital watches and
many portable computers. The data is given to the serial port which is given to read
buffer, which specifies the data on the LCD display. For example, C: 234, N: 320, G:
278 is displayed on the LCD display and it is of 15 bytes length, the read buffer
function is used on the back panel in the LabVIEW software to read the serial data .
A schematic, or schematic diagram, is a representation of the elements of a system
using abstract, graphic symbols rather than realistic pictures. Here all the elements in
the system are placed sequentially with resistors, capacitors and integrated circuits.
Figure 7.3 shows the schematic diagram of proposed architecture.

Fig 7.3 : Schematic Diagram of a proposed Architecture

The Here the while loop is taken with ‘i’ as the iteration parameter and for each
iteration the delay time of 10ms is considered. The output of input and output
communication port is connected to VISA serial port and I/O COM1 acts as VISA
resource name. Figure 7.4 shows the LabVIEW program.
Fig 7.4 : Block Diagram of Air Pollution Monitoring System

Using numeric controls and indicators on the front panel to enter and display numeric
data in LabVIEW applications. Here three different indicators are used for
measurement of different air pollutants. The first one is temperature indicator in
which the display format is numeric in SI notation. It indicates the amount of carbon
monoxide content in the atmosphere. Another indicator we used is screw gauge. The
needle color is red which indicator the amount of nitrous oxide in the atmosphere. The
last indicator we used is meter which indicates the content of natural gas in the
atmosphere. Figure 7.5 & 7.6 shows the front panel for different sensor data.
Fig 7.5 : Front panel showing indicators of sensors output and read buffer output
In Normal conditions

Fig 7.6 : Front panel showing indicators of sensors output and read buffer output
In Alert conditions
8. CONCLUSION

The real success of the sensor network technology depends mainly on its application
in eradicating a harmful situation or in maintaining a good one . Designing an
efficient application is one of the major challenges and sensor network challenges are
application dependent .

Air quality monitoring is a prospective application domain which is of particular


value to our country. Large cities with high concentration of industry, intensive
transport networks and high population density are major sources of air pollution.
Predicting air quality from multiple sources by using modeling is very complicated.
So, air quality models are best used for isolated sources or situations .

As per the World Bank report quoted earlier, industrial pollution in India is on the
more alarming state than industrial production. Hence, controlling and monitoring air
pollution round the clock is a social imperative. This study proves that WSN could be
a useful mechanism for this double task.

A low-cost low complexity and scalable wireless mash network based real-time
air quality monitoring system is presented which includes carbon monoxide,
Hydrogen and methane gas measurement. By constructing the above model, we can
take measures regarding the pollution control in the public areas and pave way for
controlling pollution .

We present a real time acquisition and monitoring system based on LabVIEW


interface.

9. SCOPE FOR FUTURE WORK


The design of the air quality monitoring network basically involves determining the
number of stations and their locations, with a view of the objectives, costs and
available resources. To assist an industrialist, an expert system should be developed to
fix the exact number and distribution of monitoring locations of a sensor. The expert
system must contain some guidance to energy efficient continuous air pollution
monitoring sensor network.

One more challenge is, effective data warehousing and mining process for air
pollution monitoring data. The data stored within the central data warehouse will
often need to be queried by the end-users in order to find regularities and fluctuations
in pollution levels. Furthermore, there is a need to identify the long-term patterns of
pollution, key relationship between certain pollutants etc.

Society looks for a pollution-free globe for happy living. The global warming threat is
waiting at the door. Government rules, governing pollution control in private sector
industries are not implemented that effectively. This scenario stresses the need for an
efficient monitoring system with the collaboration of users, domain experts, hardware
designers and software developers. This study is an attempt in this direction.

10. BIBLIOGRAPHY
[1] Wireless Sensor Networks : H. Karl and A. Willig , Protocols and Architectures
for
Wireless Sensor Networks, John Wiley and Sons Ltd , The Atrium , Southern Gate,
Chichester, West Sussex, England.
[2] Wireless Sensor Networks : Afsaneh Minaie, Ali Sanati-Mehrizy “Application of
Wireless Sensor Networks in Health Care System” 120th ASEE Annual Conference
and Exposition.
[3] Wireless Technologies : Jin-Shyan Lee, Yu-Wei Su , and Chung-Chou Shen “A
Comparative Study of Wireless Protocols: Bluetooth, UWB, ZigBee, and Wi-Fi” The
33rd Annual Conference of the IEEE Industrial Electronics Society (IECON).

You might also like