Sie sind auf Seite 1von 82

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

CHAPTER 1

INTRODUCTION
We live in a world where everything can be controlled and operated automatically,
but there are still a few important sectors in our country where automation has not been
adopted or not been put to a full-fledged use, perhaps because of several reasons one such
reason is cost. One such field is that of agriculture. Agriculture has been one of the primary
occupations of man since early civilizations and even today manual interventions in farming
are inevitable. Greenhouses form an important part of the agriculture and horticulture sectors
in our country as they can be used to grow plants under controlled climatic conditions for
optimum produce. Automating a greenhouse envisages monitoring and controlling of the
climatic parameters which directly or indirectly govern the plant growth and hence their
produce. Automation is process control of industrial machinery and processes, thereby
replacing human operators.

1.1 CURRENT SCENARIO


Greenhouses in India are being deployed in the high-altitude regions where the subzero temperature up to -40 C makes any kind of plantation almost impossible and in arid
regions where conditions for plant growth are hostile. The existing set-ups primarily are:
1.1.1 MANUAL SET-UP:
This set-up involves visual inspection of the plant growth, manual irrigation of plants,
turning ON and OFF the temperature controllers, manual spraying of the fertilizers and
pesticides. It is time consuming, vulnerable to human error and hence less accurate and
unreliable.
1.1.2 PARTIALLY AUTOMATED SET-UP:
This set-up is a combination of manual supervision and partial automation and is
similar to manual set-up in most respects but it reduces the labor involved in terms of
irrigating the set-up.

Dept. of ECE, SIR MVIT

Page 1

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

1.2 PROBLEM DEFINITION


A number of problems associated with the above mentioned systems are enumerated
as below:
1. Complexity involved in monitoring climatic parameters like humidity, CO2, illumination,
soil pH, temperature, etc which directly or indirectly govern the plant growth.
2. Investment in the automation process are high, as todays greenhouse control systems are
designed for only one parameter monitoring (as per GKVK research center); to control more
than one parameter simultaneously there will be a need to buy more than one system.
3. High maintenance and need for skilled technical labor. The modern proposed systems use
the mobile technology as the communication schemes and wireless data acquisition systems,
providing global access to the information about ones farms. But it suffers from various
limitations like design complexity, inconvenient repairing and high price. Also the reliability
of the system is relatively low, and when there are malfunctions in local devices, all local and
tele data will be lost and hence the whole system collapses. More over farmers in India do
not work under such sophisticatedenvironment and find no necessity of such an advanced
system, and cannot afford the same.
Keeping these issues in view, a microcontroller based monitoring and control system
is designed to find implementation in the near future that will help Indian farmers.

1.3 PROPOSED MODEL FOR AUTOMATION OF GREENHOUSE


The proposed system is an embedded system which will closely monitor and control
the microclimatic parameters of a greenhouse on a regular basis round the clock for
cultivation of crops or specific plant species which could maximize their production over the
whole crop growth season and to eliminate the difficulties involved in the system by reducing
human intervention to the best possible extent. The system comprises of sensors, Analog to
Digital Converter, CPLD,

Dept. of ECE, SIR MVIT

Page 2

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

When any of the above mentioned climatic parameters cross a safety threshold which
has to be maintained

to protect the crops, the sensors sense the change and the

CPLD reads this from the data at its input ports after being converted to a digital form by the
ADC. The CPLD then performs the needed actions by employing relays until the strayed-out
parameter has been brought back to its optimum level. Since the CPLD is used as the heart of
the system, it makes the set-up low-cost and effective nevertheless and the entire set-up
becomes user friendly.
Thus, this system eliminates the drawbacks of the existing set-ups mentioned in the
previous section and is designed as an easy to maintain, flexible and low cost solution.

Dept. of ECE, SIR MVIT

Page 3

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

BLOCK DIAGRAM

Dept. of ECE, SIR MVIT

Page 4

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

CHAPTER 2

BASIC THEORY
2.1 LIFE PROCESSES INSIDE GREENHOUSE:
2.1.1 PHOTOSYNTHETIC PROCESS
The two major life-processes occurring in plants are photosynthesis and
transpiration.Photosynthesis is the conversion of light energy into chemical energy by living
organisms.The raw materials are carbon dioxide and water; the energy source is sunlight; and
the endproductsare oxygen and (energy rich) carbohydrates, for example sucrose, glucose
andstarch. This process is arguably the most important biochemical pathway, since nearly
alllife on Earth either directly or indirectly depends on it.

Fig 3.1.Block diagram of photosynthesis


Dept. of ECE, SIR MVIT

Page 5

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

A commonly used but slightly simplified equation for photosynthesis is:


6 CO2(g) + 12 H2O(l) + photons C6H12O6(aq.) + 6 O2(g) + 6 H2O(l) (3.1)
Carbon dioxide + water + light energy glucose + oxygen + water
Light energy obtained from the sun is very essential for photosynthesis. The
photonspresent in light are responsible for triggering the light-reaction in plants. Plants need
anoptimum amount of exposure to light in a day. This optimum period is called its
photoperiod.The plant sensitivity curve for photosynthesis has its peak at the red side of
thespectrum. This indicates that providing plants with the wavelengths best suited
tophotosynthesis is most efficient with the use of artificial light. Tests show a mean
deviationfrom the average sensitivity curve of less than 5% for a wide variety of plants. The
curveshows that the maximum sensitivity for photosynthesis lies in the far red at
approximately675 nm. The plant sensitivity curve disputes two common misconceptions. The
first is that an"ideal" plant growing lamp duplicates the spectral energy distribution of the
sun. Sunlight hasa continual spectrum, radiating energy in wavelengths that contribute less to
photosynthesis,and are therefore "wasted" on the plant. For this reason, many lamps are more
efficient thansunlight for plants.
Plants need dark periods. Periods of light (called photo-periods) and dark periods
andtheir relative lengths have an effect on plant maturity. The dark period of each day
affectsflowering and seeding of most plants. Although many plants can grow under
continuouslight, nearly all plants prefer a dark period each day for normal growth. All plants
need somedarkness to grow well or to trigger flowering. The ideal photoperiods of plants
vary, somepreferring long days and short nights; others the reverse; and some do best when
the length ofthe night and day periods are equal.

2.1.2 TRANSPIRATION
Transpiration is the evaporation of water from the aerial parts of plants,
especiallyleaves but also stems, flowers and roots Transpiration also cools plants and enables
massflow of mineral nutrients and water from roots to shoots. Mass flow is caused by the
decreasein hydrostatic (water) pressure in the upper parts of the plants due to the diffusion of
waterout of stomata into the atmosphere. Water is absorbed at the roots by osmosis, and
Dept. of ECE, SIR MVIT

Page 6

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

anydissolved mineral nutrients travel with it through the xylem.The rate of transpiration is
directly related to the degree of stomatal opening, and tothe evaporative demand of the
atmosphere surrounding the leaf. The amount of water lost bya plant depends on its size,
along with the surrounding light intensity, temperature, humidity,and wind speed (all of
which influence evaporative demand). Soil water supply and soiltemperature can influence
stomatal opening, and thus the transpiration rate.

Fig 3.2.Transpiration
The moisture content in the soil is a very crucial factor in the process of
transpirationas the absorption of mineral salts from the soil through the process of osmosis is
directlydependent on the moisture content in the soil.The greenhouse works best when the
temperature is not too hot and not too cold.Though it sounds simple in the spring and autumn
we can easily have a wide range oftemperatures from the cold in the middle of the night to
the excessive heat of the day whenthe sun is shining. During the day the rays from the sun
penetrate the greenhouse and warmup and light up the surroundings. Light escapes through
the glass walls but the heat in formof infra-red radiations gets trapped inside the green house
leading to an incubating effect andthe temperature inside gradually increases. This increased
temperature leads to an increase inthe rate of transpiration which is harmful to the plant.

Dept. of ECE, SIR MVIT

Page 7

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

CHAPTER 3

CONTROLLING SYSTEM
3.1. BASIC MODEL OF THE CONTROLLING SYSTEM

Fig. 3.1.Block diagram of the system

Dept. of ECE, SIR MVIT

Page 8

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

3.2 PARTS OF THE SYSTEM:


1.Sensors (Data acquisition system)
1. Temperature sensor (Pt100)
2. Humidity sensor (HY HS220)
3. Light sensor (LDR)
4. CO2 sensor
2. Analog to Digital Converter (ADC 0804)
3. Complex Programmable Logic Device (XC9572XL)
4. Devices controlled
1. Exaust Fan
2. Sprayer (Dc Motor)
3. Fan/Heater
4. Artificial Light (DC bulb)

TRANSDUCERS
This part of the system consists of various sensors, namely CO2, humidity, temperature and
light. These sensors sense various parameters- temperature, humidity, soil moisture and light intensity
and are then sent to the Analog to Digital Converter.

ANALOG TO DIGITAL CONVERDER (ADC):


Dept. of ECE, SIR MVIT

Page 9

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

The analog parameters measured by the sensors are then converted to corresponding
digital values by the ADC. Here the ADC used is ADC 0804.
COMPLEX PROGRAMMABLE LOGIC DEVICE(CPLD):
The CPLDis the heart of the proposed embedded system. It constantly monitors the
digitized parameters of the various sensors and verifies them with the predefined
threshold values and checks if any corrective action is to be taken for the condition
at that instant of time. In case such a situation arises, it activates the particular device to
perform a controlled operation.

3.3 STEPS FOLLOWED IN DESIGNING THE SYSTEM:


Three general steps can be followed to appropriately select the control system:
Step # 1: Identify measurable variables important to production.
It is very important to correctly identify the parameters that are going to be measured
by the CPLDs data acquisition interface, and how they are to be measured. The set of
variables typically used in greenhouse control is shown below:
Sl. No. Variable to be monitored

Its Importance

Temperature

Affects all plant metabolic functions.

Humidity

Affects transpiration rate and the plant's thermal


control mechanisms.

Affects ice sheets slowly melt, and as sea

CO2

level slowly rises


4

Light

Affects photosynthetic rate, responsible for


most thermal load during warm periods

Table 3.1 Importance of the various parameters


An electronic sensor for measuring a variable must readily available, accurate,
reliable and low in cost. If a sensor is not available, the variable cannot be incorporated into
the control system, even if it is very important. Many times variables that cannot be directly
Dept. of ECE, SIR MVIT

Page 10

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

or continuously measured can be controlled in a limited way by the system. For example,
fertility levels in nutrient solutions for greenhouse production are difficult to measure
continuously.
Step# 2: Investigate the control strategies.
An important element in considering a control system is the control strategy that is to
be followed. The simplest strategy is to use threshold sensors that directly affect actuation of
devices. For example, the temperature inside a greenhouse can be affected by
controlling heaters, fans, or window openings once it exceeds the maximum allowable
limit. The light intensity can be controlled using threshold level. As the light intensity
decreases light may be turned on.Thus ensuring that the plants are not deprived of adequate
sunlight even during the winter season or a cloudy day.
More complex control strategies are those based not only on the current values of the
controlled variables, but also on the previous history of the system, including the rates at
which the system variables are changing.
Step #3: Identify the software and the hardware to be used.
It is very important that control system functions are specified before deciding what
software and hardware system to purchase. The model chosen must have the ability to: 1.
Expand the number of measured variables (input subsystem) and controlled devices (output
subsystem) so that growth and changing needs of the production operation can be
satisfied in the future. 2. Provide a flexible and easy to use interface. 3. It must ensure high
precision measurement and must have the ability resist noise.
Hardware must always follow the selection of software, with the hardware required
being supported by the software selected. In addition to functional capabilities, the selection
of the control hardware should include factors such as reliability, support, previous
experiences with the equipment (successes and failures), and cost.

Dept. of ECE, SIR MVIT

Page 11

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

CHAPTER 4

HARDWARE DESCRIPTION
4.1 TRANSDUCERS:
A transducer is a device which measures a physical quantity and converts it into a
signal which can be read by an observer or by an instrument. Monitoring and controlling of a
greenhouse environment involves sensing the changes occurring inside it which can
influence the rate of growth in plants. The parameters which are of importance are the
temperature inside the greenhouse which affect the photosynthetic and transpiration
processes are humidity, moisture content in the soil, the illumination etc. Since all these
parameters are interlinked, a closed loop (feedback) control system is employed in
monitoring it. The sensors used in this system are:
1. Humidity sensor
2. CO2 sensor
3. Light sensor
4. Temperature sensor
4.1.1 LIGHT SENSOR
Light Dependent Resistor (LDR) also known as photoconductor or photocell, is a
device which has a resistance which varies according to the amount of light falling on its
surface. Since LDR is extremely sensitive in visible light range, it is well suited for the
proposed application.

Fig. 4.2. Light Dependent Resistor

Dept. of ECE, SIR MVIT

Page 12

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

4.1.1.1 Features of the light sensor:


The Light Dependent Resistor (LDR) is made using the semiconductor Cadmium Sulphide
(CdS).
The light falling on the brown zigzag lines on the sensor causes the resistance of thedevicto
fall. This is known as a negative co-efficient. There are some LDRs that work in the
opposite way i.e. their resistance increases with light (called positive co- efficient). he
resistance of the LDR decreases as the intensity of the light falling on it increases. Incident
photons drive electrons from the valence band into the conduction band.

Fig 4.3Structure of a Light Dependent Resistor, showing Cadmium Sulphide track


and an atom to illustrate electrons in the valence and conduction band
4.1.1.2 Functional description
1. The LDR is the component tied directly to the 5V, the sensor node will increase in voltage
with increasing light
2. The LDR's resistance can reach 10 k ohms in dark conditions and about 100 ohms in full
brightness.
3. The LDR is directly used for sensing light in our system which is connected to +5V.
Hence the voltage value in this case decreases with increase in light intensity.
4. The sensor node voltage is compared with the threshold voltage for dark or night
conditions

Dept. of ECE, SIR MVIT

Page 13

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

5. The relationship between the resistance RL

and light intensity Lux for a

typical LDR is:


RL = 500 / Lux k

4.2.CARBONDIOXIDE SENSOR
The MQ series of gas sensors use a small heater inside with an electro-chemical sensor.
They are sensitive for a range of gasses and are used indoors at room temperature.
They can be calibrated more or less (see the section about "Load-resistor" and "Burn-in") but
a know concentration of the measured gas or gasses is needed for that.The output is an
analog signal and can be read with an analog input of the MP. Since there are no electronic
components inside, therefore most sensors can be used with AC and DC voltages.
Be careful when connecting it for the first time. If the pins are connected wrong, the sensor
could get damaged, or it could be broken instantly. There are also shields available with these
sensors pre-installed.
Wiring
The preferred wiring is to connect both 'A' pins together and both 'B' pins together. It is safer
and it is assumed that is has more reliable output results. Although many schematics and
datasheets show otherwise, you are advised to connect both 'A' pins together and connect
both 'B' pins together.

Dept. of ECE, SIR MVIT

Page 14

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

In the picture, the heater is for +5V and is connected to both 'A' pins. This is only possible if
the heater needs a fixed +5V voltage.The variable resistor in the picture is the load-resistor
and it can be used to determine a good value. A fixed resistor for the load-resistor is used in
most cases.The Vout is connected to an analog input of the Arduino.
The voltage for the internal heater is very important.Some sensors use 5V for the heater,
others need 2V. The 2V can be created with a PWM signal, using analogWrite() and a
transistor or logic-level mosfet.
The heater may not be connected directly to an output-pin of the Arduino, since it uses too
much current for that.Some sensors need a few steps for the heater. This can be programmed
with an analogWrite() function and delays. A transistor or logic-level mosfet should also in
this situation be used for the heater.
If it is used in a battery operated device, a transistor or logic-level mosfet could also be used
to switch the heater on and off.
The sensors that use 5V or 6V for the internal heater do get warm. They can easily get 50 or
60 degrees Celcius.After the "burn-in time", the heater needs to be on for about 3 minutes
(tested with MQ-2) before the readings become stable.

Load-resistor
The sensor needs a load-resistor at the output to ground. It's value could be from 2kOhm to
47kOhm. The lower the value, the less sensitive. The higher the value, the less accurate for
higher concentrations of gas.

Dept. of ECE, SIR MVIT

Page 15

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

If only one specific gas is measured, the load-resistor can be calibrated by applying a know
concentration of that gas. If the sensor is used to measure any gas (like in a air quality
detector) the load-resistor could be set for a value of about 1V output with clean air.

4.1.3 HUMIDITY SENSOR


The humidity sensor SY-HS220 is used for sensing thehumidity. It delivers
instrumentation quality RH (Relative Humidity) sensing performance ina low cost, solder
able SIP (Single In-line Package). Relative humidity is a measure, in percentage, of the vapor
in the air compared to the total amount of vapor that could be held in the air at a given
temperature.

Fig4.4. Humidity sensor


4.1.3.1 Features
1. Rated voltage : DC 5V
2. Current consumption < -3.0mA
3. Operating temperature range: 0-60 degree Celsius
4. Operating Humidity range: 30-90%RH
5. Storable Temperature range : -30 degrees to 85 degree Celsius
6. Storable Humidity range: within 95%RH
7. Standard output voltage: DC 1.980 mV(at 25 degrees,60%RH)
8. Accuracy +5%RH or -5%RH (at 25 degrees,60%RH)
9.

Dept. of ECE, SIR MVIT

Page 16

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

4.1.3.2 Functional description


This sensor module converts relative humidity(30-90%RH) to voltage and can be
used in weather monitoring application.
The sensor develops a linear voltage vs. RH output that is ratiometric to the supplyvoltage.
That is, when the supply voltage varies, the sensor output voltage follows in the same
proportion. It can operate over a 4-5.8 supply voltage range. At 5V supply voltage, and room
temperature, the output voltage ranges from 0.8 to 3.9V as the humidity varies from 0% to
100% (noncondensing).
The humidity sensor functions with a resolution of up to 0.5% of relative humidity(RH).
With a typical current draw of only 200 A, the HIH-4000 Series is ideally suited forlow
drain, battery operated systems.
The change in the RH of the surroundings causes an equivalent change in the voltageoutput.
The output is an analog voltage proportional to the supply voltage. Consequently, converting
it to relative humidity (RH) requires that both the supplyand sensor output voltages be taken
into account according to the formula:
RH = ((Vout / Vsupply) 0.16) /0.0062, typical at 25C (4.2)
This voltage is converted to the digital form by the ADC and then sent as input to the CPLD
which reads the data.

4.1.4 TEMPERATURE SENSOR-PT100

Fig. 4.5 Pt100 temperature sensor

Dept. of ECE, SIR MVIT

Page 17

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

Platinum resistance thermometers (PRTs) offer excellent accuracy over a wide


temperature range from -200 to +850 C). Standard Sensors are are available from many
manufacturers with various accuracy specifications and numerous packaging options to suit
most applications. Unlike thermocouples, it is not necessary to use special cables to connect
to the sensor. The principle of operation is to measure the resistance of a platinum element.
The most common type (PT100) has a resistance of 100 ohms at 0 C and 138.4 ohms at 100
C. There are also PT1000 sensors that have a resistance of 1000 ohms at 0 C.

The relationship between temperature and resistance is approximately linear over a small
temperature range: for example, if you assume that it is linear over the 0 to 100 C range, the
error at 50 C is 0.4 C. For precision measurement, it is necessary to linearise the resistance
to give an accurate temperature. The most recent definition of the relationship between
resistance and temperature is International Temperature Standard 90 (ITS-90). This
linearisation is done automatically, in software, when using Pico signal conditioners. The
linearisation equation is:
Rt = R0 * (1 + A* t + B*t2 + C*(t-100)* t3)
Where:
Rt is the resistance at temperature t, R0 is the resistance at 0 C, and
A= 3.9083 E-3

B = -5.775 E-7

C = -4.183 E -12 (below 0 C), or C = 0 (above 0 C)


For a PT100 sensor, a 1 C temperature change will cause a 0.384 ohm change in resistance,
so even a small error in measurement of the resistance (for example, the resistance of the
wires leading to the sensor) can cause a large error in the measurement of the temperature.
For precision work, sensors have four wires- two to carry the sense current, and two to
measure the voltage across the sensor element. It is also possible to obtain three-wire sensors,
although these operate on the (not necessarily valid) assumption that the resistance of each of
the three wires is the same.
The current through the sensor will cause some heating: for example, a sense current of 1
mA through a 100 ohm resistor will generate 100 W of heat. If the sensor element is unable
to dissipate this heat, it will report an artificially high temperature. This effect can be reduced
by either using a large sensor element, or by making sure that it is in good thermal contact
Dept. of ECE, SIR MVIT

Page 18

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

with its environment. Using a 1 mA sense current will give a signal of only 100 mV. Because
the change in resistance for a degree celsius is very small, even a small error in the
measurement of the voltage across the sensor will produce a large error in the temperature
measurement. For example, a 100 V voltage measurement error will give a 0.4 C error in
the temperature reading. Similarly, a 1 A error in the sense current will give 0.4 C
temperature error. Because of the low signal levels, it is important to keep any cables away
from electric cables, motors, switchgear and other devices that may emit electrical noise.
Using screened cable, with the screen grounded at one end, may help to reduce interference.
When using long cables, it is necessary to check that the measuring equipment is capable of
handling the resistance of the cables. Most equipment can cope with up to 100 ohms per core.
The type of probe and cable should be chosen carefully to suit the application. The main
issues are the temperature range and exposure to fluids (corrosive or conductive) or metals.
Clearly, normal solder junctions on cables should not be used at temperatures above about
170 C. Sensor manufacturers offer a wide range of sensors that comply with BS1904 class B
(DIN 43760): these sensors offer an accuracy of 0.3 C at 0 C. For increased accuracy,
BS1904 class A (0.15 C) or tenthDIN sensors (0.03 C). Companies like Isotech can
provide standards with 0.001 C accuracy. Please note that these accuracy specifications
relate to the SENSOR ONLY: it is necessary to add on any error in the measuring system as
well. Related standards are IEC751 and JISC1604-1989. IEC751 also defines the colour
coding for PRT sensor cables: the one or two wires attached to one end of the sensor are red,
and the one or two wires at the other end are white.

4.2 ANALOG TO DIGITAL CONVERTER (ADC 0804)


In physical world parameters such as temperature, pressure, humidity, and velocity
are analog signals. A physical quantity is converted into electrical signals. We need an analog
to digital converter (ADC), which is an electronic circuit that converts continuous signals
into discrete form so that the CPLD can read the data. Analog to digital converters are the
most widely used devices for data acquisition.

Dept. of ECE, SIR MVIT

Page 19

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

Fig4.6.Getting data from the analog world


4.2.1 DESCRIPTION
Analog to digital converters find huge application as an intermediate device to
convert the signals from analog to digital form. These digital signals are used for further
processing by the digital processors. Various sensors like temperature, pressure, force etc.
convert the physical characteristics into electrical signals that are analog in nature.
ADC0804 is a very commonly used 8-bit analog to digital convertor. It is a single channel
IC, i.e., it can take only one analog signal as input. The digital outputs vary from 0 to a
maximum of 255. The step size can be adjusted by setting the reference voltage at pin9.
When this pin is not connected, the default reference voltage is the operating voltage, i.e.,
Vcc. The step size at 5V is 19.53mV (5V/255), i.e., for every 19.53mV rise in the analog
input, the output varies by 1 unit. To set a particular voltage level as the reference value, this
pin is connected to half the voltage. For example, to set a reference of 4V (Vref), pin9 is
connected to 2V (Vref/2), thereby reducing the step size to 15.62mV (4V/255).
ADC0804 needs a clock to operate. The time taken to convert the analog value to digital
value is dependent on this clock source. An external clock can be given at the Clock IN pin.
ADC 0804 also has an inbuilt clock which can be used in absence of external clock. A
suitable RC circuit is connected between the Clock IN and Clock R pins to use the internal
clock.
4.2.2 FEATURES
1. It is a very commonly used 8-bit, 20pin analog to digital converter
2. It is a single channel IC, i.e., it can take only one analog signal as input.
3. Ratiometric conversion
4. 100-us conversion time
5. Will Operate in a Stand Alone Mode
6.

Differential Analog Voltage Inputs

Dept. of ECE, SIR MVIT

Page 20

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

7. Works with Bandgap Voltage References


8. TTL Compatible Inputs and Outputs
9.

On-Chip Clock Generator

10. Analog Voltage Input Range(Single + 5V Supply) 0V to 5V


11. No Zero-Adjust Required
12. 80C48 and 80C80/85 Bus Compatible - No Interfacing
Logic Required

4.2.3 CONVERSION METHOD USED


Following are the most used conversion methods:
1. Digital-Ramp ADC
2. Successive Approximation ADC
3. Flash ADC
Successive approximation ADC is suitable for the proposed application. It is much
faster than the digital ramp ADC because it uses digital logic to converge on the value closest
to the input voltage. A comparator and a DAC (Digital to Analog Converter) are used in the
process.

Dept. of ECE, SIR MVIT

Page 21

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

4.2.4. PIN DIAGRAM OF ADC 0804

Fig4.7. Pin diagram of ADC 0804

4.3 CPLD
4.3.1. INTRODUCTION
Programmable Logic Devices (PLDs) offer wide range of logiccapacity, features, speed and
voltage characteristics and these devicescan be changed at any time to perform any number
of functions. Theconcept is to have a few PLD blocks or macro cells on a single device with
general purpose interconnect in between. Simple logic paths can be implemented within a
single block. More sophisticated logic willrequire multiple blocks and use the general
purpose interconnect inbetween to make these connections. CPLDs are great at handling
wideand complex gating at blistering speeds. e.g., 5ns which is equivalentto 200MHz. the
timing model for CPLD is easy to calculate, so evenbefore design it can calculate the in to
Dept. of ECE, SIR MVIT

Page 22

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

output speeds. CPLDs enableease of design, lower development costs, more product revenue
formoney, and the opportunity to speed your products to market, etc.

4.3.2. FEATURES AND SPECIFICATIONS


CPLD (XC9572XL) Technical Specifications:
1. 7.5 ns pin-to-pin logic delays on all pins
2. FCNT to 125 MHz
3. 72 macro cells with 1,600 usable gates
4. Up to 72 user I/O pins
5. 5 V in-system programmable (ISP)
6. Endurance of 10,000 program/erase cycles
7. Program/erase over full commercial voltage and temperature range
8. Enhanced pin-locking architecture
9. Flexible 36V18 Function Block
10. 90 product terms drive any or all of 18 macro cells within Function Block
11. Global and product term clocks, output enables, set and reset signals
12. Extensive IEEE Std 1149.1 boundary-scan (JTAG) support
13. Programmable power reduction mode in each macro cell
14. Slew rate control on individual outputs
15. User programmable ground pin capability
16. Extended pattern security features for design protection
17. High-drive 24 mA outputs
18. 3.3 V or 5 V I/O capability
19. Advanced CMOS 5V Fast FLASH technology
20. Supports parallel programming of more than one XC9500 concurrently
21. Available in 44-pin PLCC, 84-pin PLCC, 100-pin PQFP and 100-pin TQFP packages
Frequency support: External Frequency oscillator 40 MHz in
system up gradable up to 65 MHz.
Internal Frequency up to 112 MHz.
Language Support: VHDL, Verilog, Mixed HDL.
Simulator support: XILINX (ModelSIM)
Dept. of ECE, SIR MVIT

Page 23

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

Synthesis tool support: XILINX (XST)


Place & Route support: XILINX Foundation and Alliance series.

4.3.2.1. CPLD Trainer and Development KIT Specifications:


1. On board regulated power supply 3.3V
2. XC9572XL CPLD
3. In-built JTAG Programmer
4. Parallel port connector for JTAG Programming
5. 2 x 7 Segment Display
6. 4 x 4 Key Switches
7. 16 LED Displays
8. 16 switches for easy fixed inputs.
9. Buzzer
10. Jumper Selectable Port Pins
11. External 72 I/O Port Pins to control external devices or anotherCPLD suitable for custom
project design & DevelopmentApplications for students and developers.

4.3.3. INSTALLATION:
Software:
1. Use ISE Webpack 6.1 provided along with this CPLD KIT.Use the 12 digit Key for
installing ISE which is given on the CDcover.
Hardware:
1. Connect the 3-pin power supply cable to the 230V powersupply.
2. Connect the parallel port (LPT1) from PC to the parallel portconnector at the back side of
the KIT.

4.3.4. CPLD BOARD LAYOUT:

Dept. of ECE, SIR MVIT

Page 24

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

Fig4.8. CPLD board layout

4.3.5. COMPONENTS OF CPLD KIT:


Input power supply:
Operating Voltage: 3.3V DC regulated voltageConstant power of 3.3V/0.4A is driven from
5.0V/0.4A usingLM317 Voltage Regulator IC. Input to the LM317 is providedFromuniversal
switch mode power supply (SMPS), which is provided inside the KIT. Universal switch
mode power supplygets Supply input of 100V to 240V AC.

Light Emitting Diodes:The CPLD KIT comes with 16+1 Nos. of LEDs. 16 No of LEDsfor
the I/O purposes and one LED for the POWER SUPPLYStatus.
JTAG Programmer:
The JTAG Programmer Manufactured by us is provided in theKIT for the programming of
the CPLD. So, a Parallel port connectorfrom PC to the KIT is provided.

Oscillator:
This CPLD KIT supports input frequency up to 65MHz. Herethe KIT comes with a 40 MHz
crystal Oscillator.

Dept. of ECE, SIR MVIT

Page 25

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

Slide Switches:
The CPLD KIT comes with 16 slide switches for fixed input.So,it will be useful for
programmer to utilize the maximum of16 inputs for his programme.

Seven segment display:


The CPLD consist of two seven segment displays to display thedata. Here the seven segment
display is connected to the CPLD,wiring are fixed, by proper assignment of the allotted pins
thesecan be used in the programme.

Buzzer:
A buzzer is connected to the CPLD. So that it can be used in theprogramme directly by
assigning the allotted pin.

4X4 Key switches:


The CPLD comes with the 4X4 key switches. This can be usedas a Keypad forgiving input to
the CPLD.

Jumper settings:
Jumpers are provided at the sides of the CPLD chip. The jumpersin the sides are useful for
selecting the CPLD pin usage asgeneral purpose I/O or the allotted application I/Os. By
properjumper settings the fixed I/Os or General Purpose I/Os can beselected.

Fig4.9. Jumper settings

Dept. of ECE, SIR MVIT

Page 26

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

2.4 RELAY
The relay that we are using in this project is a 230V/ 2Amp relay and its an
electro mechanical relay. The excitation voltage that is required is +12V DC. It is
driven using the Relay driver IC ULN2003 / ULN2003A.The device is connected to
the electro mechanical relay. When the relay is excited by applying the 12V dc the
relay gets activated and in the process turns ON the device and when the excitation
voltage is stopped the relay gets deactivated and in the process Turns OFF the
devices.
2.4.1 ELECTROMECHANICAL RELAY
Electromechanical relays are switching devices typically used to control high
power devices. In such relays the switching mechanism that is part of an operating
circuit, is activated by means of a relay solenoid coil through which the switching
current flows. Electromagnetic relays generally comprise two primary components
including a movable conductive cantilever beam and an electromagnetic coil.
Electromechanical type relays have one or more mechanical displacement electrical
contacts coupled to a mobile element of the magnetic circuit of an electromagnet.
The electromagnet is controlled by supplying power to its coil which drives the
movement of the mobile element and the closing or opening of the electrical
contacts of the relay. Over the years, electromechanical relays have found wide and
varied application in the communications and electrical components. Ultra miniature
electromechanical relays are used in various applications, such as ins trumentation,
telecommunications, automatic test systems, wireless technologies, RF signal pulse

Dept. of ECE, SIR MVIT

Page 27

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

generators, automotive and medical electronics, as well as commercial and general


aviation and aerospace applications.
2.4.2 RELAY SPECIFICATION
Volts

12

Polarity

Positive

Type

DC

Classification

Electro Mechanical relay

Baffle

Single Pole

Coil Resistance

250 ohms

Max Current

2 Amps

Max Volts

230V

Insulation

Class B

4.5. POWER SUPPLY CONNECTION


The power supply section consists ofan 9V and 12V AC Adaptor. This Voltage then rectified
using bridge rectifier. The high value of capacitor 1000 F charges at a slow rate as the time
constant is low, and once the capacitor charges there is no resistor for capacitor to discharge.
This gives a constant value of DC. IC 7805 is used for regulated supply of +5 volts and IC
7812 is used to provide a regulated supply of +12 volts in order to prevent the circuit ahead
from any fluctuations. The filter capacitors connected after this IC filters the high frequency
spikes. These capacitors are connected in parallel with supply and common so that spikes
filter to the common. These give stability to the power supply circuit.
Regulator
It is an IC which is used to regulate the incoming voltage, In our system we use 3.3V
Regulator to regulate the voltage from ADC to CPLD from 5V to 3.3V, because CPLD
operates with 3.3V voltage.

Dept. of ECE, SIR MVIT

Page 28

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

Fig4.14. 3.3V Regulator(7805)

4.6. CIRCUIT SCHEMATIC OF THE SYSTEM

Dept. of ECE, SIR MVIT

Page 29

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

Fig4.15. Circuit diagram of the system

Dept. of ECE, SIR MVIT

Page 30

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

CHAPTER 5

SYSTEMS USED IN WORK MODE


5.1 EXUAST FAN FOR CONTROLLING CO2 LEVEL
5.2

ARTIFICIAL

GROWING

LIGHTS

FOR

CONTROLLING

ILLUMINATION
Growing lights enable cultivators to extend daylight hours - useful for winter and
spring growing when levels of natural lights can be low, and one can therefore improve plant
growth. Three basic types of lamps used in greenhouse lighting are:
Fluorescent lamps - These have the advantage of higher light efficiency with low heat. This
type of lamp is the most widely used for supplemental light. It is available in a variety of
colors but cool-white lamps are the most common. High intensity (1500 ma) fluorescent
tubes that require higher wattage are also commonly used to reach 2000 foot candles.
Incandescent lamps - These vary in size from 60 watts to 500 watts. The grower can vary
foot-candle levels by adjusting the spacing and mounting height above the plants.
High-intensity discharge (HID) lamps - These have a long life (5000 hours or more). With
improvements made possible by the addition of sodium and metal- halides, the lamp
has a high emission of light in the regions utilized by plants.
The following generally accepted cultural divisions describe light levels:
1. Very high: Over 5000 footcandles--nearly full sun except at midday, when full
summer sun in most latitudes may reach 10,000 fc.
2. High: 4000-5000 footcandles--bright light, just under 50% of the full midday sun.
3. Intermediate: 1800-4000 footcandles--dappled sunlight.
4. Low: 1000-1800 footcandles--reduced sunlight, so that if a hand is passed over the
leaves it does not produce a shadow.
One footcandle is equal to 10.76 lux, although in the lighting industry, typically this is
approximated as 1 footcandle being equal to 10 lux.
Dept. of ECE, SIR MVIT

Page 31

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

5.3 TEMPERATURE CONTROLLERS


5.3.1 COOLING EQUIPMENT
There are three primary cooling devices in most greenhouses. These are the vent
system, exhaust fan, and swamp cooler. Some greenhouses may make use of air conditioners
and/or misting systems as well.
1. Vents are hinged or track connected panels in the roof or sides of greenhouses. They
open up the greenhouse to outside natural air. Hot air that builds up in the greenhouse
can escape, and fresh air can enter the house. The microcontroller can be used to
automate the opening and closing of these vents depending upon requirement.
But during hot summer days, venting alone will not get the job done.
2. Exhaust fans can move a large volume of the hot greenhouse air out and pull fresh air
in through the rear vent. They're powerful for a reason, as full sun on a hot summer
day can cause temperatures inside the greenhouse to superheat. An exhaust fan must
be able to pull this air out, or the temperatures will continue to rise.
3. Swamp coolers: come in different widths and lengths. They can be configured to the
appropriate size, as this varies depending on the length and width of the greenhouse,
location where you live, and type of plants you wish to grow.
5.3.2 HEATING EQUIPMENT
1. Hot-water or steam heater: A hot-water system with circulator or a steam system
linked with automatic ventilation will give adequate temperature control. In some
areas, coal or natural gas is readily available at low cost. This fuel is ideal for hotwater or a central steam system. Steam has an advantage in that it can be used to
sterilize growing beds and potting soils.
2. Electric heaters: Overhead infrared heating equipment combined with soil cable heat
provides a localized plant environment, which allows plants to thrive even though
thesurrounding air is at a lower than normal temperature. Electric resistance-type
heaters are used as space heaters or in a forced air system.

Dept. of ECE, SIR MVIT

Page 32

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

5.4 HUMIDIFCATION SYSTEMS


Many evaporative cooling and humidifying systems are available: Foggers, Mist
systems, Roof Sprinklers, and Pan & Fan Systems. They add water vapour to the air, and
may subsequently reduce the amount of water that the plants need to transpire.
Roof sprinklers add water vapour and cool the incoming air. On large ranges, it is
possible to decrease the temperature by 3 - 5 C and increase the humidity by 5-10%.
Pad and fan systems consist of porous wet pads at the inlet end of a fan ventilated
greenhouse. As the exhaust fans draw air through the wet pads, water evaporates, cooling and
humidifying the air. Temperatures tend to be coolest nearer the fans and hottest at the exhaust
when using these systems.
Mist and fog systems produce tiny water droplets that evaporate, thereby cooling and
humidifying the greenhouse air. A misting system can provide needed moisture to maintain
a healthy humidity level of 50 to 70%.

Dept. of ECE, SIR MVIT

Page 33

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

CHAPTER 6
6.1 BASIC MODEL OF THE MONITORING SYSTEM

CC2500-Tx

Light
Sensor

CC2500-Rx

GUI

PIC-16F877
Humidity
Sensor

PC
CO2
Sensor

Temperature
Sensor

6.2 PARTS OF THE SYSTEM:


1.Sensors (Data acquisition system)
1. Temperature sensor (Pt100)
2. Humidity sensor (HY HS220)
3. Light sensor (LDR)
4. CO2 sensor
2. PIC-16F877
3. CC2500 Tx and Rx
4.GUI
Dept. of ECE, SIR MVIT

Page 34

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

6.3 PIC
6.3.1 PIN DIAGRAM-PIC 16F877A

Dept. of ECE, SIR MVIT

Page 35

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

6.3.2 FEATURES
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 PIC16C73B/74B/76/77
Interrupt capability (up to 14 sources)
Eight level deep hardware stack
Direct, indirect and relative addressing modes
Power-on Reset (POR)
Power-up Timer (PWRT) and Oscillator Start-up Timer (OST)
Watchdog Timer (WDT) with its own on-chip RC oscillator for reliable
operation
Programmable code-protection
Power saving SLEEP mode
Selectable oscillator options
Low-power, high-speed CMOS FLASH/EEPROM technology
Fully static design
In-Circuit Serial Programming (ICSP) via two pins
Single 5V In-Circuit Serial Programming capability
In-Circuit Debugging via two pins
Dept. of ECE, SIR MVIT

Page 36

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

Processor read/write access to program memory


Wide operating voltage range: 2.0V to 5.5V
High Sink/Source Current: 25 mA
Commercial and Industrial temperature ranges

6.4.CC2500
6.4.1. Description
The CC2500 is a low-cost 2.4 GHz transceiver designed for very low-power wireless
applications. The circuit is intended for the 2400-2483.5 MHz ISM (Industrial, Scientific and
Medical) and SRD (Short Range Device) frequency band.
The RF transceiver is integrated with a highly configurable baseband modem. The modem
supports various modulation formats and has a configurable data rate up to 500 kBaud.
CC2500 provides extensive hardware support for packet handling, data buffering, burst
transmissions, clear channel assessment, link quality indication and wake-on-radio.

Dept. of ECE, SIR MVIT

Page 37

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

The main operating parameters and the 64-byte transmit/receive FIFOs of CC2500 can be
controlled via an SPI interface. In a typical system, the CC2500 will be used together with a
microcontroller and a few additional passive components.

Features
RF Performance
High sensitivity (-104 dBm at 2.4 kBaud, 1% packet error rate)
Low current consumption (13.3 mA in RX, 250 kBaud, input well above sensitivity
limit)
Programmable output power up to +1 dBm
Excellent receiver selectivity and blocking performance
Programmable data rate from 1.2 to 500 kBaud
Frequency range: 2400 - 2483.5 MHz
Analog Features
OOK, 2-FSK, GFSK, and MSK supported
Suitable for frequency hopping and multichannel systems due to a fast settling
frequency synthesizer with 90 us settling time
Automatic Frequency Compensation (AFC) can be used to align the frequency
synthesizer to the received centre frequency
Integrated analog temperature sensor
Digital Features
Flexible support for packet oriented systems: On-chip support for sync word
detection, address check, flexible packet length, and automatic CRC handling.
Efficient SPI interface: All registers can be programmed with one "burst" transfer
Low-Power Features

400 nA SLEEP mode current consumption


Fast startup time: 240 us from SLEEP to RX or TX mode (measured on EM design)
Wake-on-radio functionality for automatic low-power RX polling
Separate 64-byte RX and TX data FIFOs (enables burst mode data transmission)

Dept. of ECE, SIR MVIT

Page 38

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

Fig 6.4.1- Functional Diagram

6.5.GRAPHICAL USER INTERFACE


A program interface that takes advantage of the computer's graphics capabilities to make the
program easier to use. Well-designed graphical user interfaces can free the user from learning
complex command languages. On the other hand, many users find that they work more
effectively with a command-driven interface, especially if they already know the command
language.
Basic Components of a GUI
Graphical user interfaces, such as Microsoft Windows and the one used by the Apple
Macintosh, feature the following basic components:
pointer : A symbol that appears on the display screen and that you move
to select objects andcommands. Usually, the pointer appears as a small angled
arrow. Text -processing applications, however, use an I-beam pointer that is shaped
like a capital I.
pointing device : A device, such as a mouse or trackball, that enables you to select
objects on the display screen.
icons : Small pictures that represent commands, files, or windows. By moving the
pointer to the icon and pressing a mouse button, you can execute a command
or convert the icon into a window. You can also move the icons around the display
screen as if they were real objects on your desk
desktop : The area on the display screen where icons are grouped is often referred
to as the desktop because the icons are intended to represent real objects on a real
desktop.
Dept. of ECE, SIR MVIT

Page 39

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

windows: You can divide the screen into different areas. In each window, you
can run a different program or display a different file. You can move windows around
the display screen, and change their shape and size at will.
menus : Most graphical user interfaces let you execute commands by selecting a
choice from a menu.
In addition to their visual components, graphical user interfaces also make it easier to
move data from one application to another. A true GUI includes standard formats for
representing text and graphics. Because the formats are well-defined, different programs that
run under a common GUI can share data. This makes it possible, for example, to copy a
graph created by a spreadsheet program into a document created by a word processor.

Dept. of ECE, SIR MVIT

Page 40

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

CHAPTER 7

SOFTWARE
7.1 INTRODUCTION TO XILINX SOFTWARE
Xilinx, Inc. is an American technology company, primarily a supplier of
programmable logic devices. It is known for inventing the field programmable gate array
(FPGA) and as the first semiconductorcompany with a fablessmanufacturing model.
Founded in Silicon Valley in 1984, the company is headquartered in San Jose,
California, with additional offices in Longmont, Colorado; Dublin, Ireland; Singapore;
Hyderabad, India; Beijing, China; Shanghai, China and Tokyo, Japan.
7.1.2 THE BASIC STEPS FOR PROCESSING A CPLD DESIGN USING THE ISE
SOFTWARE.
1. Creating a New Project
Create a new design in an existing or newly created folder by selecting File ->New Project
from the Project Navigator pull down menu.

Fig7.1. Windows for creating new project


Dept. of ECE, SIR MVIT

Page 41

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

1.1. From the Project Navigator, select File -> New Project. The New Project dialog box
will appear.

Fig7.2. New project dialog box

1.2. In the Project line, type in a name for your project. The name my_proj is shown above.
Then select a directory for the project files. You may type in the path, or you may click the
browse button to find a directory to place the files.
1.3. Select the Top-Level Module Type value box. For VHDL, Verilog, or ABEL designs,
select HDL. If you plan to use a 3rd-party design entry tool to prepare your net list,

Fig7.3. Top-Level Module Type value box


Dept. of ECE, SIR MVIT

Page 42

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

1.4. Select EDIF as the Synthesis Tool. If you select EDIF or NGC/NGO a separate dialog
box will appear for entering an input
1.5. The dialog changes to allow you to select device and design flow method. file. Click
Next.

Fig7.4. Dialog box to select device and design flow method

1.6. Click the Device Family value and the Xilinx CPLD families appear. Select a family
(Xilinx CPLD XC9572XL, TQ100,-10) from the list, and then click in the Value box on the
second row to select specific devices, and the third line for packages. Select a target device
1.7. Select the compiler you want to use for design synthesis. For schematic designs, your
schematic will be net listed to the selected language (VHDL or Verilog) and compiled using
the selected synthesis tool (XST). If you plan to use a 3rd-party design entry tool to prepare
your netlist, select EDIF as the Synthesis Tool. If you wish to import a TDO file, select as the
Synthesis Tool the language (VHDL, Verilog or ABEL) into which you would like to
translate it. The TDO Converter is located in the Design Entry Utilities process group. Click
Next to continue on to Creating a New Source.

Dept. of ECE, SIR MVIT

Page 43

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

2. Open or Create Source File(s)


Select Project -> Add Source... or Project -> New Source... from the Project avigator pull
down menu to add or create the source files for the design.

Fig7.5. Dialog box for Open or Create Source File(s)


Creating a New Source Design
2.1. After you click Nextfrom the Device and Design Flow dialog box, the New Source
dialog box will appear.

Fig7.6. Dialog box for Creating a New Source


Dept. of ECE, SIR MVIT

Page 44

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

Fig7.7. Dialog box for selecting VHDL Module


2.2. Create a source file. Click New Source. The New source type dialog box appears. Select
the type of source file you wish to create. The available selections vary according to the
Synthesis Tool you selected when creating the project. For your main design file, you would
typically select either one of the VHDL Module, Verilog Module, ABEL Module or
Schematic. In this example, we previously selected XST VHDL/Verilog as our Synthesis
Tool. So now we select VHDL Module as the type of our main design source. Next, enter
the name and location for the new source design. If you want to use an existing design file or
an EDIF netlist from a 3rd-party design entry tool as the source for your project, use the
Project -> Add Source dialog box instead and indicate what type of source file you are
adding (skip to step2.5).
2.3. Click Next >. The Define VHDL Source dialog will appear.

Fig7.8.Define VHDL Source dialog


Dept. of ECE, SIR MVIT

Page 45

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

Type the desired module name into the Entity Name text box. For VHDL designs, you can
also change the Architecture Name.
Note:You should give your source modules (entities) different names from ou project name.
Type the name of each port of your source module into the Port Name column. Specify
whether each port is an input or output by clicking in the Direction column and pulling down
the selection list.

Fig7.9. Dialog box to select the port type


If the Port is a bus, enter Most Significant Bit and Least Significant it numbers for the port in
the MSB and LSB columns. The ports for e jc2_top example would appear as follows:
Note:If you wish to perform the procedure in this tutorial without typing in a new design
source, you can copy one of the examples supplied in the IS Examples directory
Note:Click Cancel in the Define VHDL Source dialog box if you prefer to specify all of this
information directly into the Text Editor.

Dept. of ECE, SIR MVIT

Page 46

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

Fig7.10. Box to define VHDL source


2.4. Click the Next button and the New Source Information dialog box will appear.

Fig7.11. New Source Information dialog box

2.5. Examine the information, and then click Finish. The Create a New Source dialog box
will appear with your new source file listed.

Dept. of ECE, SIR MVIT

Page 47

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

Fig7.12.Create a New Source dialog box


2.6. The Add Existing Sources dialog will appear. Use this dialog to add all the other
source files to your new project. When you click Add Source, a standard directory
dialog box will appear, and you can locate your other source files. When you select a
file, it will appear in the Source File column, and the program will automatically list
the Type in the Type column, and place a check in the Copy to Project column.

Fig7.13. Add Existing Sources dialog box

Click Nextwhen you have added all your sources. You will see a summary of yournew
project.

2.7. Click Finish. The first new module is automatically added to the project as the top-level
module of the project. You will now use thHDL Editor window to define the contents of your
design. When complete, save your design source. You can repeat the abov procedure to
create additional design sources in your project

Dept. of ECE, SIR MVIT

Page 48

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

Fig7.14. New project information box

Fig7.15.HDL Editor window


Dept. of ECE, SIR MVIT

Page 49

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

2.8. With the module name (my_mod) selected in the Sources window, double-click Check
Syntax (found under Synthesize) to check the VHDL syntax. The transcript on the Project
Navigator will let you know if the syntax is correct and places a green check next to Check
Syntax. If the syntax check fails, a red x will appear. With the top-level design highlighted,
double click the Implement Designprocess as shown below.

Fig7.16. Box for Processing for source file

3. l -Implement Design
With the top-level design highlighted, double click the Implement Designprocess as shown
below.
Before going for Implementation need to specify the UCF for the PIN assignment. This can
be done as follows

Dept. of ECE, SIR MVIT

Page 50

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

Fig7.17. Xilinx-Project Navigator Dialog box

Implementing a New Top-level Design


3.1. Before running the fitter, you may wish to set some of the fitter options. Highlight the
targeted design and the Implement Design process
3.2. Select Process -> Properties. The Process Properties dialog box will appear.
Note: You can expand the dialog box by dragging with the mouse. The box below has been
expanded to show all the Fitting options.
The options shown will be restricted to the options available for the device family you have
choosen
3.3.Select the implementation Template that you would like to use to control fitter
optimization. The default is optimize Density, which is a good starting point for a new
design. Other options on the drop-down menu are Optimize Speed and Optimize Balance.
Adjust the optimization properties as needed. Click the help button or go to CPLD Design
Dept. of ECE, SIR MVIT

Page 51

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

Techniques section for more information on implementation options. You may also select F1
on any dialog to get a brief description of the selection properties displayed.
3.4 Next, fit the design, with the top-level design module and the Implement Design process
highlighted, select Process -> Run. The fitter will run. After successfully completing, a
check mark will appear next to Implement Design, and the transcript will display the success
or failure of the fitter. You can now examine any of the reports by double-clicking on the
report name under the Implement Design process. The primary fitter results can be found in
the Fitter Report and Timing Report.

Fig7.18. Process properties box

Dept. of ECE, SIR MVIT

Page 52

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

Fig7.19. Sources Dialog box

Fig7.20. Dialog box for Processing of source file

3.5. Each time you implement your design, a guide file is created(project_name.gyd) which
contains your pinout information. Whenyou are ready to commit the pinout of your design,
run the LockPins process. The pinout information stored in the .gyd file isappended to the
end of the User Constraint File for your design(top_module_name.ucf by default). This
pinout will then be appliedto all subsequent design iterations run through the fitter. Whenyou

Dept. of ECE, SIR MVIT

Page 53

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

run the Lock Pins process, a report file is displayed whichshows any pin assignment conflicts
that may have occurred.
3.6. If you want, you can select View Fitted Design to bring up the ChipViewer. This
application will present a graphical display of thedevice and allow for pin-locking.
4. Programming
The following tutorial shows how to program an XC9500XL device by using the IMPACT
software tool and the Xilinx JTAG Parallel Download Cable. The procedure is the same for
any Xilinx CPLD.
4.1 Connect the Xilinx JTAG Parallel Download Cable to your PC. Then connect the cable to
your target device JTAG pins as specified in the device data sheet (and turn on the power to
your target device)
4.2 After you have successfully implemented your design, double-click configure
device(IMPACT) in the processes window under Generate Programming File. This will
generate a JEDEC file and bring up the IMPACT interface.A dialog will appear. Select
Boundary-Scan Mode and click Next.

Note: For CPLD designs,you can also highlight the Configure Device [IMPACT] process
in the project Navigator window and select Process -> Run.
4.3 The Boundary Scan selection mode dialog box will then ask if you want to automatically
connect, or just enter a boundary-scan chain (manually). If you have a demo board, select the
automatic mode, otherwise manually create a boundary-scan chain using Enter a BoundaryScan Chain.
Dept. of ECE, SIR MVIT

Page 54

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

4.4 Click Finish. The program automatically detects the chain. When it finds a device, it
brings up a file dialog and the program queries you for a JED, BSDL or BIT file for the
device. Locate the *.jed file for your design and click OK. The part displays as shown below.

Fig7.21. Configration mode window


Note: In this example, we have used our demo board with a single XC9572XL CPLD.
4.5. Start the iMPACT programming operation by highlighting thedevice (click on it once)
and selecting Operations -> Program: Youwill see the following screen:
4.6. SelectErase Before Programing and Verify, then click OK. When programing is
complete a message will appear and inform you of the results.
Dept. of ECE, SIR MVIT

Page 55

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

4.7. Now check the functionality on the board and verify it by applying different inputs.

Fig7.22. Program Options window

Fig7.23. Configuration mode window to indicate program succeeded


Dept. of ECE, SIR MVIT

Page 56

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

7.2.MICRO C PIC

The mikroC PRO for PIC is a powerful, feature-rich development tool for PIC
microcontrollers. It is designed to provide the programmer with the easiest possible solution
to developing applications for embedded systems, without compromising performance or
control.
PIC and C fit together well: PIC is the most popular 8-bit chip in the world, used in
a wide variety of applications, and C, prized for its efficiency, is the natural choice
for developing embedded systems. mikroC PRO for PIC provides a successful
match featuring highly advanced IDE, ANSI compliant compiler, broad set of
hardware
libraries, comprehensive documentation, and plenty of ready-to-run examples.
mikroC PRO for PIC allows you to quickly develop and deploy complex
applications:
Write your C source code using the built-in Code Editor (Code and Parameter
Assistants, Code Folding, Syntax Highlighting, Auto Correct, Code Templates,
and more.)
Use included mikroC PRO for PIC libraries to dramatically speed up the devel
opment: data acquisition, memory, displays, conversions, communication etc.
Monitor your program structure, variables, and functions in the Code Explorer.
Generate commented, human-readable assembly, and standard HEX compati
ble with all programmers.
Use the integrated mikroICD (In-Circuit Debugger) Real-Time debugging tool
tomonitor program execution on the hardware level.
Inspect program flow and debug executable logic with the integrated Software
Simulator.G
et detailed reports and graphs: RAM and ROM map, code statistics, assembly
listing, calling tree, and more.
MikroC PRO for PIC provides plenty of examples to expand, develop, and use
as building bricks in your projects. Copy them entirely if you deem fit thats why
we included them with the compiler.
Dept. of ECE, SIR MVIT

Page 57

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

CHAPTER 8

FLOWCHART
8.1 FLOWCHART REPRESENTING THE WORKING OF THE
SYSTEM

Dept. of ECE, SIR MVIT

Page 58

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

Fig8.1. Flow chart of the system

Dept. of ECE, SIR MVIT

Page 59

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

CHAPTER 9

RESULT ANALYSIS
Readings taken at room temperature of 270C

9.1 TRANSDUCER READINGS


9.1.1 LIGHT SENSOR
Tolerance = 0.1V

Table 9.2 Light sensor readings


Dept. of ECE, SIR MVIT

Page 60

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

9.1.3 HUMIDITY SENSOR

9.1.3.1 FORMULA:
RH = ((Vout / Vcc) 0.16 )/0.0062, typical at 25C. (Ref. Eq.4.3)
where, Vsupply = 4.98V
Tolerance= 0.1V

Table 9.3Humidity sensor readings

Dept. of ECE, SIR MVIT

Page 61

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

9.1.3.CO2 SENSOR
Tolerance= 0.2 V

Table 9.1 Soil moisture sensor readings

9.1.4 TEMPERATURE SENSOR


9.1.4.1 FORMULA:
Rt = R0 * (1 + A* t + B*t2 + C*(t-100)* t3)

Where:

Rt is the resistance at temperature t, R0 is the resistance at 0 C, and


A= 3.9083 E-3
B = -5.775 E-7
C = -4.183 E -12 (below 0 C), or
C = 0 (above 0 C)

Dept. of ECE, SIR MVIT

Page 62

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

Table 9.4Temperature sensor readings

Dept. of ECE, SIR MVIT

Page 63

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

CHAPTER 10

ADVANTAGES AND DISADVANTAGES


10.1 ADVANTAGES
1. Sensors used have high sensitivity and are easy to handle.
2. Low cost system, providing maximum automation.
3. By using microcontroller instead of using CPLD leads to sequential operation, It is a
delayed process.
4. To avoid sequential operation we can choose FPGA, but By using this architecture
efficient usage of resource is not possible, this system cost very high hence we are
going for CPLD
5. Closed loop design prevents any chances of disturbing the greenhouse environment.
6. Low maintenance and low power consumption.
7. The system is more compact compared to the existing ones, hence is easily portable.
8. Can be used for different plant species by making minor changes in the ambient
environmental parameters.
9. Can be easily modified for improving the setup and adding new features.
10. Provides a user-friendly interface hence will have a greater acceptance by the
technologically unskilled workers.
11. In response to the sensors, the system will adjust the heating, fans, lighting, irrigation
immediately, hence protect greenhouse from damage.
12. Natural resource like water saved to a great extent.

10.2 DISADVANTAGES
1. Complete automation in terms of pest and insect detection and eradication cannot be
achieved.
2. No self-test system to detect malfunction of sensors.
3. Requires uninterrupted power supply.
4. When area Increses the number of sensors required more

Dept. of ECE, SIR MVIT

Page 64

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

CHAPTER 11

FUTURE SCOPE
11.1 SCOPE FOR FURTHER DEVELOPMENT
1. The system can be modified with the use of a datalogger and a graphical LCD panel
showing the measured sensor data over a period of time.
2. A speaking voice alarm could be used instead of the normal buzzer.
3. The device can be made to perform better by providing the power supply with the
help of battery source which can be rechargeable or non-rechargeable, to reduce the
requirement of main AC power.
4. Time bound administration of fertilizers, insecticides and pesticides can be
introduced.

Dept. of ECE, SIR MVIT

Page 65

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

CHAPTER 12

CONCLUSION
A

step-by-step

approach

in

designing

the

HDL

based

system

for

measurement and control of the four essential parameters for plant growth, i.e. temperature,
humidity, soil moisture, and light intensity, has been followed. The results obtained from the
measurement have shown that the system performance is quite reliable and accurate. The
system has successfully overcome quite a few shortcomings of the existing systems by
reducing the power consumption, maintenance and complexity, at the same time providing a
flexible and precise form of maintaining the environment.
The continuously decreasing costs of hardware and software, the wider acceptance of
electronic systems in agriculture, and an emerging agricultural control system industry in
several areas of agricultural production, will result in reliable control systems that
will address several aspects of quality and quantity of production. Further improvements will
be made as less expensive and more reliable sensors are developed for use in agricultural
production.
Although the enhancements mentioned in the previous chapter may seem far in the
future, the required technology and components are available, many such systems have been
independently developed, or are at least tested at a prototype level. Also, integration of all
these technologies is not a daunting task and can be successfully carried out.

Dept. of ECE, SIR MVIT

Page 66

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

REFERENCES
1. Stipanicev D., Marasovic J., Networked embedded greenhouse monitoring and control,
Proceedings of 2003 IEEE Conference on Control Applications, June 2003.
2. Turnell, D.J. de Fatima, Q.V., Turnell, M., Deep, G.S., Freire, R.C.S., FarmWeb-an
integrated, modular farm automation system, Proceedings of IEEE International Conference
on Systems, Man, and Cybernetics, Vol. 2, Oct. 1998.
3. Rebecca Tyson Northen, Orchids As House Plants, Dover Publications, New York, 2nd
Edition, 1985.
4. Muhammad Ali Mazidi, Janice Gillispie Mazidi, Rolin D. Mc Kinlay , The 8051
Microcontroller & Embedded Systems, Pearson Education Inc. 2nd Edition, 2008.
5. Myke Predko, Programming and Customising the 8051 Microcontroller, TMH, 1999.
6. Kenneth J Ayala, The 8051 Microcontroller Architecture, Programming & Applications,
Penram International, 2nd Edition, 1996.
7. Ramakant Gayakwad, Operational Amplifiers Linear Integrated Circuits, Prentice Hall of
India, 3rd Edition.
8. National Semiconductors, CMOS Logic Databook
9. SENSORS- The Journal of Applied Sensing Technology, Advanstar Communications Inc
10. www.nskelectronics.com
11. www.datasheetdirect.com

Dept. of ECE, SIR MVIT

Page 67

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

APPENDIX-1
CPLD Development kit
Pin allotted in Xilinx CPLD (XC9572XL) Development Kit
USED I/0
SW1
SW2
SW3
SW8
SW9
SW14
SW19
SW20
SW25
SW26
SW27
SW28
SW29
SW30
SW31
SW32
ROW4
ROW3
ROW2
ROW1
COLUMN4
COLUMN3
COLUMN2
COLUMN1
7 segment -1-0
7 segment -1-1
7 segment -1-2
7 segment -1-3
7 segment -1-4
7 segment -1-5
7 segment -1-6
7 segment -1-7
7 segment -2-0
7 segment -2-1
7 segment -2-2
7 segment -2-3
7 segment -2-4
Dept. of ECE, SIR MVIT

GENERAL I/O
J8 - 1
J8 - 6
J8 - 8
J8 - 9
J8 - 10
J8 - 11
J8 - 12
J8 - 13
J8 - 14
J8 - 15
J8 - 16
J8 - 17
J8 - 18
J8 - 20
J8 - 25
J6 - 28
J6 - 29
J6 - 30
J6 - 32
J6 - 33
J6 - 35
J6 - 37
J6 - 36
J6 - 39
J4 - 53
J4 - 59
J4 - 52
J4 - 56
J4 - 58
J4 - 54
J4 - 55
J4 - 51
J4 - 63
J4 - 68
J4 - 60
J4 - 66
J4 - 67

CPLD PIN
1
6
8
9
10
11
12
13
14
15
16
17
18
20
25
28
29
30
32
33
35
37
36
39
53
59
52
56
58
54
55
51
63
68
60
66
67
Page 68

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

7 segment -2-5
7 segment -2-6
7 segment -2-7
D2
D3
D4
D5
D6
D7
D8
D9
D10
D11
D12
D13
D14
D15
D16
D17
BUZZER
CLK
TDI
TMS
TCK
TD0

Dept. of ECE, SIR MVIT

J4 - 64
J4 - 65
J4 - 61
J7 - 76
J7 - 77
J7 - 78
J7 - 79
J7 - 81
J7 - 82
J7 - 85
J7 - 86
J7 - 87
J7 - 89
J7 - 90
J7 - 91
J7 - 93
J7 - 92
J7 - 94
J7 - 95
J7 - 96
J8 - 22
J6 - 45
J6 - 47
J6 - 48
J7 - 83
J8
J8
J8
J8
J8
J8
J8
J6
J6
J6
J6
J6
J6
J6
J6
J6
J4
J4

64
65
61
76
77
78
79
81
82
85
86
87
89
90
91
92
93
94
95
96
22
45
47
48
83
2
3
4
7
19
23
24
27
34
40
41
42
43
46
49
50
70
71

Page 69

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

J4
J4
J4
J7
J7
J7
VCC
GND

Dept. of ECE, SIR MVIT

72
73
74
80
97
99
5,26,38.57,88,98
21,31,44,62,69,75,84,100

Page 70

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

APPENDIX 2

Dept. of ECE, SIR MVIT

Page 71

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

Dept. of ECE, SIR MVIT

Page 72

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

Dept. of ECE, SIR MVIT

Page 73

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

Dept. of ECE, SIR MVIT

Page 74

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

Dept. of ECE, SIR MVIT

Page 75

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

Dept. of ECE, SIR MVIT

Page 76

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

Dept. of ECE, SIR MVIT

Page 77

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

Dept. of ECE, SIR MVIT

Page 78

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

Dept. of ECE, SIR MVIT

Page 79

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

Dept. of ECE, SIR MVIT

Page 80

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

Dept. of ECE, SIR MVIT

Page 81

WIRELESS SENSOR NETWORK BASED MONITORING SYSTEM GLOBAL WARMING SYSTEM

Dept. of ECE, SIR MVIT

Page 82

Das könnte Ihnen auch gefallen