Abstract
At present, wireless sensor network (WSN) is mainly used in some applications with a few sensor nodes and poor expansibility, which make it difficult to change the number of nodes in the WSN and the number of sensors in the node flexibly. In this paper, a new communication protocol for greenhouse monitoring system with multifunctional nodes is designed based on zigbee WSN technology to overcome the shortages above. The protocol establishes and maintains the routing table dynamically. And the bit mask method is used to mark devices and sensors which can access multiple devices in one packet. Through the elaborately designed protocol, different nodes can join the system automatically. Users can scan the data, capture images, and control the devices through browser on the Internet. The experiment results show that this greenhouse monitoring system based on WSN has perfect transportability and expansibility.
Access provided by Autonomous University of Puebla. Download conference paper PDF
Similar content being viewed by others
Keywords
1 Introduction
In recent years, greenhouse agriculture has increasingly become an important direction of modern agriculture development [1]. And the design of an effective and accurate greenhouse monitoring system is prerequisite for improving the monitoring function service of greenhouse. wireless sensor network (WSN) has these advantages of low cost, low power consumption, flexible network organization [2, 3]. At present, the WSN has been applied in cabbage farm [4] and feed storage [5] successfully in foreign countries. Different applications of zigbee based on wireless sensor network in agriculture are developing rapidly [6]. Rajesh Singh has developed a pressure monitoring system using a RF module coupled to AVR MCU. Steven Silva has developed a website for monitoring water pollution based on Zigbee and WiMax technologies and realized the remote monitoring via browser. Liu Hui has used WSN to detect the environment parameters such as temperature, humidity, illumination, and harmful gas. These parameters can be summarized and managed at the server [7, 8]. These systems use some wireless communication technologies such as GPRS, WCDMA. And WSN has been applied in aquaculture, information collection of tea plantation and the cold chain environment of fruit respectively by Shi [9], Wang [10] and Guo [11, 12]. These developers have made great achievements in the zigbee protocol stack, packet loss rate and system stability. Zhang has designed a two-way communication, which can enable users to control these parameters in real-time way [13, 14]. But in the above applications, detecting data mainly depends on only one sensor. And the remote system is not mature enough to expand easily.
In this paper, a new communication protocol for greenhouse monitoring system with multifunctional nodes is designed based on zigbee WSN to overcome the poor expansibility of existing monitoring system. The protocol establishes and maintains the routing table dynamically. And the bit mask method is used to mark devices and sensors which can access multiple devices in one packet. Through the elaborately designed protocol, a distributed monitoring system is designed to realize scanning the data, capturing images and controlling the devices through browser on the Internet. And this greenhouse monitoring system designed in the paper has perfect transportability and expansibility.
2 General Architecture of Monitoring System
As Fig. 18.1 shows that the monitoring system includes three layers, which are relatively perception layer, network layer and application layer. The perception layer is made up of the greenhouse equipment. The network layer consists of zigbee nodes and embedded gateway. And the application layer program is located at the center server.
The gateway takes the S3C6410 provided by Samsung as the core processor (533 MHZ main frequency). It has a peripherals interface and built-in hardware image encoder. Gateway has IP network interface, DM9000 network adapter, WM-GMR-09 wifi module, WSN interface, and zigbee coordinator. At the same time the gateway is connected with some equipments, such as camera, wind speed sensor, wind direction sensor, and so on.
The MCU CC2530 with low power consumption and cost provided by TI is used to build zigbee wireless network. The MCU K60 using ARM Cortex-M4 for the kernel and produced by Freescale is the core control unit of the node. There are many actuators in the node including humidifier, heater, incandescent, and devices which are charge of communication with automatic equipment, such as pick-up robot, patrol robot, irrigation equipment, and so on.
The server is responsible for summarizing and storing the data of all sensors. The web server program provides service for clients to browse the data and operate the local equipment in the greenhouse through the Internet.
In Fig. 18.2, the single-arrows represent the calls and returns, and the double-arrows represent data communication.W2S represents web server and communication data packages for daemon, which are realized by the structure WEB2SERVER below, similar to S2G, G2N, and so on.
Different nodes are just different in device driver and user interface, but the communication, acknowledge and data management of system follow the same method. Like this, compatibility of different nodes is realized, thus it is only necessary to add related user interface and device driver when new types of node are added which can make system suitable in different situations.
3 Design of Communication Protocol and Data Structure
From the Fig. 18.2, there are six data structures of the packet used in each layer. And the meaning of each segment is shown in Table 18.1. The six data structures are designed as follows:
-
WEB2SERVER: GWID, NODEID, DEVID, LoD, DATA, PACKETID, CMD
-
SERVER2GW: NODEID, DEVID, CMD, LoD, DATA, PACKETID, CRC
-
GW2NODE: NODEID, DEVID, CMD, LoD, DATA, PACKETID
-
NODE2GW: NODEID, DEVID, CMD, LoD, DATA, PACKETID
-
GW2SERVER: GWID, NODEID, DEVID, CMD, LoD, DATA, PACKETID, CRC
-
SERVER2WEB: GWID, NODEID, DEVID, CMD, LoD, DATA, PACKETID
CMD, DEVID and DATA fields are responsible for semantic representations. The values of CMD and DEVID fields are shown in the Tables 18.2 and 18.3, and DEVID represents the devices which are available in the way of bit mask. Each bit represents one device. The command has an operation to the devices whose corresponsive bits are set, or has an operation of uploading frequency to node when all the bits of DEVID are 0.
For example, if there is a packet whose GWID = 4, NODEID = 7, DEVID = 0 × 00001800 (bit11 and bit12, that are humidifier and temperature controller), CMD = 0 × 0002, DATA = 0 × 0046001c(70,28), it will present a request to adjust the humidity and temperature to 70 % and 28 °C around node No.7 in greenhouse No.4, using humidifier and temperature controller.
If the users need to obtain the current temperature and humidity of Node 7 in Gateway 3 by client browser, these steps of responding to the above request are shown as follow:
-
Step 1.
The client web program generates the original WEB2SERVER data package as follow: GWID = 3, NODEID = 7, DEVID = 0 × 0003, CMD = 0 × 0003, LoD = 0, DATA is empty; PACKETID consists of timestamp and random number.
-
Step 2.
The client web program transmits this package to a daemon designed to communicate with gateway. The daemon adds CRC field to start transmission using TCP protocol and waits for ack (acknowledgment character) signal from gateway. It will transmit again if time is out.
-
Step 3.
Gateway will transmit an ack signal of GW2SERVER with CMD = 0 × 0006.
If the check is successful, find the short address of node No.7, delete NODEID to form GW2NODE and send it to the node.
-
Step 4.
The node checks the DEVID bit by bit. When it comes to the bit of temperature (bit 0), node will sample the data of temperature once, and add 4 to LoD to fill this 4 bytes. When it comes to humidity bit, it will do the similar thing. After all bits are finished, the data NODE2GW is formed. Then the node will send it to the gateway.
-
Step 5.
The gateway will send data in packet GW2SERVER to the daemon in server and then wait for ack signal. And the daemon will return the data to the client web program if check is successful. And these data are added to the database after it finishes analyzing these data.
As for the operations whose actuators are directly connected to the gateway, such as image capturing, the process of request is similar but simpler. Their NODEID is 0, which is the ID of gateway in zigbee network. Then these requests and devices will be analyzed on gateway like nodes. After image is acquired, the gateway will compress it to format jpeg and send it to the server. The client web browser shows the image as shown in Figs. 18.3, 18.4. In addition, the users can adjust the angle of cameras by up, down, right, and left buttons.
The users can configure the nodes and gateways by their GUI supplied by LCD or touch screen. And the device list will be established once the node is powered up. The routing table is established when the gateways and nodes join the system by transmitting the corresponding commands.
4 Experiment Results
The WSN based on the above new communication protocol is established in laboratory. And the numbers of nodes are eight. In order to verify the transportability and expansibility of the monitoring system, there are three types of nodes in laboratory. The first type is only connected to temperature and humidity sensors. The second type is connected to one sensor and four devices including fan, irrigation valve, light, and stepper motor. And the third type is connected to automatic picking machine. Experiment results show that all the nodes can work well, upload data correctly, and control remotely. That’s to say the stability and suitability of system are good.
5 Summary
In summary, the communication protocol designed in this paper improves the expansibility of monitoring system in three aspects. First, the design of dynamic routing can meet the variable number of nodes. Second, the design of software layer in the node improves the portability and the communication protocols need not be changed when the system is updated. Finally, the gateway and node are both configurable, which make the device in a certain node changeable and expansible.
When the short delay and real-time characters of the system are achieved, different types of nodes have good compatibility and flexible configuration. And the sensor nodes can be adjusted to avoid chaos automatically according to the configuration when the system is expanded. The new communication protocol makes up the deficiencies of existing greenhouse monitoring system. In the future, the system can be promoted. These applications of data and image processing will have more enhanced functionality.
References
Cullar D, Estrin D, Strvastava M (2004) Overview of sensor networks. Comput Netw 37(8):41–49
Yick J, Mukherjee B, Ghosal D (2008) Wireless sensor network survey. Comput Netw 52(12):2292–2330
Díaz SE, Pérez JC, Mateos AC et al (2011) A novel methodology for the monitoring of the agricultural production process based on wireless sensor networks. Comput Electron Agric 76(2):252–265
Lopez RJA, Soto F, Suardiaz J et al (2009) Wireless sensor networks for precision horticulture in Southern Spain. Comput Electron Agric 683:25–35
Green O, Nadimi ES, Blanes V et al (2009) Monitoring and modeling temperature variations inside silage stacks using novel wireless sensor networks. Comput Electron Agric 691:149–157
Jiang J, Zhang M, Li S et al (2010) Development of data terminal for wireless sensor network. Trans CSAE 26(2):94–97
Liu C, Zhang M, Zhang F, Liu G (2011) Development of agricultural information processing platform based on wireless sensor networks. J China Agric Univ 16(5):151–156
Liu H, Wang M, Wang Y, Ma D, Li H (2008) Development of farmland soil moisture and temperature monitoring system based on wireless sensor network. J Jilin Univ (Eng Technol edn) 38(3):604–608
Shi B, Zhao D, Liu X et al (2011) Intelligent monitoring system for industrialized aquaculture based on wireless sensor network. Trans CSAE 27(9):136–140
Wang W, Luo X, Sun D et al (2011) Design of wireless sensor network node for data transmission in tea plantations. Trans CSAE 27(5):169–173
Guo B, Qian J, Zhang T et al (2011) Zigbee-based information collection system for the environment of cold-chain logistics of fruits and vegetables. Trans CSAE 27(6):208–213
Zhang H, Zhu J, Wu H et al (2012) Design of ReGA gateway for general agricultural environment information monitoring system. Trans CSAE 28(3):135–141
Zhang F, Zhu H (2011) A remote control system based on java for greenhouse. Agric Netw Info 8:14–16
Shi Z (2011) The research of greenhouse remote multi-parameter control system based on localization. Microcomput Appl 30(11):84–86
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2013 Springer-Verlag London
About this paper
Cite this paper
Qiao, H., Ma, Q., Zhu, X., Li, M., Zhou, J., Duan, X. (2013). Communication Protocol for Greenhouse Monitoring System Based on Wireless Sensor Network. In: Zhong, Z. (eds) Proceedings of the International Conference on Information Engineering and Applications (IEA) 2012. Lecture Notes in Electrical Engineering, vol 219. Springer, London. https://doi.org/10.1007/978-1-4471-4853-1_18
Download citation
DOI: https://doi.org/10.1007/978-1-4471-4853-1_18
Published:
Publisher Name: Springer, London
Print ISBN: 978-1-4471-4852-4
Online ISBN: 978-1-4471-4853-1
eBook Packages: EngineeringEngineering (R0)