CHEMICAL ENGINEERING TRANSACTIONS VOL. 51, 2016 A publication of The Italian Association of Chemical Engineering Online at www.aidic.it/cet Guest Editors: Tichun Wang, Hongyang Zhang, Lei Tian Copyright © 2016, AIDIC Servizi S.r.l., ISBN 978-88-95608-43-3; ISSN 2283-9216 Design of Agricultural Internet of Things Monitoring System Based on ZigBee Ziang Zhou*, Kun Xu, Dingyun Wu College of Mechanical and Electrical Engineering, Zhoukou Normal University,Zhoukou,Henan, ,China,466001 zzang66@126.com The main purpose of this paper is to design a smart wireless sensor network (WSN) for an agricultural environment. The WSN is designed for supervising and controlling the variegated factors such as humidity, water level, temperature and human machination. The WSN using ZigBee as the transmission medium consists of end devices with sensors, routers that propagate the network over larger distances, and a coordinator that communicates with the computer, which in turns illustrates the data and controls the entire system. Sensors gather the various agricultural factors in real-time and transmit it using Internet of things, which collaborates with one another to perform action on behalf of people to reduce or eliminate the need of human labour. As part of the investigation, extensive studies were proposed a wireless sensor network nodes deployment strategy for digital agricultural data acquisition, and performed to analyse collected data. 1. Introduction Wireless sensor networks (WSN), sometimes called wireless sensor and actuator networks (WSAN) (Akyildiz et al., 2004), are spatially distributed autonomous sensors to monitor physical or environmental conditions, such as sound, temperature, pressure, etc. and to cooperatively pass their data through the network to a main location. The more modern networks are bi-directional, also enabling control of sensor activity. The development of wireless sensor networks was motivated by military applications such as battlefield surveillance; today such networks are used in many industrial, agricultural and consumer applications, such as industrial process monitoring and control, machine health monitoring, agricultural greenhouse monitoring and so on. The WSN is built of "nodes" – from a few to several hundreds or even thousands, where each node is connected to one (or sometimes several) sensors. Each such sensor network node has typically several parts: a radio transceiver with an internal antenna or connection to an external antenna, a microcontroller, an electronic circuit for interfacing with the sensors and an energy source, usually a battery or an embedded form of energy harvesting. A sensor node might vary in size from that of a shoebox down to the size of a grain of dust, although functioning "motes" of genuine microscopic dimensions have yet to be created. The cost of sensor nodes is similarly variable, ranging from a few to hundreds of dollars, depending on the complexity of the individual sensor nodes. Size and cost constraints on sensor nodes result in corresponding constraints on resources such as energy, memory, computational speed and communications bandwidth. The topology of the WSNs can vary from a simple star network to an advanced multi-hop wireless mesh network (Akyildiz et al., 2004). The propagation technique between the hops of the network can be routing or flooding. Typical multi-hop wireless sensor network architecture is shown in Figure 1. ZigBee is an IEEE 802.15.4-based specification for a suite of high-level communication protocols used to create personal area networks with small, low-power digital radios. The technology defined by the ZigBee specification is intended to be simpler and less expensive than other wireless personal area networks (WPANs), such as Bluetooth or Wi-Fi. Applications include wireless light switches, electrical meters with in- home-displays, traffic management systems, and other consumer and industrial equipment that requires short- range low-rate wireless data transfer. DOI: 10.3303/CET1651073 Please cite this article as: Zhou Z.A., Xu K., Wu D.Y., 2016, Design of agricultural internet of things monitoring system based on zigbee, Chemical Engineering Transactions, 51, 433-438 DOI:10.3303/CET1651073 433 Figure 1: Typical multi-hop wireless sensor network architecture The ZigBee network layer natively supports both star and tree networks, and generic mesh networking. Every network must have one coordinator device, tasked with its creation, the control of its parameters and basic maintenance. Within star networks, the coordinator must be the central node. Both trees and meshes allow the use of ZigBee routers to extend communication at the network level. ZigBee supports three topologies are illustrated in Figure 2. Figure 2: Three ZigBee topologies This work is organized as follows. Section 2 describes related work. In Section 3 we explain hardware and software structure of the monitoring system. In Section 4 wireless sensor network nodes deployment strategy for digital agricultural data acquisition is proposed, especially drawing some conclusions through analysing collected data. In Section 5 we conclude this paper. 2. Related work Wireless sensor networks based on ZigBee technology are used in many industrial and civilian domains. Lately, there has been significant interest as regards agricultural monitoring and water resources management (Wang et al., 2006). Additionally, several studies and applications have been carried out in a greenhouse settlement and to monitor the environmental changes during all stages of development of agricultural products (Zhu et al., 2006). The low power consumption has been another major point of focus. Although the ZigBee modules are low power, the sensors being placed in nodes tend to increase consumption dramatically. A lot of work has been done as concerns power consumption focusing on the improvement of circuits and algorithms (Wark et al., 2007; Pawlowski et al., 2009). Additionally the validity and data packet loss during wireless communication is investigated (Skrzypczak et al., 2009). Agriculture has always been accorded an important position in China. Agriculture in China was incomparable with other countries. But due to education system and modernization our traditional agriculture system has decayed. Song (Song et al., 2010) illustrates the rapid deployment of sensor nodes during volcanic ejections. It also describes attaining real-time outrageous fidelity node, remote configurability and high degree of durability. The design system distribution verifies the working of low cost sensor network, efficiently working in peculiar environments. Meticulous timing is necessary for employing the material and spatial equivalence of signals. It helps to differentiate seismic and volcanic activities through usage of specific sensors. 434 3. Proposed monitoring system design The agricultural monitoring system with wireless sensor networks is deployed at agricultural site and developed for agriculture monitoring. Low power sensor network measures temperature, humidity and light intensity through wireless sensor nodes equipped with different sensors. Collected data by the sensors and the data is send to the base station. The base station will analyse the received data. Figure 3 shows the basic topology used for the implementation of monitoring system. Figure 3: The basic topology of monitoring system The coordinator corresponds with the base station through serial communication RS232. The base station in turn analyses and stores the incoming from the nodes data. It also manages the control signals that regulate the sensors’ sampling rate. The coordinator and the end-devices do not use clock units since a real-time clock is incorporated in the system. Knowledge of the precise time is important so as the base station to be able to check for the on-time arrival of all the packets, through the coordinator. The router is placed to extend the range of the wireless network while end-devices can be connected directly to the coordinator or to a router. The end devices, which are scattered in the field, contain the temperature and humidity sensors. The most important characteristic of the network is the bidirectional communication by ZigBee technology. 3.1 Hardware A portable end-device was designed and developed consisting of a temperature sensor, a humidity sensor, a gas sensor, a water level detector and a microcontroller with a ZigBee module. End-device block diagram is shown in Figure 4. Figure 4: End-device block diagram 435 The humidity sensor is based on the gypsum block with embedded electrodes, aiming simplicity and low cost. The ZigBee module used in these experiments was the eZ430-RF2480 by Texas Instruments. This is a complete wireless development tool that includes the ultra-low power microcontroller MSP430 and the low power transceiver CC2480 at 2.4 GHz. The circuit for the humidity sensor consists of a Wien-Bridge oscillator followed by a peak detector and a Non- Inverting amplifier with an adjustable gain and dc offset as shown in Figure 5. Figure 5: Circuit for the humidity sensor The output voltage of the second op-amp depends on both the values of the resistor R7, which controls the current supplied to the sensor and the resistance of the humidity sensor. As the ground humidity increases, the resistance of the sensor decreases, resulting in a lower voltage swing on the output of the amplifier. The peak detector then produces a dc voltage based on the negative peak of the signal while the non-inverting amplifier that follows can be adjusted to give an output of 0-2V for the lowest and the highest humidity level respectively. 3.2 Software Software of monitoring system is divided into three parts: coordinator approach, end-device approach and computer analysis approach. Coordinator approach is applied to the end devices and the coordinator. Firstly, varying parameters are initialized including the communication of the microprocessor, the adjustment of serial communication parameters and the offset of A/D converter. Subsequently, the coordinator seeks for end-devices or routers to be added to the wireless sensor network. For the addition to take place the end-devices need to have the identical key that has been defined to each one of them during their programming. This key may be changed by the coordinator and is not a matter of ultimate security. Subsequently, it will check whether all nodes have sent their data packets at the pre-set time points. End-device approach is used by each end-device. At the beginning, the appropriate initialization is performed. The key point during this process is the initialization of the analog to digital converter and the setting of the appropriate activation of all channels that have sensors. Afterwards, each end-device seeks a coordinator or a router, depending on the way they have been designed to get connected. Following confirmation, the end- device may join the wireless sensor network using the identical key. Afterwards, the temperature and humidity sensors are being “read”. Finally, the data is being send through ZigBee transmission to the coordinator or the router accordingly. As mentioned above, in the process of the coordinator, the end-device is awaiting for the coordinator to confirm receipt of the packets, within a certain time frame. In case no confirmation is received, the end-device re-sends the packet that has been placed in a stack. Each end-device uses interrupt for the receipt of data from the coordinator without continuously occupying the processor. Upon receipt of a data packet it checks which process the packet is referred to. One of these processes is the parameter adjustment, such as controlling the sampling rate. Finally, it checks whether the coordinator asks for re-transmission. Subsequently it completes the circle by checking once again its status within the network and proceeds repeating the above process Computer analysis approach running on the base station is illustrated in Figure 6. 436 Figure 6: Block diagram of computer analysis algorithm At the beginning, the GUI window, where all measurements will be illustrated, is initialized. Following that, the serial communication with the coordinator is initialized too. Data processing is taking place right after the data reading through serial communication and before sending the data to the coordinator. The main advantage of the programme is the use of multithreading technique. One thread is being used for graphic display and another thread for processing of data and serial communication. Both threads are getting coordinated by the central thread and communicate each other. In this way, the GUI illustration processes do not engage the flow of main algorithm utilizing properly the remaining computer power. 4. Data acquisition and data analysis for digital agricultural data China's agriculture has characters such as geographically dispersed, diverse objects, biological variation and uncertain environmental factors. According to China's topography, climate truck characteristics and the regional agricultural economic development in different ways. Based on the principle of ZigBee networking, the structure of digital agricultural data acquisition should be linear network structure, planar network structure or space network structure. Linear network structure is a simply network can be used in rectangular greenhouses’ digital agricultural data acquisition. The entire network, only a single path, determines the number of nodes equal to network layers or hop. Planar network structure such as large-scale farmland, pasture is complex, due to the multi-path network; scanning time analysis is also more complicated, this paper takes square instead of round for a brief analysis. Space network structure is more complex. It is conceivable that in the N-storey orchard, each storey with n blocks of terrace set one node. Through data analysis for collected data by the monitoring system, we draw the conclusions as follows: For linear network structure, a single slip of linear network has maximum capacity of 76 nodes in the 20s scanning cycle, and to minimize hops help increase network capacity. For planar network structure, the central node should set at the center of the network topology as much as possible, the more close to the edge, the longer scanning time, and in the limited scan time, the whole capacity of the network will become even smaller. For space network structure, the system performance of space network structure is relate to each layers’ node number. In order to increase the network capacity, every layer’s node number should be limited. 437 5. Conclusions The automated agricultural system is used to proliferate the growth and flourishing of the cultivation crops. This can be done by the efficient surveillance of the environmental conditions as well as the agricultural factors necessary for the flourishing of the vegetation. ZigBee based agriculture monitoring system as a reliable and efficient system for efficiently monitor the environmental conditions. In this paper, a wireless sensor network based on ZigBee that includes confirmation of valid data transmission from the base station is presented, it can be used to monitor the environmental conditions and providing information to observer. At the same time, ZigBee network nodes deployment strategy is very important in the process of build digital agricultural data acquisition network. We draw some conclusions for network structure, it will contribute to reduce the workload of optimize network deployment and build flexible network. Acknowledgements This paper was supported by Henan Science and Technology Research Project in 2014. Project Number is 142102110176. Reference Akyildiz I., Kasimoglu I., 2004, Wireless Sensor and Actor Networks: Research Challenges, Ad Hoc Networks, 4, 351-367, DOI: 10.1016/j.adhoc.2004.04.003 Pawlowski, A., Guzman J., 2009, Simulation of greenhouse climate monitoring and control with wireless sensor network and event-based control, Sensors, 9, 232- 252, DOI: 10.3390/s90100232 Romer K., Mattern F., 2004, The design space of wireless sensor networks, IEEE Wireless Commun., 6, 54- 61, DOI: 10.1109/MWC.2004.1368897 Skrzypczak, L., Grimaldi, D., Rak, R., 2009, Basic Characteristics of ZigBee and Simpliciti Modules to use in Measurement Systems, XIX IMEKO World Congress Fundamental and Applied Metrology, 9, 6-11 Song, W., Huang, R., Xu, M., 2010, Design and Deployment of Sensor Network for Real-Time High-Fidelity Volcano Monitoring, IEEE Transactions On Parallel And Distributed Systems, 11, 1658-1674, DOI: 10.1109/TPDS.2010.37 Wang N., Zhang N., Wang M., 2006, Wireless sensors in agriculture and food industry-Recent development and future perspective, Computers and Electronics in Agriculture, 50, 1-14, DOI: 10.1016/j.compag.2005.09.003 Wark T., Corke P., Sikka P., 2007, Transforming Agriculture through Pervasive Wireless Sensor Networks, Pervasive Computing, 2, 50-57, DOI: 10.1109/MPRV.2007.47 Zhu Y.W., Zhong X.X., Shi A., 2006, The Design of Wireless Sensor Network System Based on ZigBee Technology for Greenhouse, Journal of Physics, 1, 1195-1199, DOI: 10.1088/17426596/48/1/2236 438