Irrigation Control System Field of the Invention
The present invention concerns an irrigation system and more particularly a control system for controlling the movement of an elongated irrigation system made up of a sequence of interconnected links by means of a communications network that communicates control and status information between sections of the irrigation system.
Background Art
Prior art irrigation systems exist that include a series of interconnected water delivery conduits that spray water over an extended region of a field.
The configuration of these systems includes a pivoting system where the irrigation apparatus has a fixed pivot point and the elongated pipe sections sweep about an entire 360 degrees of rotation. Other systems sweep back and forth through an arc of less than 360 degrees. Additionally, linear sweep systems are known that cause the conduit to move in a straight line path back and forth across a region.
In a pivoting irrigation system there is a center tower that remains stationary and a number of rotating towers which are coupled together in a chain which rotates around the center tower. Each of these spaced towers includes a controller supported by an A-frame structure interlinked by pipe for routing water to the field. The tower is mounted or supported by tractor-sized wheels which are driven by a motor so that as the multiple motors that make up the system are energized in an intermittent sequence to cause the entire system rotates about the center pivot tower. In these prior art systems the irrigation system is made up of a number of interconnected conduits coupled together with flexible couplings at node locations. Relative orientation of one conduit section with its directly adjacent conduit section is detected by means of a orientation sensor that selectively activates a microswitch which opens and closes to activate a three-phase 3/4 or 1 Vi horsepower induction motor coupled to the tower at that node location. The orientation sensor senses an angle between the pipe from one tower to the next. As an outermost tower is caused to move ahead, the sensor causes a switch to be closed and the motor activated until the pipes are re-aligned.
Such a prior art system also included a controller at the center, stationary tower which has an adjustable timer that could be set for various intervals to control the speed of movement of the irrigation apparatus.
In this prior art system, the center controller sets a duty cycle for the end tower motor to control the speed at which the outermost tower moves about the center pivot. The microswitch sensors at the intermediate towers between the outermost tower and the center or pivot tower cause the intermediate towers to follow the lead of the outermost tower and maintain an alignment along the multiple spaced towers.
Disclosure of the invention
An irrigation control system constructed in accordance with one embodiment of the invention controls delivery of water by a plurality of interconnected water delivery conduits that move over an irrigation region. A moveable support structure supports interconnected water delivery conduits that combine to form an elongated irrigation system that extends across an irrigation region . The support structure is preferably mounted to spaced apart wheels that allow movement of said delivery conduits relative to the irrigation region.
Motors spaced across an extent of the support structure provide motive power to at least some of said wheels to move the interconnected water delivery conduits. A plurality of movement control stations are also spaced across an extent of the support structure and include a motor control interface for energizing one or more of the plurality of motors coupled to and controlled by a motor control interface of a given control station. Each control station further includes a communications interface.
The preferred control system includes network hardware for sending communications signals to the communications interfaces of the plurality of movement control stations to provide co-ordinated control over the movement of the irrigation apparatus by control over motor speed.
One important aspect of the invention is the fact that each of the motors is continually (rather than intermittently) rotating to provide continuous movement of the pivot arm while maintaining pipe alignment. This continuous motion is provided over variations in terrain, weather conditions such as wind and soil type such as sandy or muddy conditions.
Use of a network for communicating control information across the extent of the irrigation system allows the farmer to program the entire irrigation system from any point from which he has access to the irrigation system. A portable interface unit can be plugged into the controller at any location and used to enter control data at that location which will be communicated to the other controllers. A center controller on a pivot or sweep irrigation system controls speed of rotation by monitoring an angular orientation sensor. This allows the controller to speed up or slow down the motors that drive the system based upon a comparison of the actual position with a desired position related to optimum speed. There are safety mechanisms built into operating system software to prevent the motors from running out of control. The center controller communicates with the spaced control stations to assure they are still operational and can shut down the motors in the event they are not properly functioning. The towers also do their own checking to determine whether they are operational and indicate , for example, if there are problems with a motor.
A shut down of the motor and communication of this failure condition to other controllers for their subsequent shut down can be initiated from any control station. There is also a maximum deflection safety built into the system so that in the event a sensor at any control station senses that the misalignment between adjacent towers has exceeded a threshold value, a shut down of the entire irrigation system occurs.
A preferred network communications between control stations uses an RS-485 network protocol with specially implemented network operating system software that is event driven. The network software implements a virtual connection service control redirection that allows any node on the network to control any other node. This includes the ability to control or program the operating parameters from any node on the network by means of the plug-in interface. The network that provides communications across the extent of an irrigation system can also be connected to another network that, for example, spans an entire farm by means of a gateway to the other network.
These and other advantages and features of the invention will be better understood from a detailed description of a preferred embodiment of the invention which is described in conjunction with the accompanying drawings.
Brief description of the drawings
Figure 1 is a schematic depiction of a farm having three separately controllable irrigation systems for depositing water and chemicals to the farmland;
Figure 2 is a schematic of a pivoting irrigation system implementing the present invention;
Figure 3 is a schematic illustration of a control scheme for controlling movement and operation of the pivoting irrigation system of Figure 2; Figure 4 is a detailed schematic of a microprocessor controller that forms a part of a controller board used to implement control stations that are spaced across the irrigation system;
Figure 5 is a schematic of memory circuits for storing a microprocessor operating system and data used during execution of the operating system; Figure 6 is a network interface for all stations that transmit and receive data over a network interconnecting the control stations;
Figure 7 is a motor drive interface circuit for a mid-span or end tower controller board coupling motor control signals from the microprocessor of figure 4 to a motor drive circuit; Figure 8 is an RS-232 serial communications interface for all stations controller board;  Figure 9 is a digital I/O interface of the mid-span or end controller board; Figure 10 is an analog to digital converter circuit for converting analog sensed conditions to digital signals for use by the mid-span or end controller board; Figure 11 is a reset control circuit for resetting the microprocessor of a controller board if operating voltage falls too low;
Figure 12 is an amplifier circuit for a mid-span or end controller board for converting an output from a motor drive circuit to an analog signal suitable for coupling to the analog to digital converter of Figure 10 that is representative of motor temperature;
Figure 13 is a circuit for converting a motor drive bus voltage into an analog signal for conversion by the analog to digital circuit of Figure 10;
Figure 14 is a circuit for converting a signal representative of motor current into an analog signal for conversion by the analog to digital circuit of Figure 10;
Figure 15 is a motor drive circuit for converting control signals output from the microprocessor of Figure 4 into suitable three phase motor drive signals;
Figure 16 is a real-time clock circuit that forms part of the center or pivot controller board;
Figure 17 is an analog-to-digital converter circuit that forms part of the center or pivot controller board;
Figure 18 is a serial and network interface for the center or pivot controller board; Figure 19 is a low voltage detection circuit that couples a signal related to the line a.c. voltage to the Figure 17 analog-to-digital converter;
Figure 20 is a schematic showing interconnection between a center or pivot controller and a relay board for controlling actuation of solenoid operated components and gathering data from sensors external to the controller; Figure 21 is a schematic of a power distribution system for energizing the multiple control stations spaced across an irrigation system incorporating a cable- integrity and runaway alignment saftey mechanism;  Figures 22 - 34 are flowcharts of control station operating system operations.
Best mode for practicing the invention
Turning now to the drawings, Figure 1 is a schematic depicting a farm 10 that includes three independently controllable irrigation systems 12, 14, 16 for depositing water and chemicals to three spaced apart regions R1, R2, R3 of the farm. A representative one of the irrigation systems 12 for irrigating the region R1 is depicted in greater detail in Figure 2.
The Irrigation system 12 includes a number of spaced apart towers 24 that support interconnect water delivery conduits or pipes 26 that combine to form the elongated irrigation system 12 and extend across a radially outward radius 27 of the irrigation region R1. The towers 24 are supported by wheels 28 that allow movement of said delivery conduits relative to the irrigation region R1 so that the irrigation system 12 sweeps across the region R1 water and chemicals mixed with the water are deposited on the farmland. Delivery of water and chemicals to the system 12 is via a center tower 24' which is coupled to the spanning conduits 26.
Each of the towers except the center pivot tower 24' has a motor M coupled to wheels 28 that support the tower for providing motive power to the wheels. When energized in a co-ordinated fashion the motors M move the interconnected water delivery conduits 26 to sweep the irrigation system across the region R1. As shown in Figure 1 , similar structure could be used to sweep back and forth linearly or through an arc rather than in a continuous circular motion. Mounted to the towers 24 are a plurality of movement control stations
30. In accordance with a preferred embodiment of the present invention there is one control station per tower so that the control stations 30 are generally equally spaced across an extent of the irrigation system. Each control station that is supported by a moving tower includes a motor control interface 32 for energizing a motor M coupled to a motor control interface 32 of a given control station.  Each control station 30 further includes a communications interface that includes circuitry for sending communications signals to communications interfaces of the plurality of movement control stations 30 by means of a network 34 that spans the irrigation system 12. Communications across the network that is implemented provide co-ordinated control over the movement of the irrigation apparatus by control over energization of the plurality of motors M.
A pivot tower 24' at the center of the irrigation system 12 includes a control station 30' different that the other stations 30 mounted to moving towers 24. Since this control station 30' does not control the actuation of a motor there is no motor interface (although to make the control stations modular, such an interface can be included but not used in the station 30'). The center control station does, however, play an important role as seen below in co¬ ordinating movement of the irrigation system so it is coupled to the network 34. Returning to Figure 1 , one sees that the farm house (or equivalent control center) includes a computer 40 that communicates with the irrigation systems 12, 14, 16 by means of a farmwide communications network 42. In addition to the irrigation systems 12, 14, 16 the farmwide network 42 also controls operations of pumps P for delivering water or chemicals to the systems 12, 14, 16. Also data gathering sensors S that monitor soil conditions are coupied to the farmwide network 42.
Movement Control
Figure 3 illustrates the manner in which the movement of the system 12 is controlled. The center or pivot control station 30' implements a control scheme for adjusting the speed of movement of each of the intermediate control stations 30 spaced along the extent of the system 12. One input to the control station 30' is a user selectable speed input 50. A second input 52 that is required by the control station 30' is sensed orientation from an orientation sensor 53 of the line of interconnected moving towers. The control station 30' also requires a clock 54 for providing a time input 56. These inputs allow the control station 30' to determine sensed speed of rotation 58 and compare the sensed speed of angular rotation with the desired or user controlled speed input 50. A resulting control signal 62 for adjusting the speed of rotation based upon this comparison is communicated by means of the network 34 to the mid-span control stations 30.
The controller 30' utilizes this process to implement a linear sweep of the irrigation system 16 across the region R3. Assume in one representative sweep control a linear movement from a distance L from a start point of A and an end point of B where the direction of movement is reversed and the irrigation system returns to point A. Also assume a constant speed K. If one cycle is the movement rom A to B and back to A, the time for a cycle is (2L)/K (distance divided by speed). For a ramp technique assume movement begins at a speed K, and linearly increases in speed so that at the endpoint B, the system is moving at a speed of 2K. On the return cycle the system leaves the point B at speed K and by the time it returns it is moving with speed 2K. The average speed is (K+2K)/2 = (3K)/2 and time = (4L)/3K which is a 66% improvement over the constant speed example. To implement this ramping up in speed as the irrigation system traverses the region between A and B, the controller 110' must scale a user desired application rate by 2/3 to calculate the empirical ramp application rate which will result in the desired water application depth over one cycle on average. The same calculations apply to a circular movement through a sweep angle theta.
Figure 3 aiso depicts the functioning of the control for each of the tower control stations 30. An end tower control station 30" is different from the multiple mid-span tower control stations 30 in that it does not have an alignment sensor and it may have specialized equipment for implementing irrigation operations at a radially outer end of the system. A midspan tower control station 30 receives a speed signal from the center control station 30' by means of an information packet communicated over the irrigation system network 34. This information is combined at a summing node 70 with sensed information unique to a particular tower and used to determine a control signal 72 for energizing an associated motor M at a certain speed. The use of the network 34 and communications between control stations 30', 30, 30" are described in greater detail below.  Each of the control stations 30, 30', 30" includes a controller board that includes a controller 110 (Figure 4) having a time processing unit integral with the controller 110. The mid-span control stations 30 have their time processing units programmed in micro-code to implement a motor control. A TPU portion of the controller 110 manipulates six control outputs TP0-TP5 to produce pulse width modulated signals suitable to generate a three phase sine-wave for energizing a three phase induction motor M coupled to the control station 30. Figure 4 is a detailed schematic of the pin outputs from the model MC68332ACFC16 microprocessor controller 110 used in a preferred embodiment of the present invention. Although a presently preferred motor control process is performed by a single microprocessor having a TPU portion, discrete circuits for performing an equivalent function are known.
Returning to the control scheme depicted in Figure 3, an alignment sensor 116 senses tower alignment to provide an alignment feedback input 117. This sensor 116 senses alignment between adjacent pipes or conduits 26 at the system nodes and translates the angle of pipe-to-pipe deviation from 180 degrees into a linear numeric value. A motor feedback input 118 to the controller 110 measures current in the motor to allow the control station 30 to sense load on its associated motor M. This input allows the controller to sense, for example, when the tower is going up an incline so that increased power and/or speed can be applied to adjust for the condition under which the motor is operating. This in conjunction with the alignment feedback input provides control over alignment of the towers as they rotate around the center pivot. The controller 110 is coupled by means of a bus 120 to a 32 Kilobyte
RAM area 122 , and 1 megabyte of Flash-ROM 124 (Figure 5) which is programmable and stores the controller operating system. The flash ROM 124 stores the microcode for the TPU for energizing the motor M and implements the motor control algorithm. As is well known in the prior art, a power supply (not shown) supplies a VCC power input for powering the controller 110 and memory units 122, 124. network
The presently preferred network 34 is a peer-to-peer network having up to 32 nodes (one per tower) extendable over a distance of approximately 4000 feet. The architecture is suitable for an irrigation system network wherein each of the nodes is implemented by one of the control stations 30, 30', 30". The hardware for the network conforms to the IEEE-RS485 electrical specification for a multi-drop, half-duplex networking scheme. Each control station has a controller executing its own operating system software to control communications over the network 34. Communications packets are transmitted over two twisted pair wires routed between the towers that are shielded with a ground shield.
A center or pivot control station constitutes a node on the network 34, but as noted above has functionality different from the multiple control stations at the moving nodes. The operating system software is specially designed to be fast and low cost and eliminate difficulties in training associated in implementing a network using prior art network software. The RS485 network protocol is highly immune to noise, and therefore particularly suited for a preferred embodiment of the invention.
The network software provides 100% confirmation on critical packets of data and automatic retry on transmission failure, up to three attempts. Packets are error checked via checksums and the software implements a unique command set for control over irrigation system movement. The software provides arbitrary data transfers of up to 1000 bytes in size and uses an ASCII readable format for ease in troubleshooting.
Center controller board
Circuitry on a center controller board is depicted in Figures 16-20. A microprocessor 110' (Figure 20) at the pivot control station is of the same type as that shown in Figure 4 and is also coupled by a bus to two RAM modules and a flash ROM module (not shown) for storing the operating system software. The RAM is battery powered and stores programs of pivot movement such as the ramp speed control mentioned previously as well as preset wakeup operations.
The controller board for the center or pivot control station 30' includes a real time clock circuit 130 (Figure 16) driven by an oscillator 131. The clock circuit 130 sends time data to the central processing unit 110'. Two unit directional data lines, MOSI and MISO on the clock circuit 130 allow the controller to establish a serial communications transmission of clock data. A battery 132 provides backup power to the clock circuit 130 and the RAM. The MISO signal is an output signal from the microprocessor and the MOSI is an input back to the microprocessor. An SCK input to the clock circuit from the microprocessor co-ordinates the timing of data transmission on the MISO and
MOSI serial data pins. These same data lines are used to transmit analog to digital data to the controller 110.
An analog-to-digital converter circuit 140 (Figure 17) is coupled to a number of inputs which provide signals relating to monitored conditions. The circuit 140 converts analog signals at its input to digital values for transmittal to the controller 110'. A first analog input ANO indicates pressure of the water routed through the irrigation system pipes from the pumps P. A second analog input AN1 is a temperature input for monitoring ambient outdoor temperature. This allows the controller 110' to shut down the irrigation system at a setpoint temperature near the freezing point. Delivery of irrigation water at temperatures near the freezing point can protect crops from a killing frost. If the temperature falls too far, however, the water will freeze in the delivery pipes 26 and the irrigation system must be shut down to prevent damage to the pivot. A third analog input AN2 is the angular position input 52 from the orientation sensor 53 shown in Figure 3 that allows the movement of the irrigation system to be monitored.
The sensor 53 utilizes a Hall-Effect Sensor based system (not shown) to monitor an orientation of a rotating sensor member. As the entire irrigation system pivots in response to the controlled actuation of the motors M the output from the hall sensor provides an analog input AN2 and two digital inputs which are monitored at controller pins PF3 and PF4. The combination of the analog inputs and the two digital inputs define the instantaneous orientation of the irrigation system 12. The manner in which the input AN2 is generated is described more fully in United States patent application serial number 08/734,830 entitled "Angular Position Sensor" which was filed in the United States patent office on October 22, 1996 and which is incorporated herein by reference.
Each of the control stations 30, 30', 30" include an RS232 serial communications interface. The serial communications circuit 150 for the center control station 30' is depicted in Figure 18. A handheld plug-in module 151 (Figure 2) can be used by the farmer to program the system 10 by plugging the module into a connector port 152 for communications with the controllers 110, 110'. The module includes its own microprocessor controller and RS232 interface and includes a user interface for prompting the user in entering data.
Data packets that are sent via the network 34 are transmitted to the twisted pair cable by means of a network interface circuit 160 also shown in
Figure 18. The RS485 communications circuit 160 is coupled to a three-pin output connector 162. One output of the connector 162 is the grounded shield of the cable, and the two other outputs are the two-wire twisted pair communications cable connections. A sensor circuit 170 shown in Figure 19 is a alternating current voltage sensing circuit that provides an analog input 172 which is coupled to the A/D converter circuit 140 shown in Figure 17. In the event the AC supply voltage to the entire irrigation system 12 drops to too low a value an input to the microprocessor via the A/D converter 140 causes the software to shut down the system 12. The alternating current input 'VAC coupled across the terminals of a step-down transformer 174 is nominally 480 volts a.c. If the voltage drops to a value of about 410 volts the controller 110' shuts down the system 12. The circuit 170 converts alternating current voltages in the range 0- 1000 volts a.c. to a range of 0-5 volts at the input 172 to the A D converter. Figure 20 illustrates a portion of the microprocessor 110' and a relay board connector 180 for the analog-to-digital inputs to the A/D convertor circuit 140. A group of capacitors 182 coupled to these inputs are for filtering these inputs. Figure 20 also includes a circuit 184 beneath these filters that provides a fixed electric current (current source) for a water pressure sensor connected to the relay board (not shown). The relay board provides an interface to the pressure sensor, temperature sensor and position sensor as well as supporting relay activated outputs.
A reset control circuit 190 (Figure 11) causes the controller 110' (or 110) to be reset in the event VCC, the operating voltage of the controller from a controller board power supply drops below a safe level. If this occurs, the circuit 190 generates a reset input 191 at pin 68 of the microprocessor 110'. The circuit 190 also includes a de-bug connector 192 for generating outputs
193 for use in de-bugging the software. Both the midspan and the center or pivot controller boards include the reset and debug circuits.
Mid-span controller boards
The circuitry for a mid-span controller board is depicted in Figures 6-17. Each of the mid-span controllers has an RS485 interface circuit 210 (Figure 6) having three outputs 212, 214, 213 coupled to the network cabling by means of connectors C1, C2. The controller 110 communicates with the interface by means of two inputs 216, 218 and an output 217 to the controller 110 to implement serial data transfer between the controller 110 and the circuit 210. An RS232 interface circuit 220 (Figure 8) allows the controller board to be interfaced with a hand held control module 151 that is plugged into a connector 222 at the base of the tower and allows a user to program operation of not only the control station to which the hand-held unit is connected but any other control station communicating by means of the network 34 . Figure 7 illustrates a representative motor driver interface circuit 250 for coupling the microprocessor 110 to a driver circuit 270 shown in Figure 15. Interface drive inputs 252-257 are arranged in pairs with each pair driving a phase of the motor windings. For example the two inputs 252, 253 are coupled through a buffer circuit 260 to a pair of opto-isolator drivers 262, 263 having outputs 262a, 263a coupled to a connector 268 which couples these motor drive signals to the power switch circuit 270. Similarly, the two inputs 254, 255 are coupled through the buffer circuit 260 to opto-isolator drivers 264, 265 having outputs coupled to the connector 268 and the inputs 256, 257 are coupled through the buffer circuit 260 to the opto-isolator drivers 266, 267 to the connector 268. One or the other of the optoisolated gate driver signals is active at a given time. The inputs 252-257 are outputs from the microprocessor controller that define wave forms for activating the three phase motors M. The connector 268 mates with a corresponding connector 269 shown in Figure 15. A 5 volt input 269 to the circuits 262-267 is coupled to an associated resistor network for an associated pair of motor drive signals and prevents both pairs of circuits from simultaneously sending data.
A motor driver circuit 270 ( Figure 15) includes an integrated power module 272 designated as an IGBT circuit. This commercially available circuit 272 accepts pulse width modulated driver input signals from the gate drive circuit of Figure 7 and generates a corresponding three phase excitation pattern. This module 272 is commercially available from Motorola and generates three phase winding outputs 273a-273c for driving the three phases of the motor windings. The IGBT circuit 272 provides a temperature signal TC+ for monitoring power module temperature. This signal TC+ is an output 274 to a temperature sensing circuit 280 of Figure 12. The circuit 280 includes an operational amplifier 281 which generates an analog temperature output 282 for use by the controller 110. An A/D conversion circuit 290 (Figure 10) converts the analog temperature output 282 to a digital signal.
A bus voltage input 294 to the A/D converter circuit 290 is related to the bus voltage that energizes the motor windings. The bus voltage input 294 to the analog to digital converter is generated by a circuit 300 depicted in Figure
13. An input 302 to the circuit 300 is labeled 'VBUS' is used to energize the motor windings and has a nominal value of 600-700 d.c and is generated by a suitable power supply from the 480 volt a.c. input. This signal is input to an opto-isolator circuit 304 to produce two inputs to an amplifier 306 that generates a signal in the range of 0-5 volts d.c. which correlates to a bus voltage of 0-1200 d.c.
A current sensing circuit 310 is depicted in Figure 14. Two inputs l+ and I- which represent the terminals of a current sense resistor in the bus return path are provided by the power module 270. These inputs are coupled through an optoisoiator circuit 312 to an amplifier 314 which generates an analog ouput 315 to the analog to digital converter 290 of Figure 10. This signal is a voltage in the range of 0-5 volts which corresponds roughly to a 0-8 ampere current in the motor windings. The cutoff that the microprocessor uses to shut down the motor and signal the other control stations that it is doing so is based upon motor parameters supplied by the motor manufacturer.
The controllers 30, 30', 30" maintain control of the system 12 by speeding up and slowing down the motors that drive the system across the irrigation region. A connector 316 provides a means of inputting an analog input 317 to the A/D converter 290 corresponding to an angle between two adjacent and flexibly coupled water delivery pipes in the system 12. For a given control station 30, the analog input is generated by the sensor 116. The sensor 116 includes a first sensor arm connected to one pipe and a second arm connected to another pipe. The two sensor arms are coupled together at a pivot point located in close proximity to a flexible coupling that allows the pipes to pivot with respect to each other. One of the arms is linked to a potentiometer (not shown) that provides the analog signal input 317 transmitted through the connector 316.
If the system 12 cannot correct a misalignment, the orientation misalignment can become so extreme that the system 12 must be shut down to prevent damage. As seen in the Figure 21 depiction of a power distribution control circuit 319, the alignment sensor 116 includes two limit switches 320, 321 that open if the controller fails to detect the misalignment and the amount of misalignment becomes too great. A power supply 322 creates a 24 volt d.c. signal that is transmitted through a key switch 323 to a relay coil 324 which closes a normally open contact 325. The contact 325 in turn forms part of a circuit that must be energized for the tower controllers to receive three phase 480 volt motor energization inputs by means of three phase contactor 326. A holding coil 327 for these three phase signals remains energized so long as the 110 volt a.c. circuit powered by a control transformer 328 is energized by the pilot relay contact 325.
An extreme mis-alignment at any one of the towers 24 will cause one of the switches 320, 321 to open and the coil 324 to be de-energized. This will shut down the power to all the towers. An endmost tower 24" has no alignment sensor but does include a endplug connector 329 which allows additional towers to be added to extend the system 12 with the same wiring. An override relay 330 is provided. Under software control of the center controller 110' an override coil can be energized to close a normally open contact 331 and override the control operation of the switches 320, 321. This can be done for example, to diagnose problems that result in misalignment without shutting down the system 12.
Packet Transmission
The data packet format on the network 34 includes data framing information as well as checksum data for error detection and retransmission.
In addition to the data in the packet the framing information includes a start of packet designator and an end of transmission character. The packet also includes target and source node address information and a two byte control designator as well as checksum error detection data. A confirmation response packet is similarly framed. It must include a source designator, but does not include the checksum or data but does include a special acknowledge character:
Each node on the network 34 has an address and the center node at the pivot also has an address on the farm wide network 42. The center or pivot node controller acts as a gateway for the receipt and transmission of data from the network 42 to the network 34. A packet format on the network 42 has longer node addresses to accommodate more nodes than the ninety-nine allowed on the network 34.
Packets that fail a checksum verification are abandoned at the receiving node and no response of acknowledgement given. The originator of the packet will construe a lack of acknowledgement within a fixed time as a transmission failure and try again. After three unsuccessful attempts, the originator node logs a fatal communication failure to the target node.
Command Set
The originator packet on the network 34, i.e. a so-called level I network, can contain one of the following two byte commands: A(sp) Address: the data packet contains an address value for node
AL Alignment Calibrate
CT Configure Tower
Dl Discrete I/O Input
DO Discrete I/O Output DF Direction Forward
DR Direction Reverse
GO Begin run
!(sp) Identify
J(sp) Command Reject LA Linear Adjust (speed)
LS Linear Speed
QS Query Status
QV Query Value
RS Report Status RV Report Value
SP Set rotation time
ST Stop run
SV Set value
Virtual connection services are means whereby any node's serial port at an interface 210 for example can act as an interface to another node. In this instance the initiating node acts as a network-to-serial passthrough and the target node redirects its serial I/O through the network. The commands for this virtual connection service are: VC Virtual connect start
VX Virtual connect close  VI Redirected Input Byte
VO Redirected Output Byte
VS Redirected Output String It is apparent that network overhead for a single byte I/O is considerable, so serial output is formatted as strings whenever possible. The serial I/O and network I/O functions are switched via a redirectible interface layer. All user I/O is processed through this layer, which monitors the global redirection status, and sends data to a proper logical and physical channel. Local serial I/O is inhibited on a redirected target. Network management is contingent on an initial operator set up. On a completely new network, the operator enters a unique node number for each controller which is stored in the non-volatile memory of a control board. For a pivot irrigation system 12, the controllers are numbered starting at 0 from the center and moving outward. On power up, the center or master controller will issue sequential identify commands (l(sp)) to confirm against a previously entered and stored tower table.
controller operating system
After executing a boot program that initializes the controllers, the stored program operating system executes a foreground process 350 outlined in the flow chart of figure 22. The foreground process sequentially executes two decision steps 352, 354. In a first decision step 352 the software determines whether the RS485 interface has a new packet for the controller 110 (or 110') to handle. If there is a packet, the controller processes 356 the network command contained in the packet. If there is no packet, the controller determines 354 if there are characters at the input queue. If the direction is
'local' , queue data originates from the RS232 input and if the direction is 'remote' the origin of the queue is the network. If no characters are presented at the RS232 interface, the process 350 loops 359 back to the start.
The foreground process 350 is periodically interrupted by an task interrupt timer and in a presently preferred embodiment of the invention this interrupt occurs every 4 milliseconds. The flow chart of a task executive 360 is depicted in Figure 28. The controller maintains a task table which is a number of tasks that need to be performed by the controller. Each entry in the task table contains a task identifier, a task or time delay interval and a fuse counter. As seen in Figure 28 each time the foreground process is interrupted, the controller points 362 to the top of the task table and determines 363 if the first task is enabled. If no movement of the irrigation system is occurring, alignment monitoring tasks, for example, may not be enabled. If the task under consideration is not enabled, a branch 364 is taken that leads to a next subsequent table entry 366. If there are no other table entries, the controller exits 368 the task executive 360.
If there are more tasks in the table to evaluate the executive 360 branches back 370 to see if the next task is enabled at the decision step 363. If a task is enabled a branch 372 is taken to decrement the task's delay fuse 374 and then check 376 if the fuse is zero. If the fuse is zero, the task is executed 378. After the task executes, the fuse for that task is reloaded 380 from the task's interval value table and a next table entry is evaluated. If the fuse has not decremented to zero a branch 382 is taken and a next task table entry is directly evaluated. The use of the fuses allows a priority of task hierarchies to be established and allows for adjustable task execution periods.
Events
Other hardware interrupts are processed in the background at irregular occurring intervals. Figure 27 is the event processing routine 400 that occurs when a character is received at the RS485 interface of any controller. If the controller is building a packet a branch is taken 402 to determine 404 if an end of packet byte has been received. If so, a branch 406 is taken to determine
408 an address of the target designation of the packet. If the controller's node address and the packet target designation do not match or the packet is not a broadcast packet the routine 400 exits 410.
If the controller receiving the character is not presently building a packet, a branch 411 is taken to determine 412 if the character received is a 'start packet' byte. If it is, then a packet receive program flag is set 414 and the routine is exited 410. If no packet is being received by the controller and a start packet byte is not sensed a branch 416 is taken to exit 410 the routine. This exit path will occur if signal corruption results in an improperly formed packet. Returning to the address checking step 408, if the packet is meant for the controller processing the received character, a branch 420 is taken to evaluate 422 the packet checksum. If the checksum is wrong, the routine 400 is exited 410 and a retransmission may occur. If the checksum is correct, a fresh packet semaphore is set 424, an acknowledgement is sent 426 to the sending node and the routine is exited 410.
Returning to Figure 22, one sees that the setting of a fresh packet semaphore or flag will cause the controller to branch to the process network command routine 356 since an entire packet has been received. If the two byte command 'virtual connect' (VC) is received from a host node, then the receiving node branches to the routine 430 shown in Figure 23. This routine
430 sets a direction flag to remote 432, sets a target node 434 to the address of the host node and exits 436. When the virtual connection is over (as determined by the host) the routine 440 of Figure 24 is executed by the target node controller. This routine 440 causes the direction flag to be reset to local 442 and the routine is exited 444.
One use of setting up the virtual connection by means of the routines 430, 440 is to allow control information to be sent from a node on the system 12 to the center controller 110' without actually being at the center tower 24'. By plugging in a handheld interface unit 151 to the RS232 interface for node number 10, for example, node 10 can command the center node to accept serial data transmitted from the RS232 interface as if the data were received at the center node's serial communications port. Stated another way, the network simulates a virtual serial connection by redirecting bytes at the host's (node #10) RS232 interface through the network 34 to the center node. Assume the center controller 110' has just been instructed to begin a virtual connect with node number 10. The center nodes direction flag is set to remote. Figure 25 summarizes the process of communicating with the host. At a decision step 446 the center controller 110' redirects characters sent to the host by placing the character in a packet 448 and sending it out 450 the network interface for transmission on the network 34. Without the virtual connect command, the character is sent via the RS232 port to the assumed handheld unit 151 at the controller location. Figure 26 summarizes a process
460 of receiving characters from the host when operating in virtual connect mode. The characters that are received are placed 461 into the terminal receive queue as if they had arrived at the controller's serial port.
Packet transmission Figure 30 illustrates a process 470 of initiating a packet transfer. This is typically done during execution of a task by the interrupt driven task handler routines from the task table or can be done to acknowledge a received packet.
The process 470 first formats the packet 472 then calculates a checksum 474 and listens 476 via the RS485 interface for network traffic. If the network is busy for three consecutive tests a network busy event is logged 478 and the routine is exited 480. An error condition is logged and if the irrigation system is running, it is stopped.
If the network is not busy a branch 482 is performed and the packet is sent 484. If the packet is intended for all nodes a branch 486 exits the routine. If the packet is targeted to a specific node and an acknowledgement is received a branch 488 again exits the routine. If the packet for a specific node is sent three times without acknowledgment an error is flagged 490 and the routine exited.
Motion control software
The mid-span controllers and center controllers co-ordinate motion control of the system 12. Two mid-span tower control routines are summarized in the flowcharts of Figures 31 and 34 each of which is entered by the task executive routine of Figure 28. The figure 31 routine is an alignment control task and is initialized by reading data 500 from the alignment sensor 116 by gathering data from the A/D converter. When a unit is first installed, power is first applied, but before motion begins the center controller instructs each tower (via a network command) to sense its starting alignment and store an A/D converter reading as a 'calibration zero' value. The A/D converter has a full scale range of 0-1023 and the calibration zero reading is typically about 512. The controller 110 calculates 502 an error value based on the real time sensed input from the A/D converter 290 and uses the absolute value of this error value (since misalignment can be in either sense) to determine 504 if a software limit (programmed into the flash ROM) has been exceeded. If so the pivot must be stopped 506 and a fault logged 508. The step of stopping the pivot includes the steps of de-energizing the motor coupled to the controller that has noted the fault and sending a broadcast packet to all other nodes on the network that the system 12 should stop (ST command) so that all other nodes stop movement of the other towers.
If a software limit is not exceed a motor control calculation 510 is performed and the routine is exited 512. The control calculation 510 is a proportional integral derivative calculation and is a standard technique in motor control theory to achieve closed-loop feedback control of a regulate system or process.
Turning to Figure 34, the disclosed routine 520 utilizes the PID value calculated in figure 31 by first scaling or limiting 522 that value based upon present motor speed and determines 524 the sign of the control action based on the direction of irrigation system rotation. The routine then calculates a new motor speed 526 and provides the controlled pulse width modulated output signals to set that new speed 528. Once the new speed is set the routine 520 exits 529.
Figures 29, 32, 33A and 33B relate to software running on the center controller 110'. In figure 29 if any controller issues a stop command (ST), the center controller 110 first queries the originating controller 530 for failure information and then logs 532 this fact along with the tower or node number of the controller 110 issuing the stop command. This information is available from the packet composed by the mid-span controller and received by the center controller 110'.  Figure 32 is a flowchart of a process 540 run by the task executive whereby the center or pivot controller 110' periodically queries all towers for their status. The process initializes a counter 542 and then checks the status 544 of each tower by means of issuing a 'QS' command. After a tower status is checked the controller 110' increments 546 the tower counter and loops back
548 until it determines 550 all towers have been queried. Once all towers have been queried, the routine exits 552. Failure to receive a response from a tower three consecutive times is logged 554 and causes the center controller 110' to stop 556 the pivot by issuing a 'ST' command. Also, receipt of a packet response that a tower has stopped will cause the center controller 110' to log this fact 558 and stop the pivot 556.
Figures 33A and 33B are a flowchart of a routine 560 run by the task executive for monitoring operating parameters of the system 12. The routine 560 sequentially reads 562, 564, 566, 568 values from the A/D converter circuit of Figure 17 to determine if movement of the irrigation system 12 should be stopped 570 (See figure 33B). For a back and forth sweep system (either linear or pivoting) the controller 110' also senses an end of sweep condition as indicated by the angular sensor input 52 to determine when to stop movement 572. In this circumstance .however, the stopping is not due to an error condition and motion is reversed 574 and movement again commenced 576.
The routine 560 also performs a sequence of steps 578 to turn on an end gun on the last tower at an appropriate time to spray water beyond the region covered by the pipes 26. Furthermore, the routine 560 also calculates a new pivot speed based upon a sensed angular position and conveys that speed to all towers on the network 34. The end gun is controlled by the last
(endmost) controller 110'. Each mid-span controller has a digital I/O circuit 570 (Figure 9) having output connectors 572, 574. The outermost controller 110" sends signals to an endgun circuit (not shown).
A process for starting movement of an irrigation system is controlled by the center controller 110' and involves a ramping from a stop condition up to a continuous speed. For a system such as the irrigation system 12 this process can be done and then allowed to continue at constant speed as the system rotates about the center tower. For a back and forth sweep system the process is performed at periodic intervals when a movement boundary is reached. Additionally the back and forth movement can utilize a ramping or steadily increasing speed of movement that forms a programmed sequence to the center controller 110'.
A presently preferred embodiment of the invention has been described with a degree of particularity. It is the intent however, that the invention include all modifications and alterations from the disclosed preferred design falling within the spirit or scope of the appended claims.