Sunteți pe pagina 1din 5

A Design of Greenhouse Monitoring & Control System Based on ZigBee Wireless Sensor Network

Zhou Yiming, Yang Xianglong, Guo Xishan, Zhou Mingang, Wang Liren
Department of Bio-System Engineering, Zhejiang University Hangzhou 310029, China benton.zym@tom.com
AbstractThe wireless sensor network (WSN) is one of the most significant technologies in the 21st century. As an open and global standard for WSN, ZigBee shows advantages on low-cost, low power consumption and self-forming. The current researches of ZigBee wireless sensor network on industrial automation, electronic products, smart buildings and medical care were presented and, as an explorative application of ZigBee wireless sensor network in protected agriculture overcoming the limits of wire connection, its applied design for greenhouse management was proposed by introducing both the hardware and software architectures. The node power consumption was also discussed. Finally, the architecture of ZigBee-based mesh network greenhouse management was indicated. Keywords-wireless sensor network; ZigBee; monitoring and control system; application greenhouse;

I.

INTRODUCTION

Wireless sensor network, which integrates sensor technology, MEMS technology, wireless communication technology, embedded computing technology and distributed information management technology, has been under rapid development during recent years. Because of the wide application prospect, it interests the world. Business Week ever predicted in 1999 that WSN technologies would be one of the most important technologies in 21st [1]. ZigBee is an open and global standard for WSN aiming at a low rate, low cost, low power consumption and self-forming wireless communication. The major applications of ZigBee focus on sensor and automatic control, such as military application, industrial control, smart buildings and environment monitoring. Agriculture automation is also an applicable field recommended by ZigBee alliance. This paper presents the current researches of ZigBee wireless sensor network on industrial automation, electronic products, smart buildings and medical care. The example of greenhouse management application is also given. The architectures including the hardware and software design is proposed. II. PRESENT RESEARCHES ON ZIGBEE TECHNOLOGIES

A. Industrial control Jin et al. (2006) [2] reported to apply the ZigBee technology to mine safe production. The ZigBee device wirelessly transmitted the data collected by the sensors on colliers body to the gateway which transferred them to the computer finally. The computer analyzed the data and insured the safety. Cao et al. (2006) [3] presented his application of ZigBee on wireless natural gas meter record and transmission. The implementation of ZigBee wireless network into Modbus fieldbus control system was developed by Zhou et al. (2006) [4] which not only ensured the security and real time of the connection but also reduced the cost of deployment and redeployment. Srkimki et al. (2006) [5] presented the applicability of the ZigBee technology to electric motor rotor measurements. Requirements for data transmission, electrical structure and powering of a sensor were also discussed and a prototype wireless ZigBee-based torque sensor was built and tested. B. Electronic products and house automation Huang et al. (2006) [6] discussed the problems of ZigBeebased WSN in supporting multimedia services, and proposed their reference design that can overcome these problems including the aspects of sensor nodes hardware and software architecture, network configuration and data transmission. An image sensor network platform was developed by Pekhteryev et al. (2006) [7] for testing transmission of images over ZigBee networks that support multi-hopping. These technologies can be adopted by electronic products like mobile phones and so on. Zhang et al. (2005) [8] discussed some key issues in home networking with ZigBee. Feng et al. (2005) [9] proposed a solution for home electric appliances network based on ZigBee technology and the ZigBee device types, hardware design, routing protocol and network topology were introduced in detail. Yu (2006) [10] presented the ways to achieve the automatic and long-distance remote control center in families by connecting all types of intelligent electrical appliances, monitoring and alarming equipments through ZigBee network based on ARM embedded systems.

Applications on industrial control, smart buildings, electronic products, house automation and medical care were recommended by ZigBee alliance. Literatures also show that most studies focused on these fields.

1-4244-1312-5/07/$25.00 2007 IEEE

2563

C. Smart Buildings Egan (2005) [11] indicated the application prospect of ZigBee technology on smart buildings. While Yang et al. (2005) [12] conducted an experiment in a building to monitor the fire hazard using a ZigBee-based Ad Hoc network and the result was of satisfaction. D. Medical care Wang et al. (2006) [13] presented an architecture as well as circuit implementation of ZigBee receiver for personal medical assistance using 868/915 MHz band, which was compliant to the physical layer of IEEE standard 802.15.4. An embedded remote health care system based on wireless sensor network technology was developed by Zhao et al. (2005) [14]. The designs of several sensor nodes and the care base-station and the wireless communication based on IEEE 802.15.4 / ZigBee standard between them were introduced. By connecting the base-station with a networked home PC, the doctor could check the data through another networked computer to see if the patient was fine. III.
DESIGN

between paired nodes. The end device acts as a leaf node in the network. ZigBee-based wireless monitoring and control system in one greenhouse is composed of a coordinator and several end devices including sensor nodes and actuator modules organized as a star network shown in Fig. 1. By running greenhouse management software, the coordinator periodically receives the data from the wireless sensor nodes and displays them on its LCD. Meanwhile, it sends orders to actuator modules in the network to control the electrical machines automatically or manually.

However, wireless technologies have been widely used in agriculture nowadays [15][16], but most of them were restricted to simple communication between control computer and end devices like sensors instead of wire connection, which couldnt be strictly defined as wireless sensor network. As its increasing applications on agriculture, researchers summarized the following five aspects of environmental monitoring, precision agriculture, machine and process control, building and facility automation, traceability systems [17]. Greenhouse monitoring and control system has been greatly developed during the past decades. The sensors were used to monitor the parameters, and a computer with expert strategies on greenhouse management was applied to analyze the data to implement automated control. However, these systems have mostly been wire connected and this limits the use because of the high expenses in installation and maintenance. Although references show that wireless sensors based on several communication techniques have already been used in greenhouse, WSN is believed to eliminate the big costs of just wiring [18][19]. According to the greenhouse actualities, ZigBee WSN technologies are thought the most suitable for greenhouse application because of its low cost, low power consumption, self-forming and high network capacity. The applicable design dedicated for greenhouse management is introduced as follows. A. Star network in greenhouse ZigBee defines the network, security, and application framework profile layers for an IEEE 802.15.4-based system. ZigBees network layer supports three networking topologies; star, mesh, and cluster tree. Star networks are common and provide for very long battery life operation. The ZigBee logical device types are ZigBee Coordinators, ZigBee Routers, and ZigBee End Devices. The coordinator initializes a network, manages network nodes, and stores network node information. The router participates in the network by routing messages

Figure 1. The star network applied in one greenhouse management

B. Node hardware The design of wireless transceiver and its energy consumption was a difficulty before JN5121 was developed. The JN5121 is the first in a series of low power, low cost IEEE802.15.4 compliant wireless microcontrollers. Combining an on chip 32-bit RISC core, a fully compliant 2.4GHz IEEE802.15.4 transceiver, 64Kb of ROM and 96Kb of RAM, provides a versatile low cost solution for wireless sensor networking applications. The high level of integration helps to reduce the overall system cost. In particular, the ROM enables integration of point-to-point and mesh network stack protocols, and the RAM allows support of router and controller functions without the need for additional external memory. The JN5121 uses hardware MAC and highly secure AES encryption accelerators for low power and minimum processor overhead. Integrated sleep oscillator and power saving facilities are provided, giving low system power consumption. The device also incorporates a wide range of digital and analogue peripherals for the user to connect to their application [20]. As an example of a sensor end device integrated temperature, humidity and light, the design is shown in Fig. 2.

Figure 2. The hardware design of a sensor node

1-4244-1312-5/07/$25.00 2007 IEEE

2564

The SHT1x is a single chip relative humidity and temperature multi sensor module comprising a calibrated digital output. The TSL2550 is a digital light sensor with a two-wire, SMBus serial interface. SHT1x and TSL2550 are both digital sensors with small size and low power consumption. The extra flash is used to store the programs. Antenna is connected to the built-in transceiver through a balun. Other sensor nodes can be obtained by changing the sensors. The actuator module comprises JN5121, relays and some anti-jamming circuits serving as a driver for electrical machines. Compared with end devices, coordinator also contains a LCD and four buttons for displaying, settings and manual operations. The sensor nodes are powered from onboard batteries and the coordinator also allows to be powered from an external power supply determined by a jumper. C. Node software The application system consists of a coordinator and several end devices. The general structure of the code in each is the same, with an initialization followed by a main loop. In the main loop, interrupts are used extensively to synchronize operation, which allows the device to put the CPU to sleep for long periods whilst nothing is happening [21]. The Fig. 3 shows the software flow of coordinator. Upon the coordinator being started, the first action of the application is the initialization of the hardware, stack and application variables. Then it sends out regular beacons containing a beacon payload of 8 bytes. The first byte of the beacon payload contains a specific value so that the end devices can use this to verify that the coordinator is running the demonstration. As each end device associates with the coordinator it is given a short address with which to identify it. Also the keys are only checked 20 times per second. This avoids the need for any key de-bounce software algorithm without giving a perceived operating delay. Any MLME or MCPS events are processed as they occur, handling association requests and received frames from end devices. The application puts the CPU itself into doze mode whenever possible. The buttons have different functions under different LCD screen. The Network Screen shows the current values for all sensor nodes and states for all actuators. To select a Node Display screen, the NODE button should be pressed. This screen displays the value for one sensor node and the link quality. Pressing the SETINGS button causes the Node Setting screen which allows the high and low limit values to be set. If it is an actuator node, the three buttons act as manual operations of OPEN, CLOSE and STOP. To select another sensor node, the NODE button should be pressed orderly until the Network Screen shows again.

Figure 3. The software flow diagram of coordinator

The Fig.4 shows the software flow of a sensor node. As each sensor node is switched on, it scans all channels and, after seeing any beacons, checks that the coordinator is the one that it is looking for. It then performs a synchronization and association. Once association is complete, the sensor node enters a regular loop of reading its sensors and putting out a frame containing the sensor data. As the beacons from the coordinator contain a payload, the sensor node receives an MLME indication from the stack whenever a beacon arrives. This is used to trigger the next read of the sensors.

Figure 4. The software flow diagram of end device

D. Node Power Consumption The node power consumption mainly includes JN5121 current consumption and sensors on board power consumption [22]. Because the coordinator in our application can be powered from an external power supply besides batteries, so sensor node power consumption is discussed below. 1) JN5121 current consumption.: The sensor node in the enabled star network that continuously performs the following actions in one minute: Wakes from sleep.

1-4244-1312-5/07/$25.00 2007 IEEE

2565

Reads data from a sensor connected to the two-wire serial interface. Performs a Clear Channel Assessment (CCA). Transmits a data frame containing a payload of 64 bytes. Sleeps (without holding the memory contents) before repeating Step 1.

serial interface. During this time, the current drawn by the JN5121 is 9mA. c) Perform CCA: Before a data frame can be transmitted, the CSMA/CA algorithm is used to check that the channel is not being used. The CCA takes 8 symbol periods (0.128ms) to complete. If the channel is found to be busy, the back-off periods should be added. One back-off period is equal to 20 symbol periods. Assume that the channel is found to be clear after the CCA and that the random back-off period is 2, the time taken to execute the CSMA/CA algorithm can be calculated as follows. Back-off Period = (22-1)*20/62.5=0.96 ms CCA Period =0.128 ms During the back-off period, the application is running and the transceiver is on although it is not transmitting and receiving. The current drawn during this period is 12.8mA. During a CCA, the radio receiver is on and therefore the current drawn is 49mA. d) Transmit data: The data frame includes 6 bytes of Physical layer header and 13 bytes of the MAC layer header. The payload size of sensors data is 6 bytes. The data transmission period can be calculated as follow. Data Transmission Period= (6+13+6)*8/250=0.704ms The current drawn during this period is 44mA, the radio transmitting current. e) While Sleep: The current drawn during the approximate one minute sleep period is 3.5A. 2) Sensors power consumption: The supply current of the humidity and temperature Sensor SHT1x and the ambient light sensor TSL2550 is 0.55mA and 0.35mA while measuring, 0.3A and 10A while sleep respectively. The periods related these two modes are 5ms and 1 minute. Using the above time and current data, it is possible to calculate the average current required by the application is 17.4A approximately. So the node should therefore be capable for about five years when powered by two 750mAh batteries. E. ZigBee-based mesh network for greenhouses management The star network is limited to one greenhouse management, so its not available for many greenhouses around in one area. However, ZigBees self-forming and self-healing mesh network architecture permits data and control messages to be passed from one node to other node via multiple paths. This feature extends the range of the network and can be competent for many greenhouses application.

Table 1 shows the current consumption of JN5121 while performing various operations. All quoted currents are typical values at 3V and 25 .
TABLE I. Operation Sleep (RAM contents not held) Sleep (RAM contents held) CPU active (wireless transceiver off) CPU active (wireless transceiver on) Radio transmitting Radio receiving THE CURRENT CONSUMPTION OF JN5121 Current(mA) 0.0035 0.025 9.00 12.80 44.00 49.00 CPU in doze mode CPU in doze mode Notes

The timings of all 802.15.4 operations are based on one fundamental piece of information, the symbol rate. When operating in the 2.4-GHz band, the symbol rate is defined as 62500 symbols per second. Each symbol comprises four bits of information and, therefore, the over-air data rate is 250 kbps. So, the time mentioned below taken to perform common 802.15.4 network operations is all based on this data rate. The time taken by the JN5121 to perform operations that are not related to the 802.15.4 protocol is shown in Table.
TABLE II. THE TIME TAKEN BY JN5121 DISRELATED TO THE 802.15.4
PROTOCOL

Operation Oscillator start time Application load time

Time (ms) 2.5 0.84*n

Notes

n is application size in Kbytes

Now, we can calculate the power consumption of each action. a) Wake from sleep: Since the contents of RAM have not been held, the time taken to wake from sleep mode can be calculated by adding the oscillator start time to the application load time. Therefore, the time to wake from sleep equals 13.084 ms (0.25+0.84*12.6, see Table ). When loading the application, the wireless transceiver will not be operating and therefore the current drawn is 9mA. b) Read data from sensors: It is assumed that it takes 5ms to read data from the sensors attached to the two-wire

1-4244-1312-5/07/$25.00 2007 IEEE

2566

[2] [3]

[4]

[5]

[6]

[7] Figure 5. The architecture of ZigBee-based mesh network for greenhouses management

[8]

Fig. 5 shows the architecture of ZigBee-based mesh network for greenhouses management. The embedded controller, served as ZigBee coordinator in the network, can receive the real-time sensor data from routers in all greenhouses and control the electronic machines by sending them orders. The data from each greenhouse are displayed on LCD. The star network introduced in section 3.1 is applied in a certain greenhouse. The difference is that the coordinator in star network acts as a router in mesh network which participates in the network by routing messages between paired nodes. The router in a remote greenhouse can talk with the coordinator through its neighbor routers. The multiple paths ensure the reliability of communication. Using JN5121 as a transceiver, the embedded controller adopts the ARM embedded system to achieve a complicated greenhouse management system by planting Linux operation system and expert strategies [22]. It also can be connected by remote computer via GPRS or Ethernet which allows people working at home. The design of a router refers to section 3.2. IV. CONCLUSION

[9]

[10]

[11]

[12]

[13]

[14]

[15]

[16]

Greenhouse prevents the plant from the effects of climate, inspect and so on, which makes great sense for agricultural production. The automation and high efficiency on greenhouse environment monitoring and control are crucial. Applying ZigBee-based WSN technologies to greenhouses is a revolution for protected agriculture which overcomes the limits of wire connection systems. Such a system can be easily installed and maintained. After several moths test, the system has been working normally and shows its competent abilities on precision irrigation and animal facilities. ACKNOWLEDGMENT The work is supported by the foundation of Zhejiang Provincial Science and Technology Department (No. 2005C22060). REFERENCES
[1] 21 ideas for the 21st century, American: Business Week, August 1999, pp. 78-167.

[17]

[18]

[19]

[20] [21] [22] [23]

C. Jin Y.S. Qi, Z.Q. Luo, The application of ZigBee on mine safety, Safety in Coal Mines, Vol. 9, No. 2, pp. 39-41, Febrary 2006. Z. Cao, C.X. Cao, X.J. Tang, Design and Application of Wireless M eter Reading System Based on ZigBee, Automation Panorama, Vol. 23, No. 1, pp. 45-48, Febrary 2006. J.Y. Chen, X.P. Zhou, ZigBee Wireless Communication Technology in Industrial Controls, Radio Engineering of China, Vol. 36, No. 6, pp. 61-64, 2006. V. Sarkimaki, R. Tiainen, T. Lindh, J. Ahola, Applicability of ZigBee technology to electric motor rotor measurements, Proceedings of International Symposium on Power Electronics, Electrical Drives, Automation and Motion. Italy: Taormina, May 2006, pp. 137-141. H.C. Huang, Y.M. Huang, J.W. Ding, An implementation of batteryaware wireless sensor network using ZigBee for multimedia service, Proceedings of ICCE 2006. Vietnam: Hanoi, January 2006, pp 369-370. G. Pekhteryev, Z. Sahinoglu P. Orlik, G. Bhatti, Image transmission over IEEE 802.15.4 and ZigBee networks, Proceedings of ISCAS 2005. Japan: Kobe2005, pp. 3539-3542. W.Y. Zhang, L. Feng, Z.C. Wei, Research on home networking with ZigBee, Journal of Hefei University of Technology(Natural Science), Vol. 28, No. 7, pp. 755-799, July 2005. P.G. Feng, L. Feng, Z.C. Wei, An Application Model in Home Network Based on Zigbee, Journal of Henan University of Science & Technology(Natural Science), Vol. 26, No. 6, pp. 43-46, December 2005. C.Y. Yu, Application of Zigbee to Familys Long- Distance Remote Control Managing System, Journal of Dalian Nationalities University, Vol. 8, No. 3, pp. 60-61, May 2006. D. Egan, The emergence of ZigBee in building automation and industrial control, Computing & Control Engineering, Vol. 16, No.2, pp. 14-19, April/May 2005. R. Yang, T. Yang, Wireless Sensor Network Based on ZigBee with Applications for Smart Building, Agricultural mechanization of China, Vol. 5, pp. 76-79, May 2005. C.C. Wang, J.M. Huang, C.Y. Chang, C.P. Li, 868/915 MHz ZigBee receiver for personal medical assistance, Proceedings of ICCE 2006. Vietnam: Hanoi, 2006, pp. 461-462. Z. Zhao, C. Li, EasiMed: A remote health care solution. Engineering in Medicine and Biology Society, Proceedings of IEEE-EMBS 2005. China: Shanghai, 2000, pp. 2145-2148. H.Q. Luo, X. Zhang, E. Liu, X.J. Qiao, Y.H. Zhang, The Design of Wireless Sensor in Greenhouse Environment Measurement. Sensor World, Vol. 12,No. 5, pp. 45-48, 2006. R. Morais, C.J. Boaventura, M. Cordeiro, C. Serdio, P. Salgado, C. Couto, Solar data acquisition wireless network for agricultural applications. In: Proceedings of Nineteenth Convention on Electrical and Electronics Engineers. Israel: Jerusalem, 1996, pp. 527-530. N. Wang, N.Q. Zhang, M.H. Wang, Wireless sensors in agriculture and food industry-Rencent development and future perspective, Computers and Electronics in Agriculture, Vol. 50, No.1, pp. 1-14, January 2006. C.M.J. Alves-Serodio, J.L. Monteiro, C.A.C. Couto, An integrated network for agricultural management applications, IEEE International Symposium on Electromagnetic Compatibility. America: Denver, 1998, pp. 679-683. C. Serdio,  J.B. Cunha, Raul Morais, C. Couto, J. Monteiro, A networked platform for agricultural management systems, Computers and Electronics in Agriculture, Vol. 31, No. 1, pp. 75-90, March 2001. Datasheet: JN5121. Reference Manual: JN-RM-2004-Demo-Application-Software. Available: http://www.jennic.com. Reference Manual: JN-AN-1001-Power-Estimation-1v3.pdf, Available at: http://www.jennic.com. P.P. Li, Z.J. Xia, Y.G. Hu, H.P. Mao, Preliminary study on intelligent decision support system for cucumber environment management in greenhouse, Journal of Jiangsu University (National Science Edition), Vol. 25, No. 1, pp. 5-8, January 2004.

1-4244-1312-5/07/$25.00 2007 IEEE

2567

S-ar putea să vă placă și