The Implementation of a Control Circuit for a Microcontroller Based Automated Irrigation System

International Journal of Emerging Technology and Advanced Engineering Website: www.ijetae.com (ISSN 2250-2459, ISO 9001:2008 Certified Journal, Volume...
Author: Jeffry Paul
36 downloads 0 Views 379KB Size
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 It eliminates the possibility of soil erosion and can be used for the application of liquid fertilizers [4]. The manual method of irrigation is used predominantly by rural farmers in most developing countries especially in areas where the season of rainfall is very short [1]. An automated irrigation system has important advantages over the methods used by the local farmers: it ensures a more precise application and conservation of water, high crop yield as well as removal of human errors [3, 4]. The current trend in irrigation is to shift from manually operated type of irrigation to automated types [4]. Many automated types of irrigation systems that use fairly complex electronics for their control have been implemented. Many of these automated systems use sensors to monitor parameters such as soil moisture, soil temperature, soil pH, leaf temperature, relative humidity, air temperature, rainfall, vapour pressure, and sunshine hours [5]. The use of wireless sensor network technology to implement and control various types of irrigation systems have been reported [2, 5, 6, 7]. The use of wireless and internet communication systems enables real-time monitoring of irrigation systems [8, 9, 10, 11]. Most of the systems that have been reportedly implemented use very complex electronics control and measure very many parameters. The system described here monitors the soil moisture and uses the value of this parameter to schedule the irrigation of a farm. This system is simpler for rural and small-time farmers to adopt than more complicated automatic irrigation scheduling systems that use numerous weather and soil data as inputs.

Abstract--- In many parts of the world especially in arid and semi arid areas, rainfalls, due to their seasonal nature, are inadequate to meet agricultural needs. It thus becomes imperative to use irrigation to meet the moisture needs of plants in order to increase food crop production. The system described here monitors the moisture needs of crops through buried sensors and automatically pumps water for irrigation when the need arises. Through the use of a microcontroller and sensors, water storage and delivery to the farm are automatically carried out thus requiring minimal human interventions, achieving supply of water as needed by plants thus optimizing plant growth and helping to conserve water and energy. The system is very simple to operate and ideally suits the irrigation need of rural farmers. Keywords--- Automated Electronic, Control

Irrigation,

Microcontroller,

I. INTRODUCTION Crops require moisture to grow. This moisture is provided naturally mostly by rainfalls which are seasonal in many parts of the world. This fact makes the growing of crops to be carried out mostly during the rainy seasons. In the dry seasons crop growing is nearly completely suspended due to the extra difficulties of providing moisture for the crops. In places where dry season farming is carried out the moisture requirements of the crops are most often provided through the method of irrigation. Irrigation is an artificial means used to supply water to plants for their growth and maturity. In addition to ensuring enough moisture essential for plant life, irrigation also provides insurance against short duration drought and cools the soil and atmosphere to provide a congenial environment for plant growth as well as reducing hazard of soil piping amongst other advantages [1]. Irrigation is carried out mainly through the use of surface or flood irrigation and the drip irrigation type. In the surface irrigation water is applied and distributed over the soil surface by gravity. The drip irrigation allows water to drip slowly to the roots of plants either onto the soil surface or directly onto the root zone through a network of valves, pipes and tubes [2]. The drip irrigation has many advantages over basin flood and localized methods of irrigation [3].

II. MATERIALS AND METHODS The block diagram of the system is depicted in figure 1. The embedment of a microcontroller into the system makes it to be a standalone type of system that is capable of taking decisions to keep it functioning properly. The microcontroller receives as inputs signals from water level and moisture sensors. Depending on the input received it takes decision to let water out to the sprinkler system, closes the tap or pumps water from the reservoir to the 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 aerial tank is empty, it turns on the pump, through the ac motor, for the aerial tank to be filled. When this has been done the system checks if the soil is dry upon the affirmation of which the control tap is opened for water to flow to the soil through the sprinkler system. The control tap is closed when the moisture content of the soil reaches a predetermined level that has been fixed by the soil moisture sensors. The aerial tank is then refilled to complete the process. The microcontroller keeps monitoring the state of the sensors to determine what action it will take next.

The number of sensors employed depends on the size of farm to be irrigated. The logical OR operation of the sensors ensure that all parts of the farm receive adequate moisture. When the soil is dry the gypsum block has a high resistance thus turning off transistor Q1. This transistor is turned on only when the soil has received the desired amount of moisture. If we assume that the resistance of the gypsum block under wet condition is Rg, then the requirement for the saturation of the BJT is expressed as inequality (1).

 F I B  IC ..............(1)

A. Sensors Both the water level and the soil moisture sensors are discrete sensing type. The water level sensors are required to indicate the presence or absence of water to an exact height only. We are not interested in the rising or falling of water level outside the stipulated levels. In the same manner the soil moisture sensors are required to indicate only the presence or absence of soil wetness to a predetermined level. 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.

The transistor Q1 will turn on when

( Rg  Rb ) 

 F R1 VCC  VBEsat  VCC  VCEsat

.............(2)

The resistance of the gypsum block, Rg, is determined by the depth at which it is buried, amongst other factors, and the sensitivity of the sensor should be set on site.

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 Level sensors

Water Level Logic

Soil Sensor Logic

Control Tap

Microcontroller

Status Indicator

Solenoid Drive Solenoid

Aerial Tank

Water Outlet to Field

Relay Drive

AC Motor

AC Power Input Figure1: Block Diagram of Automated Irrigation System

654

Pump

Water Reservoir

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 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 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 a microcontroller input port pin. The arrangement depicted in figure 3 ensures that the microcontroller turns on the 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.

Vcc

R1

Rg

Rb

Q1

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

3 7

Q

VCC

8

U1 R

VCC

4

DC

VCC

R5 Q1

TH

1

6

GND

2 1

CV

5

TR

VCC

2

R2

555

TF R3 VCC

R4 Q2 R6

2 1

Q3

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

The schematic diagram of the complete automated irrigation system is given in figure 4. The microcontroller used for the project is the PIC16F84A [13]. The microcontroller takes inputs from the soil sensor S1 and the water level sensors (TF, TL) continuously. Under the control of the program in its memory the microcontroller turns on (or off) the tap or pump depending on the input it has received from the sensors. One of the four LEDs (D1 - D4) is also turned on to visually indicate the state of events at the input of the microcontroller. 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.

III. RESULTS AND D ISCUSSION The program for the microcontroller was written in Assembly Language [14] and was then built into an executable hex file using the MPLAB IDE Version 8.20 [15] and the embedded MPASM assembler. A software simulation was carried out with the simulator built into the MPLAD IDE to ensure that the program variables and registers changed as desired. The program required few registers but the output ports (PORTA and PORTB) were observed to have the correct values.

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 U1

8 7

6 7 8 9 10 11 12 13

RB0/INT RB1 RB2 RB3 RB4 RB5 RB6 RB7

R10

3

Q

R

DC

VCC CV

R13

VCC

4

R5

5

Q1

R12

2 1

MCLR

VCC

RA0 RA1 RA2 RA3 RA4/T0CKI

R11

R14

6

TH

GND

4

17 18 1 2 3

OSC1/CLKIN OSC2/CLKOUT

TR

1

16 15

VCC

2

R2

555

Upper Level Water Sensor TF

PIC16F84A VCC

D6

D4 R16

X1

R15

D7

R3 VCC

D5

VCC

R4 Q2 R17 R6

VCC1

VCC1

VCC

Q3 2 1

C1

C2 AC Power

AC Power

R18 Lower Level Water Sensor TL

Q4 2 1

D1 D2 RL1

Q5

RL2

Soil Moisture Sensor S1

Q6 Pump

Valve

Figure 4: Schematic of Complete Irrigation System

The circuit shown in figure 4 was then built and the hardware was debugged in the Proteus Virtual System Modeling (VSM) environment version 7.7 [16]. Switches were used to represent the soil moisture sensor and the water level sensors.

Light emitting diodes (LED) driven through transistors were used to indicate the valve and pump output signals. The conditions of the switches and the outputs observed from the microcontroller are given in table 1. 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 Indication

Output

S1

TF

TL

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 wet ?

Yes

No

Is Aerial Tank

dry? No

Yes

Open Tap, Turn OFF pump, Turn ON Blue LED

Open Tap, Turn ON pump, Turn ON Red LED

Is Aerial Tank full ? No Close Tap, Turn ON pump, Turn ON Yellow LED

Figure 5: Flowchart of Program Executed by Microcontroller

659

Yes Close Tap, Turn off pump, Turn ON Green LED

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 [7]

IV. CONCLUSION A stand alone farm irrigation system has been designed and implemented using a microcontroller. Due to the few number of components used the system has a high degree of reliability. The size of the pump and tap used can be varied to meet the required expanse of a particular farm. The system can easily be deployed in remote farms as the amount of electrical power it consumes is small.

[8]

[9]

REFERENCES [1]

[2]

[3]

[4]

[5]

[6]

[10]

J. Dhiman, S. Singh, and S. Dhiman, “Utilization of Irrigation Water Using Microcontroller”, Automatic Control and Information Sciences, Vol.1, No. 1, pp.1-5, 2013. J.S. Awati and V.S. Patil, “Automatic Irrigation Control by Using Wireless Sensor Networks”, Journal of Exclusive Management Science, Vol. 1, Issue 6, pp. 1-7, June 2012. T. Boutraa, A. Akhkha, A. Alshuaibi and R. Atta, “Evaluation of the Effectiveness of an Automated Irrigation System Using Wheat Crops”, Agriculture and Biology Journal of North America, Vol. 2, No. 1, pp.80-88, 2011. M. Yildirim and M. Demirel, “An Automated Drip Irrigation System Based on Soil Electrical Conductivity”, The Philippine Agricultural Scientist, Vol. 94, No. 4, p.343-349, December, 2011. S. Singh, and N. Sharma, “Research Paper on Drip Irrigation Management Using Wireless Sensors”, International Journal of Computer Networks and Wireless Communications, Vol. 2, No. 4, pp.461-464, August 2012. A. Cellatoglu, and B. Karuppanan, “Remote Sensing and Control for Establishing and Maintaining Digital Irrigation”, International Journal of Advanced Information Technology, Vol. 2, No.1, pp.1125, February 2012.

[11]

[12]

[13]

[14]

[15] [16]

660

R.G. Evans and W.M. Iversen, “Remote Sensing and Control of an Irrigation System Using a Distributed Wireless Sensor Network”, IEEE Transactions on Instrumentation and Measurement, Vol. 57, No. 7, pp.1379-1387, 2008. G. Yang, Y. Liu, L. Zhao, S. Cui, Q. Meng and H. Chen, “Automatic Irrigation System Based on Wireless Network”, International Conference on Control and Automation, ICCA, 2010, pp.2120-2125. R.M. Faye, F. Mora-Camino, S. Sawadogo, and A. Niang, “PCBased Automation of a Multi-Mode Control for an Irrigation System, International Symposium on Industrial Embedded Systems”, Lisbon, 4-6 July, 2007, pp.310-315. Y. Zhou, K. Yang, L. Wang, and Y. Ying, “A Wireless Design of Low-Cost Irrigation System Using ZigBee Technology”, International Conference on Networks, Security, Wireless Communications and Trusted Computing, 2009. Y. Kim and R.G. Evans, “Software Design for Wireless SensorBased Site-Specific Irrigation”, Computer and Electronics in Agriculture, Vol. 66, No.2, pp.159-165, 2009. F.S. Zazueta and J. Xin, “Soil Moisture Sensors”, Bulletin 292, Florida Cooperative Extension Service, Institute of Food an Agricultural Sciences, University of Florida, April, 1994. Microchip Technology Inc., PIC16F84A Data Sheet, http://ww1.microchip.com/downloads/en/DeviceDoc/35007b.pdf (Accessed 15/05/2013) M.A. Mazidi, R.D. McKinlay and D. Causey, PIC “Microcontroller and Embedded Systems: Using Assembly and C for PIC18”, Pearson Education Inc., Upper Saddle River, New Jersey, 2008. Microchip IDE, http://www.microchip.com/microchip.www.SecureSoftwareList/ Proteus VSM, Labcenter Electronics, http://www.labcenter.com/Products/

Suggest Documents