automatic irrigation final document

Upload: nagineni-dhanalakshmi

Post on 07-Aug-2018

257 views

Category:

Documents


3 download

TRANSCRIPT

  • 8/20/2019 Automatic Irrigation Final Document

    1/46

    Chapter I

    Introduction

     Now days, water shortage is becoming one of the biggest problem in the world. Many

    different methods are developed for conservation of water. We need water in each and every

    field. Agriculture is one of the fields where water is required in tremendous quantity. In the

    feld o agriculture, it is very important to maintain the level o water or moisture in

    the soil where crops are planted. Excess or defciency in water may harm the growth

    o plants which results in loss to armers.

    Irrigation is an artificial application of water to the soil. It is usually used to assist the

    growing of crops in dry areas and during periods of inadequate rainfall.

    There are several pains in operating the irrigation systems in traditional ways. Water 

     pumps, tans and farms are distantly located at different places away from the operators house.

    The irrigation operator has to operate these systems against a series of hurdles lie erratic

     power supply, long travel over difficult terrain and fear of animals on the way to pumps.

    These hurdles create inefficiency in the pump operations leading to heavy wastage of water 

    and electricity. !"cess water erase the soil and damages the civil structures of water tans. All

    in all, there is a huge loss of energy in many ways. #onsidering this, automating the irrigation

    sector is vital.

     Auto irrigation system keeps inormation about moisture level in land and

    keeps moisture to permissible limit. Moisture sensor is used to measure moisture

    level in soil. According to measured moisture level, water pumps turn on or o.

    Automatic irrigation systems are convenient, especially for those who travel. If installed

    and programmed properly, automatic irrigation systems can even save you money and help inwater conservation.

    EMBEDDED SYSTEMS:

    An !mbedded system is a special$purpose system in which the computer is completely

    encapsulated by or dedicated to the device or system it controls. %nlie a general$purpose

    !

  • 8/20/2019 Automatic Irrigation Final Document

    2/46

    computer, such as a personal computer, an embedded system performs one or a few predefined

    tass, usually with very specific requirements. &ince the system is dedicated to specific tass,

    design engineers can optimi'e it, reducing the si'e and cost of the product. !mbedded systems

    are often mass$produced, benefiting from economies of scale.

    (hysically, embedded systems ranges from portable devices such as digital watches and

    M() players, to large stationary installations lie traffic lights, factory controllers, or the

    systems controlling nuclear power plants.

    In terms of comple"ity embedded systems can range from very simple with a single

    microcontroller chip, to very comple" with multiple units, peripherals and networs mounted

    inside a large chassis or enclosure.

    Examples of Embedded Systems:

    • Avionics, such as inertial guidance systems, flight control hardware*software and other 

    integrated systems in aircraft and missiles.

    • #ellular telephones and telephone switches.

    • !ngine controllers and antiloc brae controllers for automobile.

    • +ome automation products, such as thermostats, air conditioners, sprinlers, and security

    monitoring systems.

    • +ousehold appliances, including microwave ovens, washing machines, television sets,

    - players and recorder.

    • #omputer peripherals such as routers and printers.

    • +andheld calculators.

    • +andheld computers.

    • Medical equipment.

    • (ersonal digital assistant.

    • -ideogame consoles.

    "

    ig. !mbedded system.

  • 8/20/2019 Automatic Irrigation Final Document

    3/46

    Chapter II

    Automatic Irriation System

    In the fast paced world human beings require everything to be automated. /ur life style

    demands everything to be remote controlled. Apart from few things man has made his life

    automated. And why not0 In the world of advance electronics, life of human beings should

     be simpler hence to mae life simpler and convenient1 we have made 2A%T/MATI#

    I33I4ATI/N &5&T!M6. A model of controlling irrigation facilities to help millions of 

     people. This model uses sensor technology with microcontroller to mae a smart switching

    device.

    The model shows the basic switching mechanism of Water motor*pump using sensors

    from any part of field by sensing the moisture present in the soil. /ur basic model can be

    e"tended to any level of switching 7 controlling by using TM.

    !ist of Components

    • AT89#:; controller 

    • AT89#:; programming board.

    • ; ?#

    • :- 3elay

    • @ Moisture &ensors

    • 3esistor ))B ohm

    • C# :@D

    • A# Motor 

    #

  • 8/20/2019 Automatic Irrigation Final Document

    4/46

    • (ot ;B 

    • (rogramming cable

    • #onnecting wires

    Bloc" Diaram

    Micro #ontroller EAT89&:>F is interfaced with ;

  • 8/20/2019 Automatic Irrigation Final Document

    5/46

    Circuit Diaram

    %

  • 8/20/2019 Automatic Irrigation Final Document

    6/46

    Circuit Description

    The main heart of this proGect is AT89#:; microcontroller. The moisture level probes Elevel

    sensorsF are connected to the ().), ().@, ().:, and (). connected to the data pins of 

    ?# and control pins 3&, 3W and !N of ?# are connected to the (;.B, (;.;, and (;.>

    respectively.

    Initially when field is dry, ?# will display the message ry ield and motor runs automatically.

    When field A is wet, ?# displays ieldHA and still motor runs. When field A, field C are wet,

    ?# displays ieldHAHC and the motor runs. or further levels, ?# displays the messages

    ieldH#, ieldH, ieldHAHCH#, ieldHAHCH, ieldHAH#H etc.

    The motor pump stops when whole field is wet that is ield A, ield C, ield # and ield ,

    ?# displays Wet ield. The motor starts again running when at least one field is dry.

    #or"in $rinciple of Automatic Irriation System

    This system mainly wors on a principle that 2water conducts electricity6. The four 

    moisture sensors which are placed in the @ fields will indicate the moisture levels of fields. Cased

    on the outputs of these sensors, microcontroller displays wet fields names on ?# as well as

    controls the motor.

    Alorithm for Automatic Irriation System

    • irst configure the controller pins ().), ().@, ().: and ().< as inputs and ().D as output.

    •  Now initiali'e the ?#.

    • #ontinuously chec the moisture level input pins ().), ().@, ().:, and ().<

    &

  • 8/20/2019 Automatic Irrigation Final Document

    7/46

    • If all the pins are low then display ry ield on ?# and motor starts running

    automatically.

    • +igh pulse on the pin ().) indicates ield HA is Wet, display the same thing on ?#.

    • If ().@ is high then ieldHC is wet.

    • If ().: is high then ieldH# is wet.

    • If ().< is high then ieldH is wet.

    • If ().) and ().@ are high then ieldHAHC are wet.

    • If ().) and ().: are high then ieldHAH# are wet.

    • If ().@ and ().: are high then ieldHCH# are wet.

    • If ().), ().@ and ().: are high then ieldHAHCH# are wet.

    • If ().< and ().) are high then ieldHAH are wet.

    • If ().< and ().@ are high then ield HCH are wet.

    • If ().

  • 8/20/2019 Automatic Irrigation Final Document

    8/46

    $rocess to operate Automatic Irriation System usin %&'( Microcontroller

    ;. Initially burn the program to the controller.

    >. Now give the connections as per the circuit diagram.

    ). While giving the connections, mae sure that there is no common connection between

    A# and # supplies.

    @. (lace the @ moisture level sensors in four different fields.

    :. &witch on the supply, now the motor will run automatically as the field is dry.

  • 8/20/2019 Automatic Irrigation Final Document

    9/46

    Chapter III

    Components Description

    Micro Controller )AT%*S'+,

    -eatures:

    • #ompatible with M#&$:; (roducts.

    • 8 Cytes of In$ &ystem 3eprogrammable lash Memory.

    !nduranceJ ;BBB Write*!rase #ycles.

    • ully &tatic /perationJ B+' to >@M+'.

    • Three$?evel (rogram Memory ?oc.

    • >:< " 8$Cit Internal 3AM.

    • )> (rogrammable I*/ ?ines.

    • Three ; is a low$power, high$performance #M/& 8$bit microcontroller with 8 bytesof in$system programmable lash Memory. The device is manufactured using AtmelKs high$

    density nonvolatile memory technology and is compatible with the industry$standard 8B#:;

    instruction set and pin out. The on$chip lash allows the program memory to be

    reprogrammed in$system or by a conventional nonvolatile memory programmer. Cy

    combining a versatile 8$bit #(% with in$system programmable lash on a monolithic chip,

    the Atmel AT89&:> is a powerful microcontroller which provides a highly$fle"ible and cost$

    effective solution to many embedded control applications.

    $in Diaram

    )

  • 8/20/2019 Automatic Irrigation Final Document

    10/46

    !*

  • 8/20/2019 Automatic Irrigation Final Document

    11/46

    $in Description

    /CC &upply -oltage

    01D 4round

    $ort & (ort B is an 8$bit open drain bidirectional I*/ port. As an output port, each pin can

    sin eight TT? inputs. When ;s are written to port B pins, the pins can be used as

    high$impedance inputs.

    !!

  • 8/20/2019 Automatic Irrigation Final Document

    12/46

    (ort B can also be configured to be the multiple"ed low$order address*data bus

    during accesses to e"ternal program and data memory. In this mode, (B has

    internal pull$ups

    (ort B also receives the code bytes during lash programming and outputs the

    code bytes during program verification. !"ternal pull$ups are required during

     program verification.

    $ort (

    (ort ; is an 8$bit bidirectional I*/ port with internal pull$ups. The (ort ; output

     buffers can sin*source four TT? inputs. When ;s are written to (ort ; pins, they

    are pulled high by the internal pull$ups and can be used as inputs. As inputs, (ort

    ; pins that are e"ternally being pulled low will source currentEI I?F because of the

    internal pull$ups.

    In addition, (;.B and (;.; can be configured to be the timer*counter > e"ternal

    count input E(;.B*T>F and the timer*counter > trigger input E(;.;*T>!LF,

    respectively, as shown in the following table.

    (ort ; also receives the low$order address bytes during lash programming and

    verification.

    $ort $in Alternate -unctions

    (;.B T> Ee"ternal count input to Timer*#ounter >F, cloc$out

    (;.; T>!LETimer*#ounter > capture*reload trigger and direction controlF

    (;.: M/&I Eused for In$&ystem (rogrammingF

    (;.< MI&/ Eused for In$&ystem (rogrammingF

    (;.D Eused for In$&ystem (rogrammingF

    $ort +

    !"

  • 8/20/2019 Automatic Irrigation Final Document

    13/46

    (ort > is an 8$bit directional I*/ port with internal pull$ups. The (ort > output

     buffers can sin*source four TT? inputs. When ;s are written to (ort > pins, they

    are pulled high by the internal pull$ups and can be used as inputs. As inputs, (ort

    > pins that are e"ternally being pulled low will source current EI I? F because of the

    internal pull$ups.

    (ort > emits the high$order address byte during fetches from e"ternal program

    memory and during accesses to e"ternal data memory that use ; uses strong internal pull$ups when

    emitting ;s. uring accesses to e"ternal data memory that use 8$bit addresses

    EM/-L 3IF, (ort > emits the contents of the (> &pecial unction 3egister.

    (ort > also receives the high$order address bits and some control signals during

    lash programming and verification.

    $ort 2

    (ort ) is an 8$bit bidirectional I*/ port with internal pull$ups. The (ort ) output

     buffers can sin*source four TT? inputs. When ;s are written to (ort ) pins, they

    are pulled high by the internal pull$ups and can be used as inputs. As inputs, (ort

    ) pins that are e"ternally being pulled low will source current EI I?F because of the

     pull$ups.

    (ort ) receives some control signals for lash programming and verification.

    (ort ) also serves the functions of various special features of the AT89&:>, as

    shown in the following table.

    $ort $in Alternate -unctions

    ().B 3LEserial input portF

    ().; TLEserial output portF

    ().>´

    ∫0  Ee"ternal interrupt BF

    !#

  • 8/20/2019 Automatic Irrigation Final Document

    14/46

    ().)´

    ∫1  Ee"ternal interrupt BF

    ().@ TB Etimer B e"ternal inputF

    ().: T; Etimer ; e"ternal inputF

    ().<   ẂR  Ee"ternal data memory write strobeF

    ().D  ´ RD  Ee"ternal data memory read strobeF

    3ST

    3eset input. A high on this pin for two machines cycles while the oscillator is

    running resets the device. This pin drives high for 98 oscillator periods after the

    watchdog times out. The I&T/ bit in &3 A%L3 Eaddress 8!+F can be used to

    disable this feature. In the default state of bit I&T3/, the 3!&!T +I4+ out

    feature is enabled.

    A!E4  ´ PROG

    Address ?atch !nable EA?!F is an output pulse for latching the low byte of the

    address during accesses to e"ternal memory. This pin is also the program pulse

    input E  ´ PROG F during lash programming.

    In normal operation, A?! is emitted at a constant rate of ;*< the oscillator frequency and

    may be used for e"ternal timing or clocing purposes. Note, however, that one A?! pulse

    is sipped during each access to e"ternal data memory.

    If desired, A?! operation can be disabled by setting bit B of &3 location 8!+. With the

     bit set, A?! is active only during a M/-L or M/-# instruction. /therwise, the pin is

    weely pulled high. &etting the A?!$disable bit has no effect if the microcontroller is in

    e"ternal e"ecution mode.

    ´ EA   4/$$

    !$

  • 8/20/2019 Automatic Irrigation Final Document

    15/46

    !"ternal Access !nable.´ EA   must be strapped to 4N in order to enable the

    device to fetch code from e"ternal program memory locations starting at BBBB+

    up to +. Note, however, that if loc bit ; is programmed,  ´ EA    will be

    internally latched on reset.

    This pin should be strapped to -cc for internal program e"ecutions.

    This pin also receives the ;>$volt programming enable voltage E- ppF during lash

     programming.

    5TA!(

    Input to the inverting oscillator amplifier and input to the internal cloc operating

    circuit.

    5TA!+

    /utput from the inverting oscillator amplifier.

    Data Memory

    The AT89&:> implements >:8bytes occupy

    (arallel address space to the &pecial unction 3egisters. This means that the

    upper ;>8bytes have the same addresses as the &3 space but are physically

    separate from &3 space.

    #atchdo Timer )one6time Enabled 7ith 3eset6out,

    The WT is intended as a recovery method in situations where the #(% may be

    subGected to software upsets. The WT consists of a ;@$bit counter and the

    Watchdog Timer 3eset EWT3&TF &3. The WT is defaulted to disable from

    e"isting reset. To enable the WT, a user must write B;!+ and B!;+ in sequence

    to the WT3&T register E&3 location BA

  • 8/20/2019 Automatic Irrigation Final Document

    16/46

    e"cept through reset Eeither hardware reset or WT overflow resetF. When WT

    overflows, it will drive an output 3!&!T +I4+ pulse at the 3&T pin.

    !i8uid Crystal Display

    In ;9

  • 8/20/2019 Automatic Irrigation Final Document

    17/46

    • +ave no limitation of displaying special 7 even custom characters Eunlie in seven

    segmentsF

    A ;

  • 8/20/2019 Automatic Irrigation Final Document

    18/46

    $in Description

    !CD Command Codes

    Code )9ex, Command to !CD Instruction 3eister

    ; #lear isplay &creen

    > 3eturn +ome

    @ ecrement #ursor Eshift cursor to leftF

    < Increment #ursor Eshift cursor to rightF

    : &hift isplay 3ight

    D &hift isplay ?eft

    8 isplay off, #ursor off  

    A isplay off, #ursor on

    # isplay on, #ursor off  

    ! isplay on, cursor blining

    isplay on, cursor on

    !(

  • 8/20/2019 Automatic Irrigation Final Document

    19/46

    ;B &hift cursor position to left

    ;@ &hift cursor position to right

    ;8 &hift the entire display to the left

    ;# &hift the entire display to the right

    8B orce cursor to beginning of ;st line

    #B orce cursor to beginning of >nd line

    )8 > lines and :"D matri"

    Capacitors

    #apacitor is a basic storage device to store electrical charges and release it as it is

    required by the circuit. #apacitors are widely used in electronic circuits to perform variety of 

    tass, such as smoothing, filtering, bypassing etc. /ne type of capacitor may not be suitable

    for all applications. #eramic capacitors are generally superior than other types and therefore can

     be used in a vast ranges of application. The following superior than other types and therefore can

     be used in a vast ranges of application. The following is the typical capacitor application in

    electronics industries.

    DC bloc"in capacitor: 

    In this application the capacitor blocs the passage of # current Eafter completely

    chargedF and yet allows the A# to pass at certain portion of a circuit.

    Capacitor as a filter: 

    #apacitors are the main elements of filters. There are several types of filters that are used

    in electronic circuits, such as ?( E?ow (ass ilterF, +( Ehigh (ass ilterF, C( ECand (ass

    ilterF, etc. &ince the reactance of the capacitor is inversely related to the frequency, thereforeit can be used to increase or decrease the impedance of the circuit at certain frequencies and

    therefore does the filtration Gob.

    Capacitor as a dischare unit:

    !)

  • 8/20/2019 Automatic Irrigation Final Document

    20/46

    #apacitors used as a charging unit and the release of the charge Edischarge energyF is used

    for triggering, ignition, and in high scale as a power source.

     By $ass capacitor:

    The reactance of capacitor decreases as the frequency increases. Therefore in certain

    application it is used in parallel with other components to bypass it at a specified frequency.

    Couplin capacitor:

    The ability of capacitor to pass A# signal, allows it to couple a section of an electronic

    circuit to another circuit.

    Decouplin capacitor:

    In high speed electronic logic switching causes draw of significant amount of current

    which in turn would cause disturbance in the logic voltage level. ecoupling capacitor is

    typically located very close to the I# output and serves as a local energy source to provide the

    needed e"tra current and therefore minimi'es the noise and disturbances to the logic signal.

    "*

  • 8/20/2019 Automatic Irrigation Final Document

    21/46

    Snubber capacitor:

    In some application, relays or E&ilicon controlled rectifierF are to drive a high

    inductance loads. In these circumstances, when the relay or the opens, a maGor transient

    voltage could be induced in the contact of the relay or across the Gunction of , which in turn

    either shows as an arc on the relay contacts or may damage the internal Gunction. Therefore

    snubber capacitor is used to limit the high voltage transient across the circuit. There are also

    other applications such as Tuned circuits, signal processing, etc...

    -ormula for Capacitance

    The capacitance E#F is a measure of the amount of charge EOF stored on each plate for agiven potential difference or voltage E-F which appears between the plates

    # P O*-

    3esistors

    "!

  • 8/20/2019 Automatic Irrigation Final Document

    22/46

    A resistor is a passive two terminal electrical component that opposes current flow by

    lowering the voltage levels within the circuits. In electronic circuits, resistors are used to limit

    current flow, to adGust signal level, bias active elements and terminate transmission lines among

    other uses. +igh$power resistors, that can dissipate many watts of electrical power as heat, may

     be used as part of motor controls, in power distribution systems, or as test loads for generators.

    The electrical resistance is equal to the voltage across the resistor divided by the current

    through resistor.

    3 P -*I

    i"ed resistors have resistances that only change slightly with temperature, time or 

    operating voltage. -ariable resistors can be used to adGust circuit elements Esuch as a volume

    control or a lamp dimmerF, or as sensing devices for heat, light, humidity, force, or chemical

    activity.

    Identifyin 3esistors

    Most a"ial resistors use a pattern of colored stripes to indicate resistance. &urface$mount

    ones are mared numerically. 3esistance can also be calculated using multimeter.

    Electronic Color code

    our$band identification is the most commonly used color coding scheme on all resistors. It

    consists of four colored bands that are painted around the body of the resistor. The first two

    numbers are the first two significant digits of the resistance value, the third is a multiplier, and

    the fourth is the tolerance of the value. !ach color corresponds to certain number as shown

     below.

    ""

  • 8/20/2019 Automatic Irrigation Final Document

    23/46

    Transistors

    A transistor is a semiconductor device, commonly used as an amplifier or an electrically

    controlled switch. The transistor is the fundamental building bloc of the circuitry in computers,

    cellular phones, and all other modern electronic devices.

    Cecause of its fast response and accuracy, the transistor is used in a wide variety of digital and

    analog functions, including amplification, switching, voltage regulation, signal modulation, and

    oscillators. Transistors may be pacaged individually or as part of an integrated circuit.

    "#

  • 8/20/2019 Automatic Irrigation Final Document

    24/46

    Diode

    A diode is a two$terminal electronic component that conducts primarily in one direction

    Easymmetric conductanceF it has low Eideally 'eroF resistance to the flow of current in one

    direction, and high Eideally infiniteF resistance in the other. A semiconductor diode is a crystalline

     piece of semiconductor with a p$n Gunction connected to two electrical terminals. A vacuum tube

    has two electrodes, a plate EanodeF and a heated EcathodeF.

    The most common function of a diode is to allow an electric current to pass in one

    direction Ecalled the diodeKs forward directionF, while blocing current in the opposite direction

    Ethe reverse directionF. Thus, the diode can be viewed as an electronic version of a chec valve.

    This unidirectional behavior is called rectification, and is used to convert alternating current to

    "$

  • 8/20/2019 Automatic Irrigation Final Document

    25/46

    direct current, including e"traction of modulation from radio signals in radio receivers these

    diodes are forms of rectifiers.

    iodes can have more complicated behavior than this simple on$off action, due to their nonlinear 

    current$voltage characteristics. &emiconductor diodes begin conducting electricity only if a

    certain threshold voltage or cut$in voltage is present in the forward direction Ea state in which the

    diode is said to be forward$biasedF. The voltage drop across a forward$biased diode varies only a

    little with the current, and is a function of temperature, this effect can be used as a temperature

    sensor or as a voltage reference.

    $#E3 S;$$!Y:

    The power supplies are designed to convert high voltage A# mains electricity to

    a suitable low voltage supply for electronic circuits and other devices. A 3(& E3egulated

    "%

  • 8/20/2019 Automatic Irrigation Final Document

    26/46

    (ower &upplyF is the (ower &upply with 3ectification, iltering and 3egulation being done

    on the A# mains to get a 3egulated power supply for Microcontroller and for the other 

    devices being interfaced to it.

    A power supply can be broen down into a series of blocs, each of which

     performs a particular function. A .# power supply which maintains the output voltage

    constant irrespective of A.# mains fluctuations or load variations is nown as 23egulated

    .# (ower &upply6.

    Transformer:

    The transformer is a device that transfers electrical energy from one electrical circuit to

    another electrical circuit through the medium of magnetic field and without a change in the

    frequency. The electric circuit which receives energy from the supply mains is called primary

    winding and the other circuit which delivers electric energy to the load is called the secondary

    winding.

    With it, the voltage and current can be multiplied and divided in A# circuits.

    Transformer is of two types step up and step down. In this proGect a step down transformer is

    used. A step down transformerJ is one whose secondary voltage is less than its primary voltage.

    "&

  • 8/20/2019 Automatic Irrigation Final Document

    27/46

    It is designed to reduce the voltage from the primary winding to the secondary winding. This

    ind of transformer 2steps down6 the voltage applied to it.

    As a step$down unit, the transformer converts high$voltage, low$current power into low$voltage,

    high$current power. The larger$gauge wire used in the secondary winding is necessary due to the

    increase in current. The primary winding, which doesnKt have to conduct as much current, may

     be made of smaller$gauge wire.

    Bride 3ectifier

    A bridge rectifier is an arrangement of four or more diodes in a bridge circuit

    configuration which provides the same output polarity for either input polarity. It is used for 

    converting an alternating current EA#F input into a direct current E#F output.

    "'

  • 8/20/2019 Automatic Irrigation Final Document

    28/46

    A bridge rectifier is an arrangement of four or more diodes in a bridge circuit configuration

    which provides the same output polarity for either input polarity. It is used for converting an

    alternating current EA#F input into a direct current E#F output. A bridge rectifier provides full$

    wave rectification from a two$wire A# input, therefore resulting in lower weight and cost when

    compared to a rectifier with a )$wire input from a transformer with a center$tapped secondary

    winding. The load resistance is connected between the other two ends of the bridge. or the

     positive half cycle of the input ac voltage, diodes ; and ) conduct, whereas diodes > and @

    remain in the / state. The ma"imum efficiency of a Cridge 3ectifier is 8;.>Q

    /oltae 3eulators:

    -oltage regulator I#s is available with fi"ed Etypically :, ;> and ;:-F or 

    variable output voltages. The ma"imum current they can pass also rates them. Negative

    voltage regulators are available, mainly for use in dual supplies. Most regulators include

    some automatic protection from e"cessive current ERoverload protectionRF and overheating

    ERthermal protectionRF. Many of the fi"ed voltage regulators I#s have ) leads and loo lie

     power transistors, such as the D8B: S:- ;A regulator shown on the right. The ?MD8B: is

    "(

  • 8/20/2019 Automatic Irrigation Final Document

    29/46

    simple to use. 5ou simply connect the positive lead of your unregulated # power supply

    Eanything from 9-# to >@-#F to the Input pin, connect the negative lead to the

    #ommon pin and then when you turn on the power, you get a : volt supply from the output

     pin.

    !M 2'% < $E3ATI1A! AM$!I-IE3 

    The ?M;:8 series consists of two independent, high gain, internally frequency

    compensated operational amplifiers which were designed specifically to operate from a

    single power supply over a wide range of voltages. /peration from split power supplies is

    also possible and the low power supply current drain is independent of the magnitude of the

     power supply voltage. 

    ") Fig. Op Amp Pin Diagram

  • 8/20/2019 Automatic Irrigation Final Document

    30/46

    Application areas include transducer amplifiers, dc gain blocs and all the

    conventional op amp circuits which now can be more easily implemented in single power 

    supply systems. or e"ample, the ?M;:8 series can be directly operated off of the standard

    S:- power supply voltage which is used in digital systems and will easily provide the

    required interface electronics without requiring the additional ;:- power supplies.

    2.= MIST;3E SE1S3S:

    A soil moisture sensor is a water conservation accessory for conventional

    automatic irrigation systems with the potential for eliminating e"cessive irrigation cycles.

      &oil moisture sensors measure the water that contains in the soil. A soil

    moisture probe is made up of multiple soil moisture sensors. /ne common type of soil

    moisture sensor is in commercial use 7 a frequency domain sensors such as a capacitance

    sensor. Another sensor the neutron moister gauge, utili'e the modulator properties of water 

    for neutron. Cy simply inserting the soil moisture sensors in the soil to be tested and

    volumetric water content of soil is reported in percent. &oil moisture sensors are used to

    conduct e"periments in ecology, environmental science and agricultural science,

    horticulture, biology and more.

    2.% MT3 D3I/I10 CI3C;IT:

    #*

     Fig.  Moisture Sensor 

  • 8/20/2019 Automatic Irrigation Final Document

    31/46

    Motor driving circuit is a relay is an electrical switch  that opens and closes

    under the control of another electrical circuit. In the original form, the switch is operated by

    an electromagnet to open or close one or many sets of contacts.

    3E!AY:

    3elay is an electrically operated switch. #urrent flowing through the coil of the

    relay creates a magnetic field which attracts a lever and changes the switch contacts. The

    coil current can be on or off so relays have two switch positions and they are double throw

    EchangeoverF switches.

    3elays allow one circuit to switch a second circuit which can be completely

    separate from the first. or e"ample a low voltage battery circuit can use a relay to switch a

    >)B- A# mains circuit. There is no electrical connection inside the relay between the two

    circuits1 the lin is magnetic and mechanical.

    The coil of a relay passes a relatively large current, typically )BmA for a ;>-

    relay, but it can be as much as ;BBmA for relays designed to operate from lower voltages.

    Most I#s EchipsF cannot provide this current and a transistor is usually used to amplify the

    small I# current to the larger value required for the relay coil. The ma"imum output current

    for the popular ::: timer I# is >BBmA so these devices can supply relay coils directly

    without amplification.

    3elays are usually &(T or (T but they can have many more sets of switch

    contacts, for e"ample relays with @ sets of changeover contacts are readily available. or 

    further information about switch contacts and the terms used to describe them please see

    the page on switches.

    #!

    http://en.wikipedia.org/wiki/Switchhttp://en.wikipedia.org/wiki/Electrical_circuithttp://en.wikipedia.org/wiki/Magnethttp://en.wikipedia.org/wiki/Magnethttp://en.wikipedia.org/wiki/Electrical_circuithttp://en.wikipedia.org/wiki/Magnethttp://en.wikipedia.org/wiki/Switch

  • 8/20/2019 Automatic Irrigation Final Document

    32/46

    Most relays are designed for (#C mounting but you can solder wires directly to

    the pins providing you tae care to avoid melting the plastic case of the relay. 3elay coils

     produce brief high voltage RspiesR when they are switched off and this can destroy

    transistors and I#s in the circuit. To prevent damage you must connect a  protection diode

    across the relay coil.

    The animated picture shows a woring relay with its coil and switch contacts. 5ou can see

    a lever on the left being attracted by magnetism when the coil is switched on. This lever 

    moves the switch contacts. There is one set of contacts E&(TF in the foreground and

    another behind them, maing the relay (T.

     Fig. Connecting a Relay

    The relayRs switch connections are usually labeled as #/M, N# and N/J

    #/M P #ommon, always connect to this, it is the moving part of the switch.

     N# P Normally #losed, #/M is connected to this when the relay coil is off.

     N/ P Normally /pen, #/M is connected to this when the relay coil is on.

    #onnect to #/M and N/ if you want the switched circuit to be on when the relay coil is

    on.

    #onnect to #/M and N# if you want the switched circuit to be on when the relay coil is

    off.

    Choosing a relay:

    5ou need to consider several features when choosing a relayJ

    #"

    http://www.kpsec.freeuk.com/components/relay.htm#protecthttp://www.kpsec.freeuk.com/components/relay.htm#protect

  • 8/20/2019 Automatic Irrigation Final Document

    33/46

    aF (hysical si'e and pin arrangement If you are choosing a relay for an e"isting (#C you

    will need to ensure that its dimensions and pin arrangement are suitable. 5ou should find

    this information in the supplierRs catalogue.

     bF #oil voltage the relayRs coil voltage rating and resistance must suit the circuit powering

    the relay coil. Many relays have a coil rated for a ;>- supply but :- and >@- relays are

    also readily available. &ome relays operate perfectly well with a supply voltage which is a

    little lower than their rated value.

    cF #oil resistance the circuit must be able to supply the current required by the relay coil.

    5ou can use /hmRs law to calculate the currentJ

    3elay coil current Psupply voltage

    coil resistance

    &witch ratings Evoltage and currentF the relayRs switch contacts must be suitable

    for the circuit they are to control. 5ou will need to chec the voltage and current ratings.

     Note that the voltage rating is usually higher for A#, for e"ampleJ U:A at >@- # or ;>:-

    A#U.

    &witch contact arrangement E&(T, (T etcF. Most relays are &(T or (T

    which are often described as Usingle pole changeoverU E&(#/F or Udouble pole

    changeoverU E(#/F. or further information please see the page on switches

    $rotection diodes for relays:

    Transistors and I#s EchipsF must be protected from the brief high voltage RspieR

     produced when the relay coil is switched off. The diagram shows how a signal diode Ee.g.

    ;N@;@8F is connected across the relay coil to provide this protection. Note that the diode is

    connected RbacwardsR so that it will normally not conduct. #onduction only occurs when

    the relay coil is switched off, at this moment current tries to continue flowing through the

    coil and it is harmlessly diverted through the diode. Without the diode no current could

    flow and the coil would produce a damaging high voltage RspieR in its attempt to eep the

    current flowing.

    3elays and transistors compared.

    ##

    http://www.kpsec.freeuk.com/ohmslaw.htmhttp://www.kpsec.freeuk.com/ohmslaw.htmhttp://www.kpsec.freeuk.com/ohmslaw.htm

  • 8/20/2019 Automatic Irrigation Final Document

    34/46

    ?ie relays, transistors  can be used as an electrically operated switch. or 

    switching small # currents EV ;AF at low voltage they are usually a better choice than a

    relay. +owever transistors cannot switch A# or high voltages Esuch as mains electricityF

    and they are not usually a good choice for switching large currents E :AF. In these cases a

    relay will be needed, but note that a low power transistor may still be needed to switch the

    current for the relayRs coilX The main advantages and disadvantages of relays are listed

     belowJ

    Ad>antaes of relays:

    3elays can switch A# and #, transistors can only switch #.

    3elays can switch high voltages, transistors cannot.

    3elays are a better choice for switching large currents E :AF.

    3elays can switch many contacts at once.

    Disad>antaes of relays:

    3elays are bulier than transistors for switching small currents.

    3elays cannot switch rapidly Ee"cept reed relaysF, transistors can switch many times per 

    second.

    3elays use more power due to the current flowing through their coil.

    3elays require more current than many chips can provide, so a low power transistor may be

    needed to switch the current for the relayRs coil.

    Chapter I/

    9ard7are Desinin and Soft7are Implementation

    9ard7are Desinin

    $roteus=.= Tool

    (roteusD.D best simulation software for various designs with microcontroller. It is mainly

     popular because of availability of almost all microcontrollers in it. &o it is a handy tool to test

    #$

    http://www.kpsec.freeuk.com/components/tran.htmhttp://www.kpsec.freeuk.com/components/tran.htmhttp://www.kpsec.freeuk.com/components/tran.htm

  • 8/20/2019 Automatic Irrigation Final Document

    35/46

     programs and embedded designs for electronics. 5ou can simulate your programming of 

    microcontroller in (roteusD.D &imulation &oftware.

    After simulating your circuit in (roteus D.D &oftware you can directly mae (#C design with it

    so it could be a all in one pacage.

    Steps to create a $ro?ect

    • ouble clic on ISIS shortcut.

    • 4o to ile menu clic on save design.

    • &ave the design by creating a new folder with specified proGect name.

    • 4o to ?ibrary menu (ic the evice symbol.

    • (ic the component to be placed from the library list.

    • (lace the selected #omponent on the &chematic sheet with grids.

    • &elect all the required components and place them on the schematic sheet.

    • #onnect the components.

    • or connecting power and groundgo to Terminal Mode.

    • After the esign completion.

    • ?oad the 2.he"6 file which is generated from eil software.

    • &tart the simulation button.

    • If the design and code are appropriate simulation gives the valid output.

    • or further modification stop the simulation, modify the circuit.

    • To modify the 2.he"6 file modify the code in eil build the code then he" while will be

    manipulated.

    Soft7are Implementation

    @eil IDE

    The eil 8B:; evelopment Tools are designed to solve the comple" problems facing

    embedded software developers.

    eil I! is basically an assembler and a compiler. Assembly or # language code can bewritten and compiled in eil. urthermore, it supports many of the 8B:; variants.

    The eil Y-ision ebugger accurately simulates on$chip peripherals EIZ#, #AN, %A3T,

    &(I, Interrupts, I*/ (orts, A* #onverter, *A #onverter, and (WM ModulesF of your 8B:;

    device. &imulation helps you understand hardware configurations and avoids time wasted on

    #%

  • 8/20/2019 Automatic Irrigation Final Document

    36/46

    setup problems. Additionally, with simulation, you can write and test applications before target

    hardware is available.

    Steps to create a pro?ect

    • ouble clic on eil shortcut.

    • #lic on run option.

    • 4o to (roGect menu select new Y-ision proGect.

    • &ave the proGect in above I&I& folder with the same proGect name.

    • 3ight clic on 2Target;6 select 2options for target [target;K.

    • #hange Ltal EM+'F value as ;;.B:9>M+'.

    • 4o to output menu in the same window Tic the [create he" fileK option.

    • #lic on /.

    • #reate a new empty document by clic on tool below file menu.

    • &ave that document with 2.c6 e"tension as it a 2c code6.

    • &ave the code in the same folder.

    • 3ight clic on &ource 4roup &elect 2Add iles to 4roup [&ource 4roup;K.

    • Add the 2.c6 file to that source group.

    • #lic on #lose option.

    • !dit the code in 2.c6 file.

    • Cuild the code.

    • If the code is appropriate code is compiled without any errors.

    • After compilation he" file is generated.

    • This generated 2.he"6 file is embedded on microcontroller in I&I& tool for software

    testing

    • If simulation results are perfect the .he" file is loaded into real$time micro controller chip.

    CM$1E1TS M;1TI10 1 $CB

    T!S ;SED:

    Solderin iron

    A soldering iron is a hand tool most commonly used in soldering. It supplies

    heat to melt the solder  so that it can flow into the Goint between two worpieces.

    #&

    http://en.wikipedia.org/wiki/Hand_toolhttp://en.wikipedia.org/wiki/Solderinghttp://en.wikipedia.org/wiki/Solderhttp://en.wikipedia.org/wiki/Hand_toolhttp://en.wikipedia.org/wiki/Solderinghttp://en.wikipedia.org/wiki/Solder

  • 8/20/2019 Automatic Irrigation Final Document

    37/46

    A soldering iron is composed of a heated metal tip and an insulated

    handle. +eating is often achieved electrically, by passing an electric

    current Esupplied through an electrical cord or battery cablesF

    through the resistive material of a heating element.   Another heating method

    includes combustion of a suitable gas, which can either be delivered through a tan 

    mounted on the iron EflamelessF, or through an e"ternal flame.

    ?ess common uses include  pyrography  Eburning designs into woodF and

    welding. &oldering irons are most often used for installation, repairs, and limited

     production wor. +igh$volume production lines use other soldering methods.

    #ire Stripper:

    Wire stripper is used to strip off wire insulator from its conductor before it is

    used to connect to another wire or soldered into the printed circuit board. &ome wire

    stripper or wire cutter has a measurement engraved on it to indicate the length that will be

    stripped.

    Side6Cuttin $lier:

    A @$inch side cutting plier will come in handy as one

    of the electronic tools when one need to trim off e"cess

    component leads on the printed circuit board. It can also be used

    to cut wires into shorter length before being used. Twee'er 

    &mall twee'er is used to hold small components especially when doing

    soldering and de$soldering of surface mount components.

    $CB Desinin and #or"in

    $CB !ayout

    #'

    http://en.wikipedia.org/wiki/Heating_elementhttp://en.wikipedia.org/wiki/Pyrographyhttp://en.wikipedia.org/wiki/Heating_elementhttp://en.wikipedia.org/wiki/Pyrography

  • 8/20/2019 Automatic Irrigation Final Document

    38/46

    The entire circuit can be easily assembled on a general purpose (#C board respectively.

    ?ayout of desired diagram and preparation is first and most important operation in any printed

    circuit board manufacturing process. irst of all layout of component side is to made in

    accordance with available components dimensions. The following points are to be observed

    while forming the layout of (#C.

    ;. Cetween two components, sufficient space should be maintained.>. +igh voltage*ma" dissipated components should be mounted at sufficient distance

    from semiconductor and electrolytic capacitors.

    ). The most important points are the components layout is maing proper 

    compromise with copper side circuit layout. (rinted circuit board is used to avoid

    most of all the disadvantages of conventional breadboard. These are small in si'e

    and efficient in performance.

    $reparin Circuit !ayout

    irst of all the actual si'e circuit layout is to be drawn on the copper side of the copper clad

     board. Then enamel paint is applied on the tracs of connection with the help of a shade brush.

    We have to apply the paints surrounding the point at which the connection is to be made. It

    avoids the disconnection between the leg of the component and circuit trac. After completion of 

     painting wor, it is allowed to dry.

    Drillin

    After completion of painting wor, holes ;*>)inch E;mmF diameter are drilled at desired points

    where we have to fi" the components.

    Etchin

    The removal of e"cess of copper on the plate apart from the printed circuit is nown as etching.

    rom this process the copper clad board with printed circuit is placed in the solution of e#l with

    )$@ drops of +#? in it and is ept so for about ;B to ;: minutes and is taen out when all the

    e"cess copper is removed from the (#C. After etching, the (#C is ept in clean water for about

    half an hour in order to get (#C away from acidic field, which may cause poor performance of 

    #(

  • 8/20/2019 Automatic Irrigation Final Document

    39/46

    the circuit. After the (#C has been thoroughly washed, paint is removed by soft piece of cloth

    dipped I thinner or turbine. Then (#C is checed as per the layout, now the (#C is ready for use.

    Solderin

    &oldering is the process of Goining two metallic conductor the Goint where two metal

    conductors are to be Goin or fused is heated with a device called soldering iron and then as allow

    of tin and lead called solder is applied which melts and converse the Goint. The solder cools and

    solidifies quicly to ensure is good and durable connection between the Goined metal converting

    the Goint solder also present o"idation.

    Solderin And Desolderin Techni8ues.

    There are basically two soldering techniques.

    • Manual soldering with iron.

    • Mass &oldering.

    Solderin 7ith Iron

    The surface to be soldered must be cleaned and flu"ed. The soldering iron switched on and

     bellowed to attain soldering temperature. The solder in form of wire is allied hear the component

    to be soldered and heated with iron. The surface to be soldered is filled, iron is removed and Goint

    is cold without disturbing.

    Solder oint are Supposed to:

    ;. (rovide permanent low resistance path.

    >. Mae a robust mechanical lin between (#C and leads of components.

    ). Allow heat flow between component, Goining elements and (#C.@. 3etain adequate strength with temperature variation. The following precaution should be

    taen while solderingJ

    • %se always an iron plated copper core tip for soldering iron.

    • &lightly for the tip with a cut file when it is cold.

    • %se a wet sponge to wipe out dirt from the tip before soldering.

    • Tighten the tip screw if necessary before iron is connected to poor supply.

    • #lean component lead and copper pad before soldering.

    • Apply solder between component leads, (#C pattern and tip of soldering iron.

    #)

  • 8/20/2019 Automatic Irrigation Final Document

    40/46

    • Iron should be ept in contact with the Goint for >$) seconds only instead of 

    eeping for very long or very small time.

    • %se optimum quantity of solder.

    C9A$TE3 /

    C1C!;SI1 -;T;3E SC$E

    '.( 3ES;!T

    The system provides with several benefits and can operate with less manpower.

    The system supplies water only when the humidity in the soil goes below the reference.

    ue to the direct transfer of water to the roots water conservation taes place and also helps

    to maintain the moisture to soil ratio at the root 'one constant to some e"tend. Thus, the

    system is efficient and compatible to the changing environment.

    In present days especially farmers are facing maGor problems in watering

    their agriculture fields, itKs because they have no proper idea about when the power is

    $*

  • 8/20/2019 Automatic Irrigation Final Document

    41/46

    available so that they can pump water. !ven after then they need to wait until the field is

     properly watered, which maes them to stop doing other activities. +ere is an idea which

    helps not only farmers but also for watering the gardens , which senses the soil moisture

    and switches the pump automatically when the power is /N.

    !lectronic 4ardner is a prototype for an automatic irrigation system that can be

    used in wide landscapes. (roperly installed, maintain and managed system can be

    implemented in large fields lie public gardens, lawns, golf fields etc.

    '.+ AD/A1TA0ES

    (. 3educed run6off of 7ater and nutrients:

    Automation can help eep fertili'er on farm by effectively reducing run$off 

    from the property. 3etaining fertili'er on farm has both economic and environmental

     benefits.

    +. Impro>es ro7th:

    &maller amounts of water applied over a longer amount of time provide ideal

    growing conditions. rip irrigation e"tends watering times for plants, and prevents soil

    erosion and nutrient runoff. Also, because the flow is continuous, water penetrates deeplyinto the soil to get well down into the root 'one.

    2. 3educed !abour:

    As the irrigator is not required to constantly monitor the progress of irrigation,

    the irrigator is available to perform other tass un$interrupted.

    . Sa>es time:

    &etting and moving sprinlers are not required. A timer delay as per 

    environment can be added to the system for automatic watering.

    '. Impro>ed !ife Style

    $!

  • 8/20/2019 Automatic Irrigation Final Document

    42/46

    The irrigator is not required to constantly chec the progress of water down the

     base being irrigated. The irrigator is able to be away from the property, rela" with the

    family and sleep through the night.

    . Adaptable:

    A drip irrigation system can be modified easily to adGust to the changing needs

    of a garden or lawn.

    =. Simplest MethodJ

    &tart by drawing a map of your garden and yard, showing the location of 

     plantings. Measure the distances required for lengths of hose or plastic tubing to reach the

    desired areas.

    %. More timely irriation:

    Irrigators with automation are more inclined to irrigate when the plants need

    water, not when it suits the irrigator 

    *. More accurate cut6off:

    Automation of the irrigation system allows cut$off of water at the appropriate

     point in the bay. This is usually more accurate than manual checing because mistaes can

    occur if the operator is too late or too early in maing a change of water flow.

    '.2 DIS6AD/A1TA0ES

    (. 3eliability:

    &ometimes failures will occur often these failures are because of human error in

    setting and maintaining the systems. A reuse system is good insurance to collect any e"cess

    run off when failures occur 

    $"

  • 8/20/2019 Automatic Irrigation Final Document

    43/46

    +. Increased Channel Maintenance:

    There is a need to increase maintenance of channels and equipments to ensure

    the system wors correctly. #hannels should be fenced to protect the automatic units from

    stoc damage.

    2. Slopes in the fieldsJ

    These systems require careful study of all the relevant factors lie land

    topography, &oil, Water, #rop and agro$climatic conditions and suitability of irrigation

    system and its components

    ue to rust of sensors we cannot predict the water level after a period of time.

    '. A$$!ICATI1S

    ;. Irrigation in fields.

    >. Irrigation in gardens, pars and golf fields

    ). -ery efficient for paddy E3iceF fields.

    @. (icsiculture.

    $#

  • 8/20/2019 Automatic Irrigation Final Document

    44/46

    '.' -;T;3E SC$E

    With a numerous fields of application and various advantages of the system has

    made it one of the maGor option available for the farmers. The increasing interest in this

    area of research may bring about more and more consumer efficient system. Water scarcity

    the maGor problem is well handled by the system. The changing climatic condition and

    global warming issues prevailing throughout the world can be overcome only through this

    system. The automatic irrigation system will be every farmerKs choice in a decade or so.

    The improper advertising was the sole reason for the late adoption and acquaintance of the

    system that too place in the late eighties. Cut with the awareness spreading all over the

    globe the system is earning acceptance and so, a number of scientist are investing their time

    to perfect the system we can implement this module in golf fields and public gardens.!lectronic 4ardner is a prototype for an automatic irrigation system that can be used in

    wide landscapes.

    The main advantage of this module is without observation of farmer the motor 

     pump automatically switches the motor on or off by using the moisture sensors. &aves time,

    &aves water. An automatic irrigation system can save you literally thousands of gallons of 

    water a year simply by remembering to turn itself off at the right time. (rotects your 

    financial investment. An attractively landscaped e"terior, with lush growth and healthy plants, helps your house proGect that fresh.

    .

    $$

  • 8/20/2019 Automatic Irrigation Final Document

    45/46

    $%

  • 8/20/2019 Automatic Irrigation Final Document

    46/46

    3eferences

    ;. Muhammad Ali Ma'idi , 2The 8B:; Microcontroller 7 !mbedded &ystems 6 .>. httpJ**www.electronicshub.org*interfacing$;