CHEMICAL ENGINEERINGTRANSACTIONS
VOL. 64, 2018 / A publication of

The Italian Association
of Chemical Engineering
Online at
Guest Editors: Enrico Bardone, Antonio Marzocchella, Tajalli Keshavarz
Copyright © 2018, AIDIC Servizi S.r.l.
ISBN978-88-95608- 56-3; ISSN 2283-9216

Design of ZIGBEE System for Water Environment Monitoring

Yuchen Jiaa,Mengxuan Cuib, LiminHuoc*

aCollege of Information Science & Technology, Agricultural University of Hebei, Baoding 071001, China

bSchool of Life Science, Beijing Institute of Technology, Beijing, 100081, China

cCollege of Mechanical Electrical Engineering, Agricultural University of Hebei, Baoding 071001, China

The parameters of temperature, pH value, turbidity, oxygen content of water is particularly important for the survival of animals in water. The monitoring of the hydrological environment of the farm and real-time understanding of environmental parameters are conducive to create a more suitable environment for animals’ growth.The author introduces a real-timemonitoring system based on ZIGBEE and mobile communication technology.The system includes a plurality of monitoring points and a terminal platform. Each monitoring point constitutes a ZIGBEE network by a number of sensor nodes, which detects water temperature, pH value, turbidity and oxygen content, and the data collected by the coordinator nodes are transmitted one by one, which is called linear transmission, and finally to the monitoring platform through the mobile communication network.The coordinator and parameter acquisition nodes are star-connected. The coordinator contains display equipment, warning devices, and information transmission module, but the parameter acquisitionnodeseach is made up of a sensor, display equipment, which core board is CC2530.

Keywords: ZIGBEE; The parameters of water; CC2530; Mobile communication

  1. Introduction

The rapid development of industrialization and urbanization has brought serious impacts on the quality of fresh water, especially the rivers and lakes.The vicious changes in the water environment led to the reduction of aquatic species.In recent years, people's water quality requirements are getting higher and higher, and the protection of freshwater organisms are also growing. The monitoring of freshwater environment is the focus, and the environmental parameters are important basis for the treatment and protection of fresh water, and its accuracy plays an important role in the formulation and implementation of protective measures.At present, most of the monitoring of water quality is based on the method of artificial multi-point sampling(KrzysztofUrbaniec, HrvojeMikulčić, Marc A.Rosen, NevenDuić,2017). Although the method is guaranteed in terms of accuracy, it is impossible to implement full-coverage real-time monitoring of large area water due to restriction of sampling time and sampling location.And human costs, equipment costs are relatively high.

With the development of wireless sensors network, the application of electronic equipment and network to carry out large-scale water quality monitoring technology developed rapidly.In 2004, the Australians developed, installed and improved a wireless sensor for ocean monitoringNetwork (R. Shokri, M. Poturalski ,G. Ravot ,P. Papadimitratos ,J.–P, 2009).Compared to conventional marine inspection tools, the wireless sensor network can run automatically. By adjusting its measurement tasks, data processing and network communication frequency, it can adapt to a variety of work environment, and make the ocean researchers to get more space distributed data.In 2002, University of Pennsylvania in the United States designed a wireless sensor network system monitoring lake or reservoir PH indicators (Szewczyk R. et al, 2004).Each node contains the environment sensor and plays the role of data routing, and use sound waves to achieve the communication between the underwater nodes.In the application of wireless sensor networks, there have been some problems. Due to the collection points are too much and large amount of data are collected, real-time data upload will bring the network congestion.In addition, if each monitoring unit communicates with the server directly, the workload of the server is too large, it will inevitably lead to network congestion; if upgrade server configuration, it will make the system cost-effective decline.

Optimizing the network communication to achieve a more cost-effective system is the focal point of this design.Another focal point of this design is the construction of water quality monitoring unit.It consists of four types of nodes: water temperature, PH value, turbidity and oxygen content, whichmake up a cluster in the networkbased on energy balance. In order to reduce the amount of information sent to achieve the purpose of saving energy, set thresholds in the collection nodeaccording to the water quality.Water quality monitoring system based on ZIGBEE is shown in Figure 1.

Figure 1Water quality monitoring system based on ZIGBEE

  1. Construction of Monitoring Nodes Based on ZIGBEE

ZIGBEE is a low-cost, low-power, wireless mesh network standard targeted at the wide development of long battery life devices in wireless control and monitoring applications.The ZIGBEE network layer natively supports both star and tree networks, and generic mesh networking(CAGD Silva,ELD Santos,ACK Ferrari,2017). Every network must have one coordinator device, tasked with its creation, the control of its parameters and basic maintenance(J Luo, 2017).

The design of the monitoring unit consists of four types of 17 nodes, which are water temperature sensor, PH sensor, turbidity sensor, oxygen content sensor, built as a network with ZIGBEE protocol, andthe frequency band is 2.4GHz.Each type of sensor node has four, as the data acquisition end node upload data to the coordinator, constitute a star topology.

2.1Design of Endnotes

The hardware of everyend node usually has the conditioning module, the power module, the wireless communication interface module and the processor module, in order to realize the basic data gathering, analysis, processing and transmission.Hardware structure is shown in Figure 2.

Figure 2 Hardware structure

The conditioning module is mainly to pre-process the signal collected by the sensors.For example, the output signal from PH electrode is too weak and very complex, and it needs to be removed the noise, to be amplified and to be conversion, in order to tune into a signal that the processor can recognize.This system uses the E-201-C sensor produced by Raytheon.Theoutput of the pH electrode is a weak voltage range between -450 and 450 mV. The signal is linearly processed by the conditioning module to obtain a signal range between 0 and 3V in order to A /D conversion.The end node's processor and information delivery device uses the CC2530EB, a truly IEEE-enabled 802.15.4 system that supports proprietary IEEE802.15.4 and ZIGBEE, ZIGBEE PRO and ZIGBEE RF4CE standards(WWF (World Wide Fund for Nature), 2016).In order to save energy, it sets to RFD (Reduced Function Device), using 3V button battery-powered, equipped with TI Z-Stack 2.3.1, using on-chip RF to send data to the coordinator, operating frequency of 2.4GHz.After the A/D conversion which is carried out by the end node, the data is sent to the sending buffer according to the communication protocol, and then sent to the CC2530 through the serial port, and the CC2530 processes the data and sends it to the coordinator through RF.

In order to save energy, in the software design, the end node set two types of threshold.The first is the data threshold.When more than 10 sets of the same data are collected, the node enters the sleep state for 60 minutes. The second is the data transmission threshold. When the collected data is within a certain range, it stops to send data to the coordinator. Such as the collection of pH values, when the pH value is between 6.5 and 7.5, the data sending is stopped.The data processing flow after the end node joins the network is shown in Figure 3.

Figure 3 Signal processing flow in the end node

2.2Design of Coordinator

The coordinator is responsible for identifying the terminal node and assigning the channel and network PAN ID to the end node.It is the core of the star topology network,hardware ofthat is CC2530, equipped with TI Z-Stack 2.3.1, and set to FFD (Full Function Device).The coordinator receives data from sixteen nodeswhich is divided into four categories, each of which collects the same type of data, and it requires the first level of data fusionto obtain the effective value of such parameters; for different types of data, it needs to be carried out the second level of data fusion, in order to obtain the comprehensive assessment of the water quality of the region. Therefore, in addition to building ZIGBEE network, the coordinator also needs to integrate the data of the collected data, in order to reduce the amount of data and to ensure the rate of data transmission and real-time(Mingyang Zhang, Mingyu Shen, 2013).Taking into account the ZIGBEE node energy consumption constraints, the first level of data fusion uses the algorithm of statistical average, and the second level of data fusion uses the algorithm of adaptive weighting and fuzzy comprehensive evaluation.

The first level data fusion calculates the statistical average and standard deviation of each type of data from sensors, and the statistical average is taken as the sample of the second level data fusion, and the standard deviation is used as the basis for the second level of data fusion.If the standard deviation exceeds the allowable value, it is not necessary to carry out the second level of data fusion, and directly send the sensor data to the monitoring platform(Chen Sha, Gao Hongju, 2016).The formula for the first-level data fusion is shown as (1) and (2).

(1)

(2)

Where, n is the number of sensors and x is the data matrix.

The fuzzy comprehensive evaluation model was established by adding the weight coefficient to the water temperature, oxygen content, pH value and turbidity as the evaluation index. The evaluation results (excellent, good, medium and poor) were uploaded. If the evaluation is excellent, the coordinator sleeps for 30 minutes; if the evaluation is poor, the sensor data is uploaded. The process of fuzzy comprehensive evaluation is:

1) Standardization of evaluation index data. Water temperature, pH value and turbidity are intermediate indicators, and oxygen content is a very large indicator. Each takes four sets of data, and get a set of evaluation indicators:

(3)

2) Determine the weighting function. The statistical average and standard deviation of the first level are introduced into the weighting function as their dynamic parameters.The dynamic weighting function is the partial normal distribution function and it is as (4).

(4)

3) After experimental analysis, it identifies as fuzzy operator.

4) In accordance with the principle of maximum membership to make a comprehensive evaluation, the results of the judge S is:

(5)

The method of fuzzy comprehensive evaluation is used to fuse the data, which obviously reduces the amount of data transmission and has a significant effect on extending the life cycle of the network.

2.3Experimental test

Three samples were tested, which are pure water, rain water,vinegar water and Alkaline water.Ten sets of data were tested and one of them was extracted, as shown in Table 1.

Table 1: Test data for three types of water samples

Sample / TEM/ oC / pH / Turbidity / DO/(mg/L) / Result
Pure water / 21.2 / 7.07 / 721 / 1.10 / Excellent
Rain water / 16.5 / 6.13 / 656 / 1.01 / Medium
Vinegar water / 23.2 / 3.58 / 630 / 1.02 / Poor
Alkaline water / 24.7 / 8.24 / 670 / 1.20 / Poor

According to the test results, it can be seen that the results of acidic water and alkaline water evaluation are poorto the evaluation of drinking water standards, and it this is in line with the actual situation.In addition, the deviation of the data is analyzed to verify the accuracy and credibility of the test data. The deviationof pH of pure water analysis is shown in Table 2.

Table 2: pH deviation analysis

1 / 2 / 3 / 4 / 5 / 6 / 7 / 8 / 9 / 10
PH / 7.06 / 7.03 / 7.10 / 7.07 / 7.06 / 7.04 / 7.13 / 6.87 / 6.98 / 7.01
deviation / 0.86% / 0.43% / 1.43% / 1.00% / 0.86% / 0.57% / 1.86% / 1.86% / 0.29% / 0.14%
  1. The formation of communication network

According to the design goal, the system can be applied to the lake, river, reservoir and other environments, which geographical area is relatively wide and terrain is complex, and it needs to deploy multiple monitoring units,which require a stable and reliable communication network. The ZIGBEE data acquisition unit set up above is battery powered and the energy is limited. At the same time, the coordinator node takes into account the work of data fusion, and the energy consumption in data communication is more limited. Therefore, in the formation of communication network, it also needs to consider the issue of energy consumption. In the construction of communication network, it uses stratified multi-hop routing protocolaccording to the distance, and it designs an opportunistic routing algorithm based on the shortest path and the residual energy of the node. The coordinator becomes the routing node, and the sink is composed of the LTE module.

Routing design is based on EXOR (extremely opportunistic routing).EXOR is the first program for opportunistic routing, which is an opportunity routing algorithm based on end-to-end shortest path ETX value (Zhang R, Gorce JM, Jaffrès-Runser K, 2009).The basic idea is that the source node wants to send data to the destination node, which first selects the shortest ETX to the destination node which is smaller than its own node as an alternative forwarding node to form an alternative forwarding node set, and then set the priority according to its distance to the destination node,the closer the destination node is, the higher the priority is.The packet carries the alternate forwarding Node IDs which are arranged in the order of priority.The source node broadcasts the packets in batches, and the neighbour nodes that received the packets forward the data in the order of priority.If the candidate node with the highest priority is forwarded, the low priority node will not forward the packets again.Instead, it will send the local storage and the higher priority node has not succeeded Send the packet.Each candidate forwarding node forwards this way until the destination node receives most packets, and the remaining packets are forwarded according to the traditional shortest route.

Since EXOR is the whole network broadcast, the candidate node set is large, the system carries on the stratification to the deployed node set, the EXOR carries on the node candidate only in this layer.In addition, the residual energy is used as another index other than the distance, and if the remaining energy is smaller than the threshold value of the forwarding data, the forwarding path is changed.EXOR energy model is shown in Figure 4.

Figure 4EXOR energy mode

In this energy model, when the node passes the path of distance s, the energy to be consumed by sending k data can be calculated by:

(6)

(7)

(8)

Based on the residual energy, an energy-based forwarding threshold is given.Where the weight of the energy variable PE is an adjustable value of 0-1.

(9)

WhereETX is the number of packets for the node, and RE is the residual energy, and ME is the maximum energy of the node.

The simulation experiment is carried out with 10 forwarding nodes as an example, and the obtained path is shown in Figure 5.

Figure 5 Forward the path map

According to the above route routing algorithm, the forwarding path is S-2-3-7-8-10.The application of opportunistic routing with energy threshold has practical significance for the number of routing nodes and the reduction of energy consumption.

  1. Conclusions

The water quality monitoring system based on ZIGBEE, which aims to improve the precision of water quality detection, has been improved in the software design.The data threshold is added to the program in the sensor acquisition node, reducing the number of redundant data sent.In the design of the coordinator node software, the fuzzy comprehensive evaluation algorithm is applied to the data fusion, which realizes the preliminary processing of the data and reduces the amount of data sent to the sink node.The role of data processing is to reduce the energy consumption of the node, extending the node's life cycle.The routing algorithm based on the shortest distance and the residual energy is designed to improve the throughput of the network and extend the network life cycle.

Acknowledgments

This work is supported by Baoding Science Technology Research and Development Guidance Program (15ZG023).

Reference

Chen Sha, Gao Hongju, 2016, In Network Data Fusion for Agricultural Information on Wireless Sensor Nodes Based on JN5139,Journal of Agricultural Mechanization Research, 38(5)

KrzysztofUrbaniec, HrvojeMikulčić, Marc A.Rosen, NevenDuić,2017, A holistic approach to sustainable development of energy, water and environment systems, Journal of Cleaner Production, Volume 155, Part 1, 1-11

Luo J., 2017, A ZigBee and Sip-Based Smart Home System Design and Implementation,International Journal of Online Engineerin,13(1),42-60

Mingyang Zhang, Mingyu Shen, 2014,Research of WSN-based data fusion in water quality monitoring. Computer Engineering and Applications,23,108-119

Shokri R., M. Poturalski, G. Ravot , P. Papadimitratos,J.–P, 2009,A practicalsecure neighbour verification protocol for wireless sensor networks,Proceedingsofthe2ndACM Conference on wireless Network Security,192 – 200

SilvaC.A.G.D.,ELD Santos,ACK Ferrari,2017,A Study of the Mesh Topology in a ZigBee Network for Home Automation Applications, IEEE Latin America Transactions, 15(5), 935-942

Szewczyk R. et al, 2004,Lessons from a Sensor Network Expedition,Proceedings of the1stEuropean Workshop Wireless Sensor Networks,307- 322

WWF (World Wide Fund for Nature), 2016, Z-Stack - ZigBee< accessed 20.01.2016

Zhang R, Gorce JM, Jaffrès-Runser K, 2009,Low bound of energy-latency trade-off of opportunistic routing in multi-hop networks, IEEE Computer Society Press, DOI: 10.1109/ICC.2009.5199148