Top Banner
1 CHAPTER 1 INTRODUCTION 1.1 OVERVIEW Over the past quarter century, there has been an exponential increase of industries, and these industries have caused complex and serious problems to the environment. The first and the foremost is the severe environmental pollution which has caused deterioration of atmosphere, climate change, stratospheric ozone depletion, loss of biodiversity, changes in hydrological systems and the supplies of fresh water, land degradation and stresses on systems of food producing, acid rain, and global warming. In addition to industries, automobiles, agricultural activities, and even ordinary homes contribute towards the environmental pollution. It is well known that some of these chemical pollutants have increased Environmental pollution has several aspects. The most serious aspect of environmental pollution is the air pollution, while two other aspects are water and soil pollution. Most of the above air pollution and quality monitoring systems are based on sensors that report the pollutants levels to a server via wired modem, router, or short-range wireless access points. In this paper, we propose a system that integrates a single-chip microcontroller and several air pollution sensors (CO, NO 2 , and SO 2 ). The integrated unit is a sensor, Analog to digital converter and a Microcontroller. This unit can be placed on the top of any moving device such as a public transportation vehicle. While the vehicle is on the move, the microcontroller generates a frame consisting of the acquired air pollutant level from the sensors array and the physical location that is reported to the PC. Future work of this paper is pollutants frame uploaded to the ZIGBEE Modem and transmitted to the Pollution-Server via the public mobile network.
40
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Int

1

CHAPTER 1

INTRODUCTION

1.1 OVERVIEW

Over the past quarter century, there has been an exponential increase of

industries, and these industries have caused complex and serious problems to

the environment. The first and the foremost is the severe environmental

pollution which has caused deterioration of atmosphere, climate change,

stratospheric ozone depletion, loss of biodiversity, changes in hydrological

systems and the supplies of fresh water, land degradation and stresses on

systems of food producing, acid rain, and global warming.

In addition to industries, automobiles, agricultural activities, and even

ordinary homes contribute towards the environmental pollution. It is well

known that some of these chemical pollutants have increased Environmental

pollution has several aspects. The most serious aspect of environmental

pollution is the air pollution, while two other aspects are water and soil

pollution.

Most of the above air pollution and quality monitoring systems are based

on sensors that report the pollutants levels to a server via wired modem, router,

or short-range wireless access points. In this paper, we propose a system that

integrates a single-chip microcontroller and several air pollution sensors (CO,

NO2, and SO2). The integrated unit is a sensor, Analog to digital converter and

a Microcontroller. This unit can be placed on the top of any moving device

such as a public transportation vehicle. While the vehicle is on the move, the

microcontroller generates a frame consisting of the acquired air pollutant level

from the sensors array and the physical location that is reported to the PC.

Future work of this paper is pollutants frame uploaded to the ZIGBEE

Modem and transmitted to the Pollution-Server via the public mobile network.

Page 2: Int

2

A database server is attached to the Pollution-Server for storing the pollutants

level for further usage by interested clients such as environment production

agencies and vehicles regeneration authorities.

1.1.1 System Requirements

A system can be characterized according to its functional and non-

functional requirements. Functional requirements describe the primary

functionality of a system while non-functional requirements describe attributes

like reliability and security, etc.

The system’s functional requirements are as follows.

i. System must support accurate and continuous real-time data collection.

ii. System needs to store the data and provide access to a location map

interface.

iii. System needs to support mobility.

iv. System must use minimum power.

v. System must be accessible from the Internet.

vi. System must be compact.

vii. System must mostly use off-the-shelf devices, components, and

standards.

viii. System must support two-way communication between the client and

the server.

ix. System must be field-configurable.

x. System should be easy to deploy.

Non-functional requirements for the system dictate that the system is

reliable, portable, accurate, maintainable, secure, accessible, and usable. In

addition, the system must support performance standards for an adequate

response time and storage space for data.

Page 3: Int

3

1.2 MOTIVATION OF THE WORK

The motivation of the project is to build an air pollution monitoring system,

so a detection system for multiple information of environment is designed in

this project. There is a growing demand for the environmental pollution

monitoring and control systems. In view of the ever-increasing pollution

sources with toxic chemicals, these systems should have the facilities to detect

and quantify the sources rapidly. This project is built for low cost, quick

response, low maintenance, ability to produce continuous measurements etc.

The main goal of this project is to control the air pollution, hazardous gases and

increase awareness about pollution by using air pollution monitoring system.

1.3 OBJECTIVE OF THE WORK

The objective of the work is to measure the air pollutants level and

temperature range. Then the Acquired air pollutant level from the sensors array

will report to the PC. This system is used for acquiring the real-time data from

the sensors-array and the physical location, time and date of the sampled

pollutants from the GPS module. This information is then encapsulated into a

data frame by the microcontroller. Finally the acquired data will report to the

PC.

1.4 CHAPTER ORGANISATION

In this report, we propose an air pollution monitoring system. The rest of

the report is organized as follows.

i. Chapter 1 gives a brief introduction about air pollution

monitoring system.

ii. Chapter 2 deals with the Lliteratures collected related to the

pollution monitoring system.

iii. Chapter 3 discuss about the Mobile GPRS-sensors array for air

pollution monitoring system.

Page 4: Int

4

iv. Chapter 4 chapter discussions are made about the work carried

out. Also outputs of the various blocks of the proposed air

pollution monitoring with ZIGBEE are mentioned.

v. Chapter 5 deals about the Conclusion and Future work.

Page 5: Int

5

CHAPTER 2

LITERATURE SURVEY

2.1 AIR POLLUTION MONITORING SYSTEM BASED ON THE IEEE

STANDARD

An Environmental Air Pollution Monitoring System (EAPMS) for

monitoring the concentrations of major air pollutant gases complying with the

IEEE 1451.2 standard. This system measures concentrations of gases such as

CO, NO2, SO2, and O3 using semiconductor sensors. The smart transducer

interface module (STIM) is implemented using the analog devices’ ADuC812

microconverter. Network Capable Application Processor (NCAP) was

developed using a personal computer and connected to the STIM via the

transducer independent interface. Three gas sensors were calibrated using the

standard calibration methods [1]. Gas concentration levels and information

regarding the STIM can be seen on the graphical user interface of the NCAP.

Further, the EAPMS is capable of warning when the pollutant levels exceed

predetermined maxima.

2.2 A WEARABLE AND WIRELESS SENSOR SYSTEM FOR REAL-

TIME MONITORING

An integrated volatile organic toxicants sensor with a Bluetooth device

interface. The device is based on novel tuning fork sensor platform along with

a wireless communication/ interface technology taken in an integrated system

approach [2]. It features high sensitivity and selectivity. The sensitivity and

selectivity are accomplished through the use of novel tuning fork sensor

modified by design polymers and selective filtering. Experiments have shown

that the device can detect toxic volatile organic compounds (VOCs) under high

concentrations of common interferents from flavours and fragrances.

Page 6: Int

6

2.3 AIR POLLUTION MONITORING SYSTEM BASED ON

GEOSENSOR NETWORK

Environment Observation and Forecasting System (EOFS) is an

application for monitoring and providing a forecasting about environmental

phenomena. We design an air pollution monitoring system which involves a

context model and a flexible data acquisition policy. The context model is used

for understanding the status of air pollution on the remote place [3]. It can

provide an alarm and safety guideline depending on the condition of the

context model. It also supports the flexible sampling interval change for

effective the trade-off between sampling rates and battery lifetimes. This

interval is changed depending on the pollution conditions derived from the

context model. It can save the limited batteries of geo-sensors, because it

reduces the number of data transmission.

2.4 TEMPORAL AIR QUALITY MONITORING USING

SURVEILLANCE CAMERA

This paper is to report upon the usage of an internet surveillance camera

to record the temporal development and to map the spatial distribution of air

quality concentration. An internet surveillance camera was used to quantify air

quality with our own developed algorithm, which is based on the regression

analysis of the relationship between measured reflectance components from a

surface material and the atmosphere [4]. A newly developed algorithm was

applied to compute the temporal development of PM values.

2.5 MONITORING SYSTEM WITH WIRELESS NETWORK BASED

ON EMBEDDED SYSTEM

This paper proposes a remote monitoring system for the greenhouse

environment. The system can be set in the monitoring spot. Real time data

which gathered and simply disposed can be transmitted to the remote server by

wireless module-GPRS &. CDMA IX. The dynamic WEB publishing can be

Page 7: Int

7

realized by the ASP.NET technique in the remote server. Embedded operation

system-GC/OS-II has been ported in the system's microchip. GC/OS-II can

manage collecting, displaying and saving data and so on. This method can

significantly improve the system's Real-time, reliability and expansibility [5].

The remote monitoring system can realize the real time publishing and the

historical data request.

2.6 REMOTE MONITORING SYSTEM WITH WIRELESS SENSORS

MODULE

This paper focuses on realizing the wireless remote monitoring Mud-

rock Flow landslide in remote or complex regional geological environment, on

basis of the conclusion of wired image monitoring system, proposed a wireless

remote image monitoring system based on GSM/GPRS and ARM_Linux

developing environment. Firstly, design the overall of the system, analysis the

structure of the system’s hardware and software [6]. Then, use the APIs of

Video4Linux kernel to realize image acquisition of the system, through PPP

dial-up to access the GPRS, through network programming to realize the

transmission of the image.

2.7 DESIGN OF AIR POLLUTION MONITORING SYSTEM USING

ZIGBEE NETWORKS

This paper focuses on implementation of air pollution monitoring

system. First, each sensor was tested after survey about market trends of a

variety of sensors for detecting air pollution. Second, wireless communication

modules for monitoring system were developed using wireless sensor networks

technologies based on ZIGBEE. And then a performance of modules was

estimated in the real-fields [7]. Through software programs written in NES C

for efficient routing in wireless networks were simulated using TOSSIM

simulator. Finally, integrated wireless sensor board which employs dust, CO2,

temperature /humidity sensor and a ZIGBEE module was developed.

Page 8: Int

8

2.8 POLLUMAP: A POLLUTION MAPPER FOR CITIES

PolluMap is a new automated system that monitors the air quality of

urban cities and displays the information using a web service. The system

collects pollution data using mobile hardware modules, transmits the data

regularly using GPRS to a back-end server, and integrates the data to generate a

pollution map of the city using its geographical information system [8]. The

pollution map is available at any time from an easy-to-view website. Unlike

previous pollution mappers, the new system provides continuous update of

pollution information in addition to maximum coverage. It can be easily

expanded to new areas and is cheap to employ.

2.9 AIR QUALITY MONITORING USING ALOS SATELLITE

IMAGE

The aim of this study is to develop a state-of-art reliable technique to

use surveillance camera for monitoring the temporal patterns of PM10

concentration in the air. Once the air quality reaches the alert thresholds, it will

provide warning alarm to alert human to prevent from long exposure to these

fine particles. This is important for human to avoid the above mentioned

adverse health effects. In this study, an internet protocol (IP) network camera

was used as an air quality monitoring sensor [9]. It is a 0.3 mega pixel Charge-

Couple-Device (CCD) camera integrates with the associate electronics for

digitization and compression of images. This network camera was installed on

the rooftop of the School of Physics. The camera observed a nearby hill, which

was used as a reference target. At the same time, this network camera was

connected to network via a cat 5 cable or wireless to the router and modem,

which allowed image data transfer over the standard computer networks

(Ethernet networks), internet, or even wireless technology. Then images were

stored in a server, which could be accessed locally or remotely for computing

the air quality information with a newly developed algorithm. The results were

compared with the alert thresholds. If the air quality reaches the alert threshold,

Page 9: Int

9

alarm will be triggered to inform us this situation. The newly developed

algorithm was based on the relationship between the atmospheric reflectance

and the corresponding measured air quality of PM10 concentration. In situ

PM10 air quality values were measured with DustTrakTM

meter and the sun

radiation was measured simultaneously with a spectroradiometer. Regression

method was use to calibrate this algorithm. Still images captured by this

camera were separated into three bands namely red, green and blue (RGB), and

then Digital Numbers (DN) were determined. These DN were used to

determine the atmospherics reflectance values of difference bands, and then

used these values in the newly developed algorithm to determine PM10

concentration. The results of this study showed that the proposed algorithm

produced a high correlation coefficient (R2) of 0.7567 and low root-mean-

square error (RMS) of ± 5μg/m3

between the measured and estimated PM10

concentration.

Page 10: Int

10

CHAPTER 3

MOBILE DAQ UNIT

3.1 GPRS-SENSORS FOR AIR POLLUTION MONITORING SYSTEM

The proposed system consists of a Mobile Data-Acquisition Unit

(Mobile-DAQ) and a fixed Internet-Enabled Pollution Monitoring Server

(Pollution-Server). The Mobile-DAQ unit integrates a single-chip

microcontroller, air pollution sensors array, a General Packet Radio Service

Modem (GPRS-Modem), and a Global Positioning System Module (GPS-

Module). The Pollution-Server is a high-end personal computer application

server with Internet connectivity. The Mobile-DAQ unit gathers air pollutants

levels (CO, NO2, and SO2), and packs them in a frame with the GPS physical

location, time, and date. The frame is subsequently uploaded to the GPRS-

Modem and transmitted to the Pollution-Server via the public mobile network.

A database server is attached to the Pollution- Server for storing the pollutants

level for further usage by various clients such as environment protection

agencies, vehicles registration authorities, and tourist and insurance companies.

The Pollution-Server is interfaced to Google Maps to display real-time

pollutants levels and locations in large metropolitan areas.

3.2 HARDWARE ARCHITECTURE

To satisfy the system’s functional and non-functional requirements, two

major building blocks are needed, namely: a Mobile Data-Acquisition Unit

(Mobile-DAQ) and a fixed Internet-Enabled Pollution monitoring Server

(Pollution-Server). The Mobile-DAQ unit is designed by integrating the

following hardware modules shown in Fig.3.2. As the figure shows, the

Mobile-DAQ consists of a 16-bit single-chip microcontroller integrated with a

sensor array using analog ports. The Mobile-DAQ is also connected to a GPS

module and a GPRS-Modem using the RS-232 interface. Each of these

components is described in the following.

Page 11: Int

11

Block Diagram

Figure 3.1 Air pollution monitoring system

Power

Supply

Micro

Controller

GAS

SENSOR

Temperature

SENSOR

A

D

C

U

N

I

T

UART

GPRS

Transceiver

GPS

MODULE

Page 12: Int

12

3.2.1 16-Bit Single-Chip Microcontroller

The microcontroller is a single-chip device that has rich built-in

resources for digital input/output ports, 16 channels, 8/10 bits analog-to-digital

converter, 8 input/output interrupt- driven timers, 12 Kbytes of RAM, 4 Kbytes

of EEPROM, 256 Kbytes of FEEPROM, two RS-232 serial communication

ports, 4 Control Area networks ports, and SPI communication ports. These

resources are more than enough for the proposed application.

3.2.2 Sensors Array

The sensor array consists of three air pollutions sensors including

Carbon Monoxide (CO), Nitrogen Dioxide (NO2), and Sulphur Dioxide (SO2).

As Table 3.2.2 shows, the resolution of these sensors is sufficient for pollution

monitoring. Each of the above sensors has a linear current output in the range

of 4 mA–20 mA. The 4 mA output corresponds to zero-level gas and the 20

mA corresponds to the maximum gas level. A simple signal conditioning

circuit was designed to convert the 4 mA–20 mA range into 0–5 V to be

Sensor CO NO2 SO2

Resolution Less than 1.5 Less than 0.02 Less than 0.1

Rep time Less than 25 Less than 60 Less than 25

Op range 0- 1000 0-20 0-20

Operating life Greater than 2 Greater than 2 Greater than 2

Diameter 20 20 20

Table 3.1 Sensor Array Specification

Compatible with the voltage range of the built-in analog-to-digital converter in

the 16-bit single chip microcontroller described earlier.

Page 13: Int

13

3.2.3 GPS Module

The GPS module provides the physical coordinate location of the

mobile-DAQ, time and date in National Marine Electronics Association

(NMEA) format [11]. NEMA format includes the complete position, velocity,

and time computed by a GPS receiver where the position is given in latitude

and longitude The data packet from the GPS-Module includes an RMS Header

followed by UTC time, data validity checksum, latitude, longitude, velocity,

heading, date, magnetic variation and direction, mode, and checksum. The only

information required for the proposed system is date, time, latitude and

longitude. The GPS modem is interfaced with the microcontroller using the

RS-232 communication standard.

3.2.4 GPRS-Modem

The general packet radio service (GPRS) is a packet-oriented mobile

data service used in 2G and 3G cellular communication systems global system

for mobile communications (GSM).The proposed system uses a GPRS-Modem

as a communication device to transmit time, date, physical location and level of

air pollutants. The modem used for the proposed system has an embedded

communication protocol that supports Machine-to-Machine (M2M) intelligent

wireless Transmission Control Protocol (TCP/IP) features such as Simple Mail

Transfer (SMTP) E-mail, File Transfer Protocol (FTP), and Simple Messaging

Service (SMS) services Protocol. The modem supports an RS-232 interface

that allows Serial TCP/IP socket tunnelling. The modem also has rugged

aluminium enclosure making it suitable for the proposed system.

3.2.5 Pollution-Server

The Pollution-Server is an off-the-shelf standard personal computer with

accessibility to the Internet. As Fig. 3.2 shows, the Pollution-Server connects to

the GPRS-Modem via TCP/IP through the Internet and the public mobile

network. The server requires a private IP address for the GPRS-Modem and

Page 14: Int

14

communicates over a pre-configured port. The Pollution-Server connects to a

database management system (MySQL) through a local area network (LAN).

The Pollution-Server runs a Wamp Server stack that provides the Apache Web

Server in addition to the PHP Server-side scripting language. Clients such as

the municipality, environmental protection agencies, travel agencies, insurance

companies and tourist companies can connect to the Pollution-Server through

the Internet and check the real-time air pollutants level using a normal browser

on a standard PC or a mobile device. The Pollution- Server can be physically

located at the Environmental Protection Agency (EPA) or similar government

agencies.

To satisfy the system’s functional and non-functional requirements, two

major building blocks are needed, namely: a pollution monitoring system and a

fixed Internet-Enabled Pollution monitoring Server (Pollution-Server). The air

pollution monitoring unit is designed by integrating the following hardware

modules shown in Fig. 1. As the figure shows, the monitoring system consists

of a 16-bit single-chip microcontroller integrated with a sensor array using

analog ports. The Air pollution monitoring system is also connected to a GPS

module and a ZIGBEE-Modem using the RS-232 interface. Each of these

components is described in the following.

Page 15: Int

15

CHAPTER 4

AIR POLLUTION MONITORING SYSTEM

4.1 INTRODUCTION

Environmental Air pollution monitoring system (EAPMS) is used for

monitoring the concentrations of major air pollutant gases. This system

measures concentration of gases and temperature level using semiconductor

sensors.. This sensor integrates ATMEL89C51 and ADC. In this system the

acquired air pollutant level and temperature from sensor array will report to the

personal computer (PC). Further, the EAPMS is capable of warning when the

pollutant levels exceed predetermined maxima. We design and implement an

air pollution monitoring system based on sensor network. It employs the

context model for understanding the status of air pollution on the current and

near future pollution area. It is essential to provide a message and safety

guideline for a near future dangerous situation, because prevention is better

than cure. It can reduce severe damage and recovery cost

Page 16: Int

16

4.1.1 Block Diagram

Figure 4.1 system hardware basic building block

4.2 SENSORS

The sensor array consists of three air pollutions sensors including

Carbon Monoxide (CO), Nitrogen Dioxide (NO2), and Sulphur Dioxide (SO2).

Each of the above sensors has a linear current output in the range of 4 mA–20

mA. The 4 mA output corresponds to zero-level gas and the 20 mA

corresponds to the maximum gas level. A simple signal conditioning circuit

was designed to convert the 4 mA–20 mA range into 0–5 V to be compatible

with the voltage range of the built-in analog-to-digital converter in the 16-bit

single chip microcontroller.

A gas sensor is a transducer that detects gas molecules and produces an

electrical signal with a magnitude proportional to the concentration of the gas.

A semiconductor sensor consists of one or more metal oxides such as tin oxide,

16 aluminium oxide, etc. When heated to a high temperature, an n-type

semiconductor material decreases its resistance, while p-type increases the

Power

Supply

Micro

Controller

GAS

SENSOR

Temperature

SENSOR

A

D

C

U

N

I

T

UART

PC

GPS

MODULE

Page 17: Int

17

resistance in the presence of a reducing gas. Table II shows the details.

Typically, a semiconductor sensor produces a strong signal, especially at high

gas concentrations with adequate sensitivity, fast response time, long-term

stability, and longer lifetime

4.3 GAS SENSOR (PPD4NS)

This dust sensor creates digital (low pulse) output when detecting

particulate matters. Low pulse occupancy time is in proportion to particulate

matters concentration. PPD4NS can detect particulate matters whose size is

around 1 micro meter or larger on the air. The scheme of this sensor is that it

generates a rising current of air which includes particles using a heater and

rises up. And then particles of smoke, dust pass on the lighting area, the

dispersion light pulse was generated in accordance with size of particles. It

outputs voltage pulse converted from the dispersion light pulse.

CE32-A01 is a solid electrolyte type CO2 gas sensor adopted planar

technologies to improve the reliability, the sensing property. Components of

heater, electrodes and electrolyte were made by thin film technology. This

sensor exhibits a non-linear relation between voltage of output and density of

CO2 gas. This sensor can only detect CO2 and unit of output is mV. It needs to

OP-Amp because of very low scale of voltage. The low cost semiconductor

sensors are suitable to use in an array form for low cost environment pollution

monitoring systems.

Page 18: Int

18

4.3.1 Circuit of Sensor Module

Figure 4.2 Circuit of Gas Sensor

Such an array could be enhanced with additional temperature, pressure, and

relative humidity sensors to measure the pollutant concentrations together with

other physical parameters, with the advantage of better calibration of the gas

sensors.

Page 19: Int

19

Feature Analytical instrument Gas sensors

Resolution Excellent Comparable

Cost Very high Fair

Size Bulky Compact

Rigidity Fragile Rigid

Response Slow Quick

Process Control Difficult Easy

Mass production Difficult Easy

Table 4.1 Comparison between Analytical Instruments and Gas Sensors

4.4. TEMPERATURE SENSOR

The SHT71 is a single chip relative temperature multi sensor module

comprising a calibrated digital output. This device includes a capacitive

polymer sensing element for relative humidity and temperature sensor. Both

are seamlessly coupled to a 14 bit analog to digital converter and a serial

interface circuit on the same chip.

Figure 4.3 Temperature Sensor

Page 20: Int

20

4.5 MICROCONTROLLER

4.5.1 Description

The AT89C51 is a low-power, high-performance CMOS 8-bit

Microcomputer with 4K bytes of Flash programmable and erasable read only

memory (PEROM). The device is manufactured using Atmel’s high-density

nonvolatile memory technology and is compatible with the industry-standard

MCS-51 instruction set and pin out. The on-chip Flash allows the program

memory to be reprogrammed in-system or by a conventional nonvolatile

memory programmer. By combining a versatile 8-bit CPU with Flash on a

monolithic chip, the Atmel AT89C51 is a powerful microcomputer which

provides a highly-flexible and cost-effective solution to many embedded

control applications

4.5.2 Features

i. Compatible with MCS-51™ Products.

ii. 4K Bytes of In-System Reprogrammable Flash.

Memory Endurance: 1,000 Write/Erase Cycles.

iii. Fully Static Operation: 0 Hz to 24 MHz’s.

iv. Three-level Program Memory Lock.

v. 128 x 8-bit Internal RAM.

vi. 32 Programmable I/O Lines.

vii. Two 16-bit Timer/Counters.

viii. Six Interrupt Sources.

ix. Programmable Serial Channel.

x. Low-power Idle and Power-down Modes.

Page 21: Int

21

4.5.3 Pin Diagram

Figure 4.4 Pin Diagram

In addition, the AT89C51 is designed with static logic for operation

down to zero frequency and supports two software selectable power saving

modes. The Idle Mode stops the CPU while allowing the RAM, timer/counters,

serial port and interrupt system to continue functioning. The Power Down

Mode saves the RAM contents but freezes the oscillator disabling all other chip

functions until the next hardware reset

Page 22: Int

22

4.5.4 Pin Description

VCC - Supply voltage.

GND - Ground.

Port 0

Port 0 is an 8-bit open-drain bi-directional I/O port. As an output port,

each pin can sink eight TTL inputs. When 1s are written to port 0 pins, the pins

can be used as high impedance inputs. Port 0 may also be configured to be the

multiplexed low order address/data bus during accesses to external program

and data memory. In this mode P0 has internal pull-ups. Port 0 also receives the

code bytes during Flash programming, and outputs the code bytes during

program verification. External pull-ups are required during program

verification.

Port 1

Port 1 is an 8-bit bi-directional I/O port with internal pull-ups. The Port

1 output buffers can sink/source four TTL inputs. When 1s are written to Port 1

pins they are pulled high by the internal pull-ups and can be used as inputs. As

inputs, Port 1 pins that are externally being pulled low will source current (IIL)

because of the internal pull-ups Port 1 also receives the low-order address bytes

during Flash programming and verification.

Port 2

Port 2 is an 8-bit bi-directional I/O port with internal pull-ups. The Port

2 output buffers can sink/source four TTL inputs. When 1s are written to Port 2

pins they are pulled high by the internal pull-ups and can be used as inputs. As

inputs, Port 2 pins that are externally being pulled low will source current (IIL)

because of the internal pull-ups. Port 2 emits the high-order address byte during

fetches from external program memory and during accesses to external data

memory that uses 16-bit addresses (MOVX @ DPTR). In this application, it

Page 23: Int

23

uses strong internal pull-ups when emitting 1s. During accesses to external data

memory that uses 8-bit addresses (MOVX @ RI), Port 2 emits the contents of

the P2 Special Function Register. Port 2 also receives the high-order address

bits and some control signals during Flash programming and verification.

Port 3

Port 3 is an 8-bit bi-directional I/O port with internal pull-ups. The Port

3 output buffers can sink/source four TTL inputs. When 1s are written to Port 3

pins they are pulled high by the internal pull-ups and can be used as inputs. As

inputs, Port 3 pins that are externally being pulled low will source current (IIL)

because of the pull-ups. Port 3 also serves the functions of various special

features of the AT89C51 as listed below: Port 3 also receives some control

signals for Flash programming and verification.

4.5.5 Operating Modes

Idle Mode

In idle mode, the CPU puts itself to sleep while all the on chip

peripherals remain active. The mode is invoked by software. The content of the

on-chip RAM and the entire special functions registers remain unchanged

during this mode. The idle mode can be terminated by any enabled interrupt or

by a hardware reset. It should be noted that when idle is terminated by a

hardware reset, the device normally resumes program execution, from where it

left off, up to two machine cycles before the internal reset algorithm takes

control. On-chip hardware inhibits access to internal RAM in this event, but

access to the port pins is not inhibited. To eliminate the possibility of an

unexpected write to a port pin when Idle is terminated by reset, the instruction

following the one that invokes Idle should not be one that writes to a port pin or

to external memory.

Page 24: Int

24

Power-Down Mode

In the power-down mode, the oscillator is stopped, and the instruction

that invokes power-down is the last instruction executed. The on-chip RAM

and Special Function Registers retain their values until the power-down mode

is terminated. The only exit from power-down is a hardware reset. Reset

redefines the SFRs but does not change the on-chip RAM. The reset should not

be activated before VCC is restored to its normal operating level and must be

held active long enough to allow the oscillator to restart and stabilize.

4.6 ANALOG TO DIGITAL CONVERTER

4.6.1 Description

The ADC0808, ADC0809 data acquisition component is a monolithic

CMOS device with an 8-bit analog-to-digital converter, 8-channel multiplexer

and microprocessor compatible control logic. The 8-bit A/D converter uses

successive approximation as the conversion technique. The converter features a

high impedance chopper stabilized comparator, a 256R voltage divider with

analog switch tree and a successive approximation register. The 8-channel

multiplexer can directly access any of 8-single-ended analog signals. The

device eliminates the need for external zero and full-scale adjustments. Easy

interfacing to microprocessors is provided by the latched and decoded

multiplexer address inputs and latched TTL TRI-STATE® outputs. The design

of the ADC0808, ADC0809 has been optimized by incorporating the most

desirable aspects of several A/D conversion techniques. The ADC0808,

ADC0809 offers high speed, high accuracy, minimal temperature dependence,

excellent long-term accuracy and repeatability, and consumes minimal power.

These features make this device ideally suited to applications from process and

machine control to consumer and automotive applications

Page 25: Int

25

4.6.2 Pin Diagram

Figure 4.5 Pin diagram of ADC

Page 26: Int

26

4.6.3 Features

Easy interface to all microprocessors

Operates ratio metrically or with 5 VDC or analog span

Adjusted voltage reference.

No zero or full-scale adjust required

8-channel multiplexer with address logic 0V to 5V input range

with single 5V power supply

Outputs meet TTL voltage level specifications

Standard hermetic or moulded 28-pin DIP package

28-pin moulded chip carrier package

ADC0808 equivalent to MM74C949

ADC0809 equivalent to MM74C949-1

4.6.4 Key Specifications

Resolution 8 Bits

Total Unadjusted Error ±1⁄2 LSB and ±1 LSB

Single Supply 5 VDC

Low Power 15 Mw

Conversion Time 100 μs

4.6.5 Theory of Operation

The heart of this single chip data acquisition system is its 8-bit analog-

to-digital converter. The converter is designed to give fast, accurate, and

repeatable conversions over a wide range of temperatures. The converter is

partitioned into 3 major sections: the 256R ladder network, the successive

approximation register, and the comparator. The converter’s digital outputs are

positive true.

Page 27: Int

27

Figure 4.6 Circuit of ADC

The most important section of the A/D converter is the comparator. It is

this section which is responsible for the ultimate accuracy of the entire

converter. It is also the comparator drift which has the greatest influence on the

repeatability of the device. A chopper-stabilized comparator provides the most

effective method of satisfying all the converter requirements.

Page 28: Int

28

4.7 POWER SUPPLY AND UART

4.7.1 Introduction

The ac voltage, typically 220V RMS, is connected to a transformer,

which steps that ac voltage down to the level of the desired dc output. A diode

rectifier then provides a full-wave rectified voltage that is initially filtered by a

simple capacitor filter to produce a dc voltage. This resulting dc voltage usually

has some ripple or ac voltage variation.

A regulator circuit removes the ripples and also remains the same dc

value even if the input dc voltage varies, or the load connected to the output dc

voltage changes. This voltage regulation is usually obtained using one of the

popular voltage regulator IC units.

4.7.2 IC Voltage Regulators

Voltage regulators comprise a class of widely used ICs. Regulator IC

units contain the circuitry for reference source, comparator amplifier, control

device, and overload protection all in a single IC. IC units provide regulation of

either a fixed positive voltage, a fixed negative voltage, or an adjustable set

voltage. The regulators can be selected for operation with load currents from

hundreds of milli amperes to ten of amperes, corresponding to power ratings

from milli watt to tens of watts.

Page 29: Int

29

Figure 4.7 IC Voltage Regulator

A fixed three-terminal voltage regulator has an unregulated dc input

voltage, Vi, applied to one input terminal, a regulated dc output voltage, Vo,

from a second terminal, with the third terminal connected to ground.

Figure 4.8 Power Supply

The series 78 regulators provide fixed positive regulated voltages from 5

to 24 volts. Similarly, the series 79 regulators provide fixed negative regulated

voltages from 5 to 24 volts.

Page 30: Int

30

4.7.3 UART

The UART in the AT89C52 operates the same way as the UART in the

AT89C51.

4.8 SOFTWARE DESCRIPTION

4.8.1 Introduction

The next two points describe the most important strategies followed in

order to reduce the power consumption by software and display the existence

of humidity on a computer wherever it is located.

4.8.2 Autonomous Sensor Node

The task of the Sensor Node can be summarized in waking-up, reading

sensors, building the data frame, sending-out the data and sleeping most of the

time. Wireless Sensor Networks use to work on active-sleep schedule. Thus,

the power consumption can be widely reduced by minimizing the active time.

Very low duty cycles approach the average consumption to the sleep mode

consumption. Therefore, this is the key design that has been taken in to account

on the gas Sensor Node program.

Since each sensor has a different response time, an efficient ordering of

the sensor’s activation reduces the active time and therefore the power

consumption. Initially all the sensors are switched off and ports of the

microcontroller are configured as Hi-Z, which also reduces the consumption.

After the microcontroller’s wake-up, the ports are conveniently configured for

the communication and all the sensors go into its own state. When the

microcontroller goes in to the active modes, the sensors go being read at the

end of its response time and stored in to the microcontrollers RAM memory.

Page 31: Int

31

When ten samples of each sensor have been acquired, a frame is built

with an identifying field, the battery voltage level and the gas parameters. The

internal weak pull-up resistors from the SPI lines are only active during the

microcontroller-transceiver communication, which saves our 500micro

amperes DC current.

4.8.3 Pc Interface

When the base station receives a frame from a gas Sensors Node, the

data are retransmitted through the serial cable (RS-232) TO A computer (host)

as soon as they are collected. The first software module manages the serial port

to collect the data frame. Then the program splits the frame in to their

appropriate values. These are the direct measures parameters which are

processed and values. Nevertheless other indirect parameters can be obtained

from the direct ones, like the dew-point. The software module generates several

files that provide information about the temperature and gas parameters.

4.8.4 Flow Chart

The kernel program has three main functions: trigger, data transport, and

interrupt. Each of these functions has special tasks and works cooperatively

with the NCAP. The functions have been integrated in the kernel and its flow

chart is illustrated in Fig.4.4. After receiving power, the kernel executes all

initializations routines including the TII initialization, memory clearing

processes, loading the TEDS, setting the channel data buffers, and status

registers. Subsequently, it enters into an infinite loop and goes through the

processes, as shown in the flow chart. The kernel program comprises several

software modules developed using the Embedded C language. Having

compiled, these modules have been downloaded into the 8 kB flash/EE

program memory of the ADuC812.

Page 32: Int

32

Figure 4.9 Flow Chart

The system software architecture is divided into two layers structure:

physical layer and application layer.

Page 33: Int

33

i. Physical Layer

This layer is responsible for acquiring the real-time data from the sensors

array and the physical location, time and date of the sampled pollutants from

the GPS module. This information is then encapsulated into a data frame by the

microcontroller. The microcontroller then sends each frame to the ZIGBEE-

Modem through the RS-232 interface. The ZIGBEE-Modem, in turn, sends

each data frame to the Pollution-Server using the publicly available mobile

network and the Internet. The physical layer is implemented using ANSI C

language which is compiled to native microcontroller code. The software

implementing the physical layer is composed of five functions, namely: ports-

config() function, sensor-acquisition() function, GPS-read() function and Data-

frame function are called from a main program that is stored on and executed

by the Mobile-DAQ microcontroller.

Ports- Config () Function

Developed to configure the digital inputs/outputs in addition to the

resolution of the analog-to-digital converters that read the air pollutants level

from sensor array outputs.

Sensor-Acquisition () Function

Reads each pollutant level as a voltage from the signal conditioning

circuit output via the built-in analog-to-digital converter module of the

microcontroller.

Sensor-Acquisition () Function

Communicates with the GPS module through RS-232 and extracts

latitude and longitude of the sampled air pollutant along with time and the date.

Page 34: Int

34

GPS-Read () Function

Encapsulates the IP address of the Pollution Server, a port number, the

three pollutants levels, latitude and longitude of the sampled location, and time

and date of the when the samples were taken. The data frame is shown in

Fig.4.8.4

ii. Application Layer

The application layer consists of three primary modules: Socket-Server,

Air-Pollution-Index, and Google-Mapper. Socket-Server collects and stores

pollutant data from all the Mobile-DAQs. Air Pollution-Index calculates

pollution categories based on local pollution policies and regulations. Finally,

Google-Mapper makes this pollution information available over the Internet.

4.9 IMPLEMENTATION AND RESULTS

The main goal of this project was to build an environmental air pollution

monitoring system (EAPMS) which is capable of measuring common air

pollutant concentrations using a semiconductor sensor array and ADC,

especially the Environmental standard. Having aimed towards this goal, several

hardware and software implementation modules such as the semiconductor

sensor array, the ADC, the AT89C51, and the Embedded C program have been

successfully developed. These modules were built using the guidelines

provided.

These sensors are highly vulnerable to silicon-based chemicals, and care

was taken when the system is used in such environments. This type of

chemicals such as volatile organic silicones will deteriorate the sensor surface

and, hence, degrade the sensor performance. Sometimes, depending on the

exposure level, these can cause an irreversible damage to the sensors. In

addition, the sensors have minor fluctuations to relative humidity and ambient

temperature. Normally, the sensors function properly at 50% 21 C. The sets of

Page 35: Int

35

field measurement readings of CO, NO, and SO sensors were recorded at a

normal laboratory environment, while the sensor measurement was taken near

a photocopy machine.

4.9.1 Output for Monitoring System in Hyper Terminal

Figure 4.10 Output for Pollution Monitoring in Hyper Terminal

Page 36: Int

36

4.9.2 Output for Pollution Monitoring in Keil ID

Figure 4.11 Output for Pollution Monitoring in Keil ID

Page 37: Int

37

4.9.3 Output for Pollution Monitoring in Visual Basic

Figure 4.12 Output for Pollution Monitoring in Visual Basic

Page 38: Int

38

CHAPTER 5

CONCLUSION AND FUTURE WORK

CONCLUSION

The environmental air pollution monitoring system has been

successfully implemented with the main functional blocks: the Sensor array,

the ADC, and the Microcontroller. Therefore, the goal of the paper is to

provide an industry standard interface to efficiently connect transducers to

microcontrollers and to connect microcontrollers to PC was achieved. The

capability provided by the standard is a great advantage to the system designers

and manufacturers, and it reduces the burden of designing various products to

suit various networks. The semiconductor gas sensors temperature sensors can

be successfully used to monitor the target gas concentrations and temperature

level. The usage of the air pollution monitoring system adds several advantages

to a system such as low cost, quick response, low maintenance, ability to

produce continuous measurements, etc.

5.1 FUTURE WORK

The future work is GPS module and ZIGBEE modem will used in air

pollution monitoring systems. The GPS module provides the physical

coordinate location of the mobile-DAQ, time and date. The data will packs

them in a frame with the GPS physical location, time, and date. The frame is

subsequently uploaded to the ZIGBEE-Modem and transmitted to the

Pollution-Server via the public mobile network. A database server is attached

to the Pollution- Server for storing the pollutants level for further usage by

various clients such as environment protection agencies, and vehicle

registration authorities.

Page 39: Int

39

REFERENCES

1. AbuJayyab.M, Al Ahdab.S, Taji.M, Al Hamdani.Z, and Aloul.F, [2006]

“Pollumap: A pollution mapper for cities” in Proc. IEEE Innovations in

Information Technology Conf., Dubai, UAE, Nov., pp. 1–5.

2. Chung.W and Yang.C.H, [2009] “Remote monitoring system with

wireless sensors module for room environment” Sens. Actuators B, Vol.

113, No. 1, pp. 35–42.

3. Gao.M, Zhang.F, and Tian.J, [2008] “Environmental monitoring system

with wireless mesh network based on embedded system” in Proc. 5th

IEEE Int. Symp. Embedded Computing, pp. 174–179.

4. Huang.H.W, [2006] the HCS12/9S12: An Introduction to Hardware and

Software Interfacing, 1st ed. Florence, KY: Thomson Delmar Learning.

5. Jung.Y.J, Lee.Y.K, Lee.D.G, Ryu.K.H, and Nittel.S, [2008] “Air

pollution monitoring system based on geosensor network” in Proc. IEEE

Int. Geoscience Remote Sensing Symp., Vol. 3, pp. 1370–1373.

6. Kularatna.N and Sudantha.B.H, [ 2008] “An environmental air pollution

monitoring system based on the IEEE 1451 standard ” IEEE Sensors,

Vol. 8, pp. 415–422.

7. Kwon.J.W, Park.Y.M, Koo.S.J, and Kim.H, [2007] “Design of air

pollution monitoring system using ZigBee networks for ubiquitous-city”

in Proc. Int. Conf. Convergence Information Technology, pp. 1024–

1031.

Page 40: Int

40

8. Llobet.E, [ 2001] “Multicomponent gas mixture analysis using a single

tin oxide sensor and dynamic pattern recognition” IEEE Sensors, Vol. 1,

No. 3, p. 207.

9. Tsow.F, Forzani.F, Rai.A ,Wang.R, Tsui.R, Mastroianni.S, Knobbe.C,

Gandolfi.A.J, and Tao.N.J, [ 2009] “A wearable and wireless sensor

system for real-time monitoring of toxic environmental volatile organic

compounds” IEEE Sensors, Vol. 9, pp. 1734–1740.

10. Wong.C.J, MatJafri.M.Z, Abdullah.K, Lim.H.S, and Low.K.L, [ 2007]

“Temporal air quality monitoring using surveillance camera” in Proc.

IEEE Int. Geoscience and Remote Sensing Symp., pp. 2864–2868.