Professional Documents
Culture Documents
Abstract--This paper describes the design and excess water will percolate deep to soil layers below
implementation of a low-cost multi-mode control for an the root zone with all nitrates and other pesticides it
irrigation system built around a personal computer (PC). The contains polluting the ground water. The latter on the
system uses in-situ soil water potential measurements, the other hand, leads to an under-irrigation causing a
weather condition parameters and the set points data
provided by the user to decide when and how much water to highly reduction in both crops quantity and quality.
apply to the irrigated field. Therefore, deciding when to turn on the irrigation
The soil moisture content and the climatic parameters are system and how much water to apply is a complex
monitored by a microprocessor-based data acquisition and decision-making process.
distribution controller system under the supervision of the The solution is the automation of the irrigation
host computer. water management process based on sound scientific
A bi-directional serial link allows the host computer to scheduling practices.
receive, store and display in real-time the overall irrigation Actually, automated irrigations have been around
system status on the PC's screen. Also, the PC has the since the mid of the 20th century. The early controllers
capability to transmit data to the controller and instruct it to were basically simple timers and switches used to turn
operate in one of the three possible modes.
The firmware code written in assembly language and on the irrigation system for a predetermined period of
stored in an EEPROM along with a Delphi-based friendly time regardless of the weather conditions or the soil
graphical user interface was developed to manage irrigation moisture content. Since that time, there was a
and other related practices such as fertigation. continuous improvement of automated systems in all
Full circuit and program codes were implemented to directions.
verify system operation. Most surface irrigations were converted to
pressurized irrigations, while the early mechanical
Keywords-- Multi-mode control, PC-based, data automation devices were continuously replaced by
acquisition, irrigation, soil moisture, serial communication. modern electronic controllers. In the last two decades,
with the proliferation of powerful and low cost
I. INTRODUCTION microprocessors and the impressive growth of PCs
performances, mechanized irrigation harnessed the
The primary source of water in agricultural production power of computerized controllers to improve water
in most parts of the world is rainfall. The three main factors use [1]. This increase in the sophistication of
that characterize rainfall are: amount, frequency and automation rationalized the utilization of inputs,
intensity, the values of which vary spatially and temporally. increased production, reduced losses and manpower
When the weather does not provide enough rainfall to feed yielding in an increase of the farmer's net income.
agricultural needs, farmers should supplement water This paper presents the design and implementation
available through rainfall by some type of irrigation to of an automated PC-based multi-mode control for an
manage the soil moisture and nutrient concentration to irrigation system. The block diagram in Fig. 1 depicts
create the optimum-growing environment. the hardware organization for the implemented control
With limited availability of freshwater and increasing system. The system consists of a PC (host computer)
costs of energy and manpower, irrigation, which can running Windows which uses Delphi-based software
contribute substantially to crop production should be program to access and supervise the embedded
planned and managed in such a way that no drop will be microprocessor-based data acquisition system via the
wasted. serial port.
Due to complexities in the precise knowledge of the The following elements are used in our irrigation
rainfall's main characteristics, the irrigation scheduling control system. An in-situ controller built around the
cannot be planned neither on the minimum values of the Z80 microprocessor with tranducing circuits and A/D
average precipitation during the growing season nor on the converter, digital input/output (1/0) interfacing and a
maximum. The former may lead to an over-irrigation bi-directional serial communication with the host
causing crop diseases and waste of water, fertilizer, and computer.
energy. Also, and besides running off and evaporating, the
311
and Al to access the internal data and control
registers.
The analog-to-digital converter needs a clock to
run. This signal is derived from the system's main
clock. A binary counter, the 7493 is used to divide the
main clock to suite the frequency required by the
ADC0808. The address latch enable (ALE) and
START inputs are connected together to
simultaneously latch in the selected channel and start a
conversion. The end of a conversion is signaled by the
EOC signal. This output signal drives an edge-
triggered D flip-flop, which in turn interrupts the
microprocessor. After which, the microprocessor
asserts the RD' signal for a read operation, before
Fig. 3. The overall interactive irrigation system view. selecting the next input channel and starting the
conversion.
irrigation system' s status to the host computer for storage
and display of the overall system on the PC's screen. Fig. 3 B. The PC- embedded System Serial Interface Link.
illustrates the overall interactive irrigation system view
window at run time. It is the embedded system responsibility for
sending the data and irrigation system status to the PC.
A. Development of the Data Acquisition Unit. Also, it receives set points data and commands to
manage the irrigation system in either mode control
The data acquisition unit is built around the low-cost through a serial digital communication full duplex
National Semiconductor 8-bit ADC0808. The device has 8 RS232 standard interface. The unit is built around the
multiplexed analog channels out of which any one can be Intel 8251 Universal Asynchronous Receiver
selected at one time [6]. When driven by a clock of 640 Transmitter (UART), Fig. 5.
kHz, the ADC0808 performs a conversion rate per channel On one side, the UART is connected to the
in 100 ps, a time conversion suitable for this application system's data bus and the synchronizing signals and
[5]. Fig. 4 depicts the schematic diagram of the data on the other side, it is connected to the signal level
acquisition hardware circuit. translator, the MAX232, which in turn is connected
The ADC is interfaced with the microprocessor via a to a DB9 connector [6].
programmable peripheral interface, the Intel 8255A PPI. To ensure synchronism between the host
The 8255A PPI has three 8-bit ports. The input lines on the computer and the embedded system, the transmit and
left which include the 8-bit data lines (DO-D7), two address receive clock inputs are driven by the clock
lines (AO-A1), read/write (RD'/WR'), and reset (RESET) generated by a baud rate , the CD4040. the flip flop
come directly from the microprocessor. The device is is used to divide the 3 MHz main frequency of the
selected when the chip select (CS) input is asserted. This system to suite the UART clock frequency which
pin is driven by one of the outputs of the 74LS 138 decoder. should not exceed 1.6 MHz.
The controller uses the two least significant address bits AO
F
Fig. 4. The schematic layout of the data acquisition unit built around the 0808 ADC
312
Fig. 5. The digital serial 1/0 communication interface with the PC's serial Port.
window application at run time of the automatic mode
IV. DEVELOPMENT OF SOFTWARE/FIRMWARE and the corresponding flowchart. The window contains
displays for showing the values and the current status
The system consists of a PC running Windows, which of the different actuators.
uses a Delphi based software program to interact with the
embedded microprocessor-based system via the serial port.
Taking into account all possible customer needs, the system
is designed to operate in three independent modes: manual,
semi-automatic or timer, and automatic. We developed a
fully dedicated firmware / software program to acquire
process, control and display the overall data and status of
the automated irrigation system.
The general philosophy of the software system design
was based on the following premises.
i- A friendly user interface
ii- Both software and firmware be based on a
modular design basis.
313
B. Development of the Graphical User Software.
Get Actual Moisture & The fully dedicated software program was written
Weather Data in Delphi to run under Windows XP platform. It has
been written in such a way that the users get access
easily to the irrigation system data, and have the
No Yes ~~~~~~~~~ability to view in real-time the system's status. This
Raining? developed friendly-user interface contains several
Compare with ~~~~~~~~windows,
such the interactive view form, Fig. 3. This
Desired Data
displays ~~~~~~~window
graphically on the PC' s screen a
general view of the irrigation system. The window
shows in real-time the operating status of the different
0No ~~~~~~~equipments
and the actual data of different
equire
With ~~~~~~~~~~parameters.
a simple click of the mouse on given
equipment such as a valve or the tank will display a
Yes ~~~~~~~~~~~~~more
detailed picture.
Arencimtion
re c ma
No ~~~~~~~~The
manual, semi-automatic, and automatic
interactive windows are illustrated by Fig. 7, 9, and 10
Suitabl 9 No
sIrrigation ONcommand type
~~~~~~respectively.
The RadioButton components in the
GroupBox are used to select the mode
of irrigation. It is possible for the user to change the
Sart Irrigationmode while irrigation is on by simply enabling the
Turn Irigatin OFF corresponding RadioButton.
The software program has been developed to
Water ~~~~~~~allow the user to specify the required target such as
Management soil moisture levels, soil type, maximum wind speed
to permit an irrigation to take place. Fig. II illustrates
the set points window.
Fig. 8. The automatic mode flowchart. I
In this manual mode, Fig. 9, the user has the freedom to F270/
activate the irrigation process irrelevant of the weather WahrCniin
conditions and moisture of the soil. This feature may be of pii 12 eiiAuoici
interest during the frost events, the irrigator can spray crops IS61l ineftint ....................W.....
to warm up the atmosphere and thereby increasing the Ra1Fl oRanIrgto
temperature. Soil.M........... rFlo Rat
In the semi-automatic or timer mode, Fig. 10, it is the UpraeCeia
with irrigation water. The graphical user interface allows Clsd Closed
the user to deliver the necessary fertilizer with great
simplicity. The desired fertilizer solution is obtained by Fig. 10. The window application for semi-automatic control.
dosing the fertilizers controlled by valve-2 and the water
flow controller by another valve-i1.
2Ah/07 11 :02:215
314
procedure Tforml .Button2Click(Sender: Tobject); cables was felt excessive. A low-cost self-contained
begin embedded microprocessor-based system supervised
ApdComPortl .Open:= true; by a host computer was considered more attractive
ApdComPortl.Output:= char(strtoint(Edit6.Text)) and can easily be fed by a battery or a solar panel.
Timer2.Enable := true;
end; The PC does not directly control the devices;
instead, it manages the information flow and provides
procedure Tform 1.Timer2Timer(Sender :Tobject); the user via the graphical user interface a means to
begin remotely control the irrigation system by simple clicks
ApdComPortl.Output:= char(strtoint(Edit7.Text))
Timer2.Enable := false; of the mouse.
end; The developed system can be enhanced by some
additional signal processing routines to display
procedure Tforml .Button3Click(Sender: Tobject) historical diagrams of the different data.
begin
ApdComPortl.Open:= true;
ApdComPort .Output:= char(strtoint(Edit8.Text)) VI. REFERENCES
Timer3.Enabled := true;
end; [1] F.S. Zazueta., A. G Smajstrla and G. A Clark,
procedure Tform 1.Timer3Timer(Sender :Tobject); "Irrigation system controllers. IFAS Extension,
begin Agricultural and Biological Engineering
Department, Florida Cooperative Extension
public
Service, University of Florida. Gainsville, FL.
I Public declarations } 2002.
end; [2] Black R. D and Rogers D. H, "Soil water
measurements: an aid to irrigation water
var management".
Forml2: Tforml2;
Available: http://www.oznet.ksu.edu..../L795.pdf.
implementation [3] Ilsystems, "Real time irrigation a key feature of
-
V. CONCLUSION
315