Vous êtes sur la page 1sur 61

ENVIRONMENTAL MONITORING

WITH MOBILE ROBOTS

1
CHEPTER 1

INTRODUCTION

The proposed system “Micro-controller, LCD, Temperature, Humidity


and Pressure sensors, EEPROM, RTC, Relay, RS232, Motor, and Mobile” is
designed and developed to accomplish the various tasks in an adverse
environment of an industry. The intelligent machine is loaded with several
units such as LCD, microcontroller, relay, potential transformer, current
transformer which synchronously works with the help of a start-of-the-art PIC
microcontroller. This “ENVIRONMENTAL MONITORING WITH MOBILE
ROBOTS” is to the technical advancement. This prototype system can be
applied effectively and efficiently in an expanded dimension to fit for the
requirement of industrial, research and commercial applications.

Microcontroller is the heart of the device which handles all the sub
devices connected across it. We have used PIC microcontroller. It has flash
type reprogrammable memory. It has some peripheral devices to play this
project perform. It also provides sufficient power to inbuilt peripheral devices.
We need not give individually to all devices. The peripheral devices also
activates as low power operation mode. These are the advantages are appear
here.

1.1 RELATED WORK


Monitoring of urban environments is typically done by stationary
monitoring stations, typically several stations in a city [7]. However, under
some conditions of weather and terrain, pollutants are accumulated in a
confined area, e.g. in street canyons, and create local but intense pollution. The
need for refining the monitoring scale motivated the development of small
inexpensive gas sensors for air pollution monitoring, which enables sensor
networks with a large number of sensors deployed in the fields [8]. A mobile
robot equipped with such sensors can be used for collecting gas concentration

2
data at various locations and generating a gas distribution map of the given
environment.
However, a difficulty lies in the fluctuating nature of the gas distribution
In general environments, adjective flow dominates gas dispersal compare to
slow molecular diffusion. Since the airflow we encounter is almost always
turbulent, the gas distribution becomes patchy and meandering [9]. One way to
work around is to measure the gas concentration for at least several minutes at
each location to obtain a statistically significant measure, e.g. time average. To
obtain a map of good quality in shorter time, model equations representing
turbulent diffusion process and/or resultant gas distributions can be used to
estimate the gas dispersal in the whole area from a limited number of
measurement points. However, a uniform airflow field has to be assumed in
those methods, and the experimental validations were mostly done in small
controlled areas in which this assumption could reasonably be made. On the
other hand, we used kernel based extrapolation for gas distribution mapping.
As a model-free method, this approach does not assume a pre-defined
functional form of the gas distribution and is therefore not restricted to specific
situations but yet provides a way to integrate the measurements performed over
time and extrapolate on the sparse measurement points. Autonomous search for
the location of a gas source is another important subject for mobile robots
equipped with “electronic noses”. Various hardware and software setups are
proposed so far, and their details can be found in the review [11]. Most of the
robots use gas concentration gradient and airflow direction to track gas plumes
to their source. However, the experimental demonstrations were mostly given
again in small controlled environments. In most of the cases, uniform strong
airflow fields were artificially created. Otherwise, small areas in larger rooms
were carefully chosen to have constant airflow. Consequently, the next
challenge is to achieve successful gas source localization in larger and
uncontrolled environments, e.g. under outdoor conditions. The data we are
collecting will serve as the basis for devising and evaluating the appropriate gas
source localization algorithms and the hardware setups.

3
CHAPTER 2

LITERATURE SURVEY

2.1 REVIEW OF SENSOR

Precision Centigrade Temperature Sensors


The LM35 series are precision integrated-circuit temperature
sensors, whose output voltage is linearly proportional to the Celsius
(Centigrade) temperature. The LM35 thus has an advantage over linear
temperature sensors calibrated in ° Kelvin, as the user is not required to
subtract a large constant voltage from its output to obtain convenient
Centigrade scaling. The LM35 does not require any external calibration or
trimming to provide typical accuracies of ±1⁄4°C at room temperature and
±3⁄4°C over a full −55 to +150°C temperature range. Low cost is assured by
trimming and calibration at the wafer level. The LM35’s low output
impedance, linear output, and precise inherent calibration make interfacing to
readout or control circuitry especially easy. It can be used with single power
supplies, or with plus and minus supplies. As it draws only 60 μA from its
supply, it has very low self-heating, less than 0.1°C in still air. The LM35 is
rated to operate over a −55° to +150°C temperature range, while the LM35C is
rated for a −40° to +110°C range (−10° with improved accuracy). The LM35
series is available packaged in hermetic TO-46 transistor packages, while the
LM35C, LM35CA, and LM35D are also available in the plastic TO-92
transistor package. The LM35D is also available in an 8-lead surface mount
small outline package and a plastic TO-220 package.

Features
n Calibrated directly in ° Celsius (Centigrade)
n Linear + 10.0 mV/°C scale factor

4
n 0.5°C accuracy guaranteeable (at +25°C)
n Rated for full −55° to +150°C range
n Suitable for remote applications
n Low cost due to wafer-level trimming
n Operates from 4 to 30 volts
n Less than 60 μA current drain
n Low self-heating, 0.08°C in still air
n Nonlinearity only ±1⁄4°C typical
n Low impedance output, 0.1 ohm for 1 mA load

Absolute Maximum Ratings

If Military/Aerospace specified devices are required, please contact the


National Semiconductor Sales Office/ Distributors for availability and
specifications.
Supply Voltage +35V to −0.2V
Output Voltage +6V to −1.0V
Output Current 10 mA
Storage Temp:
✓ TO-46 Package, −60°C to +180°C
✓ TO-92 Package, −60°C to +150°C
✓ SO-8 Package, −65°C to +150°C
✓ TO-220 Package, −65°C to +150°C
Lead Temp:
✓ TO-46 Package,
✓ (Soldering, 10 seconds) 300°C
✓ TO-92 and TO-220 Package,
✓ (Soldering, 10 seconds) 260°C
✓ SO Package (Note 12)
✓ Vapour Phase (60 seconds) 215°C
✓ Infrared (15 seconds) 220°C

5
✓ ESD Susceptibility (Note 11) 2500V
Specified Operating Temperature Range: TMIN to T MAX
✓ LM35, LM35A −55°C to +150°C
✓ LM35C, LM35CA −40°C to +110°C
✓ LM35D 0°C to +100°C

Piezoelectric sensor
Dynamic pressure sensors are designed to measure pressure changes in
liquids and gasses such as in shock tube studies, in-cylinder pressure
measurements, field blast tests, pressure pump perturbations, and in other
pneumatic and hydraulic processes. Their high rigidity and small size give
them excellent high frequency response with accompanying rapid rise time
capability. Acceleration compensation makes them virtually unresponsive to
mechanical motion, i.e., shock and vibration. This series is characterized by
very high frequency response and fast rise time. These instruments contain
integral impedance converting IC amplifiers which reduce the output
impedance by many orders of magnitude allowing the driving of long cables
with negligible attenuation. Series 2300V utilizes thin synthetic quartz crystals
stacked together to produce an analogous voltage signal when stressed in
compression by pressure acting on the diaphragm. This pressure, by virtue of
diaphragm area, is converted to compressive force which strains the crystals
linearly with applied pressure producing an analog voltage signal.

Principle of operation

Depending on how a piezoelectric material is cut, three main modes of


operation can be distinguished: transverse, longitudinal, and shear.

Transverse effect

A force is applied along a neutral axis (y) and the charges are
generated along the (x) direction, perpendicular to the line of force. The

6
amount of charge depends on the geometrical dimensions of the
respective piezoelectric element. When dimensions a,b,c apply,
Cx = dxyFyb / a,
where a is the dimension in line with the neutral axis, b is in line with
the charge generating axis and d is the corresponding piezoelectric
coefficient.

Longitudinal effect
The amount of charge produced is strictly proportional to the
applied force and is independent of size and shape of the piezoelectric
element. Using several elements that are mechanically in series and
electrically in parallel is the only way to increase the charge output. The
resulting charge is
Cx = dxxFxn,
Where dxx is the piezoelectric coefficient for a charge in x-direction
released by forces applied along x-direction (in pC/N). Fx is the applied
Force in x-direction [N] and n corresponds to the number of stacked
elements.

Shear effect
Again, the charges produced are strictly proportional to the
applied forces and are independent of the element’s size and shape. For
n elements mechanically in series and electrically in parallel the charge
is
Cx = 2dxxFxn.

In contrast to the longitudinal and shear effects, the transverse effect opens the
possibility to fine-tune sensitivity on the force applied and the element
dimension.

7
Humidity Sensor
Dallas Semiconductor, in conjunction with Texas Weather Instruments,
Inc., previously developed a basic weather station that used 1-Wire technology
to measure wind speed wind direction, and temperature [1]. The station’s
capability was next expanded to include a rain gauge that was connected to the
1-Wire net by simply plugging it into the expansion connector on the weather
station board [2]. Because 1-Wire technology transmits both power and
bidirectional data over a single twisted-pair cable [3,4], no extra wiring or
power was required. A PC or microcontroller executing Touch Memory
Executive (TMEX) software controls the 1-Wire net. Data transfers are half
duplex and bit sequential over a single twisted-pair cable using short and long
time slots to encode the binary ones and zeros, while power is transmitted
during communication idle times. Because every 1-Wire device has a unique
ID address that identifies it to the bus master, multiple sensors can share the
same net and the software can automatically recognize and display data.

Environmental Sensing
Trimmed capacitive sensing element with onchip signal conditioning. It
develops a linear voltage vs. RH output that is ratiometric to the supply
voltage. That is, when the supply voltage varies, the sensor output voltage
follows in the same proportion. The part is calibrated at 5 VDC, but it will
operate over a 4–5.8 VDC range. At the calibration voltage and room
temperature, the output voltage ranges from 0.8 to 3.9 VDC as the humidity
varies from 0% to 100% (noncondensing). At 200 A, its operating current is
well suited for use on a 1-Wire net. Since the part is light sensitive, it should be
shielded from bright lights when in operation measuring RH

8
2.2 OTHER MONITORING SYSTEMS (REGIONAL AND GLOBAL
SURVEYS)

Variables in Relation to Climatic Changes


In the SCEP and SMIC studies it was pointed out that global censuses
repeated at regular intervals are needed for assessing climate trends. Several of
these censuses could be carried out by means of remote sensing from satellites
with techniques in existence or in the process of development. These variables
are related to conditions at the earth's surface such as:- The temporal and
geographical distribution of the earth-atmosphere albe do and outgoing
radiation flux over the entire globe (with an accuracy of at least 1 %); high
resolution registration of the global distribution (horizontal and 51 vertical) of
cloudiness; the extent of polar ice and snow cover (recorded with lower
resolution), and the surface temperature of the oceans. There are also variables
related to human activities, which can be measured from satellites at longer
time intervals, e.g., areas under irrigation, artificial lakes or dams, the extent of
urbanization and changes in vegetation. Because of the special technique
involved, measurements by satellites must be treated as a separate system. A
special satellite system for these variables only will be expensive, but there are
possibilities of using satellites with other functions (weather surveillance)to
reduce operating costs.

Source Monitoring
Information on substances emitted to the environment is important to
any global monitoring system and is especially needed for global budgeting.
Data are readily available for some of these substances, e.g., the amount of oil
transported over the oceans, but in generalwe need to develop new methods for
data gathering for critical substances. Substances which have been selected for
global monitoring (mercury, lead, cadmium, DDT, PCB and combustion
products of fossil fuels) should have first priority. These data must be based on
national production statistics in industry, mining, etc. but there should be

9
international agreement to transmit certain types of data to one central
coordination body.
To assess present and future environmental risks it is important to have a
continuous record of critical chemical substances emitted to the environment.
At the same time these substances should be evaluated in regard to possible
health risks to human beings and to ecosystems. To assess these environmental
emissions it is necessary to have a detailed knowledge of the techniques of
industrial processes. Special attention has to be given to impurities in crude
chemicals and to organic chemicals which have high biological activity even in
extremely small amounts, e.g., hormones and antibiotics. An ultimate aim of
such an international registry will be to record the amounts of all old and new
potentially dangerous substances added to the environment every year. It has to
be stressed that a very large number of new substances are added to the
environment each year but only a few of these may be of potential risk in the
future. A registry may thus not only give information on the dangerous
substances but also information on substances which are harmless to the
environment.

Variables in Relation to Biological Changes


Repeated biocensuses and surveys have been suggested as suitable
variables for global environmental monitoring. These may have different
priorities. Some can be started at once, others need research and development
before inclusion in a global system. Registers of vanishing or endangered
species and certain types of bird censuses should have high priority.
Registration of endangered species is already carried out on a global basis by
mCN. Internationally co-ordinated census programmers for waterfowl and sea
birds also exist in several regions and in many nations extensive census
schemes for passerines are in an advanced state. These programmers only need
consolidation and extension. The distribution of species highly sensitive to
certain specific substances or variables in relation to phenology and
aerobiology may be included at a later date.

10
All these variables need a very special kind of organization to be
monitored effectively, and it seems proper that each of these variables should
be treated as a special subsystem. The registration of gross vegetation changes
by satellites is a high priority variable. The newly emerging system using Earth
Resource Technology Satellites seems to be the appropriate way to register
these changes. It is essential that an international framework be created to
handle this type of information. In the future it is likely that satellite
registration of biological variables in the oceans may be of great importance to
global monitoring.

Short-lived Phenomena
The present system used by the Smithsonian Institution for registering
short-lived phenomena may, if extended, be a very valuable tool to record
events which are indicators of environmental change. The biological aspects
have been previously stressed, but other records such as oil spills and volcanic
activities are also important for the global environmental situation. We
recommend that this system should be enlarged and internationally supported.

11
CHAPTER 3

EXISTING WORK

The existing project is” A miniaturized low-power wireless remote


environmental monitoring system based on electrochemical analysis” In this
project, They report a miniaturized low-power wireless remote environmental
monitoring system. This system has been developed for on-site monitoring of
water pollution by heavy-metal ions. The system is composed of three parts: an
electrochemical sensor module using microfabricated electrodes for detecting
heavy-metal contamination in sample water; a custom potentiostat module
including readout circuitry, analog-to-digital converter and microcontroller;
and a radio frequency (RF) module for sending detected signals to a base
station through wireless communication. The electrochemical sensor module is
implemented using microfabricated mercury working electrodes (WEs), solid-
state reference electrode (SSRE), and platinum counter electrode (CE). For the
low-power operation, direct frequency-shift keying (FSK) modulation and
simple binary FSK demodulation methods are used for RF module which is
realized using 0.18_mCMOS technology. All the modules are hybrid integrated
in a printed circuit board (PCB) and low-power consumption below 1mW has
been achieved.

3.1. INTRODUCTION
As the contamination of groundwater by heavy-metal ions is critically
harmful to many organisms, including humans, there have been various
researches and reports on in-site and on-site detection of heavy-metal
contaminants using electrochemical detection methods. Electrochemical
detection can be easily realized in a simple and cheap implementation platform
with high sensitivity and its implementation is quite compatible with
conventional semiconductor processing technologies. The previous approaches
have used electrochemical sensor integrated with a custom designed
potentiostat for simple on-site analysis system. However, they have used a

12
laptop computer for data acquisition, signal processing, and system control, and
this makes it difficult to achieve periodic on-site environmental monitoring in
broad field areas.
This environmental monitoring system includes sensing electrodes,
potentiostat, and radio frequency (RF) communication module with an antenna
and can be located in broad open fields such as river, coast, etc. When the
analysis is requested by the base station, heavy-metal ions in the water are
analyzed by the electrochemical sensor with potentiostat and the detected
signals are transferred to the base station through the RF module. There are
some requirements for the proposed wireless monitoring system. In order to
realize a miniaturized system, all the important components for the proposed
sensor system should be integrated in a small form factor. Also, as a distributed
portable system, the entire components must be optimally designed to reduce
the power consumption. In order to fulfill these requirements, the proposed
sensor system has been implemented using electrochemical sensor fabricated
on silicon substrate by microelectromechanical system (MEMS) technology
and a custom RF communication device optimally designed for low-power
consumption.

3.2 SYSTEM DESCRIPTION FOR WIRELESS ENVIRONMENTAL


MONITORING

The block diagram of the proposed wireless environmental monitoring


system is shown in Figure. The base station generates and transmits instruction
signals for the operation of distributed sensor systems. The distributed sensor
system receives instruction signals from the base station and performs the
monitoring of water pollution and transmits the sensing information to the base
station again. For the distributed sensor system, we have developed three basic
modules: sensing electrodes module for electrochemical detection; custom
potentiostat module for sensor readout, signal processing and control; and RF
communication module for wireless communication. Figure shows the detailed

13
block diagram of the proposed distributed sensor. In this work, we have
fabricated the mercury working electrodes (WEs) and solid-state Ag/AgCl
reference electrode (RE) on the same silicon substrate using MEMS technology
and assembled the rest of modules in a hybrid platform by integrating the
custom potentiostat and the custom RF module chip fabricated using 0.18 _m
CMOS technology.

BASE STATION

ANTENNA

MCU RF
USER
MODULE
INTERFACE

Figure 3.1 Block Diagram for Base Station

DISTRIBUTED SENSOR SYSTEM

Figure 3.2 Block Diagram for Distributed Sensor System

14
Instruction signals will be wirelessly transmitted from the base station at
a close distance and received at the sensor system through an antenna. The
targeted minimum communication distance is about 50 m. In the RF module,
the received RF signals are demodulated and converted into digital signals
which will be the series of input control signals to the MCU. The MCU
generates sensor driving signals which will be applied to the sensing electrodes
through digital-to-analog converter (DAC) and amplifiers. Electrochemical
analysis is performed at the sensing electrodes according to the received
control signals. Next, the detection signal from the sensor module is transferred
into the MCU and finally transmitted to the base station after modulation in the
RF module.
For the low-power operation, the proposed distributed sensor network
has been designed to have two operation modes—sleep mode and wake-up
mode. During the sleep mode, only the MCU operates in non-active state
consuming very small fraction of power, while the rest of the other modules are
turned off. During the wake-up mode, the MCU takes an active state and scans
the RF input signal. If the instruction signals are detected during the wake-up
mode, the MCU activates the system and starts to supply power to the other
modules. To minimize the power consumption in this wake-up mode, the MCU
gradually enables the system as needed and properly disables the unnecessary
parts of the system. For example, during the receiving-mode, the sensor module
and drive amplifier (DA) in RF module are not activated. On the other hand,
during the transmitting-mode, the sensor module and LNA, mixer, and
baseband circuits are not activated. The sensing module is only activated
during the sensing-mode according to power scheduling by the MCU.

15
CHAPTER 4

PROPOSED WORK

The objective of this project is to “ENVIRONMENTAL


MONITORING WITH MOBILE ROBOTS “. Present industry is increasingly
shifting towards automation. Two principle components of today’s industrial
automations are programmable controllers and robots. In order to aid the
tedious work and to serve the mankind, today there is a general tendency to
develop an intelligent operation.

The proposed system “Micro-controller, Lcd, Temperature, Humidity


and Pressure sensors, EEPROM, RTC, Relay, RS232, Motor, and Mobile” is
designed and developed to accomplish the various tasks in an adverse
environment of an industry. The intelligent machine is loaded with several
units such as LCD, microcontroller, relay, potential transformer, current
transformer which synchronously works with the help of a start-of-the-art PIC
microcontroller. This “ENVIRONMENTAL MONITORING WITH MOBILE
ROBOTS” is to the technical advancement. This prototype system can be
applied effectively and efficiently in an expanded dimension to fit for the
requirement of industrial, research and commercial applications.

Microcontroller is the heart of the device which handles all the sub
devices connected across it. We have used PIC microcontroller. It has flash
type reprogrammable memory. It has some peripheral devices to play this
project perform. It also provides sufficient power to inbuilt peripheral devices.
We need not give individually to all devices. The peripheral devices also
activates as low power operation mode. These are the advantages are appear
here.

16
4.1 BLOCK DIAGRAM

Figure 4.1 Block Diagram for Environmental Monitoring With


Mobile Robots

4.2 MICROCONTROLLER UNIT

Microcontrollers are destined to play an increasingly important role in


revolutionizing various industries and influencing our day to day life more
strongly than one can imagine. Since its emergence in the early 1980's the
microcontroller has been recognized as a general purpose building block for
intelligent digital systems. It is finding using diverse area, starting from simple
children's toys to highly complex spacecraft. Because of its versatility and
many advantages, the application domain has spread in all conceivable
directions, making it ubiquitous. As a consequence, it has generate a great deal
of interest and enthusiasm among students, teachers and practicing engineers,

17
creating an acute education need for imparting the knowledge of
microcontroller based system design and development. It identifies the vital
features responsible for their tremendous impact; the acute educational need
created by them and provides a glimpse of the major application area.

Introduction

A microcontroller is a complete microprocessor system built on a single


IC. Microcontrollers were developed to meet a need for microprocessors to be
put into low cost products. Building a complete microprocessor system on a
single chip substantially reduces the cost of building simple products, which
use the microprocessor's power to implement their function, because the
microprocessor is a natural way to implement many products. This means the
idea of using a microprocessor for low cost products comes up often. But the
typical 8-bit microprocessor based system, such as one using a Z80 and 8085 is
expensive. Both 8085 and Z80 system need some additional circuits to make a
microprocessor system. Each part carries costs of money. Even though a
product design may require only very simple system, the parts needed to make
this system as a low cost product.

To solve this problem microprocessor system is implemented with a


single chip microcontroller. This could be called microcomputer, as all the
major parts are in the IC. Most frequently they are called microcontroller
because they are used they are used to perform control functions.

The microcontroller contains full implementation of a standard


MICROPROCESSOR, ROM, RAM, I/0, CLOCK, TIMERS, and also SERIAL
PORTS. Microcontroller also called "system on a chip" or "single chip
microprocessor system" or "computer on a chip".

A microcontroller is a Computer-On-A-Chip, or, if you prefer, a single-


chip computer. Micro suggests that the device is small, and controller tells you
that the device' might be used to control objects, processes, or events. Another

18
term to describe a microcontroller is embedded controller, because the
microcontroller and its support circuits are often built into, or embedded in, the
devices they control.

Today microcontrollers are very commonly used in wide variety of


intelligent products. For example most personal computers keyboards and
implemented with a microcontroller. It replaces Scanning, De-bounce, Matrix
Decoding, and Serial transmission circuits. Many low cost products, such as
Toys, Electric Drills, Microwave Ovens, VCR and a host of other consumer
and industrial products are based on microcontrollers.

4.2.1 Evolution of Microcontroller

Markets for microcontrollers can run into millions of units per


application. At these volumes of the microcontrollers is a commodity items and
must be optimized so that cost is at a minimum. .Semiconductor manufacturers
have produced a mind-numbing array of designs that would seem to meet
almost any need. Some of the chips listed in this section are no longer regular
production, most are current, and a few are best termed as "smoke ware": the
dreams of an aggressive marketing department.

Table 4.1 Evolution of Microcontroller

Sl.No Manufacturer Chip Designation Year No. No RAM ROM Other


of of Features
Pins I/O

4 Bit MC

1. Texas Instruments TMS 1000 Mid 1970 28 23 64 1K LED


Display

2. Hitachi HMCS 40 - 28 10 32 512 10 bit ROM

3. Toshiba TLCS 47 - 42 35 128 2K Serial bit


I/O

8 bit MC

1. Intel 8048 1976 40 27 64 1K External

19
Memory 8K

2 Intel 8051 1980 40 32 128 4K External


Memory
128 K

3. Motorola 6081 1977 - 31 128 2K

4. Motorola 68HC11 1985 52 40 256 8K Serial Port,


ADC,

5. Zilog Z8 - 40 32 128 2K External


Memory
128K,

16 Bit MC

1. Intel 80C196 - 68 40 232 8K External


Memory
64K, Serial
Port, ADC,
WDT,
PWM

2. Hitachi H8/532 - 84 65 1K 32K External


Memory
1M, Serial
Port, ADC,
PWM

3. National HPC16164 - 68 52 512 16K External


Memory
64K, ADC,
WDT,
PWM

32 Bit MC

1. Intel 80960 - 132 20 MHz clock, 32 bit bus, 512 byte


instruction cache

20
4.2.2 Concepts of Microcontroller
Microcontroller is a general purpose device, which integrates a number
of the components of a microprocessor system on to single chip. It has inbuilt
CPU, memory and peripherals to make it as a mini computer. A
microcontroller combines on to the same microchip:

➢ The CPU core


➢ Memory(both ROM and RAM)
➢ Some parallel digital i/o

Microcontrollers will combine other devices such as:


➢ A timer module to allow the microcontroller to perform tasks for
certain time periods.
➢ A serial i/o port to allow data to flow between the controller and
other devices such as a PIC or another microcontroller.
➢ An ADC to allow the microcontroller to accept analogue input data
for processing.
Microcontrollers are:
➢ Smaller in size
➢ Consumes less power
➢ Inexpensive

Micro controller is a standalone unit, which can perform functions on


its own without any requirement for additional hardware like I/O ports and
external memory.
The heart of the microcontroller is the CPU core. In the past, this has
traditionally been based on a 8-bit microprocessor unit. For example Motorola
uses a basic 6800 microprocessor core in their 6805/6808 microcontroller
devices.

21
In the recent years, microcontrollers have been developed around
specifically designed CPU cores, for example the microchip PIC range of
microcontrollers.

4.3 Introduction To PIC


The microcontroller that has been used for this project is from PIC
series. PIC microcontroller is the first RISC based microcontroller fabricated in
CMOS (complementary metal oxide semiconductor) that uses separate bus for
instruction and data allowing simultaneous access of program and data
memory.
The main advantage of CMOS and RISC combination is low power
consumption resulting in a very small chip size with a small pin count. The
main advantage of CMOS is that it has immunity to noise than other fabrication
techniques.

PIC (16F877)
Various microcontrollers offer different kinds of memories. EEPROM,
EPROM, FLASH etc. are some of the memories of which FLASH is the most
recently developed. Technology that is used in pic16F877 is flash technology,
so that data is retained even when the power is switched off. Easy
Programming and Erasing are other features of PIC 16F877.

4.2.4 PIC Start Plus Programmer


The PIC start plus development system from microchip technology
provides the product development engineer with a highly flexible low cost
microcontroller design tool set for all microchip PIC micro devices. The pic
start plus development system includes PIC start plus development
programmer and mplab ide. The PIC start plus programmer gives the product
developer ability to program user software in to any of the supported
microcontrollers. The PIC start plus software running under mplab provides for
full interactive control over the programmer.

22
CHAPTER 5

SYSTEM IMPLEMENTATION

5.1 POWER SUPPLY


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.

TRANSFORMER RECTIFIER FILTER IC REGULATOR LOAD

Fig 5.1 Block diagram for Power supply

5.1.1 Working Principle

Transformer

The transformer will step down the power supply voltage (0-230V) to
(0-6V) level. Then the secondary of the potential transformer will be connected
to the precision rectifier, which is constructed with the help of op–amp. The
advantages of using precision rectifier are it will give peak voltage output as
DC; rest of the circuits will give only RMS output.

23
Rectifier
The rectifier is device which converts Alternating current into some DC
form. The output of the rectifier is in pulsated DC form. There is some
semiconductor devices used to convert AC to pulsated DC named diodes.
Normally we are using PN junction diodes in rectifiers. These diodes allow the
current flow to it when the incoming voltage is higher than or equal to 0.7 V.
otherwise it will act as an open circuit.

Filter

The next section of the power supply is filter section. That is nothing but
capacitor. The capacitor is used as a filter to convert Pulsated DC to pure DC.
We can utilize the capacitor’s charging discharging characteristics and convert
the pulsated DC to pure DC.

Voltage Regulator

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 adjustably set
voltage. The regulators can be selected for operation with load currents from
hundreds of milli amperes to tens of amperes, corresponding to power ratings
from milli watts to tens of watts.

Circuit Description

Power supply is a reference to a source of electrical power. A device or


system that supplies electrical or other types of energy to an output load or
group of loads is called a power supply unit. The term is most commonly
applied to electrical energy supplies, less often to mechanical ones, and rarely
to others.

24
This typically involves converting 240 volt AC supplied by a utility
company to a well-regulated lower voltage (+/-12V) DC for electronic devices.

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

Figure 5.2 Circuit Diagram Of Power Supply

. 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.

25
The potential transformer will step down the power supply voltage (0-
230V) to (0-6V) level. Then the secondary of the potential transformer will be
connected to the precision rectifier, which is constructed with the help of op–
amp. The advantages of using precision rectifier are it will give peak voltage
output as DC, rest of the circuits will give only RMS output.

Bridge rectifier
When four diodes are connected as shown in figure, the circuit is called
as bridge rectifier. The input to the circuit is applied to the diagonally opposite
corners of the network, and the output is taken from the remaining two corners.
Let us assume that the transformer is working properly and there is a positive
potential, at point A and a negative potential at point B. the positive potential at
point A will forward bias D3 and reverse bias D4.

The negative potential at point B will forward bias D1 and reverse D2.
At this time D3 and D1 are forward biased and will allow current flow to pass
through them; D4 and D2 are reverse biased and will block current flow.

The path for current flow is from point B through D1, up through RL,
through D3, through the secondary of the transformer back to point B. this path
is indicated by the solid arrows. Waveforms (1) and (2) can be observed across
D1 and D3. One-half cycle later the polarity across the secondary of the
transformer reverse, forward biasing D2 and D4 and reverse biasing D1 and
D3. Current flow will now be from point A through D4, up through RL,
through D2, through the secondary of T1, and back to point A. This path is
indicated by the broken arrows. Waveforms (3) and (4) can be observed across
D2 and D4. The current flow through RL is always in the same direction. In
flowing through RL this current develops a voltage corresponding to that
shown waveform (5). Since current flows through the load (RL) during both
half cycles of the applied voltage, this bridge rectifier is a full-wave rectifier.

26
One advantage of a bridge rectifier over a conventional full-wave
rectifier is that with a given transformer the bridge rectifier produces a voltage
output that is nearly twice that of the conventional full-wave circuit.

This may be shown by assigning values to some of the components


shown in views A and B. assume that the same transformer is used in both
circuits. The peak voltage developed between points X and y is 1000 volts in
both circuits. In the conventional full-wave circuit shown—in view A, the peak
voltage from the center tap to either X or Y is 500 volts. Since only one diode
can conduct at any instant, the maximum voltage that can be rectified at any
instant is 500 volts.

The maximum voltage that appears across the load resistor is nearly-but
never exceeds-500 v0lts, as result of the small voltage drop across the diode. In
the bridge rectifier shown in view B, the maximum voltage that can be rectified
is the full secondary voltage, which is 1000 volts. Therefore, the peak output
voltage across the load resistor is nearly 1000 volts. With both circuits using
the same transformer, the bridge rectifier circuit produces a higher output
voltage than the conventional full-wave rectifier circuit.

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 adjustably set
voltage. The regulators can be selected for operation with load currents from
hundreds of milli amperes to tens of amperes, corresponding to power ratings
from milli watts to tens of watts.

27
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.
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.
For ICs, microcontroller, LCD --------- 5 volts
For alarm circuit, op-amp, relay circuits ---------- 12 volts

5.2 ELECTRICALLY ERASABLE PROM

5.2.1 Pin Configuration

Figure 5.3 Pin Configuration for IS24C04

Serial Clock (SCL) - The SCL input is used to clock all data into and out of
the device. In the WRITE mode, data must remain stable when SCL is HIGH.
In the READ mode, data is clocked out on the falling edge of SCL.

Serial Data (SDA) - The SDA pin is a bidirectional pin used to transfer data
into and out of the device. Data may change only when SCL is LOW. It is an
open-drain output, and may be wire-ORed with any number of open-drain or

28
open-collector outputs. Address (A0) - The A0 pin is not electrically connected
to the IS24C04.

A1, and A2 - The address inputs are used to set the least significant three bits
of the slave address. These inputs may be tied HIGH or LOW, or they may be
actively driven. These inputs allow up to four IS24C04 devices to be connected
together on the bus. An optional device will have these pins “don’t care.”

Write Control (WC) - The Write Control input is used to disable any attempt
to write to the memory. When HIGH, the memory is protected; when LOW, the
write function is normal. The part can be read independent of the state of WC
pin. When not connected this pin will be pulled LOW.

Endurance and Data Retention


The IS24C04 is designed for applications requiring high endurance
write cycles and unlimited read cycles. It provides 10 years of secure data
retention, with or without power applied, after the execution of 1,000,000 write
cycles.

5.2.2 Applications
The IS24C04 is ideal for high volume applications requiring low power
and low density storage. This device uses a low-cost, space-saving 8-pin plastic
package. Candidate applications include robotics, alarm devices, electronic
locks, meters and instrumentation.

5.2.3 General Description

The IS24C04 features a SERIAL communication, and supports


bidirectional data transmission protocol allowing operation on a simple two-
wire bus between the different devices connected somewhere on the system

29
bus. The two-wire bus was defined as a serial data line (SDA), and a serial
clock line (SCL). (Refer to Figure 1. Typical System Bus Configuration.)

The protocol defines any device that sends data onto the SDA bus as a
transmitter, and the receiving device as a receiver. The device controlling the
data transmission is named MASTER device, and the controlled device is
named SLAVE device. In all cases, the IS24C04 will be a slave device, since it
never initiates any data transfers. Up to four IS24C04 can be connected to the
bus. Device's physical address inputs A0-A2 must be connected to either Vcc
or GND.

Following a START condition, the MASTER (transmitter) device must


initiate the “Device Addressing Byte” including device type identifier, device
address, and a read or write operation to select a slave device (receiver)
connected to the system bus. The receiver will then respond with an
ACKnowledge by pulled the SDA line LOW. The ACKnowledge is used to
indicate successful data transfers. The transmitting device will release the data
bus (SDA goes HIGH) after transmitting eight bits (one data bit is transfered at
the falling edge of each clock cycle). During the ninth clock cycle, the receiver
will pull the SDA line LOW to ACKnowledge the transmitter that it received
the eight bits of data.

5.3 HUMIDITY MEASUREMENT

Humidity is the amount of water vapor in the air. Relative humidity is


defined as the ratio of the partial pressure of water vapor in a parcel of air to
the saturated vapor pressure of water vapor at a prescribed temperature.
Humidity may also be expressed as specific humidity. Relative humidity is an
important metric used in forecasting weather. Humidity indicates the likelihood
of precipitation, dew, or fog. High humidity makes people feel hotter outside in
the summer because it reduces the effectiveness of sweating to cool the body

30
by reducing the evaporation of perspiration from the skin. This effect is
calculated in a heat index table.

5.3.1 Types of Humidity

Absolute humidity

Absolute humidity is the quantity of water in a particular volume of air.


The most common units are grams per cubic meter, although any mass unit and
any volume unit could be used. Pounds per cubic foot are common in the U.S.
and occasionally even other units mixing the Imperial and metric systems are
used.

If all the water in one cubic meter of air were condensed into a
container, the container could be weighed to determine absolute humidity. The
amount of vapor in that cube of air is the absolute humidity of that cubic meter
of air. More technically, absolute humidity is the mass of water vapor, mw, per
cubic meter of air, Va:

AH = mw / Va

Absolute humidity ranges from 0 grams per cubic meter in dry air to 30
grams per cubic meter (0.03 ounce per cubic foot) when the vapour is saturated
at 30 °C. (See also Absolute Humidity table)

The absolute humidity changes as air pressure changes. This is very


inconvenient for chemical engineering calculations, e.g. for dryers, where
temperature can vary considerably. As a result, absolute humidity is generally
defined in chemical engineering as mass of water vapor per unit mass of dry
air, also known as the mass mixing ratio (see below), which is much more
rigorous for heat and mass balance calculations. Mass of water per unit volume
as in the equation above would then be defined as volumetric humidity.
Because of the potential confusion, British Standard BS 1339 (revised 2002)

31
suggests avoiding the term "absolute humidity". Units should always be
carefully checked. Most humidity charts are given in g/kg or kg/kg, but any
mass units may be used.

The engineering of physical and thermodynamic properties of gas-vapor


mixtures is named Psychometrics.

Mixing ratio or humidity ratio

Mixing or humidity ratio is expressed as a ratio of water vapour mass,


mw, per kilogram of dry air, md, at a given pressure. The colloquial term
moisture content is also used instead of mixing/humidity ratio. Humidity ratio
is a standard axis on psychometric charts, and is a useful parameter in
psychometrics calculations because it does not change with temperature except
when the air cools below dew point.

That ratio can be given as:

MRi = mw / md

Mixing ratio can also be expressed with the partial pressure of water vapor:

MRi = δ * pw / (pa - pw)

Where

δ = 0.62197 is the ratio of molecular weights of water vapor and dry air
pw = partial pressure of water vapor in moist air
pa = atmospheric pressure of moist air

Technically speaking, this is a dimensionless quantity as it is the mass of


water vapor to the mass of dry air. So it is expressed as Kg/Kg. However, the
mass of water vapor is much less than the value of the mass of dry air and most
commonly meteorologists use g/Kg which is 10 − 3 Kg/Kg.

32
Relative humidity

Relative humidity is defined as the ratio of the partial pressure of water


vapor (in a gaseous mixture of air and water vapor) to the saturated vapor
pressure of water at a given temperature. Relative humidity is expressed as a
percentage and is calculated in the following manner:

RH = p(H2O) / p*(H2O) x 100%

Where

P(H2O)is the partial pressure of water vapor in the gas mixture;


P*(H2O)is the saturation vapor pressure of water at the temperature of
the gas mixture; and
RH is the relative humidity of the gas mixture being considered.

Relative humidity is often mentioned in weather forecasts and reports,


as it is an indicator of the likelihood of precipitation, dew, or fog. In hot
summer weather, it also increases the apparent temperature to humans (and
other animals) by hindering the evaporation of perspiration from the skin as the
relative humidity rises. For example, if it was 80 degrees, with a relative
humidity of approximately 75%, it would feel about 84 degrees.

Specific humidity

Specific humidity is the ratio of water vapor to air (including water


vapor and dry air) in a particular mass. Specific humidity ratio is expressed as a
ratio of kilograms of water vapor, mw, per kilogram of air (including water
vapor), mt .

That ratio can be shown as:

SH = mw / mt

33
Specific humidity is related to mixing ratio (and vice versa) by:

SH = MR / (1+ MR)

Humidity during rain

Humidity is a measure of the amount of water vapor dissolved in the air,


not including any liquid water or ice falling through the air. For clouds to form,
and rain to start, the air doesn't have to reach 100% relative humidity at the
Earth's surface, but only where the clouds and raindrops form. This normally
occurs when the air rises and cools. Typically, rain falls into air with less than
saturated humidity. Some water from the rain may evaporate into the air as it
falls, increasing the humidity, but not necessarily enough to raise the humidity
to 100%. It is even possible for rain falling through warm, humid air to be cold
enough to lower the air temperature to the dew point, thus condensing water
vapor out of the air. Although that would indeed raise the relative humidity to
100%, the water lost from the air (as dew) would also lower the absolute
humidity.

Real-Time Clock
A real-time clock (RTC) is a computer clock (most often in the form of
an integrated circuit) that keeps track of the current time. Although the term
often refers to the devices in personal computers, servers and embedded
systems, RTCs are present in almost any electronic device which needs to keep
accurate time.

Terminology
The term is used to avoid confusion with ordinary hardware clocks
which are only signals that govern digital electronics, and do not count time in
human units. RTC should not be confused with real-time computing, which
shares its three-letter acronym, but does not directly relate to time of day.

34
Purpose
Although keeping time can be done without an RTC, using one has
benefits:
• Low power consumption (important when running from alternate
power)
• Frees the main system for time-critical tasks
• Sometimes more accurate than other methods
• A GPS receiver can shorten its startup time by comparing the current
time, according to its RTC, with the time at which it last had a valid
signal. If it has been less than a few hours then the previous ephemeris is
still usable.

Power source
RTCs often have an alternate source of power, so they can continue to
keep time while the primary source of power is off or unavailable. This
alternate source of power is normally a lithium battery in older systems, but
some newer systems use a super capacitor, because they are rechargeable and
can be soldered. The alternate power source can also supply power to battery
backed RAM.

Timing
Most RTCs use a crystal oscillator, but some use the power line
frequency. In many cases the oscillator's frequency is 32.768 kHz. This is the
same frequency used in quartz clocks and watches, and for the same reasons,
namely that the frequency is exactly 215 cycles per second, which is a
convenient rate to use with simple binary counter circuits

35
5.4 THE ELECTROMAGNETIC RELAY

Figure 5.4 Electromagnetic relay

The electromagnetic relay consists of a multi-turn coil, wound on an


iron core, to form an electromagnet. When the coil is energized, by passing
current through it, the core becomes temporarily magnetized. The magnetized
core attracts the iron armature. The armature is pivoted which causes it to
operate one or more sets of contacts. When the coil is de-energized the
armature and contacts are released.
The coil can be energized from a low power source such as a transistor
while the contacts can switch high powers such as the mains supply. The relay
can also be situated remotely from the control source. Relays can generate a
very high voltage across the coil when switched off. This can damage other
components in the circuit. To prevent this diode is connected across the coil.
The cathode of the diode is connected to the most positive.

36
The spring sets (contacts) can be a mixture of n.o n.c and c.o. Look at
the page on switches to see how they can be used in circuits. Various coil
operating voltages (ac and dc) are available. The actual contact points on the
spring sets are available for high current and low current operation. The REED
RELAY has a much faster operation than the relays described above.

Figure 5.5 Motor control circuit

The circuit above is a motor control circuit using a low voltage relay
to control a high power motor. When the "start" button is pushed, the 12 volt
circuit is completed and the relay is energised. The three sets of contacts close
and 240 volts is applied to the motor. Since there is now a closed relay contact
across the "start” switch, when the button is released the relay continues to be
energised and the motor continues to run. The relay has "latched on". When
the "stop" button is pushed the 12 volt circuit is broken. The relay is de-
energized and the motor stops.

37
5.5 DC MOTOR

A DC motor is an AC synchronous electric motor that from a modeling


perspective looks very similar to a DC motor. Sometimes the difference is
explained as an electronically-controlled commutation system, instead of a
mechanical commutation system, although this is misleading, as physically the
two motors are completely different. (The rest of this article assumes the reader
is familiar with the principles of electrical motors.)
Three subtypes exist:
• The three-phase AC synchronous motor type has three electrical
connections
• The stepper motor type may have more poles on the stator.
• The reluctance motor has all its poles on the stator, and a magnetic core on
the rotor.

In a conventional (brushed) DC-motor, the brushes make mechanical


contact with a set of electrical contacts on the rotor (called the commutator),
forming an electrical circuit between the DC electrical source and the armature
coil-windings. As the armature rotates on axis, the stationary brushes come into
contact with different sections of the rotating commutator. The commutator and
brush-system form a set of electrical switches, each firing in sequence, such
that electrical-power always flows through the armature-coil closest to the
stationary stator (permanent magnet).
In a BLDC motor, the electromagnets do not move; instead, the permanent
magnets rotate and the armature remains static. This gets around the problem of
how to transfer current to a moving armature. In order to do this, the brush-
system/commutator assembly is replaced by an intelligent electronic controller.
The controller performs the same power-distribution found in a brushed DC-
motor, but using a solid-state circuit rather than a commutator/brush system.
Comparison with brushed-DC motors:

38
Because of induction of the windings, power requirements, and
temperature management some glue circuitry is necessary between digital
controller and motor.BLDC motors offer several advantages over brushed DC-
motors, including higher efficiency and reliability, reduced noise, longer
lifetime (no brush erosion), elimination of ionizing sparks from the
commutator, and overall reduction of electromagnetic interference (EMI.) The
maximum power that can be applied to a BLDC motor is exceptionally high,
limited almost exclusively by heat, which can damage the magnets. BLDC's
main disadvantage is higher cost, which arises from two issues. First, BLDC
motors require complex electronic speed control to run. Brushed DC-motors
can be regulated by a comparatively trivial variable-resistor (potentiometer or
rheostat), which is inefficient but also satisfactory for cost-sensitive
applications. Second, many practical uses have not been well developed in the
commercial sector. For example, in the RC hobby scene, even commercial
brushless motors are often hand-wound while brushed motors use armature
coils which can be inexpensively machine-wound.
BLDC motors are considered more efficient than brushed DC-motors. This
means for the same input power, a BLDC motor will convert more electrical
power into mechanical power than a brushed motor, mostly due to absence of
friction of brushes. The enhanced efficiency is greatest in the no-load and low-
load region of the motor's performance curve. Under high mechanical loads,
BLDC motors and high-quality brushed motors are comparable in efficiency.
Controller Implementations:
Because the controller must direct the rotor rotation, the controller needs
some means of determining the rotor's orientation/position (relative to the
stator coils.) Some designs use Hall effect sensors or a rotary encoder to
directly measure the rotor's position. Others measure the back EMF in the
undriven coils to infer the rotor position, eliminating the need for separate Hall
effect sensors, and therefore are often called "sensorless" controllers. Like an
AC motor, the voltage on the undriven coils is sinusoidal, but over an entire

39
commutation the output appears trapezoidal because of the DC output of the
controller.
The controller contains 3 bi-directional drivers to drive high-current DC
power, which are controlled by a logic circuit. Simple controllers employ
comparators to determine when the output phase should be advanced, while
more advanced controllers employ a microcontroller to manage acceleration,
control speed and fine-tune efficiency. Controllers that sense rotor position
based on back-EMF have extra challenges in initiating motion because no
back-EMF is produced when the rotor is stationary. This is usually
accomplished by beginning rotation from an arbitrary phase, and then skipping
to the correct phase if it is found to be wrong. This can cause the motor to run
briefly backwards, adding even more complexity to the startup sequence.

Variations on Construction
The poles on the stator of a two-phase BLDC motor. This is part of a computer

Figure 5.6 Schematic for delta and wye winding

Cooling fan; the rotor has been removed. Schematic for delta and wye winding
styles. (This image does not illustrate a BLDC motor's inductive and generator-
like properties)

BLDC motors can be constructed in several different physical


configurations: In the 'conventional' (also known as 'inrunner') configuration,

40
the permanent magnets are mounted on the spinning armature (rotor.) Three
stator windings surround the rotor. In the 'outrunner' configuration, the radial-
relationship between the coils and magnets are reversed; the stator coils form
the center (core) of the motor, while the permanent magnets spin on an
overhanging rotor which surrounds the core. The flat type, used where there are
space or shape limitations, uses stator and rotor plates, mounted face to face.
Outrunners typically have more poles, set up in triplets to maintain the 3 groups
of windings, and have a higher torque at low RPMs. In all BLDC motors, the
stator-coils are stationary.
There are also two electrical configurations having to do with how the
wires from the windings are connected to each other (not their physical shape
or location). The delta winding connects the 3 groups of windings to each other
in a triangle-like circuit, and power is applied at each of the connections. This
pattern is typical to low-speed, low-torque motors. The wye ("Y"-shaped)
winding, sometimes called a star winding, connects all of the windings to a
central point and power is applied to the remaining end of each winding.
Although efficiency is greatly affected by the motor's construction, the
wye winding is normally more efficient. At any given time, two-thirds of the
windings in a delta configuration are running at half the voltage of the other,
which is an impact on efficiency. The wye winding always powers only two
windings in series, so higher voltages (or lower-resistance windings) can be
used.
From a controller standpoint, the two styles of windings are treated exactly
the same, although some less expensive controllers need to read voltage from
the common center of the wye winding.

5.6 PIC MICROCONTROLLER WITH LCD INTERFACING

PIC microcontroller is the first RISC based microcontroller


fabricated in CMOS (complementary metal oxide semiconductor) that uses

41
separate bus for instruction and data allowing simultaneous access of program
and data memory.

The main advantage of CMOS and RISC combination is low


power consumption resulting in a very small chip size with a small pin count.
The main advantage of CMOS is that it has immunity to noise than other
fabrication techniques.

PIC (16F877)
Various microcontrollers offer different kinds of memories.
EEPROM, EPROM, FLASH etc. are some of the memories of which FLASH
is the most recently developed. Technology that is used in pic16F877 is flash
technology, so that data is retained even when the power is switched off.
Easy Programming and Erasing are other features of PIC 16F877.

5.6.1 Special Features Of PIC Microcontroller

• High-performance RISC CPU


• Only 35 single word instructions to learn
• All single cycle instructions except for program branches which
are two cycle
• Operating speed: DC - 20 MHz clock input
DC - 200 ns instruction cycle
• Up to 8K x 14 words of Flash Program Memory,
Up to 368 x 8 bytes of Data Memory (RAM)
Up to 256 x 8 bytes of EEPROM data memory
• Pin out compatible to the PIC16C73/74/76/77
• Interrupt capability (up to 14 internal/external
• Eight level deep hardware stack
• Direct, indirect, and relative addressing modes
• Power-on Reset (POR)

42
• Only single 5V source needed for programming capability
• In-Circuit Debugging via two pins
• Processor read/write access to program memory
• Wide operating voltage range: 2.5V to 5.5V
• High Sink/Source Current: 25 mA
• Commercial and Industrial temperature ranges
• Low-power consumption:
< 2mA typical @ 5V, 4 MHz
.

Figure 5.6 Pin diagram of LCD interfacing

Operation
The power supply is given to the controller is +5v ,it will operated
in +5v only. Here we are interfacing LCD display with the controller. It is 40
pin controllers. It consists of 5ports namely port A, port B, port C, port D and
port E.
Each port has different number of pins.
Port A have 6pins (RA0-RA5)
Ports B have 8pins (RB0-RB7)

43
Ports C have 8pins (RC0-RC7)
Ports D have 8pins (RD0-RD7)
Ports E have 3pins (RE0-RE2)
VDD is for power supply
For clock input and output for 2pin is used (CLK IN/OUT).
For LCD interfacing, LCD data line is taken from the port B (0-7), for data line
given to LCD. Here we are using trim pot variable resistor. This resistor is used
for adjustment of LCD brightness.
Crystal oscillator is used for producing clock pulse. There are
different type of oscillators like RC,LC etc,. Some of the oscillator produce
clock pulse which is vary with voltage, temperature fluctuations. Only crystal
oscillator produce stable clock pulse, it does not vary with the voltage
fluctuations. We never get accurate operation of controller if clock pulse is not
stable.
Then the port A, port C is used for input/output purpose.
Input/output is taken from the this port. Data are given to the controller through
input ports. Port RE(0-1) is for read and write. RD(0-7)is also for input.

5.7 TEMPERATURE MEASUREMENT


A thermistor is a type of resistor used to measure temperature changes,
relying on the change in its resistance with changing temperature. Thermistor is
a combination of the words thermal and resistor. The Thermistor was first
invented by Samuel Ruben in 1930, and has U.S. Patent #2,021,491. If we
assume that the relationship between resistance and temperature is linear (i.e.
we make a first-order approximation), then we can say that:
ΔR = kΔT
Where
ΔR = change in resistance
ΔT = change in temperature
k = first-order temperature coefficient of resistance

44
Figure5.7 circuit diagram of thermistor

Thermistors can be classified into two types depending on the sign of k.


If k is positive, the resistance increases with increasing temperature, and the
device is called a positive temperature coefficient (PTC) thermistor, Posistor. If
k is negative, the resistance decreases with increasing temperature, and the
device is called a negative temperature coefficient (NTC) thermistor. Resistors
that are not thermistors are designed to have the smallest possible k, so that
their resistance remains almost constant over a wide temperature range.

45
Circuit Description

In this circuit the thermister is used to measure the temperature.


Thermister is nothing but temperature sensitive resistor. There are two type of
thermister available such as positive temperature co-efficient and negative
temperature co- efficient. Here we are using negative temperature co-efficient
in which the resistance value is decreased when the temperature is increased.
Here the thermister is connected with resister bridge network. The bridge
terminals are connected to inverting and non-inverting input terminals of
comparator. The comparator is constructed by LM 324 operational amplifier.
The LM 324 consist of four independent, high gains, internally frequency
compensated operational amplifier which were designed specifically to operate
from a single power supply over a wide voltage range.
The first stage is a comparator in which the variable voltage due to thermister is
given to inverting input terminal and reference voltage is given to non-
inverting input terminal.
Initially the reference voltage is set to room temperature level so
the output of the comparator is zero. When the temperature is increased above
the room temperature level, the thermister resistance is decreased so variable
voltage is given to comparator. Now the comparator delivered the error voltage
at the output. Then the error voltage is given to next stage of preamplifier. Here
the input error voltage is amplified then the amplified voltage is given to next
stage of gain amplifier. In this amplifier the variable resistor is connected as
feedback resistor. The feedback resistor is adjusted to get desired gain. Then
the AC components in the output are filtered with the help of capacitors. Then
output voltage is given to final stage of DC voltage follower through this the
output voltage is given to ADC or other circuit.

Thermistor

Thermistor is a type of resistor whose resistance varies with


temperature. The word is a portmanteau of thermal and resistor. Thermistors

46
are widely used as inrush current limiters, temperature sensors, self-resetting
over current protectors, and self-regulating heating elements.

Thermistors differ from resistance detectors temperature (RTD) in that the


material used in a thermistor is generally a ceramic or polymer, while RTDs
use pure metals. The temperature response is also different; RTDs are useful
over larger temperature ranges, while thermistors typically achieve a higher
precision within a limited temperature range [usually −90 °C to 130 °C].

Thermistors can be classified into two types, depending on the sign of k. If k is


positive, the resistance increases with increasing temperature, and the device is
called a positive temperature coefficient (PTC) thermistor, or posistor. If k is
negative, the resistance decreases with increasing temperature, and the device
is called a negative temperature coefficient (NTC) thermistor. Resistors that are
not thermistors are designed to have a k as close to zero as possible, so that
their resistance remains nearly constant over a wide temperature range.

Instead of the temperature coefficient k, sometimes the temperature coefficient


of resistance α (alpha) or αT is used. It is defined as

For example, for the common PT100 sensor, α = 0.00385 or 0.385 %/°C. This
αT coefficient should not be confused with the α parameter below.

Applications

• NTC thermistors are used as resistance thermometers in low-

temperature measurements of the order of 10 K.

• NTC thermistors can be used as inrush-current limiting devices in power

supply circuits. They present a higher resistance initially which prevents

large currents from flowing at turn-on, and then heat up and become

much lower resistance to allow higher current flow during normal

47
operation. These thermistors are usually much larger than measuring

type thermistors, and are purposely designed for this application.

• NTC thermistors are regularly used in automotive applications. For

example, they monitor things like coolant temperature and/or oil

temperature inside the engine and provide data to the ECU and,

indirectly, to the dashboard.

• Thermistors are also commonly used in modern digital thermostats and


to monitor the temperature of battery packs while charging.

5.8 HUMIDITY MEASUREMENT

Figure 5.8 circuit diagram of humidity sensor

The above diagram shows the SCU of output from crystal. At


first output potentials from the crystal is very low in voltage (0.1 likewise). So
the first stage of SCU is operational amplifier (non inverting amplifier). It will
increase the voltage level of output from the crystal.

48
The next stage is the comparator. The non inverting input of the
comparator connected to variable resistance pot for adjustment of accuracy.
The amplified signal from the piezoelectric crystal fed into another input to the
comparator.

The comparator outputs the +12 or -12 voltages according to its greater
input. From the output of comparator connected to the Q1 transistor’s base.

In normal conditions there is no voltage in inverting input of the


comparator. So the non inverting input is higher. Now the output of the
comparator is +12. If the output of comparator is +12v, the Q1 transistor will
conduct and ground In abnormal conditions there is some voltage in inverting
input of the comparator. So the non inverting input becomes lower than the
inverting input. Now the output of the comparator is -12. If the output of
comparator is -12v, the Q1 transistor would not conduct. We have taken one
output in collector of the transistor Q1. this is LOGIC 1, Then the output from
the collector of transistor Q1 has given to base of Q2. There is some base
voltage across the base of Q2. So it will conduct and ground the voltage
applied across the collector. We can also get the LOGIC 0 from the collector of
Q2 while the same condition.

5.9 PRESSURE MEASUREMENT


Pressure

Pressure (symbol: p) is the force per unit area applied on a surface in a


direction perpendicular to that surface. Mathematically:

Where
p is the pressure
F is the normal force

49
Pressure is a scalar, and has SI units of pascals, 1 Pa = 1 N/m2.

Figure 5.9 circuit for Pressure Measurement

Pressure is transmitted to solid boundaries or across arbitrary sections of


fluid normal to these boundaries or sections at every point. It is a fundamental
parameter in thermodynamics and it is conjugate to volume.

Circuit description
This circuit is designed to measure the varying pressure. The
pressure is measured by diaphragm which is one type of transducer. When
pressure is applied, the diaphragm is moving in the forward side. The
diaphragm moving is depends on the pressure. So it generates the voltage pulse
depends on the movement of diaphragm. The voltage pulses are in the range of
milli voltage. Hence the voltage pulse is given to Instrumentation amplifier
section in order to amplify the signals.
The important features of instrumentation amplifier are high gain
accuracy, high CMRR, low output impedance. Here the instrumentation
amplifier is constructed by TL 082 operational amplifier. The TL 082 is the
dual operational amplifier that is two operational amplifiers is fabricated in

50
single chip. Here the instrumentation amplifier acts as differential
instrumentation amplifier. The diaphragm transducer terminals are connected
to A1 and A2 amplifier of the differential instrumentation amplifier.
The difference of the varying voltage signals from the transducer is
amplified by the instrumentation amplifier. The A4 amplifier is used for zero
adjustment. When there is no pressure the diaphragm may be sliding in the
forward or reverse side. Due to that instrumentation amplifier delivered some
voltage at the output. To avoid this problem A4 amplifier is used for zero
adjustment. Hence when there is no pressure the output is zero.
The A5 amplifier acts as gain amplifier in which variable resistors is
connected as feedback resistor. By adjusting the feedback resistor we can vary
the gain of the output signal. Then the final gain adjusted signal is amplified by
the A6 amplifier.

5.10 RELAY DRIVER CIRCUIT

Relays

A relay is a switch worked by an electromagnet. It is useful if we want a


small current in one circuit to control another circuit containing a device such
as a lamp or electric motor which requires a large current, or if we wish several
different switch contacts to be operated simultaneously.
When the controlling current flows through the coil, the soft iron core is
magnetized and attracts the L-shaped soft iron armature. This rocks on its pivot
and opens, closes or changes over, the electrical contacts in the circuit being
controlled it closes the contacts.
The current needed to operate a relay is called the pull-in current and
the dropout current in the coil when the relay just stops working. If the coil
resistance R of a relay is 185  and its operating voltage V is 12V, the pull-in
current I is given by:

I= V/R = 12/185

51
= 0.065A
= 65mA
Relay driver circuit is used for on / off control of relay, it acts as a switch,
normally open relay is used. Relay function is derived by controller unit. Relay
working current is 40 mA.
When the controller unit output is low relay should be in off
condition. When the controller unit output is high, relay should be ready for
doing specified function.

DPDT

A DPDT (double-pole double-throw) relay has two pairs of contacts or


"throws" and two magnetically activated switch contacts or "poles". A current
applied to the relay coil causes both poles to switch.

Circuit description

This circuit is designed to control the load. The load may be motor or
any other load. The load is turned ON and OFF through relay. The relay ON
and OFF is controlled by the pair of switching transistors (BC 547). The DPDT
relay is connected in the Q2 transistor collector terminal. A Relay is nothing
but electromagnetic switching device which consists of six pins. They are two
set of Common, Normally close (NC) and normally open (NO) pins.
`The relay common pin is connected to supply voltage. The normally
open (NO) pin connected to load. When high pulse signal is given to base of
the Q1 transistors, the transistor is conducting and shorts the collector and
emitter terminal and zero signals is given to base of the Q2 transistor. So the
relay is turned OFF state.
When low pulse is given to base of transistor Q1 transistor,
the transistor is turned OFF. Now 12v is given to base of T2 transistor so the
transistor is conducting and relay is energized. Hence the common terminal and

52
NO terminal of relay are shorted. Now load gets the supply voltage through
relay.

Voltage Signal from Transistor Q1 Transistor Q2 Relay


Microcontroller or PC
1 ON OFF OFF
0 OFF ON ON

Figure 5.10 Relay Driver Circuit

53
Darlington transistor

Here we are compound two transistors to get more current gain, this
compound structure is called darlington pair, the Darlington transistor (often
called a Darlington pair) is a compound structure consisting of two bipolar
transistors (either integrated or separated devices) connected in such a way that
the current amplified by the first transistor is amplified further by the second
one.

Transistors have a characteristic called current gain. This is referred to


as its hFE. The amount of current that can pass through the load when
connected to a transistor that is turned on equals the input current x the gain of
the transistor (hFE).The current gain varies for different transistor and can be
looked up in the data sheet for the device. Typically it may be 100. This would
mean that the current available to drive the load would be 100 times larger than
the input to the transistor. In some application the amount of input current
available to switch on a transistor is very low. This may mean that a single
transistor may not be able to pass sufficient current required by the load. As
stated earlier this equals the input current x the gain of the transistor (hFE).
If it is not be possible to increase the input current then we need to increase the
gain of the transistor. This can be achieved by using a Darlington Pair. A
Darlington Pair acts as one transistor but with a current gain that equals:
Total current gain (hFE total) = current gain of transistor 1 (hFE t1) x current
gain of transistor 2 (hFE t2)

54
So for example if you had two transistors with a current gain (hFE) = 100:
(hFE total) = 100 x 100
(hFE total) = 10,000
You can see that this gives a vastly increased current gain when compared to a
single transistor.
Therefore this will allow a very low input current to switch a much bigger load
current
Normally to turn on a transistor the base input voltage of the
transistor will need to be greater that0.7V. As two transistors are used in a
Darlington Pair this value is doubled. Therefore the base voltage will need to
be greater than 0.7V x 2 = 1.4V. It is also worth noting that the voltage drop
across collector and emitter pins of the Darlington Pair when the turn on will be
around 0.9V Therefore if the supply voltage is 5V (as above) the voltage across
the load will be will be around 4.1V (5V – 0.9V).

5.11 PCB DESIGN


Design and Fabrication of Printed circuit boards

Introduction
Printed circuit boards, or PCBs, form the core of electronic equipment
domestic and industrial. Some of the areas where PCBs are intensively used are
computers, process control, telecommunications and instrumentation.

Manufacturing
The manufacturing process consists of two methods; print and etch, and
print, plate and etch. The single sided PCBs are usually made using the print
and etch method. The double sided plate through – hole (PTH) boards are made
by the print plate and etch method.
• The production of multi layer boards uses both the methods. The
inner layers are printed and etch while the outer layers are
produced by print, plate and etch after pressing the inner layers.

55
Software
The software used in our project to obtain the schematic layout is
MICROSIM.

Panelisation
Here the schematic transformed in to the working positive/negative
films. The circuit is repeated conveniently to accommodate economically as
many circuits as possible in a panel, which can be operated in every sequence
of subsequent steps in the PCB process. This is called penalization. For the
PTH boards, the next operation is drilling.

Drilling

PCB drilling is a state of the art operation. Very small holes are drilled
with high speed CNC drilling machines, giving a wall finish with less or no
smear or epoxy, required for void free through hole plating.

Plating
The heart of the PCB manufacturing process. The holes drilled in the
board are treated both mechanically and chemically before depositing the
copper by the electro less copper platting process.

Etching
Once a multiplayer board is drilled and electro less copper deposited, the
image available in the form of a film is transferred on to the out side by photo
printing using a dry film printing process. The boards are then electrolytic
plated on to the circuit pattern with copper and tin. The tin-plated deposit
serves an etch resist when copper in the unwanted area is removed by the
conveyor’s spray etching machines with chemical etch ants. The etching

56
machines are attached to an automatic dosing equipment, which analyses and
controls etch ants concentrations

Solder Mask

Since a PCB design may call for very close spacing between conductors,
a solder mask has to be applied on the both sides of the circuitry to avoid the
bridging of conductors. The solder mask ink is applied by screening. The ink is
dried, exposed to UV, developed in a mild alkaline solution and finally cured
by both UV and thermal energy.

Hot Air Leveling

After applying the solder mask, the circuit pads are soldered using the
hot air leveling process. The bare bodies fluxed and dipped in to a molten
solder bath. While removing the board from the solder bath, hot air is blown on
both sides of the board through air knives in the machines, leaving the board
soldered and leveled. This is one of the common finishes given to the boards.
Thus the double sided plated through whole printed circuit board is
manufactured and is now ready for the components to be soldered.

5.12 SOFTWARE TOOLS

Mplab

MPLAB IDE is an integrated development environment that provides


development engineers with the flexibility to develop and debug firmware for
various Microchip devices
MPLAB IDE is a Windows-based Integrated Development Environment for
the Microchip Technology Incorporated PICmicrocontroller (MCU) and dsPIC
digital signal controller (DSC) families. In the MPLAB IDE, you can:

57
Assemble, compile and link source code using various language tools.
An assembler, linker and librarian come with MPLAB IDE. C compilers are
available from Microchip and other third party vendors.
Debug the executable logic by watching program flow with a simulator, such
as MPLAB SIM, or in real time with an emulator, such as MPLAB ICE. Third
party emulators that work with MPLAB IDE are also available.
Make timing measurements.
View variables in Watch windows.
Program firmware into devices with programmers such as PICSTART Plus or
PRO MATE II.
Find quick answers to questions from the MPLAB IDE on-line Help.

Mplab Simulator

MPLAB SIM is a discrete-event simulator for the PIC microcontroller


(MCU) families. It is integrated into MPLAB IDE integrated development
environment. The MPLAB SIM debugging tool is designed to model operation
of Microchip Technology's PIC microcontrollers to assist users in debugging
software for these devices
IC PROG
The PRO MATE II is a Microchip microcontroller device programmer.
Through interchangeable programming socket modules, PRO MATE II enables
you to quickly and easily program the entire line of Microchip PICmicro
microcontroller devices and many of the Microchip memory parts.
PRO MATE II may be used with MPLAB IDE running under supported
Windows OS's (see Read me for PRO MATE II.txt for support list), with the
command-line controller PROCMD or as a stand-alone programmer
COMPILER HITECH-C
A program written in the high level language called C; which will be
converted into PICmicro MCU machine code by a compiler. Machine code is
suitable for use by a PICmicro MCU or Microchip development system
product like MPLAB IDE.

58
PIC Start Plus Programmer:

The PIC start plus development system from microchip technology


provides the product development engineer with a highly flexible low cost
microcontroller design tool set for all microchip PIC micro devices. The pic
start plus development system includes PIC start plus development
programmer and MPLAB IDE.
The PIC start plus programmer gives the product developer ability to
program user software in to any of the supported microcontrollers. The PIC
start plus software running under MPLAB provides for full interactive control
over the programmer.

59
CHAPTER 6

CONCLUSION

The progress in science & technology is a non-stop process. New things


and new technology are being invented. As the technology grows day by day,
we can imagine about the future in which thing we may occupy every place.

The proposed system based on PIC microcontroller is found to be more


compact, user friendly and less complex, which can readily be used in order to
perform. Several tedious and repetitive tasks. Though it is designed keeping in
mind about the need for industry, it can extended for other purposes such as
commercial & research applications. Due to the probability of high technology
(PIC microcontroller) used this “ENVIRONMENTAL MONITORING WITH
MOBILE ROBOTS” system is fully software controlled with less hardware
circuit. The feature makes this system is the base for future systems.

6.1 FUTURE WORK


Many interesting future extensions are feasible with our current setup.
One of them would be to implement automatic recognition of the change in the
wind direction. The measured data can then be automatically split into subsets
so that each subset contains only the measurements made under similar
conditions. Mapping will then be more properly done. Other sensor modalities,
e.g. temperature and humidity sensors can be also used to check if there is an
indication of a change in the environment.
A more challenging but also more interesting extension would be to take
a closer look at the correlation between the instantaneous gas concentration and
wind velocity vector. When the wind direction changed during the sweep over
an area, the gas distribution map generated from the measurements typically
had multiple peaks distributed over the whole area.

60
REFERENCES

1. “DustBot - Networked and Cooperating Robots for Urban Hygiene,”


http://www.dustbot.org.

2. Ishida.H, Nakamoto.T, and Moriizumi.T, “Remote Sensing of


Gas/Odor Source Location and Concentration Distribution Using
Mobile System,” Sensors and Actuators B, vol. 49, pp. 52–57, 1998.

3. Lilienthal, F. Streichert, and A. Zell, “Model-based Shape Analysis of


Gas Concentration Gridmaps for Improved Gas Source Localisation,” in
Proc. ICRA, Barcelona, Spain, 2005, pp. 3575 – 3580.

4. Purnamadjaja.H and Russell.R.A, “Congregation Behaviour in a Robot


Swarm Using Pheromone Communication,” in Proc. ACRA, 2005.

5. Pyk.P, Berm´udez Badia.S, Bernardet.U, Kn¨usel.P, Carlsson.M, Gu, E.


Chanie.J, Hansson.T.C, Pearce.K, and Verschure .P. F, “An Artificial
Moth: Chemical Source Localization Using a Robot Based Neuronal
Model of Moth Optomotor Anemotactic Search,” Auton Robot, vol. 20,
pp. 197–213, 2006.

WEBSITES:

1. http://www.atmel.com/
2. http://www.microchip.com/
3. http://www.8052.com
4. http://www.beyondlogic.org

61

Vous aimerez peut-être aussi