automatic irrigation system using microcontroller main document

Upload: myhomenet1191881

Post on 24-Feb-2018

250 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/25/2019 Automatic Irrigation System Using Microcontroller Main Document

    1/39

    CHAPTER 1

    INTRODUCTION

    1

  • 7/25/2019 Automatic Irrigation System Using Microcontroller Main Document

    2/39

    1.1 INTRODUCTION

    This chapter includes the problem statement, system block diagram and explanation

    about the each block. It also includes the relevance of our project i.e. what are the applications

    of this projects.

    In the fast paced world human beings require everything to be automated. Our life

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

    automated. nd why not! In the world of advance electronics, life of human beings should be

    simpler hence to make life simpler and convenient" we have made #$TO%TI&

    I''I(TIO) *+*T%-. model of controlling irrigation facilities to help millions ofpeople. This model uses sensor technology with microcontroller to make a smart switching

    device.

    The model shows the basic switching mechanism of ater motor/pump using

    sensors from any part of field by sensing the moisture present in the soil. Our basic model can

    be extended to any level of switching 0 controlling by using 1T%2.

    PROBLEM STATEMENT3

    To build an utomatic Irrigation *ystem using T%(45 %icrocontroller.

    .OBJECTIVE:

    )ow days, water shortage is becoming one of the biggest problem in the world.

    %any different methods are developed for conservation of water. e need water in each and

    every field. In our day to day life water plays a vital part and is considered as a 6asic 7uman

    )eed. ater is needed for everyone human beings, animals, plants, etc.

    griculture is one of the fields where water is required in tremendous quantity.

    astage of water major problem in agriculture. very time excess of water is given to the

    fields. There are many techniques to save or to control wastage of water from agriculture.

    1ifferent types of irrigation are used for management of water in agricultural land.

    IRRIGATION:

    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.

    2

  • 7/25/2019 Automatic Irrigation System Using Microcontroller Main Document

    3/39

    TYPES OF IRRIGATION SYSTEMS

    Ditch Irrigti!"

    1itch Irrigation is a rather traditional method, where ditches are dug out and

    seedlings are planted in rows. The plantings are watered by placing canals or furrows in

    between the rows of plants. *iphon tubes are used to move the water from the main ditch to the

    canals. This system of irrigation was once very popular in the $*, but most have been

    replaced with modern systems.

    Fig. Ditch Irrigation

    T#rrc#$ Irrigti!":

    This is a very labor8intensive method of

    irrigation where the land is cut into steps and

    supported by retaining walls. The flat areas are used for planting and the idea is that the waterflows down each step, while watering each plot. This allows steep land to be used for planting

    crops.

    Fig. Terraced Irrigation

    Dri% Irrigti!":

    3

  • 7/25/2019 Automatic Irrigation System Using Microcontroller Main Document

    4/39

    This is known as the most water efficient method of irrigation. ater drops right

    near the root 9one of a plant in a dripping motion. If the system is installed properly you can

    steadily reduce the loss of water through evaporation and runoff.

    Fig. Drip Irrigation.

    S%ri"&'#r S()t#*:

    This is an irrigation system based on overhead sprinklers, sprays or guns, installed

    on permanent risers. +ou can also have the system buried underground and the sprinklers rise

    up when water pressure rises, which is a popular irrigation system for use on golf courses and

    parks.

    Fig. Sprinkler System

    R!tr( S()t#*):

    4

  • 7/25/2019 Automatic Irrigation System Using Microcontroller Main Document

    5/39

    This method of irrigation is best suited for larger areas, for the sprinklers can reach

    distances of up to 4:: feet. The word #'otary- is indicative of the mechanical driven sprinklers

    moving in a circular motion, hence reaching greater distances. This system waters a larger area

    with small amounts of water over a longer period of time.

    Fig. Rotary System.

    NEED OF AUTOMATIC IRRIGATION:

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

    ater pumps, tanks 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 like

    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. xcess water eroes the soil and damages the civil structures of water

    tanks. ll in all, there is a huge loss of energy in many ways. &onsidering this, automating the

    irrigation sector is vital.

    utomatic irrigation systems are convenient, especially for those who travel. Ifinstalled and programmed properly, automatic irrigation systems can even save you money and

    help in water conservation. 1ead lawn grass and plants need to be replaced, and that can be

    expensive. 6ut the savings from automatic irrigation systems can go beyond that.

    atering with a hose or with oscillator wastes water. )either method targets plant

    roots with any significant degree of precision. utomatic irrigation systems can be programmed

    to discharge more precise amounts of water in a targeted area, which promotes water

    conservation.

    1.+ EMBEDDED SYSTEMS:

    5

  • 7/25/2019 Automatic Irrigation System Using Microcontroller Main Document

    6/39

    n mbedded system is a special8purpose system in which the computer is

    completely encapsulated by or dedicated to the device or system it controls. $nlike a general8

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

    predefined tasks, usually with very specific requirements. *ince the system is dedicated to

    specific tasks, design engineers can optimi9e it, reducing the si9e and cost of the product.

    mbedded systems are often mass8produced, benefiting from economies of scale.

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

    and %;< players, to large stationary installations like traffic lights, factory controllers, or the

    systems controlling nuclear power plants.

    In terms of complexity embedded systems can range from very simple with a single

    microcontroller chip, to very complex with multiple units, peripherals and networks mounted

    inside a large chassis or enclosure.

    E,*%'#) !- E*#$$#$ S()t#*):

    vionics, 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 antilock brake controllers for automobile.

    7ome automation products, such as thermostats, air conditioners, sprinklers, and

    security monitoring systems.

    7ousehold appliances, including microwave ovens, washing machines, television sets,

    1=1 players and recorder.

    &omputer peripherals such as routers and printers.

    7andheld calculators.

    7andheld computers.

    %edical equipment.

    ;ersonal digital assistant.

    =ideogame consoles.

    6

    Fig. Embedded system.

  • 7/25/2019 Automatic Irrigation System Using Microcontroller Main Document

    7/39

    CHAPTER +

    LITERATURE REVIE/

    7

  • 7/25/2019 Automatic Irrigation System Using Microcontroller Main Document

    8/39

    The chapter covers an overview about the previous and future projects related to the

    system.

    +.1 PREVIOUS RELATED /OR0:

    In India, normal irrigation technique, which are manually operated are used widely

    due to its low cost and high profits. utomatic irrigation techniques are not so prevalent here.

    6ut various methods like the automatic sprinklers, which are used widely for domestic

    gardening purpose" these are designed to supply water for a particular period of the day only.

    They are time controlled. The volume of water to be supplied and the rate of flow of water are

    essential to calculate the time interval.

    %ore over =olume control system are more advantageous than time control system.

    The amounts of water they supply are fixed irrespective of continuous electricity availability

    but still time controlled systems are more popular due to its cheap value. 7ere volume meters

    are connected, which emits a pulse after delivering a specific amount of water and the

    controller measures these pulses to keep a check on the supply.

    The most recent type is the rainfall detector for detecting a set amount of rainfall.

    This functions to interrupt the normal operation of an automatic sprinkler or irrigation system

    upon detection of the set amount of rainfall, it includes a rainwater8collection tray having an

    opening and mounted so that the portion of the opening exposed to rainwater during a

    rainstorm is adjustable. The rainwater8collection tray may be able to slide and is mounted

    below a detector housing which houses a switching circuit with two sensors extending into the

    tray, and it also prevents from the debris to fall in the tray. hen water in the tray is filled up to

    the mark of reference the sensor completes the circuitry and isolates the irrigation system from

    the supply and thus prevent from excessive water supply to the plants. This method is patent to

    'ichard . %orrison, >*alt ?ake &ity, $T@ and Aent &. rickson >&enterville, $T@.

    In addition to the above there are two more methods they are closed loop and open

    loop irrigation system. The closed loop type of system requires feedback from one or more

    sensors. The operator develops a general control strategy. Once the general strategy is defined,

    the control system takes over and makes detailed decisions of when to apply water and how

    much water to apply. Irrigation decisions are made and actions are carried out based on data

    from sensors. In this type of system, the feedback and control of the system are done

    continuously. 6ut in an open loop system, the operator makes the decision on the amount of

    water that will be applied and when the irrigation event will occur. This information is

    8

  • 7/25/2019 Automatic Irrigation System Using Microcontroller Main Document

    9/39

    programmed into the controller and the water is applied according to the desired schedule.

    Open loop control systems use either the irrigation duration or a specified applied

    volume for control purposes.

    The drawback of open loop systems is their inability to respond

    automatically to changing conditions in the environment. In addition, they may require frequent

    resetting to achieve high levels of irrigation efficiency.

    +.+ STATE OF ART:

    The scientists are developing an underground irrigation system. The major

    drawback of water evaporation taking place at the surface level irrigation is overcome by this

    method. In this method various sensors are placed below the ground level to determine the

    moisture percentage in the soil. The water supply in this case is directly to the root system and

    as the moisture level at the root level is essential to be known the sensor are placed near the

    roots. This will optimi9e the water consumption further and will make maximum use of all

    agricultural resource.

    9

  • 7/25/2019 Automatic Irrigation System Using Microcontroller Main Document

    10/39

    CHAPTER

    BLOC0S 2 E3PLANATION

    10

  • 7/25/2019 Automatic Irrigation System Using Microcontroller Main Document

    11/39

    The main content of the chapter is about the total block diagram and detailed

    designing of the *ystem.

    .1 BLOC0 DIAGRAM

    E3PLANATION OF BLOC0S

    .+ PO/ER SUPPLY:

    The power supplies are designed to convert high voltage & mains electricity to a

    suitable low voltage supply for electronic circuits and other devices. ';* >'egulated ;ower

    *upply@ is the ;ower *upply with 'ectification, 2iltering and 'egulation being done on the &

    mains to get a 'egulated power supply for %icrocontroller and for the other devices being

    interfaced to it.

    power supply can be broken down into a series of blocks, each of which performs

    a particular function. 1.& power supply which maintains the output voltage constant

    irrespective of .& mains fluctuations or load variations is known as #'egulated 1.& ;ower

    *upply-

    11

  • 7/25/2019 Automatic Irrigation System Using Microcontroller Main Document

    12/39

    2or example a B= regulated power supply system as shown below3

    . V!'tg# R#g4't!r):

    =oltage regulator I&s is available with fixed >typically B, 4C and 4B=@ or variable

    output voltages. The maximum current they can pass also rates them. )egative voltage

    regulators are available, mainly for use in dual supplies. %ost regulators include

    some automatic protection from excessive current >Doverload protectionD@ and

    overheating >Dthermal protectionD@. %any of the fixed voltage regulators I&s

    have < leads and look like power transistors, such as the EF:B GB= 4

    regulator shown on the right. The ?%EF:B is simple to use. +ou simply connect the

    positive lead of your unregulated 1& power supply >anything from

    H=1& to C=1&@ to the Input pin, connect the negative lead to the

    &ommon pin and then when you turn on the power, you get a B volt supply from the output pin.

    7ere in this project we use a ?%EF:B I& as T%( 45 works on Bv 1& .

    EFJJ

    The 6i ?inear ?%EFJJ is integrated linear positive regulator with three terminals. The

    ?%EFJJ offer several fixed output voltages making them useful in wide range of applications.

    hen used as a 9ener diode/resistor combination replacement, the ?%EFJJ usually results in

    12

    Fig. LM 78!

  • 7/25/2019 Automatic Irrigation System Using Microcontroller Main Document

    13/39

    an effective output impedance improvement of two orders of magnitude, lower quiescent

    current. The ?%EFJJ is available in the TO8CBC, TO8CC: 0 TO8C5

  • 7/25/2019 Automatic Irrigation System Using Microcontroller Main Document

    14/39

    ATMEGA 16 Micr!c!"tr!''#r:

    Fig. "I# DI$%R$M &F $TME%$ '(

    Pi" D#)cri%ti!"):

    )**+

    1igital supply voltage, the supply for the Tmega45 is B=. It works on the single supply.

    The voltage applied here powers the entire circuitry inside the microcontroller.

    %#D+

    It is pin

  • 7/25/2019 Automatic Irrigation System Using Microcontroller Main Document

    15/39

    "ort / ,"/7-"/+

    ;ort 6 is an F8bit bi8directional I/O with internal pull8up resistors >selected for each bit@. The

    ;ort 6 output buffers have symmetrical drive characteristics with both high sink and source

    capability. s inputs, ;ort 6 pins that are externally pulled low will source the pull8up resistors

    are activated. The ;ort 6 pins are tri8stated when a reset condition becomes active, even if the

    clock is not running. ;ort 6 also serves the functions of various special features of the

    Tmega45.

    "ort * ,"*7-"*+

    ;ort & is an F8bit bi8directional I/O port with internal pull8up resistors >selected for each bit@.

    The ;ort & output buffers have symmetrical drive characteristics with both high sink and

    source capability. s inputs, ;ort & pins that are externally pulled low will source current if the

    pull8up resistors are activated. The ;ort & pins are tri8stated when a reset condition becomes

    active, even if the clock is not running. If the LT( interface is enabled, the pull8up resistors on

    pins ;&B >T1I@, ;&< >T%*@ and ;&C >T&A@ will be activated even if a reset occurs. ;ort &also serves the functions of the LT( interface and other special features of the Tmega45.

    "ort D ,"D7.."D+

    ;ort 1 is an F8bit bi8directional I/O port with internal pull8up resistors >selected for each bit@.

    The ;ort 1 output buffers have symmetrical drive characteristics with both high sink and

    source capability. s inputs, ;ort 1 pins that are externally pulled low will source current if the

    pull8up resistors are activated. The ;ort 1 pins are tri8stated when a reset condition becomes

    active, even if the clock is not running.

    RESET+

    'eset Input. low level on this pin for longer than the minimum pulse length will generate

    reset, even if the clock is not running. *horter pulses are not guaranteed to generate a reset.

    15

  • 7/25/2019 Automatic Irrigation System Using Microcontroller Main Document

    16/39

    0T$L'+

    Input to the inverting Oscillator amplifier and input to the internal clock operating circuit.

    0T$L1+

    Output from the inverting Oscillator amplifier.

    $)**+

    =&& is the supply voltage pin for ;ort and the /1 &onverter. It should be externallyconnected to =&&, even if the 1& is not used. If the 1& is used, it should be connected to

    =&& through a low8pass filter.

    $REF+

    '2 is the analog reference pin. It is provided for the nalog to 1igital conversion. 2or to

    1 conversion we need reference voltage which will be provided by this pin.

    FEATURES OF AT*#g16:

    a@ 7igh8performance, ?ow8power tmelM ='M F8bit %icrocontroller

    C@ dvanced 'I*& rchitecturea@ 4

  • 7/25/2019 Automatic Irrigation System Using Microcontroller Main Document

    17/39

    d@ rite/rase &ycles3 4:,::: 2lash/4::,::: ;'O%

    e@ 1ata retention3 C: years at FB&/4:: years at CB&>4@

    f@ Optional 6oot &ode *ection with Independent ?ock 6its

    g@ In8*ystem ;rogramming by On8chip 6oot ;rogram

    h@ True 'ead8hile8rite Operation

    i@ ;rogramming ?ock for *oftware *ecurity

    @ LT( >I std. 44H.4 &ompliant@ Interface

    a@ 6oundary8scan &apabilities ccording to the LT( *tandard

    b@ xtensive On8chip 1ebug *upport

    c@ ;rogramming of 2lash, ;'O%, 2uses, and ?ock 6its through the LT( Interface

    B@ ;eripheral 2eatures

    a@ Two F8bit Timer/&ounters with *eparate ;rescalars and &ompare %odes

    b@ One 458bit Timer/&ounter with *eparate ;rescalar, &ompare %ode, and &apture

    c@ %ode

    d@ 'eal Time &ounter with *eparate Oscillator

    e@ 2our ;% &hannels

    f@ F8channel, 4:8bit 1&

    g@ F *ingle8ended &hannels

    h@ E 1ifferential &hannels in TP2; ;ackage Only

    i@ C 1ifferential &hannels with ;rogrammable (ain at 4x, 4:x, or C::x

    j@ 6yte8oriented Two8wire *erial Interface

    k@ ;rogrammable *erial $*'T

    l@ %aster/*lave *;I *erial Interface

    m@ ;rogrammable atchdog Timer with *eparate On8chip Oscillator

    n@ On8chip nalog &omparator

    5@ *pecial %icrocontroller 2eatures

    a@ ;ower8on 'eset and ;rogrammable 6rown8out 1etection

    b@ Internal &alibrated '& Oscillator

    c@ xternal and Internal Interrupt *ources

    d@ *ix *leep %odes3 Idle, 1& )oise 'eduction, ;ower8save, ;ower8down, *tandby

    e@ and xtended *tandby

    E@ I/O and ;ackages

    a@

  • 7/25/2019 Automatic Irrigation System Using Microcontroller Main Document

    18/39

    a@ C.E= 8 B.B= for Tmega45?

    b@ .B= 8 B.B= for Tmega45

    H@ *peed (rades

    a@ : 8 F %79 for Tmega45?

    b@ : 8 45 %79 for Tmega45

    4:@ ;ower &onsumption Q 4 %79, at a wavelength of approximately E:: nanometers@ to blue8violet >about :: nanometers@.

    *ome ?1s emit infrared >I'@ energy >F

  • 7/25/2019 Automatic Irrigation System Using Microcontroller Main Document

    19/39

    B#"#-it) !- LED):

    ?ow power requirement3

    %ost types can be operated with battery power supplies.

    7igh efficiency3

    %ost of the power supplied to an ?1 or I'1 is converted into radiation in the desired

    form, with minimal heat production.

    ?ong life3

    hen properly installed, an ?1 or I'1 can function for decades.

    .6 O%#rti!"' A*%'i-i#r):

    n !%#rti!"' *%'i-i#r>op8amp@ is a 1&8coupledhigh8gainelectronic voltage

    amplifierwith a differential inputand, usually, a single8ended output. n op8amp produces an

    output voltage that is typically hundreds of thousands times larger than the voltage difference

    between its input terminals.

    Operational amplifiers are important building blocks for a wide range of electronic

    circuits. They had their origins in analog computerswhere they were used in many linear, non8

    linear and frequency8dependent circuits. Their popularity in circuit design largely stems from

    the fact that characteristics of the final op8amp circuits with negative feedback>such as their

    gain@ are set by external components with little dependence on temperature changes and

    manufacturing variations in the op8amp itself.

    Op8amps are among the most widely used electronic devices today, being used in a

    vast array of consumer, industrial, and scientific devices. %any standard I& op8amps cost only

    a few cents in moderate production volume" however some integrated or hybrid operational

    amplifiers with special performance specifications may cost over U4:: $* in small quantities.

    Op8amps may be packaged as components, or used as elements of more complex integrated

    circuits.

    The op8amp is one type of differential amplifier. Other types of differential

    amplifier include the fully differential amplifier>similar to the op8amp, but with two outputs@,

    the instrumentation amplifier >usually built from three op8amps@, the isolation amplifier

    >similar to the instrumentation amplifier, but with tolerance to common8mode voltages that

    19

    http://en.wikipedia.org/wiki/Direct_currenthttp://en.wikipedia.org/wiki/Direct_couplinghttp://en.wikipedia.org/wiki/Gainhttp://en.wikipedia.org/wiki/Electronic_amplifierhttp://en.wikipedia.org/wiki/Differential_inputhttp://en.wikipedia.org/wiki/Analog_computershttp://en.wikipedia.org/wiki/Analog_computershttp://en.wikipedia.org/wiki/Negative_feedbackhttp://en.wikipedia.org/wiki/Gainhttp://en.wikipedia.org/wiki/Differential_amplifierhttp://en.wikipedia.org/wiki/Fully_differential_amplifierhttp://en.wikipedia.org/wiki/Fully_differential_amplifierhttp://en.wikipedia.org/wiki/Instrumentation_amplifierhttp://en.wikipedia.org/wiki/Instrumentation_amplifierhttp://en.wikipedia.org/wiki/Isolation_amplifierhttp://en.wikipedia.org/wiki/Direct_couplinghttp://en.wikipedia.org/wiki/Gainhttp://en.wikipedia.org/wiki/Electronic_amplifierhttp://en.wikipedia.org/wiki/Differential_inputhttp://en.wikipedia.org/wiki/Analog_computershttp://en.wikipedia.org/wiki/Negative_feedbackhttp://en.wikipedia.org/wiki/Gainhttp://en.wikipedia.org/wiki/Differential_amplifierhttp://en.wikipedia.org/wiki/Fully_differential_amplifierhttp://en.wikipedia.org/wiki/Instrumentation_amplifierhttp://en.wikipedia.org/wiki/Isolation_amplifierhttp://en.wikipedia.org/wiki/Direct_current
  • 7/25/2019 Automatic Irrigation System Using Microcontroller Main Document

    20/39

    would destroy an ordinary op8amp@, and negative feedback amplifier>usually built from one or

    more op8amps and a resistive feedback network@.

    LM 78 9 OPERATIONAL AMPLIFIER

    The ?%4BF 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. Operation from split power supplies is also possible and the low

    power supply current drain is independent of the magnitude of the power supply voltage.

    pplication areas include transducer amplifiers, dc gain blocks and all the

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

    supply systems. 2or example, the ?%4BF series can be directly operated off of the standard

    GB= power supply voltage which is used in digital systems and will easily provide the required

    interface electronics without requiring the additional V4B= power supplies.

    . MOISTURE SENSORS:

    soil moisture sensor is a water conservation accessory for conventional automatic

    irrigation systems with the potential for eliminating excessive irrigation cycles.

    20

    Fig. &p $mp "in Diagram

    http://en.wikipedia.org/wiki/Negative_feedback_amplifierhttp://en.wikipedia.org/wiki/Negative_feedback_amplifierhttp://en.wikipedia.org/wiki/Negative_feedback_amplifier
  • 7/25/2019 Automatic Irrigation System Using Microcontroller Main Document

    21/39

    *oil moisture sensors measure the water that contains in the soil. soil moisture

    probe is made up of multiple soil moisture sensors. One common type of soil moisture sensor is

    in commercial use 0 a frequency domain sensors such as a capacitance sensor. nother sensor

    the neutron moister gauge, utili9e the modulator properties of water for neutron.6y 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 experiments in ecology,

    environmental science and agricultural science, horticulture, biology and more.

    .8 MOTOR DRIVING CIRCUIT:

    %otor driving circuit is a relay is an electrical switchthat opens and closes under

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

    electromagnetto open or close one or many sets of contacts.

    RELAY:

    'elay 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

    >changeover@ switches.

    21

    Fig.Moist2reSensor

    http://en.wikipedia.org/wiki/Switchhttp://en.wikipedia.org/wiki/Switchhttp://en.wikipedia.org/wiki/Electrical_circuithttp://en.wikipedia.org/wiki/Electrical_circuithttp://en.wikipedia.org/wiki/Magnethttp://en.wikipedia.org/wiki/Switchhttp://en.wikipedia.org/wiki/Electrical_circuithttp://en.wikipedia.org/wiki/Magnet
  • 7/25/2019 Automatic Irrigation System Using Microcontroller Main Document

    22/39

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

    from the first. 2or example a low voltage battery circuit can use a relay to switch a C

  • 7/25/2019 Automatic Irrigation System Using Microcontroller Main Document

    23/39

    )& W )ormally &losed, &O% is connected to this when the relay coil is off.

    )O W )ormally Open, &O% is connected to this when the relay coil is on.

    &onnect to &O% and )O if you want the switched circuit to be on when the relay coil is on.

    &onnect to &O% and )& if you want the switched circuit to be on when the relay coil is off.

    Choosing a relay:

    +ou need to consider several features when choosing a relay3

    a@ ;hysical si9e and pin arrangement If you are choosing a relay for an existing ;&6 you will

    need to ensure that its dimensions and pin arrangement are suitable. +ou should find this

    information in the supplierDs catalogue.

    b@ &oil voltage the relayDs coil voltage rating and resistance must suit the circuit powering the

    relay coil. %any relays have a coil rated for a 4C= supply but B= and C= relays are also

    readily available. *ome relays operate perfectly well with a supply voltage which is a little

    lower than their rated value.

    c@ &oil resistance the circuit must be able to supply the current required by the relay coil. +ou

    can use OhmDs lawto calculate the current3

    'elay coil current Wsupply voltage

    coil resistance

    *witch ratings >voltage and current@ the relayDs switch contacts must be suitable for

    the circuit they are to control. +ou will need to check the voltage and current ratings. )ote that

    the voltage rating is usually higher for &, for example3 B at C= 1& or 4CB= &.

    *witch contact arrangement >*;1T, 1;1T etc@. %ost relays are *;1T or 1;1T

    which are often described as single pole changeover >*;&O@ or double pole changeover

    >1;&O@. 2or further information please see the page on switches

    Pr!t#cti!" $i!$#) -!r r#'():

    Transistors and I&s >chips@ must be protected from the brief high voltage DspikeD

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

    4)4F@ is connected across the relay coil to provide this protection. )ote that the diode is

    connected DbackwardsD 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

    23

    http://www.kpsec.freeuk.com/ohmslaw.htmhttp://www.kpsec.freeuk.com/ohmslaw.htm
  • 7/25/2019 Automatic Irrigation System Using Microcontroller Main Document

    24/39

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

    would produce a damaging high voltage DspikeD in its attempt to keep the current flowing.

    'elays and transistors compared.

    ?ike relays, transistorscan be used as an electrically operated switch. 2or switching

    small 1& currents >R 4@ at low voltage they are usually a better choice than a relay. 7owever

    transistors cannot switch & or high voltages >such as mains electricity@ and they are not

    usually a good choice for switching large currents >X B@. 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 relayDs

    coilY The main advantages and disadvantages of relays are listed below3

    A$;"tg#) !- r#'():

    'elays can switch & and 1&, transistors can only switch 1&.

    'elays can switch high voltages, transistors cannot.

    'elays are a better choice for switching large currents >X B@.

    'elays can switch many contacts at once.

    Di)$;"tg#) !- r#'():

    'elays are bulkier than transistors for switching small currents.

    'elays cannot switch rapidly >except reed relays@, transistors can switch many times per

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

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

    needed to switch the current for the relayDs coil.

    24

    http://www.kpsec.freeuk.com/components/tran.htmhttp://www.kpsec.freeuk.com/components/tran.htm
  • 7/25/2019 Automatic Irrigation System Using Microcontroller Main Document

    25/39

    &7;T'

    I%;?%)TTIO)

    25

  • 7/25/2019 Automatic Irrigation System Using Microcontroller Main Document

    26/39

    Fig. *irc2it Diagram o3 $2tomatic Irrigation System 2sing $TME%$ '( Microcontroller.

    5.1 /OR0ING OF AUTOMATIC IRRIGATION SYSTEM:26

  • 7/25/2019 Automatic Irrigation System Using Microcontroller Main Document

    27/39

    The power supply unit provides the required power to all the components and

    devices in the circuit

    The input is obtained from the moisture sensors whether the soil contains moisture

    or not. If the water is adequate, It is indicated by the (') ?1 in the circuit.

    hen ever any two or more sensors founds that the water level in the farms are

    below the sensors fixed level, then '1 ?1 glows indicating us that the water level is low

    and simultaneously the voltage at the O; %; is Open circuited, There by gives the

    information to the ;O'T of T%( 45 %icrocontroller

    ccording to the program code written in the micro controller using =' *tudio

    .:, hen two or more sensors senses the decrease in the water level or insufficiency in the

    moisture level of the soil, then the +??O ?1 is indicated to be O) and ;in ;6: is set in

    high position such that the obtained voltage is amplified by the transistor C)

  • 7/25/2019 Automatic Irrigation System Using Microcontroller Main Document

    28/39

    TOOLS USED:

    S!'$#ri"g ir!"

    soldering iron is a hand toolmost commonly used in soldering. It supplies heat to

    melt the solderso that it can flow into the joint between two workpieces.

    soldering iron is composed of a heated metal tip and

    an insulated handle. 7eating is often achieved electrically, by

    passing an electric current >supplied through an electrical cord or battery cables@

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

    includes combustion of a suitable gas, which can either be delivered through a tank mounted on

    the iron >flameless@, or through an external flame.

    ?ess common uses include pyrography>burning designs into wood@ and welding.

    *oldering irons are most often used for installation, repairs, and limited production work. 7igh8

    volume production lines use other soldering methods.

    /ir# Stri%%#r:

    ire 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.

    Si$#

  • 7/25/2019 Automatic Irrigation System Using Microcontroller Main Document

    29/39

    5. SOFT/ARES USED

    1.AVR STUDIO:

    =' *tudio is a professional Integrated 1evelopment nvironment >I1@ for

    writing and debugging =' applications in indows Hx/)T/C:::/J; environments. This

    tutorial assumes that you have installed =' *tudio on your computer.

    $seful links

    4. tmel &orporation3 http3//www.atmel.com

    C. =' 2reaks3http3//www.avrfreaks.net

    +. /IN AVR:

    in=' is T%?Zs native compiler comes with a suite of executable, open source

    software development tools for the tmel =' series of 'I*& microprocessors hosted on the

    indows platform. It includes the ()$ (&& compiler for & and &GG.

    1ownload in=' from3

    http3//winavr.sourceforge.net/

    and run in='[install.exe on your computer.

    5.5 USAGE OF AVR STUDIO 5.= :

    '. E4ec2te the $)R St2dio 5 Integrated De6elopment En6ironment ,IDE+

    a@ Open =' *tudio I1.b@ hen I1 opens, you will see the programming and simulator environment as well as a dialog

    box requesting to start a new project or opening a saved project.c@ &lick on the #)ew ;roject- button.d@ In the next dialog box, choose the tmel =' ssembler as the project type.e@ Type in a project name and the initial file namef@ &lick on the #)ext- buttong@ &hoose #=' *imulator- for the 1ebug ;latform and then scroll down the right8 indow to

    choose the Tmega45 =' processor. *elect in the drop down list.h@ &lick on the #2inish- button. +ou should then see the I1

    29

    http://www.avrfreaks.net/http://www.avrfreaks.net/http://www.avrfreaks.net/
  • 7/25/2019 Automatic Irrigation System Using Microcontroller Main Document

    30/39

    1. Typing in a program+

    a@ Type in the program. )ote the color8coded text. This is done automatically by the I1 and

    helps you to make corrections as you go.

    b@ hen you have completed the program save the program.

    . $ssembling the program+

    ssemble your program. +ou may do this by selecting #6uild- from the #6uild %enu- or by

    striking the \2E] key directly from your key board

    a@ &ontinue assembling and correcting errors until the program assembles without error >)ote the

    green dot in the lower window and the comment that states3 #ssembly complete, : rrors, :

    warnings-@ you are ready to simulate.

    5. Sim2lating a program+

    *imulate the program. To start the simulator you may choose #*tart 1ebugging- from The

    #1ebug %enu- or you may click on the arrow button

    5.7 CODING:

    ;rogram code can be written in & language or in an ssembly ?anguage.

    C C!$# -!r A4t!*tic Irrigti!" S()t#* 4)i"g Micr!c!"tr!''#r:

    ^includeRavr/io.hX

    void main>@

    _

    11'W:x::"

    30

  • 7/25/2019 Automatic Irrigation System Using Microcontroller Main Document

    31/39

    11'6W:xff"

    while>4@

    _

    if>>;I) 0 :b:::::44:@WW:b:::::44:@

    ;O'T6W:b:::4:::4"

    if>>;I) 0 :b::::44::@WW:b::::44::@

    ;O'T6W:b:::4:::4"

    if>>;I) 0 :b:::44:::@WW:b:::44:::@

    ;O'T6W:b:::4:::4"

    if>>;I) 0 :b:::4::4:@WW:b:::4::4:@

    ;O'T6W:b:::4:::4"

    if>>;I) 0 :b::::4:4:@WW:b::::4:4:@

    ;O'T6W:b:::4:::4"

    if>>;I) 0 :b:::4:4::@WW:b:::4:4::@

    ;O'T6W:b:::4:::4"

    if>>;I) 0 :b::::444:@WW:b::::444:@

    ;O'T6W:b:::4:::4"

    if>>;I) 0 :b:::444::@WW:b:::444::@

    ;O'T6W:b:::4:::4"

    if>>;I) 0 :b:::44:4:@WW:b:::44:4:@

    ;O'T6W:b:::4:::4"

    if>>;I) 0 :b:::4:44:@WW:b:::4:44:@

    ;O'T6W:b:::4:::4"

    if>>;I) 0 :b:::4444:@WW:b:::4444:@

    31

  • 7/25/2019 Automatic Irrigation System Using Microcontroller Main Document

    32/39

    ;O'T6W:b::4::::4"

    if>>;I) 0 :b:::4444:@WW:b::::::::@

    ;O'T6W:b:4::::::"

    `

    `

    32

  • 7/25/2019 Automatic Irrigation System Using Microcontroller Main Document

    33/39

    CHAPTER 7

    CONCLUSION 2 FUTURE SCOPE

    33

  • 7/25/2019 Automatic Irrigation System Using Microcontroller Main Document

    34/39

    7.1 RESULT

    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. 1ue to the

    direct transfer of water to the roots water conservation takes place and also helps to maintain

    the moisture to soil ratio at the root 9one constant to some extend. Thus, the system is efficient

    and compatible to the changing environment.

    In present days especially farmers are facing major problems in watering their

    agriculture fields, itZs because they have no proper idea about when the power is available so

    that they can pump water. ven after then they need to wait until the field is properly watered,

    which makes them to stop doing other activities. 7ere 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 O).

    lectronic (ardner 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 like public gardens, lawns, golf fields etc.

    34

  • 7/25/2019 Automatic Irrigation System Using Microcontroller Main Document

    35/39

    7.+ ADVANTAGES

    1. R#$4c#$ r4"

  • 7/25/2019 Automatic Irrigation System Using Microcontroller Main Document

    36/39

    8. M!r# ti*#'( irrigti!":

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

    not when it suits the irrigator

    ?. M!r# cc4rt# c4t

  • 7/25/2019 Automatic Irrigation System Using Microcontroller Main Document

    37/39

    7.5 APPLICATIONS

    4. Irrigation in fields.

    C. Irrigation in gardens, parks and golf fields

    'ice@ fields.

    . ;icsiculture.

    37

  • 7/25/2019 Automatic Irrigation System Using Microcontroller Main Document

    38/39

    7.7 FUTURE SCOPE

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

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

    research may bring about more and more consumer efficient system. ater scarcity the major

    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 farmerZs choice in a decade or so. The improper

    advertising was the sole reason for the late adoption and acquaintance of the system that took

    place in the late eighties. 6ut 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 (ardner 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. n 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. n attractively landscaped exterior, with lush growth and healthy plants, helps your

    house project that fresh.

    .

    38

  • 7/25/2019 Automatic Irrigation System Using Microcontroller Main Document

    39/39

    7.6 REFERENCES

    4. F:B48mirocontrolar and embedded system.

    8%ohd. %a9idi.

    C. %icro processor rchitecture, ;rogramming 0 pplications

    8'amesh *. (aonkar.