You are on page 1of 7

1668 JOURNAL OF NETWORKS, VOL. 6, NO.

12, DECEMBER 2011

Design of Greenhouse Control System Based on


Wireless Sensor Networks and AVR
Microcontroller
Yongxian Song
The Institute of Electronic Engineering Huaihai Institute of Technology, Lianyungang , 222005,China
Email: soyox@126.com

Chenglong Gong, Yuan Feng, Juanli Ma and Xianjin Zhang


The Institute of Electronic Engineering Huaihai Institute of Technology, Lianyungang, 222005, China
Email: soyox@163.com

AbstractIn order to accurately determine the growth of multi-factors comprehensive control level, but if we
greenhouse crops, the system based on AVR Single Chip introduce the foreign existing systems, the price is very
microcontroller and wireless sensor networks is developed, expensive and maintenance isnt convenient. In recent
it transfers data through the wireless transceiver devices years, our country have launched many studies in aspects
without setting up electric wiring, the system structure is
simple. The monitoring and management center can control
of greenhouse structure and control, and made a lot of
the temperature and humidity of the greenhouse, measure achievements, but the greenhouse measurement and
the carbon dioxide content, and collect the information control system is mostly based on cable, so it is not only
about intensity of illumination, and so on. In addition, the wiring complex, but also unfavorable to improve the
system adopts multilevel energy memory. It combines system efficiency. With the rapid development of the low
energy management with energy transfer, which makes the cost, low power sensor and wireless communication
energy collected by solar energy batteries be used technology, the conditions that construct wireless
reasonably. Therefore, the self-managing energy supply greenhouse measurement and control system becomes
system is established. The system has advantages of low mature, and it is important to realize agricultural
power consumption, low cost, good robustness, extended
flexible. An effective tool is provided for monitoring and
modernization [1-3]. According to the needs of quickly
analysis decision-making of the greenhouse environment. and accurately acquisition greenhouse environment
information, in the paper, we have further studies in
Index Termswireless sensor networks, AVR, greenhouse aspects of greenhouse environment information
collection, treatment, transmission and so on, and we
I. INTRODUCTION have developed greenhouse measurement and control
system based on AVR microcontroller and wireless
Greenhouse is a kind of place which can change plant sensor networks. This system has high practical value to
growth environment, create the best conditions for plant realize information and automation of large-scale
growth, and avoid influence on plant growth due to greenhouse monitoring and improve work efficiency.
outside changing seasons and severe weather [4-5]. For
greenhouse measurement and control system, in order to II. THE GENERAL STRUCTURE OF THE SYSTEM
increase crop yield, improve quality, regulate the growth
period and improve the economic efficiency, the The greenhouse measurement and control system
optimum condition of crop growth is obtained on the compose of the monitoring center, sensor nodes and
basis of taking full use of natural resources by changing control equipments. Sensor nodes are deployed in every
greenhouse environment factors such as temperature, place of greenhouse, the responsible for periodic
humidity, light, CO2 concentration. Greenhouse acquisition greenhouse environment information and send
measurement and control system is a complex system it to control center. The control center analyze these data
it needs to various parameters in greenhouse automatic which has been obtained, then relevant decisions are
monitoring, information processing, real-time control and made and send control message to greenhouse control
online optimization. The development of greenhouse equipment, which regulate greenhouse environment
measurement and control system has made considerable parameters to obtain best growth environment for crops.
progress in the developed countries, and reached the Modern greenhouse has very large size, and which adopt
hierarchical system structure. Supposed that greenhouse
Manuscript received March. 5, 2011; revised March.25, 2011; is rectangular area, the measurement system overall
accepted April. 10, 2011. structure is shown in Fig.1.

2011 ACADEMY PUBLISHER


doi:10.4304/jnw.6.12.1668-1674
JOURNAL OF NETWORKS, VOL. 6, NO. 12, DECEMBER 2011 1669

communication module, continuous power supply


module and serial communication module.
A. Sensor node module design
Sensor node composed of CPU module, wireless
communication module, sensor module, position switch
and energy supply module. Its structure is shown in Fig.2.
Sensor module is responsible for monitoring area
information collection and data transfer, according to the
application requirements, and can choose temperature
sensor, humidity sensors, light sensor, carbon dioxide
concentrations sensor etc. Processor module is
responsible for controlling the sensor node operation,
storage and processing the data which collected by the
node and forwarded by other nodes. Wireless
communication module is responsible for wireless
Figure.1.The system structure of Greenhouse WSN measurement and communication, exchanging control information and
control transceiver acquisition data between this node and other
nodes. Position setting switch is used to set a sensor node
In Fig.1, the rectangular greenhouse was divided into specific physical location in greenhouses. Energy supply
several same area of greenhouse, each measurement and module can provide energy which the work need for
control area is managed by a base station, and is divided sensor node, in the paper, we adopt solar self-supply
into many virtual grids which have the same sizes and is module for node power supply.
non-overlapping. A number of sensor nodes are deployed
in virtual grid and make a cluster, each cluster includes a
cluster head (sink node) and some cluster member nodes.
Cluster head generated from the member nodes through
cluster head election algorithm, and cluster member
nodes compose of sensor nodes which can collect
environmental data and control nodes which can control
actuators and adjust environmental parameters. Control
node does not participate in cluster head election, it
obtain command which the monitoring center send from
cluster head node and execute corresponding control Figure.2 Sensor node structure chart
operation. The star network composed of Cluster head
nodes, sensor nodes and control nodes, it mainly
complete data acquisition and control of greenhouse
environment. The data which is collected is transmitted
directly from sensor nodes to cluster head, the cluster
nodes transferred data to the base station by way of
multiple hops, at last, the base station transferred each
cluster head node data which is packaged to the
monitoring center. Base station is relay station between
the monitoring center and greenhouse WSN nodes, the
network control is realized by managing all the nodes of Figure.3. Sink node structure chart
single greenhouse measurement and control area. The
monitoring center is not only total console of more
B. Sink node module design
greenhouse network, but also data center of measurement
and control system of the greenhouse network , and take Sink node mainly complete the sensor nodes data
charge of control and management of the entire system. gathering and fusion within communication network, and
realize ascending and descending communication
III. GREENHOUSE WIRELESS SENSOR NETWORK NODE protocol conversion. It released monitoring task of
DESIGN
management nodes, and the data collected is forwarded to
the external network through a serial port. It is not only
Greenhouse wireless sensor network measurement and an enhanced sensor node, but also special gateway device
control system consists of two types of nodes, namely, which hasnt monitoring function and only has wireless
sensor nodes and sink nodes. Sensor node composed of communication interface. Its structure is shown in Fig.3.
CPU module, wireless communication module, power It composes of a power supply module, storage module,
supply module, sensor module and position switch which processor module, node communication module and
can set their physical location information. Sink node serial interface communication module and so on.
contains three modules: CPU module, wireless Because sink node need process many sensor nodes data,

2011 ACADEMY PUBLISHER


1670 JOURNAL OF NETWORKS, VOL. 6, NO. 12, DECEMBER 2011

it work longer hours and dormancy time is short, the center can also inquire operation state, environmental
battery energy cant satisfy sink node energy data and send control node to control command etc.
consumption, so the sink node adopt solar self-supply 2. Data storage function. The monitoring center need
module for nodes power supply in the paper. to preserve historical monitoring data for enquiries, this
function is realized through the database.
C. Power supply module
3. Data analysis and decision support functions. The
In order to solve energy supply problem of sensor monitoring data is analyzed by agricultural expert system
nodes, we adopted solar energy supply system in the and establish the most suitable greenhouse environment
paper, and the structure is shown in Fig. 4. Fig.4 show control strategy.
that power supply module have energy collector, energy The base station of measurement and control not only
storage, backup energy memory, power management and controls all nodes of the district, but also is
control section. Energy collector composes of solar communication hub between the monitoring center and
panels, and it is responsible for transforming solar energy measurement and control area, mainly providing data
into electrical energy. Energy storage include the main forwarding and data buffer function.
level energy storage, constitute of super capacitance, and
is responsible for storing energy which is collected by
solar battery and provide energy for wireless network
sensor nodes. Backup energy memory composes of
lithium battery, and provide energy source for system in
an emergency. Power management and control section is
responsible for monitoring status of energy memory
which provide power supply according to the energy
status, and take solar cell as energy memory supplement
energy.

Figure.5.The monitoring center hardware structure

V. SYSTEM SOFTWARE

A. System software design


Figure.4. Solar self-supply module structure

IV THE DESIGN OF MONITORING CENTER


The monitoring center control operation of the whole
network through the base station of all measurement and
control area, and which the main task include sending
control command for network, collection and handling
monitoring data of each node in network and data is
stored into database, historical data is inquired and
analyzed. The monitoring center mainly composes of PC
and wireless communication module. The hardware
structure is shown in Fig. 5.
In Fig.5, the PC is taken as upper computer, CC2430 is
taken as a wireless communication module, and the
communication between them is realized through serial
port. In short, the main function of the monitoring center
is described below. Figure.6 System software flowchart
1. Network management and control function. Such as
starting or stopping network operation, configuration Modular design thought is adopted in system software
network parameters. Network parameters include sensor program which mainly composed of data collection
node data acquisition frequency, the frequency submitting system of the greenhouse and wireless control systems.
the data to base station, the length of each task time slot, The data acquisition system transfer the data that is
the routing probability vector and so on. The monitoring wireless sensor node acquisition own surrounding
environment information to sink node by wireless

2011 ACADEMY PUBLISHER


JOURNAL OF NETWORKS, VOL. 6, NO. 12, DECEMBER 2011 1671

network. The data message that is fused is sent to


controller by sink node. Meanwhile, the sink node
receives instructions from controller, and forwards
instructions to the sensor node. The flow chart of system
software is shown in Fig.6.
B. The software design of monitoring center
The monitoring center send the system starts
commands in spare time slot (Tidle) and receive the
network monitoring data of each node in cluster interstate
communication (Tinter) time slot. If necessary, other
management control commands can be sent in spare time
slot and routing time slot. In network formation time slot
and communications time slot within the cluster, each
node is busy with networking in greenhouse, and dont
monitor commands of control center, so the management
control command for network need not be sent and
complete some data processing tasks. We adopt
Microsoft access for the monitoring center database. The
program flowchart of monitoring center spare time slot is
shown in Fig.7 Figure.8 The program flowchart of monitoring center cluster interstate
communication time slot

C. The nodes deployed algorithm of measurement and


control system based on WSN in Greenhouse
In greenhouse WSN measurement and control system,
the sensor nodes deployed in greenhouse periodically
collected various environmental data and send it to
control center with multiple hops communication manner,
and it belongs to the typical centralized data collection
network. In Such system, due to the nodes near the base
station forward large quantities of data and premature
deaths, and the network is divided and even completely
paralyzed. The energy consumption hotspot is caused as a
result of load distribution imbalance between the nodes,
so we take phenomenon as funnel effect [6-7]. This
article solve funnel effect of greenhouse WSN
measurement and control system through redundancy
node technology, using a single measurement and control
Figure.7.The program flowchart of monitoring center spare time slot area of greenhouse as the research object, taking the
node's next-hop choose road probability as edge fuzzy
In spare time slot, the monitoring center mainly weights, and introduce fuzzy graph theory, and the data
completes start-up system functions. If the system is the probability from source cluster head to the destination
first start, then must connect to database. Then, the node cluster head node by m jump is calculated, so we
monitoring center send starts commands to the base obtain network data load distribution in greenhouse
station of all measurement and control area in measurement and control area by it, and the redundant
greenhouse, if not received a confirmation of the base and nodes deployed algorithm (RNDA) based on cluster load
no more than retransmission times, and the starts balancing was designed. In order to balance the network
commands is resent. If exceed retransmission times, and load, we adopt three ways in the algorithm, namely, the
fault diagnosis module is run. If received confirmation multi-path routing, redundant nodes deployment and
frame that the base station returns and spare time slot is cluster head election. The key of RNDA is that
not over, the monitoring center can complete other determines each cluster head routing probability
management control command. P
vector v , and can construct network topology through
In cluster interstate communication, the main task of
monitoring center collect data that greenhouse WSN this vector. In greenhouse WSN measurement and control
submitted and store in database. If users have Pv of cluster head v is pre-set according to the
system,
management control requirements, and it may priority
executed. The program flowchart of monitoring center Pv became the basis
nodes geographical location. In fact,
cluster interstate communication time slot is shown in for routing algorithms, when network begin to run, every
Fig.8. kind of node communicate each other by using the same

2011 ACADEMY PUBLISHER


1672 JOURNAL OF NETWORKS, VOL. 6, NO. 12, DECEMBER 2011

P a are all set to 5 in the following simulated experiments.


preset v , if the neighbor of a cluster head that can In Matlab 7.0, M document program is written according
communicate cant produce cluster head due to to algorithm process and the performance of RNDA
energy of all nodes are exhausted, and cluster head algorithm is researched, and compare with uniform
P deployment way. In a uniform deployment mode, the
topology will change, so the cluster head v should be
adjusted. The cluster interstate communications model is redundant nodes is evenly distributed in each cluster, the
shown in Fig.9, in order to narrative convenient, the networks is operated in three tasks slot mode.
1. Fig.10 shows that is 4 4 grid which d is
monitoring area is divided into the 5 5 grid, we can set
automatically grid number in simulation. 25cm (namely, d = 25m ), communications distance
dCI = 2d dCO = 2dCI
p v ( ev 3 ) within the cluster is and .
p v ( ev 4 ) pv ( ev 2 ) Fig.10 (a) data fusion coefficient is = 1/ a , Fig.10 (b)
pv( ev1 ) data fusion coefficient is = 1 .
p v ( ev 5 )
pv(ev6 )
pv ( ev 8 )
pv ( ev 7 )

pv = { pv (ev1 ) , pv(ev 2 ) , pv(ev 3 ) , pv (ev 4 ) ,


pv(ev 5 ) , pv (ev 6 ) , pv(ev 7 ) , pv(ev 8 ) }

Figure.9 Cluster interstate communications model

Fig.9 (b) shows that each cluster head has eight routing
Uniform deployment
P RNDA deployment
direction at most, namely, v has 8 component.
According to cluster head category, taking one part or a
few directions to give choose road probability value. Redundant nodes
P (e)
These choose road probability v can be freely
chosen, and ensure that the sum of choose road (a) Data fusion coefficient = 1/ a
probability is 1. In Fig.9 (a), according to the
geographical position, the cluster head is divided into hot
cluster head H (black dots representation), boundary
Network lifetime/round

cluster head, general cluster head (colorless circle) etc.


We consider that the cluster head which adopt data fusion
strategy and doesnt adopt data fusion strategies has on
impact the network lifetime in simulation, The main
purpose of WSN data fusion reduce the network data
quantity through integration of each sensor node
redundant information. In simulation experiments, the
data fusion is put into practice in cluster head nodes,
supposed that data fusion coefficient is 1( = 1 ) when
the data fusion strategy is not executed. If the data fusion
strategy is adopted, the different data fusion coefficient is
chosen according to different fusion degree. Because the
sensor nodes belong to isomorphism sensor nodes here,
the type of the information collected is consistent,
according to statistical knowledge, the small range
(b)Data fusion coefficient =1
environmental parameters hasnt too large difference, so
we fuse all child nodes data of one grid into a data, and
describe environmental information of the grid (e.g. Figure.10.The Redundant nodes have impact on the network lifetime
temperature, humidity). In Simulation experiments, 4 4 grid
supposed that the data fusion coefficient is
1 2. Fig.11 shows that is 5 5 grid which d is
a ( = 1/ a ) when the data fusion strategy is
20cm (namely, d = 20m ). Fig.11 (a) data fusion
adopted, a is the activities node number inside grid,

2011 ACADEMY PUBLISHER


JOURNAL OF NETWORKS, VOL. 6, NO. 12, DECEMBER 2011 1673

coefficient is = 1/ a , Fig.11 (b) data fusion coefficient VI. CONCLUSION

is = 1 . According to the characteristics of modern greenhouse


production, the paper introduce wireless sensor network
technique to greenhouse wireless detection-control
system, and the whole greenhouse system can automatic
adjust by combining wireless sensor network technology
with greenhouse control technology. In hardware, WSN
nodes mainly compose of Atmega128L and wireless
transceiver chip CC2420. In software, the modularized
design ideas is adopted in this paper, the sensor nodes
deployment is made a in-depth analysis, the simulation
results show that this algorithm can effectively prolong
the network life.

REFERENCES
[1] Du Xiaoming, Chen Yan.The Realization of Greenhouse
Controlling System Based on Wireless Sensor
Network[J].JOURNAL OF AGRICULTURAL
MECHANIZATION RESEARCH, 2009(6): 141-144.
[2] Qiao Xiaojun, Zhang Xin, Wang Cheng, et al. Application
of the wireless sensor networks in agriculture[J],
(a) Data fusion coefficient = 1/ a Transactions of the CSAE,2005, 9(21):232-234.
[3] S.L. Speetjens, H.J.J. Janssen, etc. Methodic design of a
measurement and control system for climate control in
horticulture[J]. COMPUTERS AND ELECTRONICS
IN AGRICULTURE, 2008, (64):162-172.
[4] Wang Linji.The Design of Realizing Change Temperature
Control in Greenhouse by PLC [J].ELECTRICAL
ENGINEERING, 2008, 5: 81-83.
[5] Liu Yanzheng, Teng Guanghui, Liu Shirong.The problem
of the control system for Greenhouse Climate[J].CHINESE
AGRICULTURAL SCIENCE BULLETIN. 2007,23: 154-
157.
[6] C. Y. Wan, S. B. Eisenman, A. T. Campbell, et al.
Overload traffic management for sensor networks[J]. ACM
Transactions on Sensor Networks, 2007, 3, Article No. 18.
[7] G. S. Ahn, E. Miluzzo, A. T. Campbell, et al. Funneling-
MAC: A Localized, Sink-Oriented MAC For Boosting
Fidelity in Sensor Networks[C]. Proceedings of the 4th
international conference on Embedded networked sensor
systems. New York: ACM, 2006: 293-306.
(b)Data fusion coefficient = 1
[8] Li Nan, Liu Chengliang, Li Yanming, Zhang Jiabao, Zhu
Figure.11.The Redundant nodes have impact on the network Anning. Development of remote monitoring system for soil

lifetime ( 5 5 grid)
moisture based on 3S technology alliance[J]. Transactions
of the CSAE, 2010, 264: 169-173.
As can be seen from the above graph, the network [9] P. Santi, J. Simon. Silence Is Golden with High
lifetime that the data fusion strategy is adopted is Probability: Maintaining a Connected Backbone in
probably 2 ~ 3 times than the data fusion strategy isnt Wireless Sensor Network[C]. 1st European Workshop on
adopted. Virtual grid number has also impact on the Wireless Sensor Networks. Berlin: wireless sensor
network life, the more virtual grid were classified in networks, proceedings, 2004: 106-121.
monitoring area, the greater the network data quantity is, [10] F. Chen, P. Jiang, Q. He. Phased waking coverage scheme
based on hibernation of redundant nodes for wireless
and the shorter the network lifetime is. RNDA compare
sensor networks[C]. Proceedings-International Symposium
with uniform deployment mode, Fig.11 (a) shows that the on Computer Science and Computational Technology. NJ:
network lifetime improved 35.8 percent in A and B dot. Institute of Electrical and Electronics Engineers Computer
When we extend the same network life, RNDA can save Society. 2008: 709-713
a lot of redundant nodes. Compared with uniform mode, [11] Z.M. Li, L. Lei. Sensor Node Deployment in Wireless
the RNDA only deployed 24% redundant nodes when the Sensor Networks Based on Improved Particle Swarm

network lifetime is 3.5 104 round. Optimization[C].Proceedings of 2009 IEEE International


Conference on Applied Superconductivity and
Electromagnetic Devices. 2009:25-27.
[12] J.H. Tarng, B.W. Chuang, PC. Liu. A relay node
deployment method for disconnected wireless sensor

2011 ACADEMY PUBLISHER


1674 JOURNAL OF NETWORKS, VOL. 6, NO. 12, DECEMBER 2011

networks:Applied in indoor environments[J]. Journal of He is currently working as a professor with the department
Network and Computer Applicatons. 2009.32:652-659. of electronic engineering of Huaihai Institute of Technology,
[13] Y.C. Wang, Y.C. Tseng. Distributed Deployment Schemes Lianyungang 222005, China. His main research interesting is
for Mobile Wireless Sensor Networks to Ensure Multilevel automatic measurement, control and system theory, computer
Coverage[J]. IEEE TRANSACTIONS ON PARALLEL network applications.
AND DISTRIBUTED SYSTEMS. 2008.19(9):1280-1294.
[14] P. Gajbhive, A. Mahajan. A Survey of Architecture and
Node deployment in Wireless Sensor Network[C]. 1st Yuan Feng was born in Lianyungang ,on
International Conference on the Applications of Digital March 28,1978. He received the B.S. degree
Information and Web Technologies, ICADIWT 2008: 426- in Computer hardware and application from
430. Huaihai Institute of Technology,
[15] W.T. Xu, X.H. Hao, C.L. Dang. Connectivity Probability Lianyungang, China, in 1999, and the M.S
Based on Star Type Deployment Strategy for Wireless degree in Industrial Control from Nanjing
Sensor Networks[C].Proceedings of the 7th World University of Science, Nanjing, China, in
Congress on Intelligent Control and Automation. 2007.From 1999 to now, he has been a teacher in Huaihai
2008:1738-1742. Institute of Technology, Lianyungang,China. His current
research interests include signal processing, Computer Control
Technology.
Yongxian Song was born in xuzhou,on
April 1,1975. He r eceived the B.S. degree
in Applied Electronic Technology from Hu Juanli Ma female, lecturer, born in 1976,
aihai Institute of Technology, 1995-1999 studied at Gansu University of
Lianyungang,China, in 1997, and the M.S Technology, studying electrical automation,
degree in Control Theory and Control and obtained a bachelor degree. 2004-2007
Engineering from Jiangsu university, studied at the Northwestern Polytechnical
Zhenjiang, China , in 2006. From 2009 to University, studying control theory and
now, He is studing for Ph.D degree in Control Theory and control engineering and obtained a Master
Control Engineering from Jiangsu university, Zhenjiang, China. degree in Engineering. From1999 to now, she
Since 2006, he has been a teacher in Huaihai Institute of has been working in the Huaihai Institute of Technology.
Technology, Lianyungang, China. His current research interests
include signal processing ,intelligent control, and industrial
control . Xianjin Zhang was born in suqian, in1975.
He received the B.S. degree in Applied
Chenglong Gong was born in 1964, male.He Electronic Technology from Guilin University
received the B.S. degree in Automatic of Electronic Technology, Guilin, China, in
Control from University of Electronic 1998, and the M.S degree in Power Electronic
Science and Technology, Chengdu, China, in and Control Engineering from Nanjing
1984, and the M.S degree in Automation University of Aeronautics & Astronautics,
Control from China University of Mining and Nanjing, China, in 2005. Since 2005, he
Technology, Xuzhou, China , in 1988. has been a teacher in Huaihai Institute of Technology,
Lianyungang, China. His current research interests include
electric and electronical converting technique.

2011 ACADEMY PUBLISHER

You might also like