Advance Journal of Food Science and Technology 6(12): 1339-1342, 2014

advertisement
Advance Journal of Food Science and Technology 6(12): 1339-1342, 2014
ISSN: 2042-4868; e-ISSN: 2042-4876
© Maxwell Scientific Organization, 2014
Submitted: August 01, 2014
Accepted: September 23, 2014
Published: December 10, 2014
Design of Intelligent Greenhouse based on STC89C52
Chunyou Zhang
Inner Mongolia University for the Nationalities, College of Mechanical Engineering,
TongLiao, 028000, China
Abstract: The growth of various crops requires specific environment. Intelligent greenhouse, can create the best
external environment for the growth of all kinds of plant through regulation. In this study, intelligent greenhouse
takes the single chip processor as the core, the design of temperature and humidity sensor is AM2301 of lian cheng
chuang fa technology co, LTD. The system is mainly to complete the acquisition of scene temperature and humidity
data; According to the actual needs of animal and plant growth to adjust litre cooling equipment, humidifying
equipment, drop wet equipment and ventilation equipment, to provide the relatively controllable and even the most
suitable temperature, humidity, light, water and other environmental conditions for animal and plant production, to
create the most suitable small artificial environment for the growth of the plants and animals to meet the need of
modern agriculture.
Keywords: Environmental condition, intelligent greenhouse, single chip processor
INTRODUCTION
Agricultural facilities (Chen et al., 2008) is through
the application of modern engineering and technology
for the growth of plants and animals to create the most
suitable temperature, humidity, light, fertilizer and other
environmental conditions, so that the growth of plants
and animals can get rid of dependence on the natural
environment, efficient agricultural production, it is a
high-tech, high-yield, high efficiency and other
characteristics, is the most dynamic new agricultural
industry.
Intelligent Greenhouse (Wu, 2008) as an important
form of facility agriculture to achieve, because space is
relatively closed to outside climate is small, easy to
control the greenhouse climate and other characteristics,
widely applied.
Intelligent Greenhouse by adjusting the
temperature, humidity, light, CO2, soil PH value,
nutrition and other environmental parameters, make the
environment in the most suitable for a certain crop
growth status, provide a good growing environment for
the growth of crops, to control crop growth cycle,
improve the yield and quality of crops.
In the development of intelligent greenhouse
system, it is important to choose the control structure.
The reasonable control of the structure of greenhouse
control system can improve the control accuracy,
reliability, application flexibility. The control frame of
this system adopts distributed structure, on the whole,
the host computer system consisting of micro computer,
lower computer by scm. So to determine the structure of
the control system is the main reason there are two, one
is taking into account the system's scalability. In
practical applications, according to the production
situation may need to be adjusted number of
greenhouses, such as building a greenhouse to increase
or decrease the building greenhouses. In this control
system, the response to this situation, only the number
of the next crew change it. Second, the compatibility of
this structure is good. Whether it is the host-terminal
mode, or truly distributed model, both on the hardware
layout preclude the use of this distributed architecture,
the system chooses this structure is convenient for
system upgrading. The core controller of the control
system is the macro crystal company STC89C52RC
mcu. STC89C52RC is an enhanced MCS 51 kernel 8 bit
microcontroller based on macro crystal technology
company. STC89C52RC microcontroller has strong
code encryption, strong anti-interference, low power
consumption, low price, high ratio of performance to
price obvious characteristics, fully satisfies the
application demand.
THE DESIGN OF CONTROL SCHEME
M This study mainly regulate the greenhouse
temperature and humidity, controlled object of all the
temperature and humidity inside the greenhouse
equipment, mainly some switching devices, such as
sunroof motors, ventilation motors. The control system
uses a distributed control structure, that is, from one
host to manage multiple slaves, each slave can manage
a greenhouse. Host (PC) (Peng, 2003) preclude the use
of micro-computer, so you can take full advantage of
the computing speed and storage advantages of the
host; slave (the crew) preclude the use of MCU, mainly
to complete the data collection and field preclude
control. The core of controller is STC89C52
microcontroller in the crew, completed the main drive
of temperature and humidity sensors, the controllable
1339
Adv. J. Food Sci. Technol., 6(12): 1339-1342, 2014
VCC
P2.1
DC5
3
4
5
6
10
11
12
13
3
4
5
6
10
11
12
13
PC3
1K
DC3
DC2
PC2
.
g
f
e
d
c
b
a
.
g
f
e
d
c
b
a
1K
PC1
8
7
6
5
4
3
2
1
8
7
6
5
4
3
2
1
.
g
f
e
d
c
b
a
1K
8
7
6
5
4
3
2
1
8
7
6
5
4
3
2
1
.
g
f
e
d
c
b
a
1K
DC4
PC4
1.2 74LS164(1)
3
4
5
6
10
11
12
13
1.2 74LS164(1)
1.2 74LS164(2)
9
8
9
8
9
8
9
1.2 74LS164(1)
3
4
5
6
10
11
12
13
P2.4
8
PC5
DC1
PC0
DC0
1K
1K
1K
1K
1K
1K
LED4
9
LED3
9
LED2
9
9
GND
LED1
VCC
Fig. 1: Display system circuit diagram
P2.5
P2.4
3
4
1.2 5
6
10
11
8 12
13
74LS164(0)
Col1 P2.2
Col2
Col3
Col4
Col5
Col6
Col7
Col8 P2.3
Col6
S1
4 1
3 2
S5
4 1
3 2
S6
4 1
3 2
S3
4
3
S7
4
3
S11
4 1
3 2
S12
4 1
3 2
S13
4 1
3 2
S14
4 1
3 2
S15
4 1
3 2
S16
4 1
3 2
S17
4 1
3 2
S18
4 1
3 2
Col1
Col7
Col2
S4
4
3
S8
4
3
1
2
1
2
Col3
VCC
Col8
Col5
S2
4 1
3 2
S19
4 1
3 2
1
2
1
2
R5
5.1K
GND
VCC
S20
4 1
3 2
VCC
R6
5.1K
P3.2
P3.3
GND
Col4
Fig. 2: Key system circuit diagram
device driver and communication, display, on-site
control etc. The system for subsequent set aside part of
the interface development and design. The PC software
provides man-machine interface of this system, it not
only can complete the general control, also can realize
the measurement data record.
digital control in Fig. 1, it is common anode sevensegment LED display principle as a static display.
DC0~DC5 in Fig. 1, this six light-emitting diodes, are
in line with the seven-segment digital display lights
work, for indicating the display contents on the display
means.
Key system includes two parts, one part is the
THE DESIGN OF HARDWARE SYSTEMMERITS
ordinary 16 key keyboard, another part is used for
OF AGENT-ORIENTED MODELING
emergency treatment of emergency button. Mergency
button connected to two external interrupts of
The main function of the lower unit is temperature
STC89C52RC (Wang, 1999) on the application source,
and humidity measurement and site control, no need to
as long as the button is pressed it will promptly apply to
show a complex function. Therefore, the system
the microcontroller interrupt and then get timely
preclude the use of seven-segment LED (Li, 2007;
treatment. Key system circuit diagram shown in Fig. 2.
Zhang and Peng, 2002) display system consisting of the
Figure 2, matrix keyboard using query mode, the
next crew. Segment digital tube has a simple structure,
normal work of all lines are low level, all column lines
the combination of flexible, easy to control, display
are low during normal operation, when a key is pressed,
characteristics of stability, more suitable for composing
P2.2 and P2.3 lines two lines have a root line goes low,
simple digital display system. A display part of the
the row lines can also determine whether the change in
circuit shown in Fig. 1.
the level of the key being pressed. S19 and S20 to
74LS164 is a serial input parallel output conversion
manual interrupt request button.
chip, the chip used in a cascade, as shown in Fig. 1. The
1340 Adv. J. Food Sci. Technol., 6(12): 1339-1342, 2014
5V-s
PC3 1
PC4 2
TI 3
RST 4
PC5 5
TO 6
P2.6 7
P2.7 8
RD 9
WR 10
ALE 11
P0.0 12
P0.1 13
P0.2 14
P0.3 15
P0.4 16
P0.5 17
P0.6 18
P0.7 19
20
PC3
PC4
TIME IN
RESET
PC5
TIME OUT
IO/M
CE
RD
WR
ALE 8155H
AD0
AD1
AD2
AD3
AD4
AD5
AD6
AD7
Vss
VCC
PC2
PC1
PC0
PB7
PB6
PB5
PB4
PB3
PB2
PB1
PB0
PA7
PA6
PA5
PA4
PA3
PA2
PA1
PA0
40
39
38
37
36
35
34
33
32
31
30
29
28
27
26
25
24
23
22
21
PC2
PC1
PC0
PB7
PB6
PB5
PB4
PB3
PB2
PB1
PB0
PA7
PA6
PA5
PA4
PA3
PA2
PA1
PA0
PA0
1
2
PA1
3
4
PA2
5
6
PA3
7
8
PA4
1
2
PA5
3
4
PA6
5
6
PA7
7
8
16
15
14 1K
13
12 1K
11
10 1K
9
TLP52
16
15
14
13
12
11
10
9
TLP52
1K
1K
1K
1K
1
2
3
4
5
6
7
8
9
I1
I2
I3
I4
I5
I6
I7
I8
G
O1
O2
O3
O4
O5
O6
O7
O8
com
ULN2803
18
17
16
15
14
13
12
11
10
1
2
3
4
5
6
7
8
9
Con2
GND-s
1K
GND
Fig. 3: The output interface circuit diagram
Lower computer motherboard belongs to the weak
control board and greenhouse site operated equipment
generally requires a 220V power supply such voltage,
belonging to the electric circuit. Therefore, the output
interface to be considered weak and strong electrical
isolation problems. Output interface should also
consider the correct transmission and power control
signal amplification problem.
In this study, the weak strong electrical isolation
achieved using opto TLP521-4, TLP521-4 contains four
internal opt coupler. Power control signal amplification
achieved preclude the use ULN2803, ULN2803 is a set
of open-collector Darlington driver chip, ULN2803
contains eight sets of internal driver circuit.
Consider the output signal is more, but also to
increase the protective effect on SCM, this study has
expanded in the output interface part, added a
programmable parallel interface chip 8155H. Access a
piece of 8155H can be extended out 22 lines, all control
equipment control signal from the 22 line from the root.
The circuit output interface is shown in Fig. 3.
Figure 3, the 8155H of PA, PB and PC work is the
basic input/output mode. Because this system is only 7
output signals, so only use 8155H PA port, according to
need can be extended using the PB port, 8155H can
provide a total of 16 output signals.8155H PC port used
to expand the display lights with work.
greenhouse. The main function of PC software are as
follows: the greenhouse temperature and humidity
control and monitoring, recording and management, the
control of temperature and humidity data control
formulation and execution, the fuzzy control strategy
formulation and implementation strategy. In order to
collect the data of the lower computer, PC software to
use the computer serial port. In Delphi 7, you can use
the Spcomm control. The PC software of this article is
written by Delphi 7.0.
CONCLUSION
The intelligent greenhouse control system designed
in this study is formed by the upper machine and lower
machine. The upper machine is responsible for fuzzy
control arithmetic, the command issuing, data record
and display and greenhouse management; Lower
machine is responsible for data collection, field device
control and emergency treatment, etc. The intelligent
greenhouse control system can realize the data
acquisition and processing of the environment
parameters such as temperature, humidity, illumination
and the corresponding control can be carried out,
making the intelligent greenhouse can provide a good
environment for the growth of crops. The system is of
low cost, reliable performance, convenient operation
and has a broad market prospect.
THE DESIGN OF HOST COMPUTER
REFERENCES
PC software for unified regulation of various
Chen, C., S. Jixuan and M. Zhang, 2008. Our country
greenhouse, display and record the data collection. The
agriculture present situation and development
PC software of system has the ability to simultaneously
countermeasure analysis. Hebei Agric. Sci., 36(11):
manage multiple greenhouses. When managing
multiple greenhouses, have equal status between the
66-70.
1341 Adv. J. Food Sci. Technol., 6(12): 1339-1342, 2014
Li, J.H., 2007. Intelligent Control Technology. National
Defence Industry Press, Beijing, pp: 33-35.
Peng, X.M., 2003. Micro Computer Control
Technology. Electronic Industry Press, Beijing, pp:
45-46.
Wang, F.R., 1999. Microcomputer Control System on
Chip Design. Beihang University Press, China, pp:
76-78.
Wu, S.M., 2008. Modern agricultural greenhouse
system. Shanxi Agric. Sci., 50(9): 96-99.
Zhang, Y. and X.Y. Peng, 2002. MCS-51 MCU
Application. Harbin Institute of Technology Press,
China, pp: 196-198.
1342 
Download