A Remote Monitoring System for Greenhouse Based on the Internet of Things

. The Internet of Things (IOT) is considered as a great opportunity for the development in the information field nowadays, and has been applied widely in many fields. The IOT can be applied to monitor and control the microclimate factors of greenhouse remotely. In this paper, a wireless monitoring network is designed in the perception layer of the IOT. The nodes are developed based on the Mica2 hardware and the TinyOS software. The LPL (low power listening) technology is adopted to reduce the energy consumption of the relay node which is powered by a solar panel. The ACK (Acknowledgement) mechanism is used in the software to improve the quality of wireless communications. A remote monitoring terminal is developed by using Java technology. The monitoring terminal is easy to operate with good interactivity. The system has been installed in a glass greenhouse. The actual operation results show that the system is stable and reliable, which lays a good foundation for the development of remote control strategies in future.


Introduction
As an important component of protected agriculture, the greenhouse cultivation can achieve efficient production.In China, the average cultivated area per person is about only 40% of that in the world [1], so it is an effective way to alleviate the conflict between more people and less arable land area by promoting greenhouse cultivation techniques.In recent 30 years, the greenhouse cultivation in China has achieved great development and the area of greenhouse cultivation ranks first in the world.However, the automation of greenhouse monitoring and control system is very poor, which leads to a waste of time and human resource.The Internet of Things (IOT) is considered as a great opportunity for the development in the information field.In recent years, the IOT has been being applied widely in many fields, such as logistics, industrial environmental monitoring and smart grid, etc [2][3][4].The IOT will also be helpful for improving the automation of greenhouse monitoring and control system.Consequently, we have decided to start a big project on the remote monitoring and control system for greenhouse based on the IOT.The paper is a part of this project.In this paper, we introduce the remote monitoring system, which includes a wireless monitoring network and a remote monitoring terminal.
The paper is organized as follows.In section 2, the architecture of remote monitoring system for greenhouse based on the IOT is described.In section 3, a wireless monitoring network is designed.The LPL (low power listening) technology is adopted to reduce the energy consumption of the relay node which is powered by a solar panel.The ACK (Acknowledgement) mechanism is adopted to improve the wireless communications quality.In section 4, a remote monitoring terminal is developed based on Java technology.In section 5, the system is installed in a glass greenhouse successfully.At last, the paper is concluded.

System architecture
The architecture of remote monitoring and control system for greenhouse based on the IOT contains three levels, i.e., perceptual layer, backbone transport layer and application layer, as shown in Fig. 1.Wireless sensor networks are usually adopted in the perceptual layer.The function of sensor nodes is to monitor environmental factors of greenhouse, such as indoor air temperature and relative humidity; while the function of controller nodes is to control the facilities, such as fans, windows.All data acquired by sensor nodes will be gathered by a base station node, which is connected with a local monitoring terminal.The function of the local terminal is to process and store the information of greenhouse environmental factors and facilities, and to upload the information to the backbone transport layer and receive control commands from it.The backbone transport layer is the middle layer, and is usually composed of 2G/3G networks, the Internet, Cloud computing service platforms, etc.Its function is to achieve the remote data transmission and sharing.The application layer is the top layer, and it includes various display devices connected with the backbone transport layer, such as PDAs, PCs, remote display terminals, etc. Growers can view the information of environmental factors of greenhouse and control the facilities remotely through the application layer.In the backbone transport layer of the IOT, the mature communication networks are adopted, so the researchers can pay more attention to develop the perceptual layer and the application layer.In the perceptual layer, wireless sensor networks are used more and more widely [5][6][7].Compared with the wired network, the wireless network owns many advantages, such as convenient layout, easy extension of nodes, low cost of installation, etc.However, the wireless communication quality is much poorer than that of wired communication.Therefore, the researchers should consider the reliability of wireless communication properly.In section 3, the wireless monitoring network developed in our project is introduced.In section 4, we will introduce our remote monitoring terminal in the application layer, although there are some monitoring terminals reported [8,9].

Wireless monitoring network
Our V-type glass greenhouse is 60m long and 30m wide.The environmental factors needed to be measured are the air temperature, relative humidity and solar illumination both inside and outside the greenhouse.The purpose of measuring outside environmental factors is to provide the basis for the future development of the control strategy.A wireless monitoring network is designed.The distribution of nodes is shown in Fig. 2.There are four sensor nodes with three placed inside and one placed outside.As we have not yet developed suitable control strategy, the controller node here is just used as a relay node in this paper.The base station node and the local terminal are placed in a monitoring room.As the distance between the greenhouse and the monitoring room is too long, about 300m, a relay node is designed.The base station is wired with the local monitoring terminal via RS-232 serial line.The local monitoring terminal is an industrial personal computer connected with the Internet.
The Mica2 hardware with CC1000 as the wireless communication device is adopted to design the wireless nodes.The working frequency of the wireless monitoring system is set to 433MHz, which has better diffraction transmission capacity than 2.4GHz.The digital sensor SHT11 is used to measure air temperature and relative humidity; while TSL2561 sensor is used to measure solar illumination intensity.The four sensor nodes and the controller node are all powered by electricity, which is convenient in greenhouse.So the power consumption of these nodes is not necessary to be considered.However, the relay node is powered by a solar panel.Therefore, it's important to reduce the energy consumption of the relay node as much as possible.The LPL (low power listening) technology is adopted in the software development of the relay node, in order to reduce its power consumption.The LPL technology is an asynchronous MAC protocol used for reducing the power consumption of wireless communication nodes [10].During the most time of one period, the wireless module is turned off and only turned on for a very short time to detect RF signals.If there are RF signals, the wireless module keeps active state; otherwise returns to sleep state.The duty cycle of the active state can be reduced to below 1%, so the LPL technology is effective to reduce the power consumption of wireless nodes.The node software is developed in the TinyOS operating system, which is a special operating system for wireless sensor networks.The LPL command setLocalWakeupInterval(T) in the component LowPowerListening is called to realize the low power listening function.
In order to improve wireless communication quality, the ACK (Acknowledgement) mechanism is adopted [11].The basic process of data transmission by using the ACK mechanism is as follows.When the transmitting node sends a data packet, if the receiving node receives the data packet, it will send back an ACK message.If the transmitting node receives the ACK message, it will stop to send the data packet repeatedly; otherwise it will continue to send the data packet until it receives the ACK message or the sending times reach the maximum set threshold.The ACK mechanism is an effective way to improve wireless communication quality.Assume that the packet loss rate of wireless transmission is 50% and the maximum threshold of sending data packet is set to ten.It's easy to know that the packet loss rate can be reduced to below 0.1%.Therefore, the usage of ACK mechanism is an effective way to improve the wireless communications quality.In the TinyOS operating system, the port PacketAcknowledgements in the communication component ActiveMessageC provides the ACK request command.When a transmitting node sends a packet, the corresponding event sendDone will be triggered and the transmitting node will check whether the ACK message is received in the sendDone event.If the transmitting node does not receive the ACK message, it will send the data message repeatedly.
In order to improve the anti interference ability of the sensor nodes, the software watchdog is adopted.When the microprocessor is ready to reads the data from sensors, the software watchdog is started.A long enough time is set for the watchdog to guarantee the data in sensors can be read during this time.After reading, the watchdog is closed.If the microprocessor can't read normally during this time, it resets automatically.Therefore, the sensor nodes have strong anti-interference ability.

Remote monitoring terminal
A remote monitoring terminal is developed by using Java technology for growers to view the environmental information and the operation states of facilities in the greenhouse on remote display terminals.The monitoring terminal software includes three parts, i.e., server, database and client, shown in Fig. 3.The functions of server are to achieve the data exchange with the base station, and store the data into the database.The functions of database are to storage and backup all information of the system.The functions of client are to display the environmental information and the operation states of facilities, as well as achieve human-computer interaction.Tomcat 6.0 is adopted as the web server and Microsoft SQL Server 2005 as the database.The remote monitoring terminal software is installed in the local monitoring computer which is connected with the Internet.The authorized growers can use any display device connected with the Internet to view the relevant information about the greenhouse by visiting the web site of this system.The main interface of remote monitoring terminal is shown in Fig. 4. The environmental data acquired by the four sensors are all displayed in the main interface.The operation states of the facilities such as fans, humidifier and wet pad are also given at the bottom of the main interface.They are several function selection bars on the left side.In the curve fitting bar, the data of environmental factors is displayed in the form of curves.In the historical data bar, the growers can query historical data of environmental factors.In the monitoring mode bar, there are two modes that can be chosen, i.e., manual mode and automatic mode.The upper and lower limits of indoor air temperature and relative humidity can be set in this bar, as the suitable ranges of temperature and relative humidity are different for different kinds of crops.The intelligent decision bar is reserved for the development of control strategies in future.

Field experiment
The remote monitoring system has been installed in our greenhouse located in the suburbs of Nanjing, Jiangsu province, China.Some nodes installed in the field are shown in Fig. 5.The outdoor sensor node is installed near the greenhouse, so it is powered by electricity.Only the relay node is powered by a solar panel.The system works very well until now.
After login of the system web site through remote terminals, the users can view the main display interface just as shown in Fig. 4.After clicking the curve fitting bar, both indoor and outdoor environmental factors can be selected to display in curve form.Only the indoor air temperature is shown in Fig. 6, on Nov. 6, 2015, 8:00-18:00.The sampling period of the system is ten minutes.It can be seen that there is no data packet lost, which indicates that the ACK mechanism can guarantee good wireless communication quality.The continuous work of the relay node indicates the LPL technology is useful for saving power and it's suitable for wireless nodes powered by solar panels or batteries.There is a short delay of data transmission by using the LPL technology, and the delay is closely related to the dormancy period.However, the monitoring system of greenhouse is not strict with high real-time performance and the dormancy period is usually less than one minute, so the short delay does not affect the performance of the monitoring system.

Discussion and the further research
The remote monitoring system of greenhouse based on the IOT is designed.The good wireless communication quality is guaranteed by using the ACK mechanism.The relay node can run continuously with very low power by using the LPL technology.The anti-interference ability of sensor nodes is improved by using the software watchdog.
The remote monitoring terminal is easy to operate with good interactivity.The field experiment shows that the system is very stable and reliable, which lays a good foundation for the future research about remote control strategies.
It's well known that the heating and active cooling both consume a lot of energy, so the energy consumption accounts for a large proportion of the production cost of greenhouse.It's a challenging research to save energy as much as possible on the premise that the air temperature and relative humidity are kept in suitable ranges [12].The energy-saving methods of control strategies are the emphases of our research in future.The structures and sizes of various greenhouses are very different, so are the facilities in greenhouse.Therefore, we will also consider the universality of new control strategies at the same time.

Figure 1 .
Figure 1.The architecture of remote monitoring and control system for greenhouse based on the IOT.

Figure 2 .
Figure 2. The wireless monitoring and control network for greenhouse.

Figure 3 .
Figure 3.The overall structure of monitoring software.

Figure 4 .
Figure 4.The main interface of the remote monitoring terminal.

Figure 5 .
Figure 5.Some nodes installed in the field.