# Design of Fuzzy Drip Irrigation Control System Based on ZigBee Wireless Sensor Network

Xinjian Xiang

► To cite this version:

Xinjian Xiang. Design of Fuzzy Drip Irrigation Control System Based on ZigBee Wireless Sensor Network. 4th Conference on Computer and Computing Technologies in Agriculture (CCTA), Oct 2010, Nanchang, China. pp.495-501, 10.1007/978-3-642-18333-1_58. hal-01559569

HAL Id: hal-01559569

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

Submitted on 10 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
# Design of Fuzzy Drip Irrigation Control System Based on ZigBee Wireless Sensor Network

Xinjian Xiang

College of Automation & Electrical Engineering, Zhejiang University of Science and
Technology, Zhejiang, P. R. China

Email:hzxxj@sina.com

## Abstract

To improve agricultural water resources' utilization, crop's automatic, locate, time and appropriate drip irrigation is a good choice. In this paper, an automatic control drip irrigation system based on ZigBee wireless sensor network and fuzzy control would be introduced. System uses CC2430 for wireless sensor network node design, collecting soil moisture, temperature and light intensity information and sending the drip irrigation instructions by the wireless network. System put this three soil factors input fuzzy controller, created fuzzy control rule base and finished crop irrigation time fuzzy control. This paper mainly describes system's hardware structure, software design and working process. The system with the characteristics of economical, reliable communications and high accuracy control, could improve agricultural drip irrigation water using efficiency and the automation level.

**Key words:** Drip irrigation, ZigBee wireless sensor network, Fuzzy controller, Drip irrigation automation

## 1. Introduction

Agricultural water low use efficiency, shortage and waste are big problem of currently development of irrigated agriculture. Drought is the major environmental stress factors for crop growth, which is more than all other factors' sum up[1]. Drip irrigation is a system that directly supply filtered water, fertilizer or other chemical agents to soil with slow and regular drip through the trunk, branch and capillary on the emitter under the low-pressure. It's utilization of water could up to 95%, Drip irrigation is an important technology in irrigated agriculture and the ideal solution to resolve the effects of drought. Over the years, most of our drip irrigation system controlled by manually experience without real-time data collection and analyze, drip of arbitrary is large. Thereby, study of automatic drip irrigation system has a great significance.

Implementation of irrigation automation requires as following [2-3]:

1) the accurate collection of crop water requirement;

2) the remote information transmission technology for water demand information and the control;

3) drip irrigation control decision-making.

Many researches carried out at home and abroad. However, there is still clearly insufficient with 2) and 3) for application:1) Currently most of drip irrigation control systems work with serial bus or field bus technology, the wiring inconvenience and high cost, longer time-consuming make it is hard to promote in practice [4]. 2) Automatic drip irrigation as a complicated system, Irrigation decision-making affected by soil, crops and the environment's multi-sensor information. There is still a lack of appropriate control strategies [5]. In recent years, with the development of wireless information transfer technology, ZigBee wireless network with its low-power, low cost, low rate, close, short latency, high-security features get attention in agricultural production. Scholars begin to study the drip irrigation system with wireless technology. However, in these drip irrigation systems, ZigBee wireless sensor network is mainly used for collecting soil, crop or environmental information, providing drip irrigation decision-making. Information collection and automatic irrigation control integrated system based
on ZigBee technology is rarely. Fuzzy control for the many complex and difficult to establish accurate mathematical model system control provides a solution, it's study about drip irrigation only consider the soil moisture information as fuzzy inputs, neglected crops and environmental information, which cause the decision-making is not accurate enough.

To this end, a design of fuzzy drip irrigation control system based on ZigBee wireless sensor network is provided. The system consists of low-power wireless sensor network node with self-composed ZigBee network formation, avoiding the inconvenience of wiring and poor flexibility shortcoming, achieving continuous online monitoring of soil moisture. System uses soil moisture, temperature and light intensity information for fuzzy decision-making, and completes the fuzzy control of drip irrigation automation. It would improve irrigation water use efficiency, ease the growing tension of water resources conflicts and provide a good growing environment for the crop.

## 2. System hardware design

### 2.1 System composition

System based on ZigBee wireless network, is made up of drip irrigation system, ZigBee wireless network nodes and monitoring center. Due to real-time monitoring information of soil moisture, temperature, light intensity and the crop water use law, implement of automatic drip irrigation with fuzzy control strategy, as shown in Figure 1.

### 2.2 Drip irrigation system design

For drip irrigation requirements, throttle, filters, and pressure gauge should be installed at the water source. System use PVC Φ32 mm for main pipe, PE Φ20 mm for branch, with pressure compensation emitter, one plant with a drip emitter embedded in the branch. Front-end of branch connected solenoid valve with 24 V DC, flow rate of 2.3L / h, and pressure gauge. Branch spacing can not be too small for preventing interference between lines caused by water infiltration, and initial set line spacing to 1 m. Soil moisture sensor buried under the roots of the plant near the surface, light intensity sensors and temperature sensors fixed to the side of the pole on the plant. Sensor signals input CC2430 to constitute the measurement of soil moisture ZigBee wireless sensor network node. Each solenoid valve coupled to the CC2430 ZigBee module circuit, composed of drip irrigation control wireless sensor network node

### 2.3 ZigBee wireless network node design

ZigBee wireless sensor network using star network topology. Node is divided into three categories: sensor node, controller node and routing node. In the design, three kinds of nodes all use TI's CC2430 as a common core module, and different expansion modules, as shown in Figure 2. CC2430 with strong function and rich

on-chip resource, only need few external components can be achieved with the signal transceiver functions, which made the hardware design for three kinds of nodes are very simple, reliable and practical.

#### 2.3.1 Design of ZigBee wireless sensor network node for soil moisture measurement

Sensor nodes connected with the soil moisture sensors is used to read and transfer sensor information. Soil moisture sensor nodes' spatial arrangement will be optimized according to crop type, soil type, terrain conditions and reliable signal transmission requirements. It includes Soil moisture sensors STHO01, digital temperature sensor DS1802B and photosensitive resistance P9003. STHO01 soil moisture sensor measurement accuracy of ± 3%, range 0 to 100%, output signal 4 ~ 20mA, operating voltage 12V DC, stabilization time after power 2 s, can meet the requirements of real-time monitoring. The output signal change to 0 ~ 5 V voltage through the high-precision resistor, then converted into digital signal by the CC2430 AD module, soil moisture can be determined from different voltage amplitude. STHO01 should be buried in the ground, the location and
drip irrigation start time is close to the data accuracy and time. General crop root depth of 10 ~ 20 cm, Drip Irrigation humid time of 5 min-30 min, thus burying depth of the sensor is set to 15CM, open time is set to 20min after drip irrigation. Signal reception and transmission by the antenna. Each sensor node is powered by solar cells, and the battery voltage is monitored at any time, once the voltage is too low, the node will send a low voltage alarm signal, then the node run into sleep mode until it is fully charged.

### 2.3.2 Design of ZigBee wireless network drip control node and routing node

Control node is connected with the irrigation control panel to control the open/close head of drip irrigation and valve through Timer based on fuzzy control strategy. In addition, the control node has the interrupt response capability to deal with control commands from the computer. As the irrigation control panel and electric control valves use electricity supply, so does the control node. Between the core module and the irrigation control panel using optocouplers in order to avoid strong electrical interference.

<figure><img src="image_2.png" /><figcaption>Fig. 1 System diagram</figcaption></figure>

<figure><img src="image_3.png" /><figcaption>Fig 2 Structure of wireless sensor network node</figcaption></figure>

System's routing nodes create a multi-hop network in self-formation. Sensor nodes distributed in the monitoring area, sent the collected data to the wireless routing node nearby, then routing node selects the best route according to the routing algorithm to establish the appropriate routing list. Routing node connect with base station for address allocation, management, monitoring, signal transmission and reception between the sensor node and control node. The routing node sends a data read command to sensor node every 20 min, and upload the receive data through the serial port to the base station computer.

## 3. System Software Design
## 3.1 Fuzzy control strategy design

The crop's water requirement is related to soil moisture index, meteorological conditions (radiation, temperature, etc.), crop type and growth stage. Therefore, the system chooses soil moisture, temperature and light intensity as the fuzzy controller input. Fuzzy controller input for soil moisture (WH), temperature (WT) and light intensity (WL), the output for the irrigation time (WT), as shown in Figure 3. In order to ensure appropriate accuracy, four variables are defined five linguistic variables: very light (VL), light (L), middle (M), heavy (H), very heavy (VH). In the choice of membership function (MF), triangular MF is simple, computationally efficient, especially for applications that require real-time implementation of the occasion, so the system using triangular MF fuzzy: translate the variable's exact value into fuzzy linguistic variable value in the appropriate domain, that determine input/output range and the domain of fuzzy linguistic variables. Fuzzy Reasoning: knowledge-based reasoning by a certain mechanism, get the fuzzy output value from the fuzzy input. Inference rule is summarized by experience get "IF-THEN" statements express, such as experience, when the soil moisture below the lower limit, indicated that the soil is extremely dry at this time regardless of the level of other inputs, crops need a lot of irrigation, written in fuzzy reasoning Rules that "if WT is VL then WT is VH". In practice, different situations also need to adjust the rules, and gradually create the best irrigation scheme. Ambiguity: According to the results of fuzzy reasoning by multiplying the scale factor, get the exact output amount needed to control the system. In this system, the center of mass defuzzification method is used to obtain the irrigation control valve opening time.

<figure><img src="image_4.png" /><figcaption>Fig3 Structural principle of fuzzy controller</figcaption></figure>

## 3.2 Node software design

In the irrigation control system, monitoring data and control commands are transmit in the wireless sensor nodes, wireless control node, the wireless routing nodes and the monitoring center. Sensor nodes and control nodes turn on the power, initialization, and get in sleep after the establishment of links. When the routing node receives an interrupt request, activate the sensor nodes and control nodes, send or receive packets, continue into hibernation after processing, waiting for a request to activate again. In the same channel, only two nodes can communicate through the competition to get the channel. Each node periodically in sleep and monitor mode, taking the initiative to seize the channel when the channel is idle, and retreat for some time based on backoff algorithm to re-monitor channel state when the channel is busy. In the programming design, system mainly uses interrupt method to complete send and receive message.

## 3.3 PC monitoring software design

Monitoring software plays a vital role in this system, written using VC #, through the monitoring software to achieve the ZigBee network monitoring, information extraction, fuzzy control calculation and control output functions. First, the software shows the topology of wireless networks, after confirmation system begin to receive node sensor signal in scheduled, the signal can be displayed in two ways: numerical display and curve display, collection steps can be set to 20min, then finish fuzzy control calculation according to fuzzy control method, output control node signal and control the electromagnetic valve's switching time. The sensor signals
and output control signals can be timed automatically saved and exported to the interface for observation and comparison.

## 4. Application and validation

System's initial test is in the vineyard's drip irrigation. The vineyard uses fixed ground drip irrigation system, each block with a main pipe and some branch comb pipes, electric control valves installed at the end of the main channel, each electronic control valve connect with a wireless sensor network controller node which control the block's drip time. In the experiment, four blocks are selected, around the block controller node distance 70 ~ 120 m, while the sensor nodes are distributed in an approximate square area around the block (each block containing 1 to 3 sensor nodes), while the base station (router nodes) farthest away from the node 250 m. Experiments show that nodes with distance of 200m, the single communication error rate is less than 2%. System using repeated comprehensive judgments to improve the reliability of communication. In addition, the electronic valve control accuracy, and system run in good condition overall.

## 5. Conclusions

In this paper, an automatic control drip irrigation system based on ZigBee wireless sensor network and fuzzy control had been proposed. System uses high-precision soil moisture, temperature and light sensors with low-cost, low power ZigBee wireless communication technology to monitor soil moisture on line, fuzzy control implementation of soil moisture and crop water use rules which are difficult to establish accurate mathematical model for drip irrigation automation. The design avoids the inconvenience of wiring, and improves the flexibility and maneuverability of water-saving drip irrigation control system. Not only can effectively solve the agricultural irrigation water use, ease the growing tension of water resources conflicts, but also provide a better growing environment for the crop, give full play to the role of the existing water-saving devices, optimal scheduling, improve efficiency, so drip irrigation is more scientific, convenient, enhance the management level. The system also supports remote setting of parameters and control for a variety of crops, can increase crop yield, reduce the cost of agricultural drip irrigation, improve the drip irrigation quality, has great value in applications.

## Acknowledgement

This material is based upon work funded by Zhejiang Provincial Natural Science Foundation of China under Grant No. Y108268.

## References

[1] Fang Xujie, Zhou yiming, Cheng Wenliang, "he design of ireless intelligent irrigation system based on ZigBee technology", Journal of Agricultural Mechanization Research, 2009(1).pp.114-118.

[2] Xie Shouyong, Li Xiwen, "Design and implementation of fuzzy control for irrigating system with PLC", Transactions of the CASE, 2007, 23(6), 208-211.

[3] Jin Zhaorong, Xu Minjie, Wei Xueliang, "Study and design of spraying irrigation automatic controller based on fuzzy decision", Drainge and Irrigation Machinery, 2004, 22(5), pp.26-28.

[4] Jiang Ming, Chen Qigong, Yan Xingfang. "Precision irrigation system based on fuzzy control", Transactions of the CASE, 2005, 21(10), pp.17-20.

[5] Yang Ximin, "Research on power consumption in sensor network", Microcontrollers & Embedded Systems, 2006(.1), PP. 27-29.