Design of Tropical Flowers Environmental Parameters Wireless Monitoring System Based on MSP 430

Considering the importance of real-time monitoring tropical flower environment parameters, the paper designs a wireless monitoring system based on MSP430F149 for tropical flower growing parameters. The proposed system uses sensor nodes to obtain data of temperature, humidity and light intensity, sink node to collect data from sensor nodes through wireless sensor network, and monitoring center to process data downloaded from the sink node through RS232 serial port. The node hardware platform is composed of a MSP430F149 processor, AM2306 and NHZD10AI sensors used to adopt temperature, humidity and light intensity data, and an nRF905 RF chip used to receive and send data. The node software, operated in IAR Embedded Workbench, adopts C Language to do node data collection and process, wireless transmission and serial port communication. The software of monitoring center develops in VB6.0, which can provide vivid and explicit real-time monitoring platform for flower farmers.


Introduction
Tropical flowers are fine ornamental plants, with broad leaves and colorful flowers, often as the exquisite gift among people.But the growth of tropical flowers requires strict environmental parameters, such as temperature, humidity and light intensity.Without sound environment, the growth and ornamental effect of tropical flowers would be negatively affected.Like anthurium, it favors warm and humid climate, intolerable of dry wind, burning sun as well as low and high temperature.And the ideal growth temperature is between 18°C-30°C.The relevant humidity should maintain between 75%-85% [1], better with light intensity in the range of 8, 000lx-18, 000lx.The lack of light can result in plants overgrowth, bud abortion and soft stem.Too much light can lead to color fading of leaves and bracts, even worse, burning and withering [2].Hence in the growth of tropical flowers, environmental parameters, including temperature, humidity and light intensity should be constantly monitored.In this way, specific and efficient measures can be taken to guarantee the growth of tropical flowers under the most favorable conditions.
Data collecting in traditional flower greenhouse adopts the way of instruments and manual work, with high cost, intensive labor and long period of data collecting, which can not guarantee its real-time validity.Using serial bus and fieldbus to collect data requires to lay massive electric cable, difficult in construction.Let alone the fact that the electric cables are easily eroded and broken down, with high cost in maintenance and limitations in data collecting scale [3][4].The wireless sensor unit is new technology to collect and process data, with wider monitoring scale, smaller size, lower cost and self-network [5][6].The wireless sensor nodes are deployed in the greenhouse to collect data can cut down the cost in laying electric cables and maintenance, alleviate labor intensity and coordinate data perception, monitoring and collection.This can help technicians better know the conditions in the greenhouse and make wise decision.In light of this, this paper designs a wireless monitoring system to collect data on environmental parameters in the greenhouse of tropical flowers.The wireless monitoring system can collect, process and report the environmental parameters, including temperature, humidity and light intensity in real-time.This can help technicians instantly know the growth condition of tropical flowers, which is significant in its effort to ensure safety production, lighten labor intensity and improve efficiency.The whole system is formed by sensor node, route node, sink node, local monitoring center and distant monitoring center, as presented in Figure 1.The sensor nodes and route nodes are deployed in the greenhouse and its surrounding, constituted by self-organizing network.The sensor nodes can collect data on temperature, humidity and light intensity.And these data can be sent to the sink node in the way of multi-hop.Then the local monitoring center will analyze, proceed, store, visualize and report data sent from sink node by serial port RS232.The sink node can also be connected into Internet, thereof sending data to distant monitoring center.

Hardware Design
The wireless sensor network nodes include sensor node, route node and sink node.The routing node can be substituted by sensor node.The sink node is connected with computers in monitoring center.As for hardware structure, it only needs to reduce sensor modules and increase serial communication ports modules.The design of rest parts are almost the same with the sensor nodes.

Hardware Structure
The sensor nodes include sensor module, processor module, wireless communication module and battery module.The sensor module is formed by temperature and humidity sensor, light sensor and peripheral circuit, responsible for collecting and transforming data on temperature, humidity and light intensity in the greenhouse.The processor adopts SCM MSP430F149, with low voltage and low power consumption, to collect data, configure parameters of each module and control data sending and receiving.The wireless communication module adopts nRF905, with low power consumption and adjustable transmitting power, to send local data among modules.The battery module provides electric power to maintain the normal function of each module.

Sensor Module Design
To guarantee the range and accuracy of data collected in the greenhouse, the temperature and humidity measuring device adopts the sensor, AM2306, developed by Guangzhou Lexiang Co. Ltd.AM2306, which contains calibrated digital signal output, is a compound sensor to measure temperature and humidity.The sensor includes one capacitive humidity sensor and one high-precision temperature sensor, connected with 8-bit SCM (Single Chip Microcomputer).And its advantages mainly reflect in quick response, anti-interference and high cost performance.Its precision of temperature measuring is within ±1°C and humidity measuring within ±2%RH.The 1-wire pin DATA of AM2306 connects with 5.1kΩ pull-up resistor and SCM port P2.0, as presented in Figure 2.   The processor module adopts SCM MSP430F149.Its main advantages reflect in low voltage, low power consumption and support 1.8V-3.6Velectric power supply, with only 280μA electric current in its full swing and 0.1μA in dormant state.It provides 5 low power modes, especially suitable for working condition of low power consumption.[7,8].The wireless communication module

Battery Module Design
Considering the requirements for outside monitoring, the battery module adopts 1200mAh and 3.2V lithium-ion ferrous phosphate battery to provide electricity.The voltage of two pcs of Li-battery is transformed into 5V after series connection through LT1129-5, and then 3.3V through LT1129-3.3, to provide electricity for the wireless communication module.Besides, the 5V voltage will be transformed into 12V voltage through LT1930, to provide electricity for sensor modules.

Node Software Design
The embedded node software, based on IAR Embedded Workbench, is developed by SCM C Language in hardware and modular programming in software, which include modules of major programmes, data collection, data receiving and sending, serial port communication.

Main Program
The node first initializes the hardware, including system clock, I/O port, timer and nRF905.Then the wireless communication module begins to synchronize information, adjust system time and send data based on time-to-bereceived.Later the node starts to periodically collect, send and receive data.Time intervals of data collection are set in 30 minutes.Every time data collection finished, the sensor will automatically power off to save electricity.Meanwhile, another timer is set up to mark the time of sending local data.During the period, the node can receive and send data from other nodes.When sending time is up, the node will send local collected data.If synchronized information received from sink node, the sensor will accordingly adjust system time and then stay in dormant state.Till the next time of data collection, a new cycle will begin, as presented in Figure 5.

Temperature and humidity measurement
The AM2306 adopts 1-wire to communicate with SCM MSP430F149.Firstly, SCM MSP430F149 pulls down DATA bus through port P4.0 and maintain above 500μs as starting signal, then pulls up 20~40μs of DATA, waiting responding signal of AM2306.When AM2306 monitor the starting signal, it transmits 80 μs low current through DATA pin as responding signal, then pulls up DATA to send data.The time and sequence are presented in Figure 6.The AM2306 once transmits 40-bit data, from high to low.The data format: 8 bit humidity integer data + 8 bit humidity decimal data + 8 bit temperature integer data + 8 bit temperature decimal data + 8 bit check code.The check code is the total amount of the former four bytes.For example, the AM2306 sends 40 bit data: 0000 0010 1001 0010 0000 0001 0000 1101 1010 0010; Humidity: 0000 0010 1001 0010 =0292H=65.8%;Temperature: 0000 0001 0000 1101=10DH=26.9°C;Check code: 1010 0010=62H.The check code of SCM: 0000 0010+1001 0010 +0000 0001+0000 1101= 1010 0010=62H.As is calculated, the check code is same, which shows the data is received correctly, or it will abandon data receiving.The process of measuring humidity and temperature is presented in Figure 7.
In Formula, NADC is digital quantity transformed by A/D converter.Iout is output electricity current of NHZD10AI, mA.
In Formula, LG light intensity, Lx.
LGmax is maximum value for light intensity, up to 2000 Lx.

Monitoring Center Software Design
The software in monitoring center can make it possible for technicians to look up real-time data.The software, developed by VB6.0, mainly conducts efficient serial communication with sink node through the control MSComm.Once the sink node begins to send data to serial port, the incident OnComm of MSComm will be triggered.The computer can collect data in OnComm incident, then adopts embedding function of external programmes to save and manage data in EXCEL.The software mainly achieves real-time monitoring of environmental parameters, realtime curve plotting, historical curve plotting, and historical data search and collection, warning and parameters set.The operating surface of real-time monitoring on environmental parameters is presented in Figure 8.

Results
The measurement data of sensor node in flowers greenhouses was compared with HTC-1 temperature and humidity meter.HTC-1 temperature measurement accuracy is ± 1% °C, and its humidity measurement accuracy ± 5% RH.It is shown that the maximum relative errors of temperature and humidity are 5.78% and 1.37% in Table1 and Table2.The results demonstrate that the system can implement real-time monitoring of parameters in the greenhouse of tropical flowers.

Conclusions
The paper designs a wireless monitoring system for environmental parameters of tropical flowers.The sensor node is controlled by SCM MSP430F149, to collect data on temperature, humidity and light intensity by AM2306 and NHZD10AI, and to send and receive data through nRF905.
The sensor node sends the data to sink node in the way of multi-hop.Then the sink node sends the processed data to local monitoring center through serial port RS232.This has achieved the wireless collection and monitoring of environmental parameters in the greenhouse of tropical flowers.The system has practical and realistic significance in safety production, alleviating labor intensity and improving efficiency in tropical flowers industry.

Figure 1 .
Figure 1.Network Structure of the Monitoring System

Figure 2 .
Figure 2. Interface between AM2306 and MSP430F149The light intensity sensor adopts NHZD10AI, developed by Wuhan Zhongke Nenghui Technology Development Co., Ltd.The NHZD10AI adopts imported luminance as its core, with output electric current 4-20mA and precision of ±5% rdg.NHZD10AI is connected into inside A/D converter P6.0 port after its output electricity current has been transformed into voltage through resistor R2, as presented in Figure3.

Figure 5 .
Figure 5. Main program flow chart of sensor node

Figure 7 .
Figure 7. Flow Chart of Software for Temperature and Humidity Measurement

Figure 8 .
Figure 8. Real-time Monitoring Interface [9] supply voltage is 1.9V-3.6V,withonly11mAunderoutputpower of -10dBm, 12.5mA in working mode and 2.5μA in shutdown mode.The idle mode and shutdown are set inside to save energy[9].The nRF905 has 3 sets of interface, including SPI transmission interface, state output interface and mode control interface.The SPI transmission interface is used to transform and exchange data with SCM, including 4 pins, CSN, SCK, MISO and MOSI, which respectively connects the port P1.0, P1.2, P1.6 and P1.4 of SCM MSP430F149.The state output interface is used to monitor data nRF905, including 3 pins, CD, AM and DR, which respectively connects the port P2.4,P2.2 and P2.0 of SCM MSP430F149.The mode control interface decides working mode of nRF905, including 3 pins, RX_CE, TX_EN, PWR_UP, which respectively connects with the port P3.0, P3.2 and P2.6 of SCM MSP430F149.The connection of nRF905 and SCM MSP430F149 is presented in Figure4.

Table 1 .
Temperature Measurement Data

Table 2 .
Humidity Measurement Data