# A Wireless Intelligent Valve Controller for Agriculture
## Integrated Irrigation System

Nannan Wen, Daoliang Li, Daokun Ma, Qisheng Ding

► To cite this version:

Nannan Wen, Daoliang Li, Daokun Ma, Qisheng Ding. A Wireless Intelligent Valve Controller for Agriculture Integrated Irrigation System. 4th Conference on Computer and Computing Technologies in Agriculture (CCTA), Oct 2010, Nanchang, China. pp.659-671, 10.1007/978-3-642-18369-0_79 .
hal-01564838

HAL Id: hal-01564838

https://inria.hal.science/hal-01564838

Submitted on 19 Jul 2017

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# A Wireless Intelligent Valve Controller for Agriculture Integrated Irrigation System

Nannan Wen¹, Daoliang Li¹,*, Daokun Ma¹, Qisheng Ding¹,²

¹College of Information and Electrical Engineering, China Agricultural University, Beijing
100083, P. R. China

²Xuzhou Normal University, Xuzhou, Jiangsu, P. R. China

**Abstract.** Based on the problems caused by current automatic irrigation system with a large number of cables, such as installation, maintenance, and difficult expansion, this paper proposed a wireless integrated irrigation control system and developed a wireless intelligent valve controller which can satisfy the requirements for agricultural irrigation in our country. The controller consisted of the control unit, power unit, wireless communication unit, relay boost driver unit, state feedback switch, etc. It received the control command from the remote control center by the wireless communication unit, actuated the relay boost driver unit to turn on/off irrigation solenoid valves. The controller includes the functions of remote control, parameter setting, feedback status detecting, etc. Since the rational design, simple command, and low cost, the controllers have been pilot in Beijing and Xinjiang. The results indicate that the controller is effective in practice and can be used a normal irrigation season.

**Key words:** Wireless; Valve controller; Irrigation system

## 1. Introduction

With the popularization and improvement of water-saving irrigation technology, agricultural irrigation control technology is applied gradually. However, irrigation control equipments in application at this stage are from abroad and also very expensive, which are only for demonstration and lack of significance for promotion. Current automated irrigation system with a large number of cables brings many problems such as installation, maintenance, expansion and other issues.

Therefore, it is hot to develop a low-cost irrigation valve controller independently for agriculture irrigation system. For example, a low cost solar-powered feedback controller for DIC of fixed irrigation systems was developed. The controller uses soil water potential (SWP) measurements to control the amount of water applied to each specific management area of a field, and measured system hydraulic pressure to communicate with other controllers. The results indicate that the controller was effective in maintaining the SWP in the root zone close to a predetermined management allowed deficit (MAD). (F.R. Miranda et al, 2005) A wireless broadcast

<footnote>* Corresponding author, Email: dliangl@cau.edu.cn</footnote>
irrigation control system and a low power wireless DC solenoid valve based on OOK modulation and powered by battery were design and applied throughout the greenhouse irrigation in a plantation. (Shen Changjun et al, 2009) With advanced electronic computer control and wireless transmission technology, a precision irrigation control system was designed for water-saving irrigation. (Kuang Qiuming et al, 2007) A new automatic smart controller for irrigation based on GSM network has been developed, it can receive GSM message from PC and mobile, then control the valves by wireless radio communication. (Yang Genghuang et al, 2005)

Many irrigation-scheduling methods have been developed over the years, but adoption by producers has been limited by cost, installation time, maintenance, and complexity of the decisions involved. (F.R. Miranda et al, 2005) The above-mentioned irrigation controllers which used OOK modulation, infrared, GSM and other means of communication bring with high price and high maintenance costs. Besides, most commercially available sensors and actuators assembled for irrigation system networks are too complex and/or costly to be feasible for site-specific management of integrated irrigation systems.

A wireless intelligent valve controller for site-specific management and/or operation of a wireless integrated irrigation control system is easier to install and maintain as compared to cable irrigation control. As a result, a potential solution to these problems is a total wireless automation of irrigation control system. Wireless automation irrigation controllers can be implemented using spatially variable irrigation systems to optimize yields and maximize water use efficiency for fields with variation in water availability due to different soil characteristics or crop water needs. (Zhang Wei et al, 2009)

The objectives of this research were to develop and test an autonomous, low cost, wireless intelligent irrigation valve controller for wireless integrated irrigation control system for the actual demands in agricultural irrigation.

## 2. Architecture of Wireless integrated irrigation control system

Integrated agricultural production demands and learning from foreign experience in research, the architecture of wireless integrated irrigation control system is shown in Fig. 1. The system was composed of two parts, wireless sensors monitoring network and remote control center. Wireless sensors monitoring network consists of wireless information acquisition nodes and irrigation control nodes distributed in the field, the remote control center sends the commands of data acquisition and valve control though the routing nodes. Wireless sensors monitoring network uses star topology, end nodes route by way of the routing nodes to the sink nodes, then the sink nodes transmit information to the wireless access point by GPRS and control computer receives information from the wireless access point by RS232. Information acquisition, remote control, parameter setting, intelligent alarm functions are achieved by the remote control center.

The system passed soil information and meteorological parameters collected by sensors in real-time monitoring to the remote control center through wireless network.
Then the remote control center automatic analysis and makes irrigation management decision to open or close valves. With timely scientific guidance amount of irrigation, the system achieved the sustainable use of water resources and automatic and intelligent irrigation. The remote control center can also share information across users through the Internet.

<figure><img src="image_2.png" /><figcaption>Fig. 1. Architecture of wireless integrated irrigation control system</figcaption></figure>

# 3. Materials and methods

## 3.1 Irrigation valve controller description

For irrigation implementation, a field is typically divided into irrigation management units based on soil characteristics, crop water requirements, and/or economic factors prior to the installation of the control system. A wireless integrated irrigation control system is installed in each irrigation management unit to monitor soil temperature, humidity and meteorological parameters and ensure water-saving irrigation.

The valve controller developed in this study is designed to work autonomously without hard-wire connections between individual control units. Each controller is designed to operate on battery power. Soil moisture determinations and irrigation decisions occur at fixed regular intervals set by the remote control center. Real-time clocks for all controllers are synchronized for measurement and irrigation decisions.

After measurements and irrigation decisions are made, remote control centre sends signal to valve controllers. Each controller installed in system is programmed to process the control commands received from remote control centre to autonomously open an irrigation solenoid valve, triggering relay boost driver unit. Finally, each
controller stores the corresponding valve status feedback information from state feedback switch and transmits to remote control center.

## 3.2 Controller hardware

Wireless Intelligent Valve Controller shall be the core of the wireless irrigation control node, hardware modularization was adopted. It consisted of the control unit, power unit, wireless communication unit, relay boost driver unit, state feedback switch, etc. A block diagram of Wireless Intelligent Valve Controller hardware developed in this study is shown in Fig. 2. Electronic devices, chips, MCU were selected to meet the low power and low cost required for the controller.

The sub-components of the control unit are a microcontroller, reset circuit, real-time clock, UART, IO expansion, analog-to-digital (A/D) acquisition, flash memory, and Interface circuit. Each irrigation controller controls four solenoid valves.

<figure><img src="image_3.png" /><figcaption>Fig. 2. Block diagram of Wireless Intelligent Valve Controller developed in this study</figcaption></figure>

### 3.2.1 Control unit

The microcontroller (MCU) consists of the Jennic5139, is the master device of control unit that is programmed to keep time and control the actuators. The device integrates a 32-bit RISC processor, with a fully compliant 2.4GHz IEEE802.15.4 transceiver, 192kB of ROM, 96kB of RAM, and a rich mixture of analogue and digital peripherals. The JN5139 is a low power, low cost wireless microcontroller suitable for IEEE802.15.4 and ZigBee applications.

It has 96kB RAM for share program and 192kB ROM for program code. It's peripherals include a 56-pin DIP package with 21 digital I/O pins, 4-input 12-bit ADC,
2 11-bit DACs, 2 comparators, 2 Application timer/counters, 3 system timers, 2
UARTs, SPI port with 5 selects, 2 wire serial interface, etc. These features all make
for a highly efficient, low power, single chip wireless microcontroller for
battery-powered applications.

This MCU was selected based on low-cost, processor speed, low power requirements, rapid software development, and ease of system integration with custom circuits. The reset circuit and clock circuit ensure equipments work reliability and stability.

The JN5139 has two independent Universal Asynchronous Receiver/Transmitter (UART) serial communication interfaces. The UART connected to a level shifter connector to provide the RS232/RS485 line voltage compatible with a PC. The software developer kit uses such an interface as the debugger interface between the JN5139 and a PC. The information can be observed directly in local with RS485/RS232 communication.

There are 21 Digital I/O (DIO) pins, which can be configured as either an input or an output, and each has a selectable internal pull-up resistor. Most DIO pins are multiplexed with alternate peripheral features of the device.

The Serial Peripheral Interface (SPI) allows high-speed synchronous data transfer between the JN5139 and peripheral devices. The JN5139 operates as a master on the SPI bus and all other devices connected to the SPI are expected to be slave devices under the control of the JN5139 CPU.

The Intelligent Peripheral (IP) Interface is provided for systems that are more complex, where there is a processor that requires a wireless peripheral. The intelligent peripheral interface is a SPI slave interface and uses pins shared with other DIO signals. The interface is designed to allow message passing and data transfer.

The controller with above DIO pins and interface circuitry can support 4-way analog inputs, 4-way control power output. A controller can support 2-way pulse solenoid valves and state switch, 2-way soil moisture sensor.

Controller extends Flash memory. Data and program are stored in non-volatile memory to prevent loss if a power failure occurs. The user can download recorded data to analyze system performance.

3.2.2 Power unit

Two 1.5V batteries as the input source through the power unit provide a stable output voltage for other units. Power unit contains polarity protection circuit and voltage regulator circuit. Polarity protection circuit includes Schottky diode and the decoupling capacitors. Voltage regulator circuit utilizes voltage regulator chip to ensure output voltage stably. After fully considering energy in application field, controller utilizes ordinary battery as power supply to ensure that the system works over an irrigation quarter.

3.2.3 Wireless communication unit

ZigBee is a two-way wireless communications technology in short distance communication, with low complexity, low power consumption, low data rate. Its complete protocol stack is only 32 KB, can be embedded in a variety of devices,
while support geographic targeting. It is a protocol specification developed for small
device wireless network. It is a part of the family of IEEE wireless network protocol.
It has a very complete hierarchy.

Wireless communication unit supported by low-power radio frequency chip with the
typical external circuitry, communicated with the control unit by MCU interface and
completed the wireless transceiver function. It works in the global free public band
(2.4GHz), reducing the traditional wireless operating cost.

3.2.4 Relay boost driver unit

In sleep mode, relay boost driver unit is off. Once the controller receives the
valve-driven control signal, it enables relay boost driver unit. Low-power boost chips
installed in the relay boost driver unit circuitry will boost the low input voltage to 5 ~
24V working voltage suitable for solenoid valve, send the driver pulse to control
valve. Finally, each controller stores the corresponding valve status feedback
information from state feedback switch and transmits to remote control center.

The valve controller uses 3V battery as power, based on ZigBee protocol, waiting for
remote control command. It can actuate relay boost driver unit to control valve. The
MCU collects the state feedback information in real-time and transmits to remote
control center. The controller supports a number of pulse solenoid valves from
various valve manufacturers and can be easy to installation and operation.

3.3 Controller software

There are 4 kinds of the operation states during the controller working: the initial state,
the task query state, the task execution state, sleep state. Diagram of specific state
transition is shown in Fig. 3.

After the wireless valve controller was powered into the initial state, the
microcontroller completed hardware initialization, including the port initialization,
watchdog initialization, the system clock initialization, and variable initialization, etc.
Then the controller starts testing a higher-level control signal which drives it into the
task query state. If the wireless communication unit detected execution signal, the
microcontroller will further determine the type of tasks, for instance, valve control,
status detecting, parameter setting, and then enter the task execution state. If no task is
detected, the controller enters sleep state. It will be wake up automatically by software
timing, then checks control signal again and enters into the task query state.
<figure><img src="image_4.png" /><figcaption>Fig. 3. Diagram of specific state transition</figcaption></figure>

The irrigation controller program was written in C. The program uses the memory capacity of the microcontroller (MCU). The program flow diagram is shown in Fig. 4. It contains a main loop and several subroutines such as valve control, status detecting, and parameter setting that enable the MCU to perform the following tasks:

-initialize hardware, including the port initialization, watchdog initialization, the system clock initialization, variable initialization;

- register to routing node in the same network, report device information;

- request tasks from superior;

- query tasks, receive remote control commands;

- process the remote commands to determine the type of tasks, execute the task

-store control information, time, and valve status in the controller memory;

- receive control commands from remote control center to drive irrigation valve;
<figure><img src="image_5.png" /><figcaption>Fig. 4. Flow diagram of controller program</figcaption></figure>

## 3.4 Irrigation valve controller testing

To measure the valve controller performance, a resistor circuit is used to series connect with the controller (Fig. 5). The circuit was powered by battery. Using a small resistor, resistance on the circuit can be neglected in the energy. Measured the voltage across the resistor by oscilloscope, circuit current value can be obtained in the series circuit to calculate the energy consumption of valve controller.
<figure><img src="image_6.png" /><figcaption>Fig. 5. Resistor circuit used to calculate the valve controller energy consumption</figcaption></figure>

The valve controller during operation including the initial state, the task query state, the task execution state and sleep state. To facilitate the analysis, the above conditions are divided into the state of active and sleep. Active Consumption $P_w$ can be calculated using the equation:

$$P_w = I_w \times T_w \qquad (1)$$

Where $I_w$ is the Active Current, $T_w$ is the Active Time for the valve controller. The Average active current $I_{wa}$ can be obtained by the following equation:

$$I_{wa} = \frac{\sum I_w \times T_w}{\sum T_w + T_s} \qquad (2)$$

Where $T_s$ is the Sleep Time. Similarly, Average sleep current $I_{sa}$ can be calculated using the equation:

$$I_{sa} = \frac{I_s \times T_s}{\sum T_w + T_s} \qquad (3)$$

Where $I_s$ is the Sleep Current. The relationship among the Average active current $I_{wa}$, Average sleep current $I_{sa}$ and Average current $I_{av}$ is as follows:

$$I_{av} = I_{wa} + I_{sa} \qquad (4)$$

Consequently, Consumption in one day $P_{wa}$ is the average current consumption for each hour multiplied by 24 hours per day, the formula can be given by

$$P_{wa} = I_{av} \times 24 \qquad (5)$$
Through analysis of valve device energy consumption in different states on one day in laboratory, we estimate the actual duration in work as follows.
Days:

$$D = \frac{1200}{I_{av}} \qquad (6)$$

Months:

$$M = \frac{D}{30} \qquad (7)$$

# 4. Results and discussion

The controller performance was evaluated at demonstrations in Beijing and Xinjiang. To verify adequate operation of the hardware and software, and the controller in the root zone on a real-time basis, some controllers were tested to simulate a site-specific irrigation system in laboratory. We chose one of them to analyze its consumption.

## 4.1 System hardware and software performance

The controller hardware and software performed all tasks as designed. Data downloaded from the controllers showed that the irrigation control system continually measured apparatus parameters and status information, and opened or closed the solenoid valve when needed without failure. User interactions with the controllers using a notebook computer were also successful.

## 4.2 Consumption current in active and sleep state

Using two ordinary batteries to power the valve controller, about 1200mAh, specific test results are as follows.

<table><caption>Tab.1. Valve controller power consumption current in active and sleep state</caption><thead><tr><th>I<sub>w</sub> (mA)</th><th>T<sub>w</sub> (ms)</th><th>p<sub>w</sub> (mA·s)</th><th>I<sub>s</sub> (mA)</th></tr></thead><tbody><tr><td>10.000</td><td>2.5</td><td>0.025</td><td>0.300</td></tr><tr><td>20.000</td><td>2.0</td><td>0.040</td><td>0.300</td></tr><tr><td>40.000</td><td>1.5</td><td>0.060</td><td>0.300</td></tr><tr><td>70.000</td><td>1.5</td><td>0.105</td><td>0.300</td></tr><tr><td>40.000</td><td>2.5</td><td>0.100</td><td>0.300</td></tr></tbody></table>
<table><tr><td>140.000</td><td>2.0</td><td>0.280</td><td>0.300</td></tr><tr><td>60.000</td><td>3.5</td><td>0.210</td><td>0.300</td></tr><tr><td>140.000</td><td>1.0</td><td>0.140</td><td>0.300</td></tr><tr><td>50.000</td><td>100.0</td><td>5.000</td><td>0.300</td></tr></table>

Valve controller power consumption current in active and sleep state is shown in Tab.1. The range of active current $I_w$ is between 20 ~ 140mA, the operating current is 50mA in most of the time and the sleep current is 0.3mA. Total active time is 114.0 ms.

### 4.3 Average energy consumption and the working duration

As the sleep time is set by software, furthermore the different sleep time preprogrammed will affect the energy consumption, we test the different average current under the different circumstance. According to the different average current, we can further compute the number of days that the irrigation controller could operate without external charging at the study.

<table><caption>**Tab.2.** Controller average energy consumption and the working duration</caption><thead><tr><th>T<sub>s</sub> (ms)</th><th>I<sub>wq</sub> (mA)</th><th>I<sub>sk</sub> (mA)</th><th>I<sub>av</sub> (mA)</th><th>P<sub>av</sub></th><th>D(d)</th><th>M(m)</th></tr></thead><tbody><tr><td>10000</td><td>0.586810</td><td>0.297</td><td>0.883</td><td>21.202</td><td>56.598</td><td>1.887</td></tr><tr><td>20000</td><td>0.295068</td><td>0.298</td><td>0.593</td><td>14.241</td><td>84.265</td><td>2.809</td></tr><tr><td>30000</td><td>0.197084</td><td>0.299</td><td>0.496</td><td>11.903</td><td>100.817</td><td>3.361</td></tr><tr><td>40000</td><td>0.147953</td><td>0.299</td><td>0.447</td><td>10.730</td><td>111.832</td><td>3.728</td></tr><tr><td>50000</td><td>0.118430</td><td>0.299</td><td>0.418</td><td>10.026</td><td>119.690</td><td>3.990</td></tr><tr><td>60000</td><td>0.098729</td><td>0.299</td><td>0.398</td><td>9.556</td><td>125.578</td><td>4.186</td></tr><tr><td>120000</td><td>0.049411</td><td>0.300</td><td>0.349</td><td>8.379</td><td>143.214</td><td>4.774</td></tr><tr><td>180000</td><td>0.032951</td><td>0.300</td><td>0.333</td><td>7.986</td><td>150.258</td><td>5.009</td></tr><tr><td>600000</td><td>0.009890</td><td>0.300</td><td>0.310</td><td>7.436</td><td>161.377</td><td>5.379</td></tr></tbody></table>

Tab.2 shows controller average energy consumption and the working duration. The sleep time $T_s$ was default in the program. The table lists 10s to 10 minutes of sleep time. The average energy consumption can be calculated by different time. Can be seen from Tab.2, the longer the sleep time, the longer controller can work. Moreover, the result showed that the 1200mAh battery was sufficient to maintain an irrigation quarter.

The performance of the irrigation controller was analyzed in terms of satisfactory operation of the controller hardware and software. The irrigation controller
performance was considered satisfactory and two batteries would be sufficient to power the irrigation controller during the normal irrigation season. If the sleep time was set at 10min or more, the controller proved to be effective for the actual application in the root zone.

**5. Conclusion**

A Wireless Intelligent Valve Controller for wireless integrated irrigation control system was developed and tested. The controller proved to be reliable, affordable, and effective in practice without hard-wire connections. The wireless intelligent valve controller with control unit, combined with low-power microprocessor chip and a sound external circuit, powered by battery, received control command from remote control center, executed the tasks, such as information acquisition, remote control, parameter setting, state feedback, while the task of valve control must be driven though the relay boost driver unit. The wireless transceiver capabilities reflected in the wireless communication unit. The valve control can be widely used in different irrigation regions.

Wireless intelligent valve controller fully considers the energy in application field, setting the collection/control frequency in accordance with the user demands. Increasing solar power charge unit to controller to ensure the power supply is the next research work. Wireless intelligent valve controller is simple construction, easy maintenance, low cost and has good application prospects.

**Acknowledgements.** This research is supported by National Science and Technology Support Programmed (2008BAB38B03-03), Land Consolidation and Rehabilitation Center of Ministry of Land Resources and Beijing UNISM Technology Co., Ltd for their Technical Support. The authors would like to thank all the members of EU-China Center for Information and Communication Technologies for their assistance.

**References**

1. F.R. Miranda, R.E. Yoder, J.B. Wilkerson, L.O. Odhiambo, An autonomous controller for site-specific management of fixed irrigation systems, Computers and Electronics in Agriculture, 48 (2005) 183-197

2. Iven Mareels, Erik Weyer, Su Ki Ooi, Michael Cantoni, Yuping Li, Girish Nair, Systems engineering for irrigation systems successes and challenges. Annual Reviews in Control, 29 (2005) 191-204

3. B. Cardenas-Lailhacar, M.D. Dukes, Precision of soil moisture sensor irrigation controllers under field conditions. Agricultural Water Management 97 (2010) 666-672

4. S.L. Davis, M.D. Dukes, G.L. Miller, Landscape irrigation by evapotranspiration-based irrigation controllers under dry conditions in Southwest Florida. Agricultural Water Management, 96 (2009) 1828-1836

5. M.S. McCready, M.D. Dukes, G.L. Miller, Water conservation potential of smart irrigation controllers on St. Augustinegrass. Agricultural Water Management, 96 (2009) 1623-1632
6. J.M. Blonquist Jr., S.B. Jones, D.A. Robinson, Precise irrigation scheduling for turf grass using a subsurface electromagnetic soil moisture sensor. Agricultural Water Management, 84(2006) 153-165

7. Zhang Wei, He Yong, Qiu Zhengjun, et al. Design of precision irrigation system based on wireless sensor network and fuzzy control[J]. Transactions of the CSAE, 2009,25(Supp.2): 7-12, (in Chinese)

8. Zhang Junfu, Chen Junqi, Hu Jianfei, Zhao Yandong, Control system of urban green land precision irrigation based on GPRS / SMS and µ C / OS embedded technology. Agricultural Engineering, 2009 (09): p 1-6, (in Chinese)

9. Gao Feng, Yu Li, Zhang Wen'an, Xu Qingxiang, Yu Lijie, Research and design of crop water status monitoring system based on wireless sensor networks. Agricultural Engineering, 2009 (02): p. 107-112, (in Chinese)

10. Shen Changjun, Zheng Wengang, Sun Gang, Yan Hua, Xing Zhen, Development and Application of Low Power Wireless DC Solenoid Valve and Controlling Module. Agricultural Machinery, 2009. 40 (z1), (in Chinese)

11. Liu Hui, Wang Maohua, Wang Yuexuan, Ma Daokun, Li Haixia, Development of farmland soil moisture and temperature monitoring system based on wireless sensor network. Jilin University (Engineering Science), 2008 (03): p. 604-608, (in Chinese)

12. Kuang Qiuming, Zhao Yandong, Bai Chenxiang, Automatic monitor and control system of water saving irrigation. Agricultural Engineering, 2007 (06): 136-139, (in Chinese)

13. Yang Genghuang, Guo Kairong, Ya-Weili, A new automation device for irrigation based on GSM network. Journal of Shenyang Agricultural University, 2005 - 12, 36 (6): 753 - 755, (in Chinese)