0% found this document useful (0 votes)
59 views

The Implementation of A Control Circuit For A Microcontroller Based Automated Irrigation System

This document describes a microcontroller-based automated irrigation system that monitors soil moisture levels using buried sensors. When the sensors detect dry soil, the microcontroller opens a control valve to allow water from a reservoir to flow to sprinklers for irrigation. It also pumps water to refill an aerial tank as needed. The simple system automatically provides water to plants as required, reducing human labor while optimizing crop growth and conserving water resources.

Uploaded by

Dershana Lachman
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views

The Implementation of A Control Circuit For A Microcontroller Based Automated Irrigation System

This document describes a microcontroller-based automated irrigation system that monitors soil moisture levels using buried sensors. When the sensors detect dry soil, the microcontroller opens a control valve to allow water from a reservoir to flow to sprinklers for irrigation. It also pumps water to refill an aerial tank as needed. The simple system automatically provides water to plants as required, reducing human labor while optimizing crop growth and conserving water resources.

Uploaded by

Dershana Lachman
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/274890884

The Implementation of a Control Circuit for a Microcontroller Based Automated


Irrigation System

Article · July 2008

CITATION READS

1 1,837

3 authors, including:

Jonathan Enokela
Federal University of Agriculture
20 PUBLICATIONS   51 CITATIONS   

SEE PROFILE

All content following this page was uploaded by Jonathan Enokela on 13 April 2015.

The user has requested enhancement of the downloaded file.


International Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (ISSN 2250-2459, ISO 9001:2008 Certified Journal, Volume 4, Issue 6, June 2014)

The Implementation of a Control Circuit for a Microcontroller


Based Automated Irrigation System
Jonathan A. Enokela1, Isaiah I. Tsavwua2, Simon A. Onyilo3
Department of Electrical and Electronics Engineering, University of Agriculture, P.M.B. 2373, Makurdi, Nigeria
Abstract--- In many parts of the world especially in arid It eliminates the possibility of soil erosion and can be
and semi arid areas, rainfalls, due to their seasonal nature, are used for the application of liquid fertilizers [4].
inadequate to meet agricultural needs. It thus becomes The manual method of irrigation is used predominantly
imperative to use irrigation to meet the moisture needs of by rural farmers in most developing countries especially in
plants in order to increase food crop production. The system
areas where the season of rainfall is very short [1].
described here monitors the moisture needs of crops through
buried sensors and automatically pumps water for irrigation An automated irrigation system has important
when the need arises. Through the use of a microcontroller advantages over the methods used by the local farmers: it
and sensors, water storage and delivery to the farm are ensures a more precise application and conservation of
automatically carried out thus requiring minimal human water, high crop yield as well as removal of human errors
interventions, achieving supply of water as needed by plants [3, 4]. The current trend in irrigation is to shift from
thus optimizing plant growth and helping to conserve water manually operated type of irrigation to automated types [4].
and energy. The system is very simple to operate and ideally Many automated types of irrigation systems that use fairly
suits the irrigation need of rural farmers. complex electronics for their control have been
Keywords--- Automated Irrigation, Microcontroller,
implemented. Many of these automated systems use
Electronic, Control sensors to monitor parameters such as soil moisture, soil
temperature, soil pH, leaf temperature, relative humidity,
I. INTRODUCTION air temperature, rainfall, vapour pressure, and sunshine
hours [5]. The use of wireless sensor network technology to
Crops require moisture to grow. This moisture is implement and control various types of irrigation systems
provided naturally mostly by rainfalls which are seasonal in have been reported [2, 5, 6, 7]. The use of wireless and
many parts of the world. This fact makes the growing of internet communication systems enables real-time
crops to be carried out mostly during the rainy seasons. In monitoring of irrigation systems [8, 9, 10, 11].
the dry seasons crop growing is nearly completely Most of the systems that have been reportedly
suspended due to the extra difficulties of providing implemented use very complex electronics control and
moisture for the crops. In places where dry season farming measure very many parameters. The system described here
is carried out the moisture requirements of the crops are monitors the soil moisture and uses the value of this
most often provided through the method of irrigation. parameter to schedule the irrigation of a farm. This system
Irrigation is an artificial means used to supply water to is simpler for rural and small-time farmers to adopt than
plants for their growth and maturity. In addition to ensuring more complicated automatic irrigation scheduling systems
enough moisture essential for plant life, irrigation also that use numerous weather and soil data as inputs.
provides insurance against short duration drought and cools
the soil and atmosphere to provide a congenial environment II. MATERIALS AND METHODS
for plant growth as well as reducing hazard of soil piping
amongst other advantages [1]. Irrigation is carried out The block diagram of the system is depicted in figure 1.
mainly through the use of surface or flood irrigation and the The embedment of a microcontroller into the system makes
drip irrigation type. In the surface irrigation water is it to be a standalone type of system that is capable of taking
applied and distributed over the soil surface by gravity. The decisions to keep it functioning properly. The
drip irrigation allows water to drip slowly to the roots of microcontroller receives as inputs signals from water level
plants either onto the soil surface or directly onto the root and moisture sensors. Depending on the input received it
zone through a network of valves, pipes and tubes [2]. The takes decision to let water out to the sprinkler system,
drip irrigation has many advantages over basin flood and closes the tap or pumps water from the reservoir to the
localized methods of irrigation [3]. aerial tank.

652
International Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (ISSN 2250-2459, ISO 9001:2008 Certified Journal, Volume 4, Issue 6, June 2014)
When the system is first switched on, and on sensing that The number of sensors employed depends on the size of
the aerial tank is empty, it turns on the pump, through the farm to be irrigated. The logical OR operation of the
ac motor, for the aerial tank to be filled. When this has been sensors ensure that all parts of the farm receive adequate
done the system checks if the soil is dry upon the moisture. When the soil is dry the gypsum block has a high
affirmation of which the control tap is opened for water to resistance thus turning off transistor Q1. This transistor is
flow to the soil through the sprinkler system. The control turned on only when the soil has received the desired
tap is closed when the moisture content of the soil reaches a amount of moisture. If we assume that the resistance of the
predetermined level that has been fixed by the soil moisture gypsum block under wet condition is Rg, then the
sensors. The aerial tank is then refilled to complete the requirement for the saturation of the BJT is expressed as
process. The microcontroller keeps monitoring the state of inequality (1).
the sensors to determine what action it will take next.
 F I B  IC ..............(1)
A. Sensors
Both the water level and the soil moisture sensors are The transistor Q1 will turn on when
discrete sensing type. The water level sensors are required
to indicate the presence or absence of water to an exact  F R1 VCC  VBEsat 
height only. We are not interested in the rising or falling of ( Rg  Rb )  .............(2)
water level outside the stipulated levels. In the same
VCC  VCEsat
manner the soil moisture sensors are required to indicate The resistance of the gypsum block, Rg, is determined
only the presence or absence of soil wetness to a by the depth at which it is buried, amongst other factors,
predetermined level. and the sensitivity of the sensor should be set on site.
The soil moisture sensors consist of gypsum blocks
buried in the soil [12]. Transistors switches are attached to
the blocks. The arrangement is shown in figure 2 in which
one sensor has been depicted.

653
International Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (ISSN 2250-2459, ISO 9001:2008 Certified Journal, Volume 4, Issue 6, June 2014)

Soil Moisture

Sensors

Water Water
Soil Level
Sensor Level
Logic sensors
Logic

Control Aerial
Tap Tank
Microcontroller

Sole-
noid Water
Status
Drive Outlet to
Indicator Sole- Field
noid

Relay

Drive AC
Motor Pump

AC Power Water
Input Reservoir

Figure1: Block Diagram of Automated Irrigation System

654
International Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (ISSN 2250-2459, ISO 9001:2008 Certified Journal, Volume 4, Issue 6, June 2014)
Vcc The control of water level in the aerial tank makes use of
the same basic transistor switching method applied in the
soil sensors. One transistor is used to determine maximum
water level while the other is used for minimum water
level. The probe for water level detection consists of a
hollow conductor of cross sectional area a, and length l, to
R1
offer a quantifiable electrical resistance when immersed in
water. The connection of the probes to the transistor
switches and the 555 timer used as logic control is shown
in figure 3. The output (Q) of the 555 timer is connected to
Rg Rb a microcontroller input port pin. The arrangement depicted
in figure 3 ensures that the microcontroller turns on the
Q1 pump to fill the aerial tank only when both water probes are
above water i.e. tank is empty. It also ensures that the
microcontroller turns off the pump only when both water
probes are below the water i.e. tank is full. This
arrangement eliminates the unnecessary frequent switching
on and off of the pump motor.

Figure 2: Schematic Diagram of a Soil Moisture Sensor Unit

655
International Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (ISSN 2250-2459, ISO 9001:2008 Certified Journal, Volume 4, Issue 6, June 2014)
VCC

VCC

R1

8 U1
VCC
3 4
VCC

Q R
7
DC VCC
5
R5
CV Q1

2
1
GND

VCC
6 2
TH TR

R2
1

555 TF
R3

VCC
R4
Q2

R6
Q3

2
1

TL

Figure 3: Schematic Diagram of Two-level Water Sensor Unit

The schematic diagram of the complete automated III. RESULTS AND D ISCUSSION
irrigation system is given in figure 4. The microcontroller The program for the microcontroller was written in
used for the project is the PIC16F84A [13]. The Assembly Language [14] and was then built into an
microcontroller takes inputs from the soil sensor S1 and the executable hex file using the MPLAB IDE Version 8.20
water level sensors (TF, TL) continuously. Under the control [15] and the embedded MPASM assembler. A software
of the program in its memory the microcontroller turns on simulation was carried out with the simulator built into the
(or off) the tap or pump depending on the input it has MPLAD IDE to ensure that the program variables and
received from the sensors. One of the four LEDs (D1 - D4) registers changed as desired. The program required few
is also turned on to visually indicate the state of events at registers but the output ports (PORTA and PORTB) were
the input of the microcontroller. observed to have the correct values.
Figure 5 gives the flowchart of the program executed by
the microcontroller. As indicated in the flowchart the
microcontroller polls the input sensors and after taking the
appropriate decision it goes back to monitoring the sensors
in a continuous loop.

656
International Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (ISSN 2250-2459, ISO 9001:2008 Certified Journal, Volume 4, Issue 6, June 2014)
VCC

VCC

R7 R8 R9
VCC

R1
U2
16 17
OSC1/CLKIN RA0 U1
15 18

8
OSC2/CLKOUT RA1 VCC
1
RA2
4 2 3 4

VCC
MCLR RA3 Q R
3
RA4/T0CKI
7
DC VCC
6 R5
RB0/INT
7 5
RB1 CV Q1
8
RB2
R10 9 R13 R12

2
1
RB3
10

GND
RB4 VCC
RB5
11 R11 6
TH TR
2
RB6
12 R14
RB7
13 R2

1
555
Upper Level Water Sensor TF
PIC16F84A
D7 R3
VCC D6 VCC
D4
VCC
X1 R16 R15 D5 R4
Q2
R17
R6
Q3
VCC1 VCC1 VCC
C1

2
1
C2
AC Power AC Power
R18
Q4 Lower Level Water Sensor TL
D1

2
1
D2

Soil Moisture Sensor S1


RL1 RL2
Q5
Q6

Pump Valve

Figure 4: Schematic of Complete Irrigation System

The circuit shown in figure 4 was then built and the Light emitting diodes (LED) driven through transistors
hardware was debugged in the Proteus Virtual System were used to indicate the valve and pump output signals.
Modeling (VSM) environment version 7.7 [16]. Switches The conditions of the switches and the outputs observed
were used to represent the soil moisture sensor and the from the microcontroller are given in table 1.
water level sensors. A miniature version of the farm irrigation system, shown
in figure 6, was constructed and fully tested.

657
International Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (ISSN 2250-2459, ISO 9001:2008 Certified Journal, Volume 4, Issue 6, June 2014)
TABLE 1
SENSOR CONDITIONS AND MICROCONTROLLER DECISIONS

Switch Conditions

S1 TF TL Indication Output

H H H Soil Dry, Tank Empty Tap ON, Pump ON, Red LED ON

H H L Soil Dry, Tank Part Full Tap ON, Pump ON, Red LED ON

H L H Not Applicable Not Applicable

H L L Soil Dry, Tank Full Tap ON, Pump OFF, Blue LED ON

L H H Soil Wet, Tank Empty Tap OFF, Pump ON, Yellow LED ON

L H L Soil Wet, Tank Part Full Tap OFF, Pump ON, Yellow LED ON

L L H Not Applicable Not Applicable

L L L Soil Wet, Tank Full Tap OFF, Pump OFF, Green LED ON

Note that in table 1; L= Low Logic Level Signal and H= High Logic Level Signal.

658
International Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (ISSN 2250-2459, ISO 9001:2008 Certified Journal, Volume 4, Issue 6, June 2014)
Start

Initialize

Processor

Monitor Soil
Sensor Inputs

Is soil Yes
wet ?

No

Is Aerial Is Aerial
Tank Tank
dry? full ?

No Yes No Yes
Open Tap, Turn Open Tap, Turn Close Tap, Close Tap, Turn
OFF pump, Turn ON pump, Turn Turn ON pump, off pump, Turn
ON Blue LED ON Red LED Turn ON ON Green LED
Yellow LED

Figure 5: Flowchart of Program Executed by Microcontroller

659
International Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (ISSN 2250-2459, ISO 9001:2008 Certified Journal, Volume 4, Issue 6, June 2014)

Aerial Tank

Pump

Control
Unit Farm
Water
Reservoir

Figure 6: Realization of the Miniature Irrigation System

IV. CONCLUSION [7] R.G. Evans and W.M. Iversen, “Remote Sensing and Control of an
Irrigation System Using a Distributed Wireless Sensor Network”,
A stand alone farm irrigation system has been designed IEEE Transactions on Instrumentation and Measurement, Vol. 57,
and implemented using a microcontroller. Due to the few No. 7, pp.1379-1387, 2008.
number of components used the system has a high degree [8] G. Yang, Y. Liu, L. Zhao, S. Cui, Q. Meng and H. Chen, “Automatic
of reliability. The size of the pump and tap used can be Irrigation System Based on Wireless Network”, International
Conference on Control and Automation, ICCA, 2010, pp.2120-2125.
varied to meet the required expanse of a particular farm.
[9] R.M. Faye, F. Mora-Camino, S. Sawadogo, and A. Niang, “PC-
The system can easily be deployed in remote farms as the Based Automation of a Multi-Mode Control for an Irrigation
amount of electrical power it consumes is small. System, International Symposium on Industrial Embedded Systems”,
Lisbon, 4-6 July, 2007, pp.310-315.
REFERENCES [10] Y. Zhou, K. Yang, L. Wang, and Y. Ying, “A Wireless Design of
[1] J. Dhiman, S. Singh, and S. Dhiman, “Utilization of Irrigation Water Low-Cost Irrigation System Using ZigBee Technology”,
Using Microcontroller”, Automatic Control and Information International Conference on Networks, Security, Wireless
Sciences, Vol.1, No. 1, pp.1-5, 2013. Communications and Trusted Computing, 2009.
[2] J.S. Awati and V.S. Patil, “Automatic Irrigation Control by Using [11] Y. Kim and R.G. Evans, “Software Design for Wireless Sensor-
Wireless Sensor Networks”, Journal of Exclusive Management Based Site-Specific Irrigation”, Computer and Electronics in
Science, Vol. 1, Issue 6, pp. 1-7, June 2012. Agriculture, Vol. 66, No.2, pp.159-165, 2009.
[3] T. Boutraa, A. Akhkha, A. Alshuaibi and R. Atta, “Evaluation of the [12] F.S. Zazueta and J. Xin, “Soil Moisture Sensors”, Bulletin 292,
Effectiveness of an Automated Irrigation System Using Wheat Florida Cooperative Extension Service, Institute of Food an
Crops”, Agriculture and Biology Journal of North America, Vol. 2, Agricultural Sciences, University of Florida, April, 1994.
No. 1, pp.80-88, 2011. [13] Microchip Technology Inc., PIC16F84A Data Sheet,
[4] M. Yildirim and M. Demirel, “An Automated Drip Irrigation System http://ww1.microchip.com/downloads/en/DeviceDoc/35007b.pdf
Based on Soil Electrical Conductivity”, The Philippine Agricultural (Accessed 15/05/2013)
Scientist, Vol. 94, No. 4, p.343-349, December, 2011. [14] M.A. Mazidi, R.D. McKinlay and D. Causey, PIC “Microcontroller
[5] S. Singh, and N. Sharma, “Research Paper on Drip Irrigation and Embedded Systems: Using Assembly and C for PIC18”, Pearson
Management Using Wireless Sensors”, International Journal of Education Inc., Upper Saddle River, New Jersey, 2008.
Computer Networks and Wireless Communications, Vol. 2, No. 4, [15] Microchip IDE,
pp.461-464, August 2012. http://www.microchip.com/microchip.www.SecureSoftwareList/
[6] A. Cellatoglu, and B. Karuppanan, “Remote Sensing and Control for [16] Proteus VSM, Labcenter Electronics,
Establishing and Maintaining Digital Irrigation”, International http://www.labcenter.com/Products/
Journal of Advanced Information Technology, Vol. 2, No.1, pp.11-
25, February 2012.
660

View publication stats

You might also like