System for monitoring microclimate conditions in greenhouse

Monitoring microclimate parameters in different kind of environments has significant contribution to many areas of human activity and production processes. One of them is vegetable production in greenhouses where measurement of its microclimate parameters may influence the decision on taking appropriate action and protect crops. It is also important to preserve optimal condition in greenhouses to facilitate the process of transpiration, plant mineral nutrition and prevent of a variety physiological damage caused by a deficit of some specific nutrients. Systems for monitoring have wide application in the last years thanks to development of modern computer technology. In this paper model of the monitoring system based on smart transducer concept was introduced. Within the system components are based on MSP430 ultra low power microcontrollers. They are using wireless communication to exchange data within the system that was structured according to smart transducer concept. User applications from Received:17.10. 2014. / Accepted 15.12. 2014 Acta Agriculturae Serbica, Vol. XIX, 38 (2014):105-114 106 the network could access to system interface using HTTP protocol where web server could be running on the computer or it could be an embedded web server running on microcontroller based device.


Introduction
Monitoring of human activities and their environments has the wide application in many areas such as industry, healthcare, army, agronomy, tracking systems etc. Measurement and control of microclimate conditions are of the greatest importance for vegetable production in greenhouses.In the first place temperature and relative humidity in the protected space, among other parameters, need to be in the optimal range for unhindered growth and development of cultivated plants.
Each vegetable crop that was grown in the protected space like greenhouses has its own specific requirements for microclimate conditions that need to be satisfy in order to create a favorable environment.Within the same type of crop regimes of temperature and air humidity are not the same through the growing period of breeding, so that there are differences according to the stage of growth and development of cultivated crops (vegetative growth, formation of generative organs, flowering, fruiting, ripening, etc.).Also listed regimes within the same type of crop differ during the night and the day, especially in terms of lack of light and the appearance of cloudiness.
Creating an optimal microclimate for the production of vegetables in greenhouses find a major role in the process of transpiration, plant mineral nutrition and prevention of various physiological damage caused by a deficit of some specific nutrients, such as calcium.
In addition the monitoring and control of temperature regimes and relative humidity in the greenhouses are widely used in the prevention of plant diseases, particularly those with various types of rot that is develop in conditions of high relative humidity.
All these presented facts imposed regulation of microclimate parameters as a priority, which means that measurements and control of environment parameters are necessary through the entire process of crops production.This can be achieved by equipping protected space, greenhouse, with small computer devices that contain sensors and that could communicate with each other thus forming monitoring system.System could be extended to maintain a favorable microclimate condition by controlling other appropriate devices for heating, ventilation and air micro-moistening.The results of monitoring system application in greenhouses would be to achieve high yields and better quality of grown vegetables.
The process of collecting environmental parameters is carried out by many types of sensor.The main problem was adding some intelligence to sensors so they could be easily connected to networks and also be able to work independently.This was overcome with achievements in modern computer and communication technology in the last years.Transducers, or sensors in broader sense, represent modules that convert physical values in the electric signal.
Connecting transducers of different manufactures and automations in their usage was feasible introducing family of IEEE 1451 standard.According to proposed IEEE 1451.0 standard functionality of smart transducers and commands for controlling their working process were defined.Access to smart transducers from network application was standardized with clear interface format, described in standard as transducer service interface.Transducer module, as part of smart transducer system, used to collect values from place of interest could communicate and sent data wirelessly.In that case module represent wireless node with all constraints that was characteristic for small independent computer device.Besides computing and memory constraint one of the main challenges was power limitation.Small devices usually based on microcontrollers were implemented to work autonomously, using battery for power supply.Power consumption often depends on require operating modes and functionalities, but also battery size have impact on device weight and invested price.Whenever the purpose and requirements of application allowed a good solution would be usage of microcontrollers with ultra low power consumptions.One of the microcontroller's families that belong to this group was MSP430 microcontrollers.The aim of this work was to present wireless network of sensor modules that were based on ultra low power MSP430 microcontrollers, including middleware module that was implemented with the computer, or with addition hardware for running embedded web server.

Basis for the development of the system
Standard of IEEE 1451 family defines common rules for smart transducers and their connections to networks or microcontrollers.Standard contain functions and commands to control smart transducers, communication protocols and formalized electronic documents TEDS.Concept of smart transducers has structure that contain Transducer Interface Module -TIM and Network Capable Application Processor -NCAP.
TIM represent module that interact with physical world over sensors or actuators, and it has one or more transducer channels.TIM has functionality such as signal conditioning, A/D or D/A conversion and interface for communication.NCAP has a role of gateway between existing TIMs and network or host processor, and it is used to control working process within present TIM modules.Connection this two main components is established by Transducer Independent Interface -TII, but definition of communication protocol and medium belongs to one of the other standards IEEE 1451.X, where IEEE 1451.5 standard is used for wireless communication.
One of the transducer features that have substantial contribution to its attribute "smart" would be usage of Transducer Electronic Data Sheet -TEDS.It represents standardize and formatted electronic document which is machine readable and enable plug-and-play operation with addition of defined command set.TEDS were usually located on TIM, but due to some possible constraints standard allow TEDS to be located remotely usually on the NCAP.
Access to IEEE 1451.0NCAP from network is provided by Transducer Services Interface -TSI.It actually represents NCAP API that contains methods to read and write transducers data, read and write TEDS, and send various commands and configurations to TIM.Based on standard TSI is divided on several interfaces: TimDiscovery contain method to discover available communication modules, existing TIMs and Transducers channels on specific TIM.TransducerAccess represent interface which is called by applications to access transducer channels.This interface would be used to perform read and write operation on TIM.Some more advanced methods are moved to TransducerManager interface avoiding complexity.Methods of the TransducerManager would be used if applications need more control over TIM access.TedsManager contain methods to read and write TEDS.CommManager is used to manage available communications on NCAP.AppCallback interface define access to non-blocking I/O and measurement stream.layer through web server that is running on NCAP hardware.User by its application sent HTTP request to the HTTP server on the NCAP.When server receive HTTP request, according to them called appropriate method of IEEE 1451.0API.This layer communicates with TIM and gets result from them.Server obtains result, form HTTP response and return them to the user (Standard IEEE 1451.0, 2007).
Other solution for distribution measure data would be using Smart Transducer Web Service -STWS and providing standard base interoperability in that way (Figure 1.).If NCAP has running web server it could be used as web service provider for transducer.Information about exiting web service would be defined in Web Services Description Language (WSDL), with description of type, message and web service operation.According to this rule user application could be realized to interoperate with web service.Simple Object Access protocol -SOAP was used as carrier of data trough different platforms and operating systems.It is used to exchange structure information between software applications regardless of the background.STWS represent standard based approach to enable interoperability between IEEE 1451 applications or smart transducers and other applications (Song et al. 2007).
TIM module could by based on ultra low power microcontrollers such as MSP430 microcontrollers.MSP family of microcontrollers contains 16-bit RISC processor design for ultra low power applications.It has flexible cocking system, multiple low power modes and autonomous intelligent peripherals.These characteristics enable truly low power optimization and extend work time battery life.
Ultra low power microcontrollers as a base of systems have great applications in many area, such as healthcare were small portable devices were use to perform necessary measurements.MSP430 microcontrollers with integrated RF module represent not expensive solution, with good performance and small size for remote sensor monitoring.MSP430 could be a choice in controlling DC or step motor that could drives some other devices thanks to their high performance peripherals.Therefore family of MSP430 microcontrollers has more variants with different functionality which could be chosen according to request for concrete application (MSP430 Datasheet).
Representative of these ultra low power microcontrollers is CC430F5137IRGZ microcontroller that could be integrated on the same module with wireless transmission data chip.Module with these characteristics is MSP430-CCRF development board that contains CC430F5137 microcontroller and integrated CC1101 RF transceiver.Maximal distance between two modules depends on RF chip output power, selected range of radio frequency and transfer data rate.According to this value and given specifications measurements distance in ideal case could be from 60 to 150 meters.
A CC430F5137IRGZ microcontroller has wide power supply range from 1,8V to 3,6V.It has 16-bit RISC architecture, extended memory and system clock up to 20 MHz.Also, it has 12-bit A/D convertor, comparator and two 16bit timers.Power consumption for different mode would be (MSP430-CCRF): • CPU Active Mode -160 μA/MHz

Results and Discussion
Concept of smart transducers was presented in article Fernandes et al. 2013 as practical implementation in agriculture.Within this paper IEEE 1451 system architecture was proposed and benefits of its usage in precision agriculture were discussed.Ambient conditions from this article and concrete physical implementation represent good base for testing our ultra low power smart transducer system.Another application of smart transducer approach was presented in article Barrero el al. 2014 for intelligent transportation system.Monitoring system solutions for greenhouses were presented in articles Park and Park 2011, den Bulcka et al. 2013, Li et al. 2010, and Chaudhary et al. 2011.
Concept of system presented in this paper consists of TIM modules based on CC430F5137 microcontrollers.Sensors like SHT15 (Sensor SHT15) used to measure temperature and relative humidity would be attached on transducer channels.Communications between TIM modules are establishing wirelessly using integrated chip CC1101 RF transceiver.
NCAP was also realized using the same CC430F5137 microcontroller in addition with other component that could enable access to data from network.In this case module based on CC430F5137 get the role of middleware or gateway between TIM modules and additional component.There are two variants of system depending on hardware solution that enable external access.First is the case when central module based on CC430F5137 microcontroller was connected directly to do computer (Figure 2.a.).Another solution introduce connecting module gateway with other microcontroller based device with enabling embedded HTTP server (Figure 2.b.).
In the first case gateway module has established serial communication with computer.Gateway is located nearby computer and exchange data with software on the server side responsible to storage data and responds to user requests.Data obtain from computer serial port was captured by application deployed on the web server that running on computer.Therefore, user applications could access transducers service interface by HTTP protocol, sending HTTP request to the web server where it is analyzed and calling appropriate methods on connected microcontroller based device.When result of calling method were obtained from TIM it was transmitted by serial communication back to computer where HTTP response was formed and sand back to user.In this solution additional module would be mbed platform (Mbed) used for direct connection to USB computer port, and in other variant it could be used for running embedded web server.a) b) Figure 2. a) Web server on computer; b) Embedded web server Distribution of data to the external network could be realized implementing Web service.In that case communication to the gateway would be the same but access from the network will resulted in batter interoperability between transducer software and other applications.
Solution without computers nearby place of measurement was presented in Figure 2.b.This is case when mbed platform is also connected with gateway microcontroller CC430F5137 using serial type of communications, but web server is run directly on mbed platform that has RJ45 shield for connecting with network.Mbed development support has to offer library for running HTTP server and other methods of transducer service interface had to be created so the operation with TIMs could be accomplished.
Also, in the variant of system with embedded web server, web services could be established and offer client applications a way to connect with STWS in respect with overall smart transducer concept.
If there is no nearby networks central module could be connected to the GSM/GPRS modem that has ability to transmit data wirelessly on great distance to the remote computer.For these purpose a Telit GM862-GPS module could be used and send data by cellular network in the same way as mobile phones.It has integrated a GSM/GPRS modem and a GPS receiver.The GSM/GPRS quadband modem enables remote communication using the mobile network which is almost available worldwide.This modem could be used to exchange SMS messages besides its ability to communicate using Internet services through the GPRS, such as HTTP, FTP and E-mail.This kind of solution enables users to access data from any location that has Internet access by their personal computers or smart phones.

Conclusion
The sensor system for monitoring microclimate conditions in greenhouse based on MSP430 ultra low power microcontrollers was presented in this paper.Concept of the system was realized according to IEEE 1451.0 standard for smart transducers.Structure of the monitoring system is characterized by flexibility due sensor module have small size, wireless communication capability and independent power supply with addition of solar panel.Distribution data to the user does not require computer in every case, and access to the system could be established on embedded web server.Further work will be system implementation in greenhouses with specific microclimate conditions for measurement and analysis of their parameter values in order to contribute better crops protection and higher yields.

Figure 1 .
Figure 1.Service-oriented architecture of smart transducers