Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

201O Second International Conference on Communication Systems, Neꢀorks and Applications

Design of Time Control Irrigation System Based on Single-chip Computer

Gao Gꢃohoꢁg1 , Lꢀꢃ Yꢀ 2, Fꢃ Jꢃꢁhꢃꢀl, Waꢁg


Yꢀꢁꢂꢃꢁ1 I School of Information Engineer
Henan Institute of Science and Technology
Henan Xinxiang, China,453003
Sanyꢂerj03@126.com
2 School of Soꢀwaꢁe Engineering
Chongqing University
Chongqing, China,400044
Liꢂyi@126.com

Abstract-The application based on single-chip computer timing of irrigation time. System design timing input
(AT89S52) in agriculture and landscape irrigation system unit,timing alarm unit,the electromagnetic valve drive unit.
was described, and a kind of time control irrigation system Aꢀ ꢁꢂ
was designed. The system can set working time and can
automatically irrigate fields when unattended. if the end of
the setting time, the system can cease irrigate and alarm Tꢃ ꢄꢅꢆꢂ
automatically. It fulfilled the demand through local debug ꢆꢇꢂ
and was favorable to saving water and man labor.
ꢍꢅꢈꢉꢊjꢋꢂꢌꢍꢂ
K ꢀordsꢁTimin of ꢂnꢃ;AT89S52;Tim ꢁꢂ
g ;Solenoid Valves
Alarm ing

I. INTRODUCTION Figure 1. System Structure Drawing

China is a laꢁge co ꢂ nt ꢃ of agric ꢂ lt ꢂ re, i ꢄ iga- A. Harꢀare circuit


ting a The h ꢅ dwaꢁe design of the System foc ꢂ ses on the
agric ꢂ lt ꢂ reonneeds
water,based to cons ꢂof
the realization l ꢅ ge f amo
mea ꢂ tomated ꢂ nt
ꢅ mland
of clock ꢂ nit, timing inpꢂt ꢂ nit, al ꢅ m ꢂ nit, display ꢂ nit
i ꢄ igation, we also consider how to conserve water,beca ꢂ se and
of o ꢂ r late st ꢆ in this area,a ꢇ ic ꢂ lt ꢂ ral
Clock unit valve drive ꢂ nit ,5 pa ꢐ s.
the1)electromagnetic
a ꢂ tomation is
AT89S52 has an inte ꢉ al high-gain inverting
relatively low and can not be widely ꢂsed in in act ꢂ al
amplifier, ꢂ sed to constit ꢂ te the oscillator, the inpꢂt of
prod ꢂ ction [1].In aꢇicꢂltꢂre and landscaping
prod ꢂ ction, inverting amplifier is the XTALl,the o ꢂꢑꢂ t is the XTAL2,
extensive i ꢄ igation methods and backward i ꢄ igation crossing connection q ꢂꢆ z c ꢃ stal and two capacitors at
agricUlt ꢂ re,developing water-saving i ꢄ igation is
techniq ꢂ es no longer meet ꢈ e req ꢂ irements of ꢂ ce both ends can be formed a stable self-excited oscillator.
imperative. I ꢄ igation a ꢂ tomation can greatly red The selection of capacitors C I and C2 is ꢂ s ꢂ ally 30 ꢂ F or
modem
the
so, which can steady the ꢒ eq ꢂ ency and has a micro-effect
labor intensity of iꢄigation, improve labor prodꢂctivity and
in ꢒ eq ꢂ ency. the ꢒ eq ꢂ ency rꢊge of P ꢂ lse oscillation is
red ꢂ ce the losses of irrigation water,which is a sign of
0-
mode ꢉ ization of i ꢄ igation management ꢊd is 24MHZ. Oscillation signal is ꢒ om the XTAL2 terminal
the At present, the system of irrigation con ꢋ olled by
inpꢂt to the on-chip clock generator, the ꢂ ser can realize
direction
hardware ofisdevelopment
to ꢂ se more of irrigated agric ꢂ lture.
PLC,machines con ꢋ olled by the fo ꢂ nction of timing control by the inte ꢉ al coꢂnter
indꢂstꢃ.the system con ꢋ olled by PLC is low,b ꢂ t pro ꢇ amming in AT89S52. the solenoid valve of the
poor
system can be set opening ꢊ d closing time, when the
stability during operation, machines controlled by ind ꢂ s ꢌ i ꢄ igation time val ꢂ e ꢓꢔives the setted time val ꢂ e,
and the comp ꢂ ter con ꢋ ol system as the next bit aꢁe higher the
and its ꢍ nctions have not been ꢍ lly embodied.In this 2) Timing input unit
a ꢂ tomatically
motorTiming stop
inpꢂt ꢂ nit iꢄ
circꢂitigation.
ꢂ ses a total of five
paper, combining the characteristics of agric ꢂ l ꢎ ral and
b ꢂ ttons,
that of g ꢅ den i ꢄ igation,rese ꢅ ching the con ꢋ ol
SO for the reset b ꢂ tton, S I for the St ꢕ Pa ꢂ se b ꢂ tton,
of
S2
i ꢄ igation system,we p ꢂ t forwaꢁd the
microcon ꢋ oller for
dataadj ꢂ sting
lines ꢅ e the
set key S30to(low),
to be b ꢂ t ꢂ s ꢂkey,
be increments ally S4
thefor
linethe
I
AT89S52 as the con ꢋ ol core,ꢂ sing timer is ꢂ ction
red
(high), so bond.When
the bit processing instr ꢂthe
a key is pressed, connected
ctions inp ꢂ t
of MCU
con ꢋ ol determine whether the key is pressed. Users can reset the
technology in agric II. ꢂ ltSYSTEM
ꢏ e ꢊDESIGN
d landscape i ꢄ igation system by SO, and then ꢂ se the incremental bond of S3 ꢈe
to redꢂction key of S4 to adjꢂst the timing of the time.
red ꢂControl
ce systemsystem
cost shown in Figure
and improve prodl.The master
ꢂ ction device of
efficiency 3) Alarm unit
the system ꢂ ses AT89S52 microcon ꢋ oller. The
iofꢄ igation. At the end of reg ꢂ laꢁ time, the solenoid valve is
ꢍ ndation of timing provided by Single-chip achieve the disconnected controlled by microcon ꢋ oller and the

978-1-4244-7477-6/10/$26.00 ©2010 IEEE ICCSNA2010


155
i ꢄ igation systems are to stop working, this time, alarm ꢂ nit
will iss ꢂ e a waꢉing notice on d ꢂ ty. the P1.6 port of the
microcon ꢋ oller in designed circꢂit access ꢋ ansistor base
inpꢂt, when the P1.6 o ꢂꢑꢂ t high, the ꢋaꢖsistor
cond ꢂ cts,
b ꢂ zzer at both ends of the voltage of aboꢂt +5 V and tweet;
when the PI.6 o ꢂꢑꢂ t low power normally, the
tra4)ꢖ sistor
Displꢁ Unit
c ꢂ t-o ꢗ system's
The b ꢂ zzer display
stops. ꢂ nit is ꢈ e ꢂ se of digital control
dynamic display. Uchaꢁ code table con ꢋ ol is to avoid the
power shortage problem for digital t ꢂ be ca ꢂ sed by the high
o ꢂꢑꢂ t of MCU dyna ꢟ ic display needs the con ꢋ ol of Figure 3. Timing Procedure Flowchꢀt
CPU
1) ꢂming module program implementa-tion
to re ꢒ esh the display, in ꢈ eory, if the time interval
In AT89S52 MCU there is a limited n ꢂ mber of timers,
between the two displays is less than 32ms, the h ꢂ man eye
b ꢂ t d ꢂ ring the coꢂrse of agriCUltꢂre or g ꢅ den
is impossible to disting ꢂ ish, ꢈ erefore, in order to achieve irrigation,it
this req ꢂ irement, LED scanning ꢒ eq ꢂ ency is may be necess ꢛ to set m ꢊ y timers once.ꢝ n order to make
generally
a timing device complete ma ꢖ y tasks of the timing, design
calc ꢂWhere:f
lated inisaccordance
the ꢒ eq ꢂwith
encythe
of following ꢘꢂ la oꢂtot:
scaꢖ, co ꢄfoesponding ꢂ ses the method of time operation , which make a lot of
the f =32 N regꢂlꢅ time qꢂeꢂe stored into a contin ꢂ o ꢂ s ꢂ nit
timing for the timer (T=1ꢙꢚ,32 is converted by 32ms 32 followed
ms exactly co ꢄ espond to the ꢒ eq ꢂ ency of 32 Hz; N is by the instr ꢂ ctions of 24H.The p ꢅ allel into the
the The sca ꢖ ning ꢒ eq ꢂ ency, f based on the form ꢂ la existing,completing timing. That ptheꢅtimer
t of T2the main
void timer2 init(void) ꢙꢜinitialize
is ꢂ p of LED nꢂmber.
total gro procedꢂres aꢁe as follows:
_

act ꢂ ally the smallest ꢒeqꢂency of LED dꢁivering scanning {


TCCR2 =OxOO; ꢙꢙ Stop timer
if below this ꢒ eq ꢂ ency,it may lead to the blinking LED.
ASSR =OxOO; ꢙꢙ Asynchrono ꢂ s Clock Mode
Of couꢁse, f can not be as high as possible. If the ꢒeqꢂency
TCNT2 =OxOO; ꢙꢜ initial val ꢂ e
of sca ꢖ is too high, the time of each ꢇ o ꢂ p of
LED's OCR2 =Ox7F;
lighting is shorter, so it co ꢂ ld lead to the inadeq ꢂ ate or the TIMSK 1=OxOO; ꢙꢜꢝ nte ꢄꢂ pt Enable
satisfacto ꢃunit
of of
thesolenoid
brightness TCCR2 =Ox61; ꢙꢞ st ꢅ t the timer
5) The valveofdriving
LED display and some
iss ꢂ es. valve driving ꢂ nit needs to converse 5V
otherSolenoid }
Displꢁ the achieving of module prog-ram
2)
oꢂꢑꢂtted by MCU to 24V driving Solenoid closed. As the Display modꢂle caꢖ display theTiming time aꢖd the
solenoid valve cuꢁrent is large, if they aꢁe directly c ꢂꢄ ent time, ꢂ sing dyna ꢟ ic sca ꢖ ning display all data.
connected with the microcon ꢋ oller, in the event of short RAM display ꢂ nit allocated as follows:
circ ꢂ it or a spike p ꢂ lse,it is likely to des ꢋ oy the Display ꢂ nit is 2DH - 2AH, 34H-35H, 27H-26H
microcon ꢋ oller, so in this ꢂnit,it appliys the optoco ꢂ pler 2DH-2AH: foꢂr mod ꢂ les ꢅe displayed when the
P521. clock high, when low, s ꢂ b-high, low points 34H-35H:
Detailed timing control circꢂit shown in Fig ꢂ re Display the time interval.
35H: store ꢒ om time to time s ꢂ b-interval peak, 34H:
storing time interval's sꢂb-low of the reg ꢂ l ꢅ time
26H-27H: store the high a ꢖ d low points of the cuꢁrent
time
The main proced ꢂ res of the p ꢅ t ꢅ e as follows:
INC 3AH ꢙꢞ timer ꢂ nit pl ꢂ s 1
MOV A,3AH ꢙꢜ reg ꢂ larly compaꢁe the n ꢂ mber
of
ꢂnitsCand
ꢠviews of timing
E A,#64H,SETT ꢙꢙ if less tha ꢖ the views of
timing then jꢂmp sett
MOV 3AH,#OOH ꢙꢙ otherwise cle ꢅ ed
FIgure 2. TImꢁng Control Cꢁrcuꢁt Dꢁꢂram MOV 24H,#40H ꢙꢜ initialization ꢂ nit 24H and 25H
B. Sofꢃare Implementation MOV 25H,#40H ꢙꢙ Cle ꢅ 26H aꢖd 27H
MOV 26H,#OOH
The p ꢅ t of soꢀwaꢁe mainly achieves the initialization
MOV 27H,#OOH
of all the storage ꢂ nit to be ꢂ sed and set the break, set the
timer mode, a ꢖ d call the relevant s ꢂ bro ꢂ tine. III. Tꢡ INSTRUCTIONS ꢃD THE RESULTS OF USING
Reg ꢂ lar THE DESIGNING
pro ꢇ a ꢟ flow chaꢐ shown in Fig ꢂ re 3.
(1) The storage environment a ꢖ d preca ꢂ tions.
ꢢto
avoid exposꢂre directly to sꢂnlight; ® the
s ꢂꢄ o ꢂ nding

156
temperat ꢂ re is 0�55°C ;®relative h ꢂ midity is within I 0% �
90% ꢁ; @to avoid rapid cha ꢖ ges in h ꢂ midity
aꢖd
temperat ꢂ re Aro ꢂ nd to dew condensation;@to avoid the
contact between the co ꢄ osive, flammable gas and the salt;
®to avoid the d ꢂ st, iron powder, water a ꢖ d oil ꢣ oplets
of
dr ꢂ gs; ꢄ to avoid direct shock and impact.
(2) the ꢂ se req ꢂ irements.ꢤ Please ꢂ se in the
Voltage
form ꢂ lated, otherwise they will bꢥ
microcomp ꢂ ter
con ꢋ ol system; ® to tighten the wiring boꢅd and the
gro ꢂ nded, or may ca ꢂ se a ꢖ electric shock; @check
screws
the of microcomp ꢂ ter control system; ® m ꢂ st be
setting of the switch and wiring before yoꢂ connect the
power;@Do not ꢂ na ꢂ thorizly repairs and modifications
Proꢇamm-able controller.
(3)The ꢂ se of effects. The irrigation system in ꢂ se
achieves the irrigation timing control, red ꢂ cing the staff
workload, improve reso ꢂ rce ꢂ tilization, aꢖd effectively
ease the contradiction between the ꢇ owing tension of
water resoꢂrces, while increasing crop yields, red ꢂ cing the
cost of a ꢇ ic ꢂ lt ꢂ ral prod ꢂ cts. It is estimated that the
ꢂ se of
i ꢄ igation systems coꢂld be saving 17% of water, saving
15% of power aꢀer ꢂ sing CONCLUSION
IV. the system.
The cen ꢋ al p ꢅ t of China's water-saving
i ꢄ igation
system is the agric ꢂ lt ꢂ ral i ꢄ igation. This paper presents
the
ꢂ se of microconꢋoller to b ꢂ ild an a ꢂ tomated
iꢄigation
system, which will effectively solve abo ꢂ nd problems of
traditional agric ꢂ lt ꢏ e, irrigation,. Aꢀer commissioning in
the laborato ꢃ a ꢖ d the field it is showed that the
i ꢄ igation
con ꢋ ol system is stable a ꢖ d reliable a ꢖ d caꢖ ꢍ lly meet
REFERENCES
the
[1] YANG Xi. ꢊpplication Research on the ꢊ gri- cultural Saving
act ꢂWater
al needs of prod ꢂ ction, easy to ꢂse, effectively
Irrigation System Based on Embedded System. Jou ꢄ al of
improving
ꢊnhui ꢊ ꢋ ol a ꢖ d37ma
congri.Sc,2009, (6):ꢖ agement level.
2793-2794.
[2] LIN Qing,WANG Ji.Design of Intelligent Irriga-tion System Based
on Embedded Technology. Communications
Technology ,VoI.42,No.05,2009.
[3] Trung-Kien Nguyen,Chung-Hwan Kim,Gook -Julhm.CMOS Low
= noise amp lifier desiꢅ op ti mizati on techniques [1]. Micr
owave Theory and Techniques (IEEE
Transactions),2004,52(5):1433-1442.
[4] Xie Shouyong,Li Xiwen,Yang Shuzi.Design ꢆ d implementation
of ꢇzzy control for irrigating Syst-em with PLC[J].Transactions of
the CSꢊE,2007,23 (6):208-210.
[5] sourceforge project,MC9Sl2NE64 OpenTCP Reference
Mꢆual[EB/OL].http:// ꢈees caleotcp. Sourceforge.netJuly,2004.
[6] ꢉꢊ.Costa,N,Pꢋwari,ꢆd ꢊ.O.Hero."Distributed
multidimensional
scaling with adaptive weithting for node localization in sensor
networks", IEEE/ꢊCM Trans.Sensor Networks,(to appeꢀ)
[Online].ꢊvailable:http:/ꢌww.eecs.umich.eduꢍꢎhero/com.html.

157

You might also like