SlideShare a Scribd company logo
1 of 20
DESIGN OFA MICRO CONTROLLER BASED AUTOMATICHOME GARDEN WATERING SYSTEM
ABSTRACT
Due to increase incommitments,goingtothe backyard to checkon and water the plantin a garden can
be a tiresome processwhichalsoconsumesalotof time that can be usedforotherpurposes. Insmall
scale home gardening a healthy water balance is essential for high quality yields. Under-watered
plantssufferfromnutrientdeficiencieswhileover-wateredplantsare more susceptible to diseases,
pressure andcan insome cases leadtoroot deaththroughsuffocation.Alsoover-wateredplantsare not
able to withstanddryspellsduringdryseason.
The aim of this project is to use engineering principles and concepts to provide a microcontroller
basedwateringsystem.The systemwill helpinsavingmoneyandwaterand time andalsoat the same
time increasingthe yield.The automatedwateringsystemiscontrolledusing ATmega328
microcontrollerbasedonarduinoplatform.The system isprogrammed via the microcontroller to give
interrupt signal to the watering system (drip, sprinkler,etc) dependingonthe soil moisture levels.
The soil moisture/humidity levelsare checkedusingsoil moisture sensor.Wheneverthere isachange in
moisture/humidityinthe soil thissensorsenses the change andgivesaninterruptsignal tothe micro-
controllerandthusthe wateringsystemis activatedordeactivated.
INTRODUCTION
Water is required for the basic growth and maintenance of plants. When a sufficient amount of
water is not present for plant needs, then stress can occur and the quality of plants will decrease
or die. An automatic watering system is responsible for providing a system that can reduce the
amount of man power needed for watering plant, besides providing a system that makes a plant
grow healthier, as we are able to ensure the plant grows according to the surrounding that favors
their growth. Watering systems can be manual or automatic.
As we know,mostof the gardenersusesmanual systemto watertheirplantinthe gardenand alsoin
the greenhouse. Thissystemisinefficient. Whenwe watermanually,the possibilitytooverwateringis
high.Some plantcan drownwhenwe supplytoomuchwaterto them.
PROBLEMSTATEMENT
There are alreadyautomaticwateringsystemsinthe marketrightnow. Some of these systemsuse PLCs.
The systemdoesnotoperate effectivelysince itirrigatesthe plantaccordingtothe time that has been
setby the user.So sometimesthe plantsreceiveanextraamountof the waterthan it needsand
sometimesis notenough.Sothisautomatedwateringsystemwill water the exact amount of water
that the particular plant needs to grow healthily. Atthe same time,the amountof waterusage can
be reduced.
OBJECTIVES
To develop alowcost,automatedwatering system
Micro-controllerbasedwateringsystem.
Highwater efficiencywateringsystem.
Wateringsystemthatsuitable toall typesof plant.
MAIN OBJECTIVES
The system is expected to monitor moisture/humidity levels in the soil and switch on/off the
wateringsystemaccordingtosetmoisture levels.
AIM AND SCOPE
This Project aims to reduce the amount of water used for watering while saving cost. As afore
mentioned in the problem statement about inconsistency of water supply for the irrigation
system, thus there is need for irrigation system that helps to save water. Besides, it also helps to
reduce the man power needed, as the process of watering the plant is now automated.
This Project consists of Arduino Uno as the micro-controller for the auto irrigation system,
moisture sensor, timer, and a LCD screen to display the level of moisture. Suitable controller will
be used to display the moisture level of soil on the LCD screen. The moisture sensor is used to
detect the level of moisture at soil, timer is used to set how frequent the system will water the
plant, and once it start the water the plant as compared to the normal irrigation system that come
without any microprocessor, it will close the valve for watering when optimum level of moisture
is detected in the soil. Hence in that sense, this features help to save water consumption while
watering the plant as compared to system that use timer. Besides that, the LCD enables the
farmer to track the moisture level of soil and can water the plant manually by pressing the
watering button on the interface of the project.
This prototype can be tested for its performance in water the plant in the time desired, and stop
watering when it reach the level of moisture that user desired, and another testing can be made
by determine how much water can it save as compared to the normal version of irrigation system
that using timer.
The limitation of this project itself is that this irrigation project is only suitable for countries like
Zimbabwe but not suitable for country that has 4 seasons. Besides, this system is suitable to most
vegetable plants but not fruit plants as they do not need so much watering, in this case we focus
mainly on vegetable plant hence this make plant farm seldom use irrigation system only
vegetable farm. Lastly this system is only designed for small and middle size of farm.
PROJECT JUSTIFICATION
PROJECT SCOPE
The scope of this project entails the design and implementation of a micro controlled irrigation
system, depending on the soil moisture content. Humidly/moisture sensor will be the input of the
system and an electric water pump will be the output of the microcontroller.
PROJECT SUMMARY
In this system, the sensors will be interfaced with ATMEGA 328 microcontroller on Arduino
board. When the humidity sensor senses the input, then it will be sent to the micro
controller. The controller will convert the input into digital and displayed it on the LCD. At the
same time, the controller will send signal to the water pump and give command so that
the pump will open the valve to start the watering process.
In the water pump section, the water source is required to continuously supply the tank,
and the water level in the tank is always full. The source can be the water that is collected from
the rain water and also can be taken from the tab (household water supply). The water in
this system is used to water the plants under the control of the microcontroller which is
programmed to do the watering task. The overall view of the project is show in Figure below;
LITREATURE REVIEW
This chapter will be discussing in depth about the type of irrigationandwateringsystemavailable
across the globe. Thisalsoincludesdifferenttype of microcontrollersthathave beenusedandalso
differenttypesof moisture sensors.
There are alternativeswaystoprovide irrigationsystem.Suchasusingwatersprinkler that will
sprinkle water to the plant according to the timer that have beenset.Thisalternative is not water
efficient.Anothermethodis byimplementingthe technologycalledsupervisorycontrol anddata
acquisition(SCADA) system. Itisa centralizedsystemwhichmeansitisbeingcontrolledbyone central
computer.Thissystemrequiredaunitof computer,programmable logiccontroller(PLC) thatwill be
connected to different equipment, and a communication system between the computer and the
PLC. This system is suitable for a large scale context but verycostlyandbulkyto be put inhouse
area.
Typesof watering
Ditch Irrigation
Thisis one of the earliestirrigationmethodstobe used.Ditches/trenchesare dugoutand crops are
plantedalongthe ditchesinrows.
Terrace Irrigation
The land isshapedintosteps.Cropsare plantedonthe flatareas. Waterflowsdownthe steps watering
each of the flat areas. This method is both time and labor intensive in building the terraces.
Drip Irrigation
This isone of the mosteffective andefficientmethodof irrigationaswaterisdrippedatthe crop root
zone.The methodsaveswaterfromrunoff andevaporation.
Sensors
A sensorisa device thatdetectsandmeasuresaphysical quantityfromthe environmentandconverts it
into an electronic signal.The physical quantitycouldbe moisture,temperature,motion,lightorany
otherphysical phenomenon.Examplesof sensorsinclude:oxygensensors,temperature sensors,
infrared sensors, humidly sensors, soil moisture sensors and motiondetectionsensors.The output
of the sensorsisusuallycharge,currentor voltage.
Of interestinthisprojectisthe soil moisture sensor.
Soil moisture sensors
A soil moisture sensor is a device that measures the volumetric water content (VWC) of soil.
MathematicallyVWC,θ,isgivenasfollows;
Equation 2.1 mathematical expressionforVWC
Where:Vwisthe watervolume andVT isthe total volume (soilvolume+watervolume).Soilmoisture
sensorsare classifiedaccordingtohowtheymeasure the soil moisture content.
Soil Moisture calculation
Two methodsare usedindeterminingthe volumetricwatercontent(VWC);directandindirect.The
direct method entails drying a known volume of soil in an oven and weighing it.The direct
methodof measuringVWCisdone usingthe followingmathematical notation:
Equation2.2 soil moisture calculation.
Where:
Mwet issoil sample before dryinginthe oven
Mdry is soil sample afterdryinginthe oven
Īw iswaterdensity
Vbis the volume of soil sample before drying
Indirectmethodisbasedoncorrelatingsoil physicalandchemical propertieswithwatercontent.Three
techniques are used in this method namely: chemical titrations, geophysical sensing andsatellite
remote sensing.
Chemical titration determines the moisture loss in sample soil after freeze drying or heating.
Satellite remote sensing uses microwave radiation to check on the difference in dielectric
propertiesof dryandwetsoils.Geophysical sensingusesphysicaldeviceswhichare insertedinthe soil
to determine the soil moisturecontent.Techniquesusedinthismethodinclude:electrical resistance,
electrical conductivity, soil dielectric, soil tension, TDR, FDR, soil capacitance among others.
Typesof soil moisture sensors
Electrical resistance blocksSensorsThese sensors are made up of two electrodes made from a
porous substance like sand ceramic mixture orgypsum.The twoelectrodesare imbeddedinthe soil
duringinstallation.Moisture isallowedtomove freelyinandoutof the sensorselectrodesasthe soil
becomesmoistordriesup. The resistance of the electrodes to the flow current is correlated with
moisture content. Tomeasure this resistance the electrodes are biased (energized) with a dc
voltage and the current flowingthroughthemmeasured. ApplyingOhm’slaw;
R=V/I
Where: R is resistance (Unknown) (â„Ļ)
V isbiasingvoltage (3.3V to5.0V)
I isthe currentflowingthroughthe electrodes(Amps)
Figure 2.1 homemade soil moisturesensor
When the moisture content in the soil is high more current will be allowed to flow thus
indicating low resistance. On the other hand for dry soils the sensor will indicate higher
resistance portrayedbythe low currentreading.
Thistype of sensorischeapand readilyavailable.Electrical resistance blocksSensorscanalsobe readily
assembledfromhome usingtwometal platesorsteel nails.
Electrical resistance blocks Sensors are mostly used in small projects and gardens due to the
disadvantages;
Theyare badlyaffectedbysoil PHandsalinitythusrequiringregularmaintenance
Theyhave lowsensitivity.
The electrodes;especiallywhichprovidesaconstantsource of ions;do not dryat the same rate as the
soil surroundingit
ELECTRICAL CONDUCTIVITYPROBESENSORS
Electrical conductivity probes employ the same principle as the Electrical resistance blocks
Sensors. The one major difference between the two types of sensors is that Electrical
conductivityprobessensorshave theirelectrodes/probesindirectcontactwiththe soil.By definition
electricity is the flow of charges and water in its pure form cannot conductelectricity. The
amount of impurities in water and mineral salts make it polar thus able to conduct electricity.
A large volume of water will mean more ions and thus better electricconduction.Electrical
conductivityprobessensorstakesadvantage of thisphenomenon.The amount of current passing
between the probes is directly proportional to the soil moisture content.Moistsoil allowmore
currentto flowbetweenthe probeswhiledriersoilsonlyallowalittle current to flow between the
probes.Betterconductivityindicates a lower electrical resistance.
Most of the soil moisture sensors currently in the market especially for small projects are
Electrical conductivityprobessensors.Theyhave the followingadvantages.
ī‚ˇ Theyare cheap
ī‚ˇ Theyare readilyavailable
ī‚ˇ Easy to calibrate andinstall
YL-69 Moisture Sensor
Thisis an Electrical resistance Sensor.The sensorismade upof two electrodes.Thissoil moisture sensor
readsthe moisture contentaroundit. A currentis passedacrossthe electrodesthroughthe soil and
the resistance tothe current in the soil determinesthe soil moisture. If the soil hasmore water
resistance will be lowandthusmore currentwill passthrough.Onthe otherhandwhenthe soil
moisture islowthe sensormodule outputsahighlevelof resistance.Thissensorhasbothdigital and
analogue outputs.Digital outputissimple touse butisnot as accurate as the analogue output.
Figure YL-69 Sensor
Othertypesof soil moisture sensorsinclude
ī‚ˇ Capacitance sensors
ī‚ˇ Time DomainReflectometry(TDR) sensors
ī‚ˇ Dielectricsensors
ī‚ˇ Heat dissipationsensors
ī‚ˇ TensiometerSensors
SensorSelection
When deciding on which sensor to use the following factors should be put into consideration:
ī‚ˇ Price: Thisis the most importantparameterwhenselectinganycomponent.The price of the
sensor will ultimately affect the price of the whole system as this is one of the major
systemmodules. Sensorwiththe mostcompetitive price shouldbe chosen.
ī‚ˇ Power: In anyelectrical systempowerefficiencyiscritical.Moisture sensorwilllow power
consumptionshouldbe selected. Sensors which can be battery powered can be used in
areas withoutelectricityconnection.
ī‚ˇ Technology: Technologyusedtodesignsensordictate the sensitivity,costanddurabilityof the
sensors. Most low cost sensors have poor sensitivity, rust and corrode over time.
Resistive orconductive sensorswhichare affectedbysoli salinitythushave ashortlife.
ī‚ˇ Shape:Long andslendersensorscanbe usedinmanyapplicationsthanbulkyones.
ī‚ˇ Durability:Soil moisture sensorwhichare notaffectedbysoil salinity,corrode orrustshouldbe
selected.Soilmoisturesensorprobesthatmeasure conductivityorresistance shouldbe
avoided,since theywill wearoutovertime.
ī‚ˇ Accuracy and Linearity: A qualitysoil moisture sensorprobe should give an output which
isproportional to water content over the full output range. In addition,the soil moisture
sensorprobe shouldhave agood outputrange to reduce sensitivitytonoise.
ī‚ˇ Voltage Range:Choose asensorthathas a big supplyvoltage range.Poweringasensorwiththe
wrongvoltage will damage the sensororgive inaccurate results.
SensorInstallation
Sensorsorientationandinstallationdependsonthe sensortype,size andshape (īŦ‚at,node,androd).
Installationshouldbe guidedbythe manufacturer'sinstallationmanual.Butingeneral the sensorshould
be installedasclose tothe root area as possible.Onnew fields; the SMS should be installed prior to
planting crops.The sensorshouldbe installedatapproximately3inchesdeep.Forexistingfields
trenchesare dug at uniformintervalsandSMSinstalled.
SENSORCALIBRATION
As isthe case of sensorsinstallation,sensorcalibrationshouldalsobe done inline withthe
manufacturer'sspeciīŦcations.Differentsensorshave differentcalibrationprocedures.Development
stage of the plants roots also determines the SMSs calibration.The soil type andcropswater
requirementsgreatlyinfluencethe sensorscalibration.
YL_69 sensor valuedescription
MAINTENANCE
The technology used to design the sensors determines the regularity of maintenance. Electric
resistance and conductance sensors tend to corrode with time and thus require regular
maintenance and replacement.TDTand TDR (Time DomainReflectometry(TDR) sensors) sensors are
the most stable and durable thusrequiringminimummaintenance
WATER PUMP:
The water pump is used to artificially supply water for a particular task. It can be electronically
controlled byinterfacingittoa microcontroller.Itcanbe triggeredON/OFFbysendingsignalsas
required.The processof artificiallysupplyingwaterisknownaspumping.There are manyvarietiesof
waterpumpsused.Thisprojectemploysthe use of asmall waterpumpwhichisconnectedto a H-
Bridge. Figure below showsawaterpump:
The pumpingof wateris a basicand practical technique,farmore practical thanscoopingit upwith
one'shandsor lifting itin a hand-held bucket. This is true whether the water is drawn from a
fresh source, moved to a neededlocation, purified, or used for irrigation, washing, orsewage
treatment, or for evacuating water from an undesirable location.Regardlessof the outcome,the
energyrequiredtopumpwaterisan extremelydemandingcomponentof waterconsumption. All
other processes depend or benefit either from water descending from a higher elevation or
some pressurizedplumbingsystem.
Microcontroller
A microcontrollerisa single onchipcomputerwhichincludesnumberof peripherals likeRAM,EEPROM,
Timersetc.,required toperformsome predefined task.There are differentmicrocontroller families
including: 8051, PIC (Programmable Interface Controller) and AVR.Microcontrollersare usedin
digital applicationsascontrol units.Some microcontrollerscome withtheirin-buildcircuitslike Analog
to digital convertorsordigital toanalogconvertors.Microcontrollersare mostlyprogrammedusing
assemblylanguage butinrecentyearshighlevel
languages like C, C++ PASCAL and java have been used.Highlevel programmingof microcontrollers
bringsthe advantage of not havinga differentprogramforeachmicrocontroller manufacturer. High
level programming is also neat, easy to document and maintain and userfriendly.
Typesof Microcontrollers
8051
These are among the earliermicrocontrollerstobe fabricated.Due tosuperiorityintechnologyinthe
newerversions,veryfewcompaniesstill fabricate 8051.Earliertypesof 8051 have 12 clocks per
instruction whereas the newer versions have 6 clocks per instruction.8051 microcontrollerdoes
not have an inbuiltmemorybusandADC. First8051 microcontrollertobe fabricatedwith Harvard
architecture wasdone in1980 by Intel.
Programmable Interface Controller(PIC)
Programmable Interface Controllersare commonlyreferredtoasPIC.PICsare slightlyolderthan8051
microcontrollers. PICs are preferred to8051 because of their small low pin countdevices. PICs
performbetterandare affordable than8051. The Microchiptechnologyfabricatedthe single chip
microcontrollerPICwithHarvardarchitecture.The onlymajordownside of PICisitsprogrammingpartis
verytedious.PICsare hence notrecommendedforbeginners.
AVR:
In 1996, Atmel fabricatedthissinglechipmicrocontrollerwithamodifiedHarvardArchitecture.Thischip
isloadedwith C- compiler and a free IDE. Like PIC,AVRmicrocontrollersare difficult forthe beginners
to workwith.AVRmicrocontrollerhason-chipboot-loaderthusAVRcanbe programmedeasilywithout
any external programmer.[3] AVRcontrollershasnumberof I/O ports, timers/counters, interrupts,
A/D converters, USART, I2C interfaces, PWM channels,on-chipanalogcomparators.
Arduino
Arduinoisan open-source electronicsdesignplatform.The Arduinoboardisspeciallydesigned
for programming and prototyping with Atmel microcontrollers. [5] An arduino interacts with
physical world via sensors. Using arduino; electric equipments can be designed to respond to
change in physical elements like temperature, humidity, heat or even light. [5] This is the
automation process. For example, reading a humidity sensor and turning on and off of an
automaticirrigationsystem.There several typesof arduinoboards.
The open-source Arduino environment allows one to write code and load it onto the
Arduinoboard's memory. The development environment is written in Java and based on
Processing, AVR-GCC, and other open source software. [5] The Arduino programming
language is an implementation of Wiring, a similar physical computing platform, which is
based on the Processing multimedia programming environment. The arduino software is
published as opensource tools, available for extension by experienced programmers. The
language can be expanded through C++ libraries, and people wanting to understand the
technical details can make the leap from Arduino to the AVR C programming language on
whichit'sbased.Similarly,AVR-Ccode canbe added directlyintothe Arduinoprogramsif one
so wishes.[5
Typesof arduinoboards
2.2.3.1 Legacy Versions
ArduinolegacyversionsincludeArduinoNG,Diecimila,andthe Duemilanove.Thesearduinos
use ATMEGA168 chips.Theyrequire manual selectionof eitherUSBor batterypower.[5] For
Arduino NG one is required to hold the rest button on the board for a few seconds before
uploadingaprogram onto it.
Figure 2.14 Differenttypesof arduino
ArduinoUno
Thisis the most common arduino type.This arduino type uses ATmega328 AVR microcontroller.
Figure 2.15 Parts of
arduinouno
ATmega328 is more preferreddue tothe followingfeatures:
Have three 8-bitbi-directional I/Oportswithinternal pull-upresistors.[5]
ī‚ˇ 32K Bytes of flashmemory.
ī‚ˇ 1K BytesEEPROM
ī‚ˇ 2K Bytesof RAM
ī‚ˇ 2 instructionwords/vector.
ī‚ˇ 8-channel 10-bitsuccessive approximationADC
ī‚ˇ Programmable Serial USART
ī‚ˇ 23 Programmable I/OLines
ī‚ˇ OperatingVoltage 1.8- 5.5Ve.t.c
ArduinoMega2560
Thisis regardedasan advancementof arduinouno.Ithas more memorythanarduinouno.It has
a total of 54 input pins of which 16 are analog inputs. It has a larger PCB board than arduino.
Overall itismore powerful thanarduinouno.ThisarduinoboardisbasedonATmega2560. [5]
ArduinoLilyPad
Thisarduinoboard isdesignedforwearableapplications.Itisusuallysewnonfabric.Thisboard
requiresthe use of a special FTDI-USBTTL serial programmingcable.ArduinoLilyPadis used
to design"smart"wearable.[5]
ArduinoMega ADK
Thisarduinoboard isspecificallydesignedtointeractwithandroiddevices.
LiquidCrystal Display(LCD)
LiquidCrystal Display(LCD) screenisanelectronicdisplaymodule.AnLCDhas a wide range of
applicationsin electronics. The most basic and commonly used LCD in circuits is the 16x2 display.
LCDs are commonly preferred in display because they are cheap, easy to programme and can
displayawide range of characters and animations.
A 16x2 LCD have two display lines each capable of displaying 16 characters.This LCD has
Command and Data registers. The commandregister stores command instructions given to the
LCD while the Dataregisterstoresthe data to be displayedbythe LCD.
Figure 2.17 LCD (16X2)
Whenusing8-bitconfigurationall 8data pins(DB0-DB7) are usedwhile only4data pins(DB4-DB7) are
usedina 4-bitconfiguration.
Automaticswitchingcircuits
In electronicsautomation manytimesthe designerisconfrontedbyasituationwhere he/she hasto
switchveryhighvoltage equipmenton,usingalow voltage circuit.Forexample usinga5v dc voltage,it
ispossible toswitchon/off a230v ac machine.Digital ordiscrete signalsenablesasopposedtoanalog
signalsare used.There are a numberof componentsused in electronicswitchingtoday.
DESIGN ANDIMPLEMENTATION
The systemhas three majorparts;humiditysensingpart,control sectionandthe outputsection.The
soil humidity was detected using YL-69 soil sensor (a resistance type sensor).The control unitwas
achievedusingATMega328microcontrollerbasedonarduinoplatform.The outputwasthe control unit
was usedtocontrol the irrigationsystembyswitching itonand off dependingonthe soil moisture
contents.Twostagesof designwere undertaken;hardware andsoftware.
Hardware design
Control Unit:ATMega328 microcontrolleronarduinoplatform
ATMega328 microcontroller on arduino platform was selected the control unit of the
microcontroller.ArduinoUnowasselectedfromthe expansive arduinofamily.ArduinoUnohasa total
of 20 inputspinsof which14 are digital and6 are analoginputs.[5] The digital pinscanbe usedas either
inputsor outputsandalso6 of the 14 pinscan be utilizedasPMW. The board has a 16 MHz ceramic
resonator,a USB connectionanda powerjack.
Figure 3.1 ArduinoUno
In the design of the system analog pins were selected as the arduino input and digital pin was
selectedasthe arduinooutputpins.[5]
Otherimportantpinson the arduinoboardare showninthe table below.
Table 3-1 Important
pinsinarduino
The pinson the arduinowere selectedasshownbelow.
Table 3-2 Selected
pinson arduino
SensingUnit:
YL-69 soil moisture sensorconnectiontoarduino
YL-69 soil moisture sensorwasinterfacedtothe arduinothrougha digital aPCB drive.The PCBdrive has
a digital potentiometeranda LM393 comparator. The LM393 comparator isusedto compare the
voltagesacrossthe sensorprobesandthe set Vcc voltage.[7] The digipotisusedtoalterthe sensitivity
of the sensorwhenconnectedindigitalmode.The outof the PCB drive hasfourconnectionspinsas
showninthe table below.
YL-69 PCB pins
The analogue configurationwasselectedasitsmore stable comparedtothe digital configuration.
The PCB drive pinA0 was connectedtothe arduinoanalogpinA0.
YL-69 Connectiontoarduinoboard
The outputof the sensorto the arduinoanalogpinA0 was resistance.The resistance toflow of current
between the sensor probes changes with soil moisture level and soil type.The currentpassing
throughthe sensorprobes(Iout) fordifferentsoilsanddifferentsoil moisturelevels wascalculatedas
shownbelow:
Iout= Vcc / {Soil Resistance value(RS)}
Equation3-1 YL-69 Currentcalculation
OutputUnits
LCD interface withArduino
To affectdisplaya16x2 LiquidCrystal Display(LCD) waschosen.LCDpinsD4, D5, D6 and D7 were used
as data linesina 4 bit mode configuration. These pinswere connectedtoarduino 5,4, 3 and 2
respectively.Pin15(A) wasconnectedtoVccand pin16 (K) wasconnectedto GND. These pins(A and K)
are forthe LEDs integratedonthe LCD circuitboard. LCD’s pinE (Enable) wasconnectedtodigital pin11
on the arduinoboard. PinRS (RegisterSelect) onthe LCD was connected to arduino digital pin 12.
R/W pin of the LCD was connected to GND (ground).
The figure belowshowsthe LCD-microcontrollerinterface.
LEDS
To indicate the three statesof the soil three LEDswere used.The three LEDs litup dependingonthe soil
moisture content.Whenthe soil wasdryLED connectedtoarduinodigital pin13 was lit. For moistsoil
(requiredcondition)LEDconnectedtoarduinodigital pin12 litup and forsoggysoil LED connectedto
arduinodigital pin11 litup.
The three LEDs were connectedtothe microcontrollerasshownbelow.
Ohmslawwas utilizedto determine the size(inohms) of the protectionresistortobe interfacedwith
the LEDs. From Ohmslaw
Voltage (V) ={Current(I)}*{Resistance(R)}
Where as inour case;
V= Vcc (5V) -Voltage dropacrossLED (selectedLEDshas2.0V)
ILED= LED current (20mA)
VLED = LED Voltage drop(redincolour) (2V)
R= minimumrequiredresistance value
Therefore
Rmin= {(5-2) V}/{20mA} =150 Ί
To achieve currentlimitationaresistance value higherthanthe calculatedRminwasselected.A
220Ί resistorwasusedand thusonly13.6mA currentwas allowedtopassthrough eachof the three
LEDs.
Waterpump connectiontothe Arduino
To implementthe final bitof the automatedirrigationsysteman electricmotor(240VAC) was
selectedasthe waterpump.The firsttwounitsof the systemi.e.sensingunitandthe control unit
(microcontroller) are poweredby5VDC. To interface the twounitsa 5VDC relay(SLT73-5D-1Z) was used
as the isolationunit.
The microcontrollerwasconnectedtothe relayviaan NPN transistor(2N4123). To protectthe
transistor;while turningiton,aresistorwasused.The resistorlimitsthe currentflowingthrough
the transistor.Aswas the case withLEDs ohmslaw was usedas shownbelow.
Rmin= (5 – 0.7) V / 40mA = 107.5đ›ē
A resistorof 470đ›ē was selectedandthusthe currentthroughthe transistorwaslimitedto;
4.3V / 470đ›ē =9.12 mA
To protect the microcontroller from back e.m.f during switching a diode was connected across
the relay.The connectionwasas shownbelow.
Program Pseudocode
READ sensorvalue
COMPARE sensorvaluewithsetthreshold
IF sensorvalue>maximumsetvalue
TURN-ON pump
DISPLAYsoil conditiononLCD
LIGHT dry soil LED
ELSE IFsensorvalue < maximumsetvalue >minimumsetvalue
TURN-OFFpump
DISPLAYsoil conditiononLCD
LIGHT moistsoil LED
ELSE IFsensorvalue < minimumsetvalue
TURN-OFFpump
DISPLAYsoil conditiononLCD
LIGHT soggysoil LED
PROGRAMFLOW CHART
CONCLUSION ANDRECOMMENDATIONS
CONCLUSION
A system to monitor moisture levels in the soil was designed. The systemwasusedto switch
on/off the watering system/pump according to set soil moisture levels. The control unitthe
prototype was implemented using a microcontroller on arduino platform while the sensing bit
was implementedusingaSMSYL-69. Three LEDs and an LCD were usedto implementthe displayof the
three soil statesi.e.soggysoil,moistsoilandthe drysoil states.Toswitchbetweenthe control andthe
irrigationsystemsarelayswitchingcircuitwasused.
RECOMMENDATIONS
ī‚ˇ To improve on the effectiveness and efficiency of the system the following
recommendationscanbe put intoconsiderations:
ī‚ˇ Cost effective techniques to overcome the limitation of requiring a soil specificcalibration
shouldbe employed.
ī‚ˇ Integrating GSM technology can be used, such that whenever the water pump switches
ī‚ˇ ON/OFF,anSMS is sentto the concernedpersonregardingthe statusof the pump.
ī‚ˇ The pump shouldalsobe controlledviaSMS.
ī‚ˇ The system can be integrated with temperature and humidity sensors to monitor the
weatherconditionsinthe farm.
REFERENCES
ī‚ˇ MassimoBanzi,GettingstartedwithArduino,SecondEdition,O’ReillyMedia,Inc,2011 Francis
Z. Karinaand Alex Wambua Mwaniki, irrigation agriculture in Kenya, Nairobi,Kenya,2011
ī‚ˇ Allan Trevennor, Practical AVR Microcontrollers, New York , USA, Springer Science +
BusinessMedia,2012
ī‚ˇ Clemmens, A.J. Feedback Control for Surface Irrigation Management, ASAE Publication
04 -90, 1990.
ī‚ˇ www.arduino.ccAccessed on6thDec,2013 , 25Th Dec,2013 and 17th Jan,2014
ī‚ˇ Songle relayDatasheet
ī‚ˇ Soil moisture sensordatasheet
ī‚ˇ W. C. Dunn,IntroductiontoInstrumentationSensors,andProcessControl,BritishLibrary
ī‚ˇ Cataloguing,2005
ī‚ˇ General Purpose TransistorsNPN Silicon(KSP2222A) datasheet
ī‚ˇ http://www.vision2030.go.ke/accessedon25th
2014

More Related Content

What's hot

Automated plant watering system
Automated plant watering systemAutomated plant watering system
Automated plant watering systemSamreenSamreen4
 
SMART FARMING USING IOT
SMART FARMING USING IOTSMART FARMING USING IOT
SMART FARMING USING IOTIAEME Publication
 
Microcontroller based irrigation
Microcontroller based irrigationMicrocontroller based irrigation
Microcontroller based irrigationkajikho9
 
Temp based fan speed control
Temp based fan speed controlTemp based fan speed control
Temp based fan speed controlSai Malleswar
 
AUTOMATIC IRRIGATION SYSTEM
AUTOMATIC IRRIGATION SYSTEMAUTOMATIC IRRIGATION SYSTEM
AUTOMATIC IRRIGATION SYSTEMAJAL A J
 
Automatic irrigation 1st review(ieee project ece dept)
Automatic irrigation 1st review(ieee project ece dept)Automatic irrigation 1st review(ieee project ece dept)
Automatic irrigation 1st review(ieee project ece dept)Siddappa Dollin
 
IOT based irrigation system
IOT based irrigation systemIOT based irrigation system
IOT based irrigation systemShanjedul Hassan
 
Smart irrigation system
Smart irrigation systemSmart irrigation system
Smart irrigation systemAyesha Sajjad
 
Smart Irrigation System
Smart Irrigation SystemSmart Irrigation System
Smart Irrigation SystemAI Publications
 
automatic irrigation system by sensing soil moisture content
automatic irrigation system by sensing soil moisture contentautomatic irrigation system by sensing soil moisture content
automatic irrigation system by sensing soil moisture contentPAMULA MURALI
 
Microcontroller based automation of drip irrigation system
Microcontroller based automation of drip irrigation systemMicrocontroller based automation of drip irrigation system
Microcontroller based automation of drip irrigation systemChitrachedu Dada Kalandar
 
Automatic Watering System in Greenhouse
Automatic Watering System in GreenhouseAutomatic Watering System in Greenhouse
Automatic Watering System in Greenhousemishu TheScareCrow
 
arduino based automtic irrigation system
arduino based automtic irrigation systemarduino based automtic irrigation system
arduino based automtic irrigation systemMiJanurSimon
 
Smart irrigation system
Smart irrigation systemSmart irrigation system
Smart irrigation systemVISHALDWIVEDI27
 
Arduino Automatic Watering System Plants Sprinkler Using IoT
Arduino Automatic Watering System Plants Sprinkler Using IoTArduino Automatic Watering System Plants Sprinkler Using IoT
Arduino Automatic Watering System Plants Sprinkler Using IoTPRAVEEN KANSARI
 
Smart irrigation system using Internet Of Things
Smart irrigation system using Internet Of ThingsSmart irrigation system using Internet Of Things
Smart irrigation system using Internet Of ThingsBasavaraj Galagi
 
Smart Irrigation ppt
Smart Irrigation pptSmart Irrigation ppt
Smart Irrigation pptshubhangi mulik
 

What's hot (20)

Automated plant watering system
Automated plant watering systemAutomated plant watering system
Automated plant watering system
 
SMART FARMING USING IOT
SMART FARMING USING IOTSMART FARMING USING IOT
SMART FARMING USING IOT
 
Microcontroller based irrigation
Microcontroller based irrigationMicrocontroller based irrigation
Microcontroller based irrigation
 
Temp based fan speed control
Temp based fan speed controlTemp based fan speed control
Temp based fan speed control
 
Automatic Irrigation System
Automatic Irrigation SystemAutomatic Irrigation System
Automatic Irrigation System
 
AUTOMATIC IRRIGATION SYSTEM
AUTOMATIC IRRIGATION SYSTEMAUTOMATIC IRRIGATION SYSTEM
AUTOMATIC IRRIGATION SYSTEM
 
Automatic irrigation 1st review(ieee project ece dept)
Automatic irrigation 1st review(ieee project ece dept)Automatic irrigation 1st review(ieee project ece dept)
Automatic irrigation 1st review(ieee project ece dept)
 
IOT based irrigation system
IOT based irrigation systemIOT based irrigation system
IOT based irrigation system
 
Smart irrigation system
Smart irrigation systemSmart irrigation system
Smart irrigation system
 
Smart Irrigation System
Smart Irrigation SystemSmart Irrigation System
Smart Irrigation System
 
Project presentation
Project presentationProject presentation
Project presentation
 
Automated irrigation
Automated irrigation Automated irrigation
Automated irrigation
 
automatic irrigation system by sensing soil moisture content
automatic irrigation system by sensing soil moisture contentautomatic irrigation system by sensing soil moisture content
automatic irrigation system by sensing soil moisture content
 
Microcontroller based automation of drip irrigation system
Microcontroller based automation of drip irrigation systemMicrocontroller based automation of drip irrigation system
Microcontroller based automation of drip irrigation system
 
Automatic Watering System in Greenhouse
Automatic Watering System in GreenhouseAutomatic Watering System in Greenhouse
Automatic Watering System in Greenhouse
 
arduino based automtic irrigation system
arduino based automtic irrigation systemarduino based automtic irrigation system
arduino based automtic irrigation system
 
Smart irrigation system
Smart irrigation systemSmart irrigation system
Smart irrigation system
 
Arduino Automatic Watering System Plants Sprinkler Using IoT
Arduino Automatic Watering System Plants Sprinkler Using IoTArduino Automatic Watering System Plants Sprinkler Using IoT
Arduino Automatic Watering System Plants Sprinkler Using IoT
 
Smart irrigation system using Internet Of Things
Smart irrigation system using Internet Of ThingsSmart irrigation system using Internet Of Things
Smart irrigation system using Internet Of Things
 
Smart Irrigation ppt
Smart Irrigation pptSmart Irrigation ppt
Smart Irrigation ppt
 

Similar to Microcontroller-Based Automatic Home Garden Watering

SENSOR BASED AUTOMATIC DRIP IRRIGATION SYSTEM
SENSOR BASED AUTOMATIC DRIP IRRIGATION SYSTEMSENSOR BASED AUTOMATIC DRIP IRRIGATION SYSTEM
SENSOR BASED AUTOMATIC DRIP IRRIGATION SYSTEMJournal For Research
 
Bring technology into Agriculture.pptx
Bring technology into Agriculture.pptxBring technology into Agriculture.pptx
Bring technology into Agriculture.pptxbaysahcmjames2kblax
 
Automatic Irrigation using sensors
Automatic Irrigation using sensorsAutomatic Irrigation using sensors
Automatic Irrigation using sensorsSwagat Sahoo
 
Smart Irrigation System in Urban Landscaping.pptx
Smart Irrigation System in Urban Landscaping.pptxSmart Irrigation System in Urban Landscaping.pptx
Smart Irrigation System in Urban Landscaping.pptxNehaChaudhary730890
 
IRJET- Water Irrigation System using Arduino
IRJET- Water Irrigation System using ArduinoIRJET- Water Irrigation System using Arduino
IRJET- Water Irrigation System using ArduinoIRJET Journal
 
microcontroller based automation of drip irrigation system
microcontroller based automation of drip irrigation systemmicrocontroller based automation of drip irrigation system
microcontroller based automation of drip irrigation systemChitrachedu Dada Kalandar
 
Seminar report
Seminar reportSeminar report
Seminar reportPankaj Kumar
 
Rural engineering process : Development of farms by automation
Rural engineering process : Development of  farms by automationRural engineering process : Development of  farms by automation
Rural engineering process : Development of farms by automationShashank Kapoor
 
Intelligent Agricultural System with Weather Monitoring
Intelligent Agricultural System with Weather MonitoringIntelligent Agricultural System with Weather Monitoring
Intelligent Agricultural System with Weather MonitoringIJSRD
 
Intelligent Agricultural System with Weather Monitoring
Intelligent Agricultural System with Weather MonitoringIntelligent Agricultural System with Weather Monitoring
Intelligent Agricultural System with Weather MonitoringIJSRD
 
development of smart automated irrigation system
development of smart automated irrigation systemdevelopment of smart automated irrigation system
development of smart automated irrigation systemIJEAB
 
Automatic plant watering using arduinos
Automatic plant watering using arduinosAutomatic plant watering using arduinos
Automatic plant watering using arduinosMuhammadFazilMemon
 
SOLAR POWER AUTO IRRIGATION SYSTEM
SOLAR POWER AUTO IRRIGATION SYSTEM SOLAR POWER AUTO IRRIGATION SYSTEM
SOLAR POWER AUTO IRRIGATION SYSTEM Gaurav Anand
 
IRJET- Advanced Irrigation System using Arduino and Raspberry Pi as Centr...
IRJET-  	  Advanced Irrigation System using Arduino and Raspberry Pi as Centr...IRJET-  	  Advanced Irrigation System using Arduino and Raspberry Pi as Centr...
IRJET- Advanced Irrigation System using Arduino and Raspberry Pi as Centr...IRJET Journal
 
Smart Drip Irrigation System
Smart Drip Irrigation SystemSmart Drip Irrigation System
Smart Drip Irrigation Systemijtsrd
 
Irrigation controller-system
Irrigation controller-systemIrrigation controller-system
Irrigation controller-systemSHIVAKUMAR A
 
Paper2507.pdf
Paper2507.pdfPaper2507.pdf
Paper2507.pdfHananShayibo
 
Precision Irrigation using IoT and Machine Learning for Drip Irrigation
Precision Irrigation using IoT and Machine Learning for Drip IrrigationPrecision Irrigation using IoT and Machine Learning for Drip Irrigation
Precision Irrigation using IoT and Machine Learning for Drip IrrigationMuhammad Aleem Siddiqui
 

Similar to Microcontroller-Based Automatic Home Garden Watering (20)

SENSOR BASED AUTOMATIC DRIP IRRIGATION SYSTEM
SENSOR BASED AUTOMATIC DRIP IRRIGATION SYSTEMSENSOR BASED AUTOMATIC DRIP IRRIGATION SYSTEM
SENSOR BASED AUTOMATIC DRIP IRRIGATION SYSTEM
 
F010323236
F010323236F010323236
F010323236
 
Bring technology into Agriculture.pptx
Bring technology into Agriculture.pptxBring technology into Agriculture.pptx
Bring technology into Agriculture.pptx
 
Automatic Irrigation using sensors
Automatic Irrigation using sensorsAutomatic Irrigation using sensors
Automatic Irrigation using sensors
 
Smart Irrigation System in Urban Landscaping.pptx
Smart Irrigation System in Urban Landscaping.pptxSmart Irrigation System in Urban Landscaping.pptx
Smart Irrigation System in Urban Landscaping.pptx
 
IRJET- Water Irrigation System using Arduino
IRJET- Water Irrigation System using ArduinoIRJET- Water Irrigation System using Arduino
IRJET- Water Irrigation System using Arduino
 
microcontroller based automation of drip irrigation system
microcontroller based automation of drip irrigation systemmicrocontroller based automation of drip irrigation system
microcontroller based automation of drip irrigation system
 
211.pdf
211.pdf211.pdf
211.pdf
 
Seminar report
Seminar reportSeminar report
Seminar report
 
Rural engineering process : Development of farms by automation
Rural engineering process : Development of  farms by automationRural engineering process : Development of  farms by automation
Rural engineering process : Development of farms by automation
 
Intelligent Agricultural System with Weather Monitoring
Intelligent Agricultural System with Weather MonitoringIntelligent Agricultural System with Weather Monitoring
Intelligent Agricultural System with Weather Monitoring
 
Intelligent Agricultural System with Weather Monitoring
Intelligent Agricultural System with Weather MonitoringIntelligent Agricultural System with Weather Monitoring
Intelligent Agricultural System with Weather Monitoring
 
development of smart automated irrigation system
development of smart automated irrigation systemdevelopment of smart automated irrigation system
development of smart automated irrigation system
 
Automatic plant watering using arduinos
Automatic plant watering using arduinosAutomatic plant watering using arduinos
Automatic plant watering using arduinos
 
SOLAR POWER AUTO IRRIGATION SYSTEM
SOLAR POWER AUTO IRRIGATION SYSTEM SOLAR POWER AUTO IRRIGATION SYSTEM
SOLAR POWER AUTO IRRIGATION SYSTEM
 
IRJET- Advanced Irrigation System using Arduino and Raspberry Pi as Centr...
IRJET-  	  Advanced Irrigation System using Arduino and Raspberry Pi as Centr...IRJET-  	  Advanced Irrigation System using Arduino and Raspberry Pi as Centr...
IRJET- Advanced Irrigation System using Arduino and Raspberry Pi as Centr...
 
Smart Drip Irrigation System
Smart Drip Irrigation SystemSmart Drip Irrigation System
Smart Drip Irrigation System
 
Irrigation controller-system
Irrigation controller-systemIrrigation controller-system
Irrigation controller-system
 
Paper2507.pdf
Paper2507.pdfPaper2507.pdf
Paper2507.pdf
 
Precision Irrigation using IoT and Machine Learning for Drip Irrigation
Precision Irrigation using IoT and Machine Learning for Drip IrrigationPrecision Irrigation using IoT and Machine Learning for Drip Irrigation
Precision Irrigation using IoT and Machine Learning for Drip Irrigation
 

Recently uploaded

microprocessor 8085 and its interfacing
microprocessor 8085  and its interfacingmicroprocessor 8085  and its interfacing
microprocessor 8085 and its interfacingjaychoudhary37
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZTE
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and usesDevarapalliHaritha
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLDeelipZope
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 

Recently uploaded (20)

microprocessor 8085 and its interfacing
microprocessor 8085  and its interfacingmicroprocessor 8085  and its interfacing
microprocessor 8085 and its interfacing
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and uses
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCL
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 

Microcontroller-Based Automatic Home Garden Watering

  • 1. DESIGN OFA MICRO CONTROLLER BASED AUTOMATICHOME GARDEN WATERING SYSTEM ABSTRACT Due to increase incommitments,goingtothe backyard to checkon and water the plantin a garden can be a tiresome processwhichalsoconsumesalotof time that can be usedforotherpurposes. Insmall scale home gardening a healthy water balance is essential for high quality yields. Under-watered plantssufferfromnutrientdeficiencieswhileover-wateredplantsare more susceptible to diseases, pressure andcan insome cases leadtoroot deaththroughsuffocation.Alsoover-wateredplantsare not able to withstanddryspellsduringdryseason. The aim of this project is to use engineering principles and concepts to provide a microcontroller basedwateringsystem.The systemwill helpinsavingmoneyandwaterand time andalsoat the same time increasingthe yield.The automatedwateringsystemiscontrolledusing ATmega328 microcontrollerbasedonarduinoplatform.The system isprogrammed via the microcontroller to give interrupt signal to the watering system (drip, sprinkler,etc) dependingonthe soil moisture levels. The soil moisture/humidity levelsare checkedusingsoil moisture sensor.Wheneverthere isachange in moisture/humidityinthe soil thissensorsenses the change andgivesaninterruptsignal tothe micro- controllerandthusthe wateringsystemis activatedordeactivated. INTRODUCTION Water is required for the basic growth and maintenance of plants. When a sufficient amount of water is not present for plant needs, then stress can occur and the quality of plants will decrease or die. An automatic watering system is responsible for providing a system that can reduce the amount of man power needed for watering plant, besides providing a system that makes a plant grow healthier, as we are able to ensure the plant grows according to the surrounding that favors their growth. Watering systems can be manual or automatic. As we know,mostof the gardenersusesmanual systemto watertheirplantinthe gardenand alsoin the greenhouse. Thissystemisinefficient. Whenwe watermanually,the possibilitytooverwateringis high.Some plantcan drownwhenwe supplytoomuchwaterto them. PROBLEMSTATEMENT There are alreadyautomaticwateringsystemsinthe marketrightnow. Some of these systemsuse PLCs. The systemdoesnotoperate effectivelysince itirrigatesthe plantaccordingtothe time that has been setby the user.So sometimesthe plantsreceiveanextraamountof the waterthan it needsand sometimesis notenough.Sothisautomatedwateringsystemwill water the exact amount of water that the particular plant needs to grow healthily. Atthe same time,the amountof waterusage can be reduced. OBJECTIVES To develop alowcost,automatedwatering system Micro-controllerbasedwateringsystem.
  • 2. Highwater efficiencywateringsystem. Wateringsystemthatsuitable toall typesof plant. MAIN OBJECTIVES The system is expected to monitor moisture/humidity levels in the soil and switch on/off the wateringsystemaccordingtosetmoisture levels. AIM AND SCOPE This Project aims to reduce the amount of water used for watering while saving cost. As afore mentioned in the problem statement about inconsistency of water supply for the irrigation system, thus there is need for irrigation system that helps to save water. Besides, it also helps to reduce the man power needed, as the process of watering the plant is now automated. This Project consists of Arduino Uno as the micro-controller for the auto irrigation system, moisture sensor, timer, and a LCD screen to display the level of moisture. Suitable controller will be used to display the moisture level of soil on the LCD screen. The moisture sensor is used to detect the level of moisture at soil, timer is used to set how frequent the system will water the plant, and once it start the water the plant as compared to the normal irrigation system that come without any microprocessor, it will close the valve for watering when optimum level of moisture is detected in the soil. Hence in that sense, this features help to save water consumption while watering the plant as compared to system that use timer. Besides that, the LCD enables the farmer to track the moisture level of soil and can water the plant manually by pressing the watering button on the interface of the project. This prototype can be tested for its performance in water the plant in the time desired, and stop watering when it reach the level of moisture that user desired, and another testing can be made by determine how much water can it save as compared to the normal version of irrigation system that using timer. The limitation of this project itself is that this irrigation project is only suitable for countries like Zimbabwe but not suitable for country that has 4 seasons. Besides, this system is suitable to most vegetable plants but not fruit plants as they do not need so much watering, in this case we focus mainly on vegetable plant hence this make plant farm seldom use irrigation system only vegetable farm. Lastly this system is only designed for small and middle size of farm. PROJECT JUSTIFICATION PROJECT SCOPE The scope of this project entails the design and implementation of a micro controlled irrigation system, depending on the soil moisture content. Humidly/moisture sensor will be the input of the system and an electric water pump will be the output of the microcontroller.
  • 3. PROJECT SUMMARY In this system, the sensors will be interfaced with ATMEGA 328 microcontroller on Arduino board. When the humidity sensor senses the input, then it will be sent to the micro controller. The controller will convert the input into digital and displayed it on the LCD. At the same time, the controller will send signal to the water pump and give command so that the pump will open the valve to start the watering process. In the water pump section, the water source is required to continuously supply the tank, and the water level in the tank is always full. The source can be the water that is collected from the rain water and also can be taken from the tab (household water supply). The water in this system is used to water the plants under the control of the microcontroller which is programmed to do the watering task. The overall view of the project is show in Figure below; LITREATURE REVIEW This chapter will be discussing in depth about the type of irrigationandwateringsystemavailable across the globe. Thisalsoincludesdifferenttype of microcontrollersthathave beenusedandalso differenttypesof moisture sensors. There are alternativeswaystoprovide irrigationsystem.Suchasusingwatersprinkler that will sprinkle water to the plant according to the timer that have beenset.Thisalternative is not water efficient.Anothermethodis byimplementingthe technologycalledsupervisorycontrol anddata acquisition(SCADA) system. Itisa centralizedsystemwhichmeansitisbeingcontrolledbyone central computer.Thissystemrequiredaunitof computer,programmable logiccontroller(PLC) thatwill be connected to different equipment, and a communication system between the computer and the PLC. This system is suitable for a large scale context but verycostlyandbulkyto be put inhouse area. Typesof watering
  • 4. Ditch Irrigation Thisis one of the earliestirrigationmethodstobe used.Ditches/trenchesare dugoutand crops are plantedalongthe ditchesinrows. Terrace Irrigation The land isshapedintosteps.Cropsare plantedonthe flatareas. Waterflowsdownthe steps watering each of the flat areas. This method is both time and labor intensive in building the terraces. Drip Irrigation This isone of the mosteffective andefficientmethodof irrigationaswaterisdrippedatthe crop root zone.The methodsaveswaterfromrunoff andevaporation. Sensors A sensorisa device thatdetectsandmeasuresaphysical quantityfromthe environmentandconverts it into an electronic signal.The physical quantitycouldbe moisture,temperature,motion,lightorany otherphysical phenomenon.Examplesof sensorsinclude:oxygensensors,temperature sensors, infrared sensors, humidly sensors, soil moisture sensors and motiondetectionsensors.The output of the sensorsisusuallycharge,currentor voltage. Of interestinthisprojectisthe soil moisture sensor. Soil moisture sensors A soil moisture sensor is a device that measures the volumetric water content (VWC) of soil. MathematicallyVWC,θ,isgivenasfollows; Equation 2.1 mathematical expressionforVWC Where:Vwisthe watervolume andVT isthe total volume (soilvolume+watervolume).Soilmoisture sensorsare classifiedaccordingtohowtheymeasure the soil moisture content. Soil Moisture calculation Two methodsare usedindeterminingthe volumetricwatercontent(VWC);directandindirect.The direct method entails drying a known volume of soil in an oven and weighing it.The direct methodof measuringVWCisdone usingthe followingmathematical notation: Equation2.2 soil moisture calculation.
  • 5. Where: Mwet issoil sample before dryinginthe oven Mdry is soil sample afterdryinginthe oven Īw iswaterdensity Vbis the volume of soil sample before drying Indirectmethodisbasedoncorrelatingsoil physicalandchemical propertieswithwatercontent.Three techniques are used in this method namely: chemical titrations, geophysical sensing andsatellite remote sensing. Chemical titration determines the moisture loss in sample soil after freeze drying or heating. Satellite remote sensing uses microwave radiation to check on the difference in dielectric propertiesof dryandwetsoils.Geophysical sensingusesphysicaldeviceswhichare insertedinthe soil to determine the soil moisturecontent.Techniquesusedinthismethodinclude:electrical resistance, electrical conductivity, soil dielectric, soil tension, TDR, FDR, soil capacitance among others. Typesof soil moisture sensors Electrical resistance blocksSensorsThese sensors are made up of two electrodes made from a porous substance like sand ceramic mixture orgypsum.The twoelectrodesare imbeddedinthe soil duringinstallation.Moisture isallowedtomove freelyinandoutof the sensorselectrodesasthe soil becomesmoistordriesup. The resistance of the electrodes to the flow current is correlated with moisture content. Tomeasure this resistance the electrodes are biased (energized) with a dc voltage and the current flowingthroughthemmeasured. ApplyingOhm’slaw; R=V/I Where: R is resistance (Unknown) (â„Ļ) V isbiasingvoltage (3.3V to5.0V) I isthe currentflowingthroughthe electrodes(Amps) Figure 2.1 homemade soil moisturesensor
  • 6. When the moisture content in the soil is high more current will be allowed to flow thus indicating low resistance. On the other hand for dry soils the sensor will indicate higher resistance portrayedbythe low currentreading. Thistype of sensorischeapand readilyavailable.Electrical resistance blocksSensorscanalsobe readily assembledfromhome usingtwometal platesorsteel nails. Electrical resistance blocks Sensors are mostly used in small projects and gardens due to the disadvantages; Theyare badlyaffectedbysoil PHandsalinitythusrequiringregularmaintenance Theyhave lowsensitivity. The electrodes;especiallywhichprovidesaconstantsource of ions;do not dryat the same rate as the soil surroundingit ELECTRICAL CONDUCTIVITYPROBESENSORS Electrical conductivity probes employ the same principle as the Electrical resistance blocks Sensors. The one major difference between the two types of sensors is that Electrical conductivityprobessensorshave theirelectrodes/probesindirectcontactwiththe soil.By definition electricity is the flow of charges and water in its pure form cannot conductelectricity. The amount of impurities in water and mineral salts make it polar thus able to conduct electricity. A large volume of water will mean more ions and thus better electricconduction.Electrical conductivityprobessensorstakesadvantage of thisphenomenon.The amount of current passing between the probes is directly proportional to the soil moisture content.Moistsoil allowmore currentto flowbetweenthe probeswhiledriersoilsonlyallowalittle current to flow between the probes.Betterconductivityindicates a lower electrical resistance. Most of the soil moisture sensors currently in the market especially for small projects are Electrical conductivityprobessensors.Theyhave the followingadvantages. ī‚ˇ Theyare cheap ī‚ˇ Theyare readilyavailable ī‚ˇ Easy to calibrate andinstall YL-69 Moisture Sensor Thisis an Electrical resistance Sensor.The sensorismade upof two electrodes.Thissoil moisture sensor readsthe moisture contentaroundit. A currentis passedacrossthe electrodesthroughthe soil and the resistance tothe current in the soil determinesthe soil moisture. If the soil hasmore water resistance will be lowandthusmore currentwill passthrough.Onthe otherhandwhenthe soil moisture islowthe sensormodule outputsahighlevelof resistance.Thissensorhasbothdigital and analogue outputs.Digital outputissimple touse butisnot as accurate as the analogue output.
  • 7. Figure YL-69 Sensor Othertypesof soil moisture sensorsinclude ī‚ˇ Capacitance sensors ī‚ˇ Time DomainReflectometry(TDR) sensors ī‚ˇ Dielectricsensors ī‚ˇ Heat dissipationsensors ī‚ˇ TensiometerSensors SensorSelection When deciding on which sensor to use the following factors should be put into consideration: ī‚ˇ Price: Thisis the most importantparameterwhenselectinganycomponent.The price of the sensor will ultimately affect the price of the whole system as this is one of the major systemmodules. Sensorwiththe mostcompetitive price shouldbe chosen. ī‚ˇ Power: In anyelectrical systempowerefficiencyiscritical.Moisture sensorwilllow power consumptionshouldbe selected. Sensors which can be battery powered can be used in areas withoutelectricityconnection. ī‚ˇ Technology: Technologyusedtodesignsensordictate the sensitivity,costanddurabilityof the sensors. Most low cost sensors have poor sensitivity, rust and corrode over time. Resistive orconductive sensorswhichare affectedbysoli salinitythushave ashortlife. ī‚ˇ Shape:Long andslendersensorscanbe usedinmanyapplicationsthanbulkyones. ī‚ˇ Durability:Soil moisture sensorwhichare notaffectedbysoil salinity,corrode orrustshouldbe selected.Soilmoisturesensorprobesthatmeasure conductivityorresistance shouldbe avoided,since theywill wearoutovertime.
  • 8. ī‚ˇ Accuracy and Linearity: A qualitysoil moisture sensorprobe should give an output which isproportional to water content over the full output range. In addition,the soil moisture sensorprobe shouldhave agood outputrange to reduce sensitivitytonoise. ī‚ˇ Voltage Range:Choose asensorthathas a big supplyvoltage range.Poweringasensorwiththe wrongvoltage will damage the sensororgive inaccurate results. SensorInstallation Sensorsorientationandinstallationdependsonthe sensortype,size andshape (īŦ‚at,node,androd). Installationshouldbe guidedbythe manufacturer'sinstallationmanual.Butingeneral the sensorshould be installedasclose tothe root area as possible.Onnew fields; the SMS should be installed prior to planting crops.The sensorshouldbe installedatapproximately3inchesdeep.Forexistingfields trenchesare dug at uniformintervalsandSMSinstalled. SENSORCALIBRATION As isthe case of sensorsinstallation,sensorcalibrationshouldalsobe done inline withthe manufacturer'sspeciīŦcations.Differentsensorshave differentcalibrationprocedures.Development stage of the plants roots also determines the SMSs calibration.The soil type andcropswater requirementsgreatlyinfluencethe sensorscalibration. YL_69 sensor valuedescription MAINTENANCE The technology used to design the sensors determines the regularity of maintenance. Electric resistance and conductance sensors tend to corrode with time and thus require regular maintenance and replacement.TDTand TDR (Time DomainReflectometry(TDR) sensors) sensors are the most stable and durable thusrequiringminimummaintenance WATER PUMP: The water pump is used to artificially supply water for a particular task. It can be electronically controlled byinterfacingittoa microcontroller.Itcanbe triggeredON/OFFbysendingsignalsas required.The processof artificiallysupplyingwaterisknownaspumping.There are manyvarietiesof
  • 9. waterpumpsused.Thisprojectemploysthe use of asmall waterpumpwhichisconnectedto a H- Bridge. Figure below showsawaterpump: The pumpingof wateris a basicand practical technique,farmore practical thanscoopingit upwith one'shandsor lifting itin a hand-held bucket. This is true whether the water is drawn from a fresh source, moved to a neededlocation, purified, or used for irrigation, washing, orsewage treatment, or for evacuating water from an undesirable location.Regardlessof the outcome,the energyrequiredtopumpwaterisan extremelydemandingcomponentof waterconsumption. All other processes depend or benefit either from water descending from a higher elevation or some pressurizedplumbingsystem. Microcontroller A microcontrollerisa single onchipcomputerwhichincludesnumberof peripherals likeRAM,EEPROM, Timersetc.,required toperformsome predefined task.There are differentmicrocontroller families including: 8051, PIC (Programmable Interface Controller) and AVR.Microcontrollersare usedin digital applicationsascontrol units.Some microcontrollerscome withtheirin-buildcircuitslike Analog to digital convertorsordigital toanalogconvertors.Microcontrollersare mostlyprogrammedusing assemblylanguage butinrecentyearshighlevel languages like C, C++ PASCAL and java have been used.Highlevel programmingof microcontrollers bringsthe advantage of not havinga differentprogramforeachmicrocontroller manufacturer. High level programming is also neat, easy to document and maintain and userfriendly. Typesof Microcontrollers 8051 These are among the earliermicrocontrollerstobe fabricated.Due tosuperiorityintechnologyinthe newerversions,veryfewcompaniesstill fabricate 8051.Earliertypesof 8051 have 12 clocks per instruction whereas the newer versions have 6 clocks per instruction.8051 microcontrollerdoes not have an inbuiltmemorybusandADC. First8051 microcontrollertobe fabricatedwith Harvard architecture wasdone in1980 by Intel. Programmable Interface Controller(PIC) Programmable Interface Controllersare commonlyreferredtoasPIC.PICsare slightlyolderthan8051 microcontrollers. PICs are preferred to8051 because of their small low pin countdevices. PICs performbetterandare affordable than8051. The Microchiptechnologyfabricatedthe single chip
  • 10. microcontrollerPICwithHarvardarchitecture.The onlymajordownside of PICisitsprogrammingpartis verytedious.PICsare hence notrecommendedforbeginners. AVR: In 1996, Atmel fabricatedthissinglechipmicrocontrollerwithamodifiedHarvardArchitecture.Thischip isloadedwith C- compiler and a free IDE. Like PIC,AVRmicrocontrollersare difficult forthe beginners to workwith.AVRmicrocontrollerhason-chipboot-loaderthusAVRcanbe programmedeasilywithout any external programmer.[3] AVRcontrollershasnumberof I/O ports, timers/counters, interrupts, A/D converters, USART, I2C interfaces, PWM channels,on-chipanalogcomparators. Arduino Arduinoisan open-source electronicsdesignplatform.The Arduinoboardisspeciallydesigned for programming and prototyping with Atmel microcontrollers. [5] An arduino interacts with physical world via sensors. Using arduino; electric equipments can be designed to respond to change in physical elements like temperature, humidity, heat or even light. [5] This is the automation process. For example, reading a humidity sensor and turning on and off of an automaticirrigationsystem.There several typesof arduinoboards. The open-source Arduino environment allows one to write code and load it onto the Arduinoboard's memory. The development environment is written in Java and based on Processing, AVR-GCC, and other open source software. [5] The Arduino programming language is an implementation of Wiring, a similar physical computing platform, which is based on the Processing multimedia programming environment. The arduino software is published as opensource tools, available for extension by experienced programmers. The language can be expanded through C++ libraries, and people wanting to understand the technical details can make the leap from Arduino to the AVR C programming language on whichit'sbased.Similarly,AVR-Ccode canbe added directlyintothe Arduinoprogramsif one so wishes.[5 Typesof arduinoboards 2.2.3.1 Legacy Versions ArduinolegacyversionsincludeArduinoNG,Diecimila,andthe Duemilanove.Thesearduinos use ATMEGA168 chips.Theyrequire manual selectionof eitherUSBor batterypower.[5] For
  • 11. Arduino NG one is required to hold the rest button on the board for a few seconds before uploadingaprogram onto it. Figure 2.14 Differenttypesof arduino ArduinoUno Thisis the most common arduino type.This arduino type uses ATmega328 AVR microcontroller. Figure 2.15 Parts of arduinouno ATmega328 is more preferreddue tothe followingfeatures: Have three 8-bitbi-directional I/Oportswithinternal pull-upresistors.[5] ī‚ˇ 32K Bytes of flashmemory. ī‚ˇ 1K BytesEEPROM ī‚ˇ 2K Bytesof RAM ī‚ˇ 2 instructionwords/vector. ī‚ˇ 8-channel 10-bitsuccessive approximationADC ī‚ˇ Programmable Serial USART ī‚ˇ 23 Programmable I/OLines ī‚ˇ OperatingVoltage 1.8- 5.5Ve.t.c
  • 12. ArduinoMega2560 Thisis regardedasan advancementof arduinouno.Ithas more memorythanarduinouno.It has a total of 54 input pins of which 16 are analog inputs. It has a larger PCB board than arduino. Overall itismore powerful thanarduinouno.ThisarduinoboardisbasedonATmega2560. [5] ArduinoLilyPad Thisarduinoboard isdesignedforwearableapplications.Itisusuallysewnonfabric.Thisboard requiresthe use of a special FTDI-USBTTL serial programmingcable.ArduinoLilyPadis used to design"smart"wearable.[5] ArduinoMega ADK Thisarduinoboard isspecificallydesignedtointeractwithandroiddevices. LiquidCrystal Display(LCD) LiquidCrystal Display(LCD) screenisanelectronicdisplaymodule.AnLCDhas a wide range of applicationsin electronics. The most basic and commonly used LCD in circuits is the 16x2 display. LCDs are commonly preferred in display because they are cheap, easy to programme and can displayawide range of characters and animations.
  • 13. A 16x2 LCD have two display lines each capable of displaying 16 characters.This LCD has Command and Data registers. The commandregister stores command instructions given to the LCD while the Dataregisterstoresthe data to be displayedbythe LCD. Figure 2.17 LCD (16X2) Whenusing8-bitconfigurationall 8data pins(DB0-DB7) are usedwhile only4data pins(DB4-DB7) are usedina 4-bitconfiguration. Automaticswitchingcircuits In electronicsautomation manytimesthe designerisconfrontedbyasituationwhere he/she hasto switchveryhighvoltage equipmenton,usingalow voltage circuit.Forexample usinga5v dc voltage,it ispossible toswitchon/off a230v ac machine.Digital ordiscrete signalsenablesasopposedtoanalog signalsare used.There are a numberof componentsused in electronicswitchingtoday. DESIGN ANDIMPLEMENTATION
  • 14. The systemhas three majorparts;humiditysensingpart,control sectionandthe outputsection.The soil humidity was detected using YL-69 soil sensor (a resistance type sensor).The control unitwas achievedusingATMega328microcontrollerbasedonarduinoplatform.The outputwasthe control unit was usedtocontrol the irrigationsystembyswitching itonand off dependingonthe soil moisture contents.Twostagesof designwere undertaken;hardware andsoftware. Hardware design Control Unit:ATMega328 microcontrolleronarduinoplatform ATMega328 microcontroller on arduino platform was selected the control unit of the microcontroller.ArduinoUnowasselectedfromthe expansive arduinofamily.ArduinoUnohasa total of 20 inputspinsof which14 are digital and6 are analoginputs.[5] The digital pinscanbe usedas either inputsor outputsandalso6 of the 14 pinscan be utilizedasPMW. The board has a 16 MHz ceramic resonator,a USB connectionanda powerjack. Figure 3.1 ArduinoUno In the design of the system analog pins were selected as the arduino input and digital pin was selectedasthe arduinooutputpins.[5] Otherimportantpinson the arduinoboardare showninthe table below. Table 3-1 Important pinsinarduino The pinson the arduinowere selectedasshownbelow.
  • 15. Table 3-2 Selected pinson arduino SensingUnit: YL-69 soil moisture sensorconnectiontoarduino YL-69 soil moisture sensorwasinterfacedtothe arduinothrougha digital aPCB drive.The PCBdrive has a digital potentiometeranda LM393 comparator. The LM393 comparator isusedto compare the voltagesacrossthe sensorprobesandthe set Vcc voltage.[7] The digipotisusedtoalterthe sensitivity of the sensorwhenconnectedindigitalmode.The outof the PCB drive hasfourconnectionspinsas showninthe table below. YL-69 PCB pins The analogue configurationwasselectedasitsmore stable comparedtothe digital configuration. The PCB drive pinA0 was connectedtothe arduinoanalogpinA0.
  • 16. YL-69 Connectiontoarduinoboard The outputof the sensorto the arduinoanalogpinA0 was resistance.The resistance toflow of current between the sensor probes changes with soil moisture level and soil type.The currentpassing throughthe sensorprobes(Iout) fordifferentsoilsanddifferentsoil moisturelevels wascalculatedas shownbelow: Iout= Vcc / {Soil Resistance value(RS)} Equation3-1 YL-69 Currentcalculation OutputUnits LCD interface withArduino To affectdisplaya16x2 LiquidCrystal Display(LCD) waschosen.LCDpinsD4, D5, D6 and D7 were used as data linesina 4 bit mode configuration. These pinswere connectedtoarduino 5,4, 3 and 2 respectively.Pin15(A) wasconnectedtoVccand pin16 (K) wasconnectedto GND. These pins(A and K) are forthe LEDs integratedonthe LCD circuitboard. LCD’s pinE (Enable) wasconnectedtodigital pin11 on the arduinoboard. PinRS (RegisterSelect) onthe LCD was connected to arduino digital pin 12. R/W pin of the LCD was connected to GND (ground). The figure belowshowsthe LCD-microcontrollerinterface. LEDS
  • 17. To indicate the three statesof the soil three LEDswere used.The three LEDs litup dependingonthe soil moisture content.Whenthe soil wasdryLED connectedtoarduinodigital pin13 was lit. For moistsoil (requiredcondition)LEDconnectedtoarduinodigital pin12 litup and forsoggysoil LED connectedto arduinodigital pin11 litup. The three LEDs were connectedtothe microcontrollerasshownbelow. Ohmslawwas utilizedto determine the size(inohms) of the protectionresistortobe interfacedwith the LEDs. From Ohmslaw Voltage (V) ={Current(I)}*{Resistance(R)} Where as inour case; V= Vcc (5V) -Voltage dropacrossLED (selectedLEDshas2.0V) ILED= LED current (20mA) VLED = LED Voltage drop(redincolour) (2V) R= minimumrequiredresistance value Therefore Rmin= {(5-2) V}/{20mA} =150 Ί To achieve currentlimitationaresistance value higherthanthe calculatedRminwasselected.A 220Ί resistorwasusedand thusonly13.6mA currentwas allowedtopassthrough eachof the three LEDs. Waterpump connectiontothe Arduino To implementthe final bitof the automatedirrigationsysteman electricmotor(240VAC) was selectedasthe waterpump.The firsttwounitsof the systemi.e.sensingunitandthe control unit
  • 18. (microcontroller) are poweredby5VDC. To interface the twounitsa 5VDC relay(SLT73-5D-1Z) was used as the isolationunit. The microcontrollerwasconnectedtothe relayviaan NPN transistor(2N4123). To protectthe transistor;while turningiton,aresistorwasused.The resistorlimitsthe currentflowingthrough the transistor.Aswas the case withLEDs ohmslaw was usedas shownbelow. Rmin= (5 – 0.7) V / 40mA = 107.5đ›ē A resistorof 470đ›ē was selectedandthusthe currentthroughthe transistorwaslimitedto; 4.3V / 470đ›ē =9.12 mA To protect the microcontroller from back e.m.f during switching a diode was connected across the relay.The connectionwasas shownbelow. Program Pseudocode READ sensorvalue COMPARE sensorvaluewithsetthreshold IF sensorvalue>maximumsetvalue TURN-ON pump DISPLAYsoil conditiononLCD
  • 19. LIGHT dry soil LED ELSE IFsensorvalue < maximumsetvalue >minimumsetvalue TURN-OFFpump DISPLAYsoil conditiononLCD LIGHT moistsoil LED ELSE IFsensorvalue < minimumsetvalue TURN-OFFpump DISPLAYsoil conditiononLCD LIGHT soggysoil LED PROGRAMFLOW CHART CONCLUSION ANDRECOMMENDATIONS CONCLUSION A system to monitor moisture levels in the soil was designed. The systemwasusedto switch on/off the watering system/pump according to set soil moisture levels. The control unitthe
  • 20. prototype was implemented using a microcontroller on arduino platform while the sensing bit was implementedusingaSMSYL-69. Three LEDs and an LCD were usedto implementthe displayof the three soil statesi.e.soggysoil,moistsoilandthe drysoil states.Toswitchbetweenthe control andthe irrigationsystemsarelayswitchingcircuitwasused. RECOMMENDATIONS ī‚ˇ To improve on the effectiveness and efficiency of the system the following recommendationscanbe put intoconsiderations: ī‚ˇ Cost effective techniques to overcome the limitation of requiring a soil specificcalibration shouldbe employed. ī‚ˇ Integrating GSM technology can be used, such that whenever the water pump switches ī‚ˇ ON/OFF,anSMS is sentto the concernedpersonregardingthe statusof the pump. ī‚ˇ The pump shouldalsobe controlledviaSMS. ī‚ˇ The system can be integrated with temperature and humidity sensors to monitor the weatherconditionsinthe farm. REFERENCES ī‚ˇ MassimoBanzi,GettingstartedwithArduino,SecondEdition,O’ReillyMedia,Inc,2011 Francis Z. Karinaand Alex Wambua Mwaniki, irrigation agriculture in Kenya, Nairobi,Kenya,2011 ī‚ˇ Allan Trevennor, Practical AVR Microcontrollers, New York , USA, Springer Science + BusinessMedia,2012 ī‚ˇ Clemmens, A.J. Feedback Control for Surface Irrigation Management, ASAE Publication 04 -90, 1990. ī‚ˇ www.arduino.ccAccessed on6thDec,2013 , 25Th Dec,2013 and 17th Jan,2014 ī‚ˇ Songle relayDatasheet ī‚ˇ Soil moisture sensordatasheet ī‚ˇ W. C. Dunn,IntroductiontoInstrumentationSensors,andProcessControl,BritishLibrary ī‚ˇ Cataloguing,2005 ī‚ˇ General Purpose TransistorsNPN Silicon(KSP2222A) datasheet ī‚ˇ http://www.vision2030.go.ke/accessedon25th 2014