Beruflich Dokumente
Kultur Dokumente
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.
Page 1
Page 2
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.
Page 3
BLOCK DIAGRAM
Page 4
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.
Page 5
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
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.
Page 7
CHAPTER 3
CONTROLLING SYSTEM
3.1. BASIC MODEL OF THE CONTROLLING SYSTEM
Page 8
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.
Page 9
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.
Its Importance
Temperature
Humidity
CO2
Light
Page 10
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.
Page 11
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.
Page 12
Page 13
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.
Page 14
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.
Page 15
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.
Page 16
Page 17
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
Page 18
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.
Page 19
Page 20
Page 21
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
output speeds. CPLDs enableease of design, lower development costs, more product revenue
formoney, and the opportunity to speed your products to market, etc.
Page 23
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.
Page 24
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.
Page 25
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.
Buzzer:
A buzzer is connected to the CPLD. So that it can be used in theprogramme directly by
assigning the allotted pin.
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.
Page 26
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
Page 27
12
Polarity
Positive
Type
DC
Classification
Baffle
Single Pole
Coil Resistance
250 ohms
Max Current
2 Amps
Max Volts
230V
Insulation
Class B
Page 28
Page 29
Page 30
CHAPTER 5
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
Page 32
Page 33
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
Page 34
6.3 PIC
6.3.1 PIN DIAGRAM-PIC 16F877A
Page 35
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
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.
Page 37
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
Page 38
Page 39
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.
Page 40
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.
Page 41
1.1. From the Project Navigator, select File -> New Project. The New Project dialog box
will appear.
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,
Page 42
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.
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.
Page 43
Page 44
Page 45
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.
Page 46
2.5. Examine the information, and then click Finish. The Create a New Source dialog box
will appear with your new source file listed.
Page 47
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
Page 48
Page 49
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.
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
Page 50
Page 51
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.
Page 52
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
Page 53
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
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.
Page 55
4.7. Now check the functionality on the board and verify it by applying different inputs.
Page 56
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
CHAPTER 8
FLOWCHART
8.1 FLOWCHART REPRESENTING THE WORKING OF THE
SYSTEM
Page 58
Page 59
CHAPTER 9
RESULT ANALYSIS
Readings taken at room temperature of 270C
Page 60
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
Page 61
9.1.3.CO2 SENSOR
Tolerance= 0.2 V
Where:
Page 62
Page 63
CHAPTER 10
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
Page 64
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.
Page 65
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.
Page 66
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
Page 67
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
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
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
J4
J4
J4
J7
J7
J7
VCC
GND
72
73
74
80
97
99
5,26,38.57,88,98
21,31,44,62,69,75,84,100
Page 70
APPENDIX 2
Page 71
Page 72
Page 73
Page 74
Page 75
Page 76
Page 77
Page 78
Page 79
Page 80
Page 81
Page 82