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

HAL
open science

# A Web-Based Monitoring System as a Measurement Tool in Greenhouses Using Wireless Sensor Networks

Yuling Shi, Zhongyi Wang, Xu Liu, Dongjie Zhao, Lan Huang

► To cite this version:

Yuling Shi, Zhongyi Wang, Xu Liu, Dongjie Zhao, Lan Huang. A Web-Based Monitoring System as a Measurement Tool in Greenhouses Using Wireless Sensor Networks. 4th Conference on Computer and Computing Technologies in Agriculture (CCTA), Oct 2010, Nanchang, China. pp.289-297, 10.1007/978-3-642-18354-6_35. hal-01563473

HAL Id: hal-01563473

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

Submitted on 17 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_2.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# A Web-based monitoring system as a measurement tool in greenhouses using wireless sensor networks

Yuling Shi¹, Zhongyi Wang¹, Xu Liu¹, Dongjie Zhao¹, Lan¹ Huang¹,*

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

*Corresponding author Lan Huang, *biomed_hl@263.net

**Abstract.** In this work, we propose a Web-based monitoring system using wireless sensor networks (WSNs) to measure plant parameters and environmental factors in greenhouses. To detect and send these variables, e.g. leaf temperature, air humidity, a ZigBee-based WSN collects data, which is transmitted by GPRS modules and the Internet to a central computer, and all information, including the dynamic topology of WSNs, can be published via the Web. The system provides flexible configuration options for sensor nodes and transport downlink commands, i.e. sensors can be added or removed flexibly in a node without changing the hardware interface and data center service software. Also, the variance of the received signal strength indicator(RSSI) and link quality indicator (LQI) under different distributions of the growing plants was considered to estimate the network link quality to ensure reliable data transmission in the WSNs. Experiments show that the system is reliable, flexible, convenient, and provides good real-time and scalability characteristics.

**Keywords:** monitoring system, WSNs, GPRS modules, received signal strength indicator, link quality indicator

## 1 Introduction

When using a conventional wire-based automatic monitoring system in a greenhouse, an increased number of measurement points can dramatically increase the complexity and cost of the system. It should also be possible to change the location of the measurement points easily to meet different measurement needs, which depend on the particular plant, on possible changes in the external weather or the greenhouse structure, and on the plant placement in the greenhouse.

In recent years, wireless sensor networks (WSNs) have been used in several agriculture applications, e.g. regional and on-farm agriculture projects for irrigation[1,2]. Vivoni and Camilli[3] developed a wireless prototype system to acquire, store, display and transmit real-time, geo-referenced environmental data between multiple field teams and remote locations. Mahan and Wanjura [4] cooperated with a

<footnote>*Corresponding author: Email: biomed_hl@263.net</footnote>
private company to develop a wireless, infrared thermometer system for in-field data collection. The system consisted of infrared sensors, programmable logic controllers and low power radio transceivers to collect data in the field and transmit it to a remote receiver outside the field. However, there has been little research into web-based WSNs for measurement of plant and environmental variables in greenhouses, and particularly to investigate the influence of plant growth on radio wave propagation in the WSNs. Also, there remains an engineering issue that requires further study to provide flexible configuration options for sensor nodes and transmit downlink commands to set up new parameters for nodes online during addition or removal of sensors without changing the interface and software.

From an engineering perspective, there remain many difficulties and challenges in measuring plant variables in the field or the greenhouse using WSNs. Our objective was to develop WSN hardware and software to provide functions for acquiring real-time measured data from the Internet, and displaying the RSSI and topology of the WSNs dynamically, and also for transmitting downlink commands to sensor nodes.

## 2. Remote monitoring system design and overall structural framework

To explore the issues with the deployment of such a monitoring network related to plant growth in the greenhouse, Web-based remote sensing network architecture is depicted in Fig.1. The system consisted of a ZigBee-based tree-topology WSN with 20 sensor nodes to obtain plant or environmental variables, e.g. leaf temperature, stem sap flow, temperature or humidity, plus 5 router nodes, and 1 coordinator node (sink node) deployed in the greenhouse, a GPRS module connected with the coordinator via the RS-232 serial port to transmit the received data to the remote monitoring center, and a web-based management sub-system for users to acquire and analyze the data via the Internet. To meet special applications of the system, the system can send commands to the wireless network to re-configure the node channel and set the sampling frequency.
<figure><img src="image_3.png" /><figcaption>Fig. 1. Overall system architecture of the web-based remote sensing network</figcaption></figure>

## 2.1 Sensor Node

The sensor node functional module is shown in Fig.2. Each sensor node can provide 8 analog channels with 14-bit resolution and multiple I/O channels, and therefore we can simultaneously connect up to 8 analog sensors and configure the channels flexibly. A node can access any sensor data without changing the hardware circuit and interface, simply using the upper flexible configuration. At the same time, all the network nodes send LQI and RSSI values to the coordinator for future operations by the data center. Sensor nodes collect the sensors' data periodically according to commands from the control center, and then send the data to the coordinator node. The coordinator node is connected with the GPRS DTU to send the data to the remote data center via the Internet.
<figure><img src="image_4.png" /><figcaption>Fig. 2. Block diagram of the sensor node in ZigBee-based WSNs</figcaption></figure>

# 3. System software design

## 3.1 Network Management Software based on Z-stack

The network application was written in C and designed to run on a CC2430 system-on-chip (SoC) solution specifically tailored for IEEE 802.15.4 and ZigBee applications. The code for each node was based on the Z-Stack supported by an Operating System Abstraction Layer (OSAL). OSAL is an event driven non-real-time operating system (for a detailed description see the documentation of Texas Instruments [5], Inc.). The components of the Z-Stack are implemented as separate tasks and information is passed inside the stack using the OSAL messaging system.

Using a tree-topology WSN, a coordinator is responsible for initiating and maintaining the network. After joining the network, the sensor nodes obtained 16-bit short network addresses, which identified data from each sensor node. Since the low LQI and RSSI indicated higher packet losses, we acquired LQI and RSSI to estimate performance for the WSN. In the Z-stack, LQI can be directly read from the receiving data packet, and assuming the structure is defined as pkt, then the LQI = pkt-> Link Quality; the RSSI value was not directly allocated in the structure, and thus we need to read it from the underlying protocol stack, and then the application layer calls.
## 3.2 Monitoring Center Program Design

The monitoring center software was developed to receive and transmit TCP protocol packets, which communicated with GPRS terminals. Using a CAsyncsocket class provided by Visual C++, the software easily achieved socket communications. After data reception, the received data is stored in the database. According to the actual needs of the project, data centers permit users to conduct these operations, e.g. setting the acquisition cycle, selecting each channel for each node to be connected to the sensors, and transporting the downlink commands to the corresponding nodes in the network, and then sensor nodes periodically call the corresponding function based on the commands.

## 3.3 Web data release

As mentioned above, a method to view the data easily via a Web browser is very important. Here, data representation challenges arise when dealing with wireless sensors. First, the data must be packaged by the wireless sensor node and sent in an understandable manner over the WSN. The data must be interpreted by a computer that stores or displays the data, which includes the network addresses of nodes, the collected sensor data, and the RSSI and LQI values and power consumption. To make the data accessible by a large range of applications, efforts should be made to determine the best structures for storing the data in databases.

The client browser running on the Web page is based on a. Net framework development, development tools, mainly Visual Studio 2008, and SQL Server 2005. The web page is shown in Fig.3.

This Web page includes five main functions: real-time data, historical data, network topology and node deployment management, and user management. The real-time data module allows users to view real-time data from each sensor node; the historical data module allows the user to select the time range for acquiring data. Also, the network topology and deployment management functions permit the user to check the status of the network and the actual deployment of nodes, so that the user can see whether the need to replace batteries or re-deploy the nodes following the growth of the crops is indicated.
<figure><img src="image_5.png" /><figcaption>Fig.3. Web data release</figcaption></figure>

4. Results and discussion

To verify the proposed system, we conducted experiments both in the laboratory
and the greenhouse. In the first stage, a small ZigBee network with several nodes was
deployed to collect data from SHT11 and infrared temperature sensors, in the light
upper plane, and to add analog channel selection in the transformer, and experimental
testing is conducted to verify the proposed hardware and software solutions. In the
second stage, the WSN was deployed in the greenhouse to assess system performance,
e.g. range, robustness and flexibility. Fig.4 depicts the experimental setup in the
greenhouse.

<figure><img src="image_6.png" /><figcaption>Fig.4. Image of device in the greenhouse</figcaption></figure>
As shown in Fig.5, we sent transport downlink commands from the remote server to nodes in the WSN, with a new configuration table for obtaining sensor data from the greenhouse. Fig.6 shows real-time data via the browser.

<figure><img src="image_7.png" /><figcaption>Fig.5. Channel configuration of each node by monitor center</figcaption></figure>
<figure><img src="image_8.png" /><figcaption>Fig.6. Real-time data displays via the web</figcaption></figure>

When considering the deployment of wireless multi-hop networks in the greenhouse, we must evaluate basic performance parameters such as radio performance (e.g., received signal strength, coverage ranges and link failure probability) with growth of crops. RSSI and LQI are important indicators of the measurement for link quality. In this experiment, the RSSI value versus the change of distance and obstacles is depicted in Fig.7, indicating that obstacles had a major impact on link quality.
<figure><img src="image_9.png" /><figcaption>Fig.7. RSSI Measurement</figcaption></figure>

Also, the network nodes periodically upload their own network information and data collected, including topology information to the data center stored in the database. The data in the database dynamically updates every hour, and when the client queries the topology, the web server then searches the database and displays the network topology in the browser. The client can see which node has left the network because of energy depletion and other reasons via the topology view, and then can add new nodes and re-deploy nodes as needed, as shown in Fig.8.
<figure><img src="image_10.png" /><figcaption>Fig.8. Network topology</figcaption></figure>

**5. Conclusions**

The application of the WSN as a measurement tool in broad ranges for monitoring environmental and plant parameters has the obvious advantages of faster deployment, unlimited installation flexibility for sensors, and better mobility than wired networks. Thus, the Web-based system has realized the display of the network topology, and the sensor data from the nodes. RSSI and LQI were important performance indicators for data transmission, and the system was able to obtain RSSI and LQI values with the growth of crops in the greenhouse. Also, the system offers flexibility, i.e. it is customizable in terms of replacing sensors to enable variations such as the type of sampling channel and the sampling frequency used.

**Acknowledgments.** This research was supported by the National High Technology Research and Development Program of China (863 Program, Grant 2008AA10Z201; Grant 2006AA10Z202).
References

1. Pierce FJ, Elliott TV. Regional and on-farm wireless sensor networks for agricultural systems in Eastern Washington. Computers and electronics in agriculture, 2008, 61:32-43

2. Camilli A, Cugnasca CE, Saraiva AM, Hirakawa AR, Correa PLP From wireless sensors to field mapping: anatomy of an application for precision agriculture. Comp. Electron. 2007, 58, 25-36.

3. Vivoni, E.R., Camilli, R.2003. Real-time streaming of environmental field data. Comput. Geosci. 29, 457-468.

4. Mahan, J.,Wanjura, D. 2004. Upchurch, Design and Construction of aWireless Infrared Thermometry System. The USDA Annual Report. May 01, 2001–September 30, 2004.

5. Texas Instruments.Z-Stack OS Abstraction Layer API F8W-2003-0002 Version1.4.

6. CHEN Guang-zhu,SHEN Chun-feng, ZHOU Li-juan,Design and performance analysis of wireless sensor network location node system for underground mine. Mining Science and Technology,2009.

7. Marina Petrova, Janne Riihijarvi, Petri Mahonen and Saverio Labella, Performance Study of IEEE802.15.4 Using Measurements and Simulations,2007.

8. ZHANG Qian, YANG Xiang-long, ZHOU Yi-ming, WANG Li-ren, GUO Xi-shan. A wireless solution for greenhouse monitoring and control based on ZigBee technology. Journal of Zhejiang University SCIENCEA,2007.

9. Ralf Grossmann, Jan Blumenthal, Frank Golatowski,Dirk Timmermann Localization in Zigbee-based Sensor Networks, Faculty of Computer Science and Electrical Engineering,2006.

10. P. Baronti, et.al., "Wireless sensor networks: a survey on the state of the art and the 802.15.4 and zigbee standards", Computer Communications,30:1655-1695, 2007.

11. N. Patwari et.al., "Relative location estimation in wireless sensor networks", IEEE Transactions on Signal Processing, vol. 51, no. 8, pp.2137-2148, 2003.