CHAPTER!

INTRODUCTION

1

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. Apart from few things man has made his life automated. And 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 "AUTOMATIC

IRRIGATION

SYSTEM". A model of controlling irrigation facilities to help millions of

people. This model uses sensor technology with microcontroller to make a smart switching device. The model shows the basic switching mechanism of Water motor/pump usmg 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 & controlling by using DTMF.

PROBLEM STATEMENT:
To build an Automatic Irrigation System using ATMEGA16 Microcontroller.

.OBJECTIVE:
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. In our day to day life water plays a vital part and is considered as a Basic Human Need. Water is needed for everyone human beings, animals, plants, etc. Agriculture is one of the fields where water is required in tremendous quantity. Wastage of water major problem in agriculture. Every time excess of water is given to the fields. There are many techniques to save or to control wastage of water from agriculture. Different 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

TYPES OF IRRIGATION SYSTEMS
Ditch Irrigation Ditch 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. Siphon tubes are used to move the water from the main ditch to the canals. This system of irrigation was once very popular in the USA, but most have been replaced with modern systems.

Fig. Ditch Irrigation Terraced Irrigation: This is a very labor-intensive 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 water flows down each step, while watering each plot. This allows steep land to be used for planting crops.

Fig. Terraced Irrigation
3

If the system is installed properly you can steadily reduce the loss of water through evaporation and runoff. sprays or guns. Water drops right near the root zone of a plant in a dripping motion. Sprinkler System: This is an irrigation system based on overhead sprinklers. Sprinkler System 4 .Drip Irrigation: This is known as the most water efficient method of irrigation. Fig. You can also have the system buried underground and the sprinklers rise up when water pressure rises. installed on permanent risers. Fig. which is a popular irrigation system for use on golf courses and parks. Drip Irrigation.

But the savings from automatic irrigation systems can go beyond that. Considering this. especially for those who travel. Watering with a hose or with oscillator wastes water. which promotes water conservation. Automatic irrigation systems are convenient. automatic irrigation systems can even save you money and help in water conservation. Rotary System. hence reaching greater distances. Neither method targets plant roots with any significant degree of precision. The irrigation operator has to operate these systems against a series of hurdles like erratic power supply. Water pumps. Fig. for the sprinklers can reach distances of up to 100 feet. If installed and programmed properly. Automatic irrigation systems can be programmed to discharge more precise amounts of water in a targeted area. 5 .Rotary Systems: This method of irrigation is best suited for larger areas. long travel over difficult terrain and fear of animals on the way to pumps. The word "Rotary" is indicative of the mechanical driven sprinklers moving in a circular motion. NEED OF AUTOMATIC IRRIGATION: There are several pains in in operating the irrigation systems in traditional ways. automating the irrigation sector is vital. These hurdles create inefficiency in the pump operations leading to heavy wastage of water and electricity. This system waters a larger area with small amounts of water over a longer period of time. Dead lawn grass and plants need to be replaced. All in all. tanks and farms are distantly located at different places away from the operators house. and that can be expensive. Excess water eroes the soil and damages the civil structures of water tanks. there is a huge loss of energy in many ways.

such as thermostats. design engineers can optimize it. Examples of Embedded Systems: • Avionics. Embedded systems are often mass-produced. usually with very specific requirements.2 EMBEDDED SYSTEMS: An Embedded system IS a special-purpose system in which the computer is completely encapsulated by or dedicated to the device or system it controls. Physically. such as a personal computer. including microwave ovens. Unlike a generalpurpose computer. Embedded system.1. washing machines. • • • • • • Computer peripherals such as routers and printers. Personal digital assistant. peripherals and networks mounted inside a large chassis or enclosure. air conditioners. Medical equipment. or the systems controlling nuclear power plants. an embedded system performs one or a few predefined tasks. Handheld calculators. to large stationary installations like traffic lights. television sets. to very complex with multiple units. and and other security monitoring systems. such as inertial guidance systems. Home automation products. Video game consoles. • • • Cellular telephones and telephone switches. Handheld computers. 6 . flight control hardware/software integrated systems in aircraft and missiles. Engine controllers and antilock brake controllers for automobile. factory controllers. Since the system is dedicated to specific tasks. benefiting from economies of scale. DVD players and recorder. sprinklers. In terms of complexity embedded systems can range from very simple with a single microcontroller chip. embedded systems ranges from portable devices such as digital watches and MP3 players. reducing the size and cost of the product. • Household appliances. Fig.

CHAPTER 2 LITERA TURE REVIEW 7 .

This functions to interrupt the normal operation of an automatic sprinkler or irrigation system upon detection of the set amount of rainfall. 2. They are time controlled. the control system takes over and makes detailed decisions of when to apply water and how much water to apply. In addition to the above there are two more methods they are closed loop and open loop irrigation system. But in an open loop system. The most recent type is the rainfall detector for detecting a set amount of rainfall. normal irrigation technique. More over Volume control system are more advantageous than time control system. it includes a rainwater-collection tray having an opening and mounted so that the portion of the opening exposed to rainwater during a rainstorm is adjustable. Here volume meters are connected. The operator develops a general control strategy. 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. which emits a pulse after delivering a specific amount of water and the controller measures these pulses to keep a check on the supply. Erickson (Centerville. which are manually operated are used widely due to its low cost and high profits. the operator makes the decision on the amount of water that will be applied and when the irrigation event will occur. which are used widely for domestic gardening purpose. these are designed to supply water for a particular period of the day only. The volume of water to be supplied and the rate of flow of water are essential to calculate the time interval. the feedback and control of the system are done continuously. The closed loop type of system requires feedback from one or more sensors. Once the general strategy is defined. The rainwater-collection 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. (Salt Lake City. Morrison. But various methods like the automatic sprinklers. This information is 8 . UT) and Kent C. and it also prevents from the debris to fall in the tray. UT).1 PREVIOUS RELATED WORK: In India. Automatic irrigation techniques are not so prevalent here. In this type of system. Irrigation decisions are made and actions are carried out based on data from sensors. This method is patent to Richard E. When 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.The chapter covers an overview about the previous and future projects related to the system.

programmed into the controller and the water is applied according to the desired schedule. In this method various sensors are placed below the ground level to determine the moisture percentage in the soil. In addition. The major drawback of water evaporation taking place at the surface level irrigation is overcome by this method. 2. 9 . 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. The drawback of open loop systems is their inability to respond automatically to changing conditions in the environment. This will optimize the water consumption further and will make maximum use of all agricultural resource.2 STATE OF ART: The scientists are developing an underground irrigation system. Open loop control systems use either the irrigation duration or a specified applied volume for control purposes. they may require frequent resetting to achieve high levels of irrigation efficiency.

CHAPTER 3 BLOCKS & EXPLANATION 10 .

58 IVl:k. C Power Supply" and for the other devices being 11 .1 BLOCK DIAGRAM Power Slillpply MOlliS1lJRjE SiENSOR LM3. A power supply can be broken down into a series of blocks.!i~} OOFllf]. 3.C power supply which maintains the output voltage constant irrespective of A. A RPS (Regulated Power Supply) is the Power Supply with Rectification.ioUer LiEiD iDlliSiIfI'LAY RjELAY EXPLANATION OF BLOCKS 3. each of which performs a particular function. Filtering and Regulation being done on the AC mains to get a Regulated power supply for Microcontroller interfaced to it. A D. C mains fluctuations or load variations is known as "Regulated D.2 POWER SUPPLY: The power supplies are designed to convert high voltage AC mains electricity to a suitable low voltage supply for electronic circuits and other devices.The main content of the chapter is about the total block diagram and detailed designing of the System.

The LM78XX offer several fixed output voltages making them useful in wide range of applications. You simply connect the positive lead of your unregulated DC power supply (anything from 9VDC to 24VDC) to the Input pin. 1M 7805 .'I • _ 3. Negative voltage regulators are available. such as the 7805 +5V 1A regulator shown on the right.thermal protection'). 12 and 15V) or variable output voltages. connect the negative lead to the Common pin and then when you turn on the power. 12 Fig. Many of the fixed voltage regulators ICs have 3 leads and look like power transistors.For example a 5V regulated power supply system as shown below: + Regulator Vout Load Components of a typical linear power Isupply __ . The LM7805 is simple to use. Here in this project we use a LM7805 IC as ATMEGA 16 works on 5v DC.3 Voltage Regulators: Voltage regulator ICs is available with fixed (typically 5. you get a 5 volt supply from the output pm. 78XX The Bi Linear LM78XX is integrated linear positive regulator with three terminals. Most regulators include some automatic protection from excessive current (. The maximum current they can pass also rates them. mainly for use in dual supplies.overload protection') and overheating (.

24V. It is assumed that a Microcontroller with reasonable software is available for computations and simulations so that many tedious details can be left to the Microcontroller. l2V. lOY. 13 .5A Output Voltage Tolerance of 5% Internal thermal overload protection Internal Short-Circuit Limited Output Voltage 5. The purpose of this project work is to present Control theory that is relevant to the analysis and design of Micro-controller system with an emphasis on basic concept and ideas. because of are now also being used in regulators for individual control loops. 3. The control system design is also carried out up to the stage of implementation in the form of controller programs in assembly language OR in C-Language.0V. l5V. the LM78XX usually results in an effective output impedance improvement of two orders of magnitude. However. 8V. Micro-controllers systems. FEATURES: • • • • • Output Current of 1. Micro-controllers were originally used as components in complicated process-control their small size and low price. In several areas Micro-controllers are now outperforming their analog counterparts and are cheaper as well. l8V. TO-220 & TO-263packages. lower quiescent current. The LM78XX is available in the TO-252.4 MICRO CONTROLLER: In this project work the micro-controller plays a major role.When used as a zener diode/resistor combination replacement. 9V. 6V.

14 . the supply for the ATmega16 is sv. GND: It is pin 31 on the microcontroller. The Port A output buffers have symmetrical drive characteristics with both high sink and source capability. Port A also serves as an 8-bit bidirectional 1/0 port. Port A (PA7-PAO): Port A serves as the analog inputs to the AID Converter. PIN DIAGRAM OF ATMEGA 16 Pin Descriptions: vee: Digital supply voltage. The Port A pins are tri-stated when a reset condition becomes active. Ground should be providing for the perfect functioning of the circuit inside the microcontroller.ATMEGA 16 Microcontroller: Fig. When pins PAO to PA7 are used as inputs and are externally pulled low. The voltage applied here powers the entire circuitry inside the microcontroller. It works on the single supply. Port pins can provide internal pull-up resistors (selected for each bit). if the AID Converter is not used. they will source current if the internal pull-up resistors are activated. even if the clock is not running.

15 . RESET: Reset Input.. PC3 (TMS) and PC2 (TCK) will be activated even if a reset occurs. Shorter pulses are not guaranteed to generate a reset. Port C also serves the functions of the JTAG interface and other special features of the ATmega16. Port B pins that are externally pulled low will source the pull-up resistors are activated. Port D pins that are externally pulled low will source current if the pull-up resistors are activated. As inputs. The Port D output buffers have symmetrical drive characteristics with both high sink and source capability.Port B (PB7-PBO): Port B is an 8-bit bi-directional 1/0 with internal pull-up resistors (selected for each bit). the pull-up resistors on pins PCS (TDI). A low level on this pin for longer than the minimum pulse length will generate reset.PDO): Port D is an 8-bit bi-directional 1/0 port with internal pull-up resistors (selected for each bit). The Port B output buffers have symmetrical drive characteristics with both high sink and source capability. even if the clock is not running. The Port B pins are tri-stated when a reset condition becomes active. Port B also serves the functions of various special features of the ATmega16. As inputs. Port C pins that are externally pulled low will source current if the pull-up resistors are activated. even if the clock is not running. Port C (PC7-PCO): Port C is an 8-bit bi-directional 1/0 port with internal pull-up resistors (selected for each bit). The Port C pins are tri-stated when a reset condition becomes active. As inputs. Port D (PD7 . The Port C output buffers have symmetrical drive characteristics with both high sink and source capability. even if the clock is not running. The Port D pins are tri-stated when a reset condition becomes active. If the JTAG interface is enabled. even if the clock is not running.

it should be connected to VCC through a low-pass filter.Most Single-clock Cycle Execution b) 32 x 8 General Purpose Working Registers c) Fully Static Operation d) Up to 16 MIPS Throughput at 16 MHz e) On-chip 2-cycle Multiplier 3) High Endurance Non-volatile Memory segments a) 16 Kbytes ofIn-System b) 512 Bytes EEPROM c) 1 Kbyte Internal SRAM 16 Self-programmable Flash program memory . It should be externally connected to VCC. XTAL2: Output from the inverting Oscillator amplifier. For A to D conversion we need reference voltage which will be provided by this pin. even if the ADC is not used. FEATURES OF ATmega16: a) High-performance. Avec: AVCC is the supply voltage pin for Port A and the AID Converter.XTALl: Input to the inverting Oscillator amplifier and input to the internal clock operating circuit. If the ADC is used. Low-power Atmel® AVR® 8-bit Microcontroller 2) Advanced RISC Architecture a) 131 Powerful Instructions . AREF: AREF is the analog reference pin. It is provided for the Analog to Digital conversion.

1 Compliant) Interface a) Boundary-scan Capabilities According to the JTAG Standard b) Extensive On-chip Debug Support c) Programming of Flash. Standby e) and Extended Standby 7) I/O and Packages a) 32 Programmable I/O Lines b) 40-pin PDIP. 44-lead TQFP.000 EEPROM e) Data retention: 20 years at 85°C1l00 years at 25°C(l) f) Optional Boot Code Section with Independent Lock Bits g) In-System Programming by On-chip Boot Program h) True Read.000 Flashl100.While. Power-save. and Capture c) Mode d) Real Time Counter with Separate Oscillator e) Four PWM Channels f) 8-channel. lOx. ADC Noise Reduction. Power-down. and Lock Bits through the JTAG Interface 5) Peripheral Features a) Two 8-bit Timer/Counters with Separate Prescalars and Compare Modes b) One 16-bit Timer/Counter with Separate Prescalar. or 200x Byte-oriented Two-wire Serial Interface k) Programmable Serial USART 1) Master/Slave SPI Serial Interface m) Programmable Watchdog Timer with Separate On-chip Oscillator n) On-chip Analog Comparator 6) Special Microcontroller Features a) Power-on Reset and Programmable Brown-out Detection b) Internal Calibrated RC Oscillator c) External and Internal Interrupt Sources d) Six Sleep Modes: Idle. 10-bit ADC g) 8 Single-ended Channels h) 7 Differential Channels in TQFP Package Only i) j) 2 Differential Channels with Programmable Gain at lx. 1149. and 44-pad QFNIMLF 8) Operating Voltages 17 .Write Operation i) Programming Lock for Software Security 4) JTAG (IEEE std.d) WritelErase Cycles: 10. Compare Mode. Fuses. EEPROM.

Some LEDs emit infrared (IR) energy (830 nanometers or longer). These two elements are material called P-type semiconductors placed in direct contact.8 MHz for ATmega16L b) 0.5. Light Emitting Diodes This section is basically meant to show up the status of the project.16 MHz for ATmega16 10) Power Consumption @ 1 MHz. LED or IRED consists of two elements of processed and N-type semiconductors. The LED or IRED has a transparent package.5 LED DISPLAY SECTION: A Light-Emitting Diode (LED) is a semiconductor device that emits visible light when an electric current passes through it.5V .7V . but in most LEDs it is monochromatic. such a device is known as an infrared-emitting diode (IRED).a) 2. but there are important differences. forming a region called the P-N junction. 18 . the LED or IRED resembles most other diode types. the LED or IRED has a large PN-junction area whose shape is tailored to the application Fig.5V for ATmega16L b) 4. occurring at a single wavelength. allowing visible or IR energy to pass through.1 rnA b) Idle Mode: 0. The light is not particularly bright. In this respect.5. Also. and 25°C for ATmega16L a) Active: 1. The output from an LED can range from red (at a wavelength of approximately 700 nanometers) to blue-violet (about 400 nanometers).5V for ATmega16 9) Speed Grades a) 0. This project makes use of Light Emitting Devices to display / prompt for necessary information.35 rnA c) Power-down Mode: < 1 ~A 3. 3V.

usually.Benefits of LEDs: Low power requirement: Most types can be operated with battery power supplies. an LED or IRED can function for decades. Their popularity in circuit design largely stems from the fact that characteristics of the final op-amp circuits with negative feedback (such as their gain) are set by external components with little dependence on temperature manufacturing variations in the op-amp itself.6 Operational Amplifiers: An operational amplifier ("op-amp") is a DC-coupled high-gain electronic voltage amplifier with a differential input and. however some integrated or hybrid operational amplifiers with special performance specifications may cost over $100 US in small quantities. with minimal heat production. nonlinear and frequency-dependent circuits. and scientific devices. The op-amp is one type of differential amplifier. a single-ended output. the isolation amplifier amplifier. Long life: When properly installed. Op-amps are among the most widely used electronic devices today. but with two outputs). High efficiency: Most of the power supplied to an LED or IRED is converted into radiation in the desired form. Op-amps may be packaged as components. Other types of differential changes and amplifier include the fully differential amplifier (similar to the op-amp. the instrumentation amplifier (usually built from three op-amps). being used in a vast array of consumer. They had their origins in analog computers where they were used in many linear. Many standard IC op-amps cost only a few cents in moderate production volume. An op-amp produces an output voltage that is typically hundreds of thousands times larger than the voltage difference between its input terminals. but with tolerance to common-mode voltages that 19 (similar to the instrumentation . or used as elements of more complex integrated circuits. 3. Operational amplifiers are important building blocks for a wide range of electronic circuits. industrial.

the LM158 series can be directly operated off of the standard +5V power supply voltage which is used in digital systems and will easily provide the required interface electronics without requiring the additional ± 15V power supplies. high gain. internally frequency compensated operational amplifiers which were designed specifically to operate from a single power supply over a wide range of voltages. E! SOP/ a DIP IPIN FUINCTIION INl H IN!2 H y. 3.would destroy an ordinary op-amp). Op Amp Pin Diagram Application areas include transducer amplifiers. 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. 20 . LM 358 . de gam blocks and all the conventional op amp circuits which now can be more easily implemented in single power supply systems. For example. and negative feedback amplifier (usually built from one or more op-amps and a resistive feedback network).- Fig.7 MOISTURE SENSORS: A soil moisture sensor is a water conservation accessory for conventional automatic irrigation systems with the potential for eliminating excessive irrigation cycles.OPERATIONAL AMPLIFIER The LM158 series consists of two independent.

the switch is operated by an electromagnet to open or close one or many sets of contacts. In the original form. biology and more. horticulture. One common type of soil moisture sensor is in commercial use & a frequency domain sensors such as a capacitance sensor. 21 . RELAY: Relay is an electrically operated switch. The coil current can be on or off so relays have two switch positions and they are double throw (changeover) switches.8 MOTOR DRIVING CIRCUIT: Motor driving circuit is a relay is an electrical switch that opens and closes under the control of another electrical circuit. utilize the modulator properties of water for neutron. Another sensor the neutron moister gauge.Fig. By simply inserting the soil moisture sensors in the soil to be tested and volumetric water content of soil is reported in percent. environmental science and agricultural science. Moisture Sensor Soil moisture sensors measure the water that contains in the soil. Current flowing through the coil of the relay creates a magnetic field which attracts a lever and changes the switch contacts. A soil moisture probe is made up of multiple soil moisture sensors. 3. Soil moisture sensors are used to conduct experiments in ecology.

NC and NO: COM = Common. typically 30mA for a 12V relay. To prevent damage you must connect a protection diode across the relay coil. Most relays are designed for PCB mounting but you can solder wires directly to the pins providing you take care to avoid melting the plastic case of the relay. Most ICs (chips) cannot provide this current and a transistor is usually used to amplify the small IC current to the larger value required for the relay coil. making the relay DPDT.Relays allow one circuit to switch a second circuit which can be completely separate from the first. Relays are usually SPDT or DPDT but they can have many more sets of switch contacts. 22 . the link is magnetic and mechanical. This lever moves the switch contacts. There is no electrical connection inside the relay between the two circuits. but it can be as much as 100mA for relays designed to operate from lower voltages. The animated picture shows a working relay with its coil and switch contacts. The coil of a relay passes a relatively large current. For example a low voltage battery circuit can use a relay to switch a 230V AC mains circuit. For further information about switch contacts and the terms used to describe them please see the page on switches. for example relays with 4 sets of changeover contacts are readily available. There is one set of contacts (SPDT) in the foreground and another behind them. Connecting a Relay The relay's switch connections are usually labeled as COM. The maximum output current for the popular 555 timer IC is 200mA so these devices can supply relay coils directly without amplification. always connect to this. Relay coils produce brief high voltage 'spikes' when they are switched off and this can destroy transistors and ICs in the circuit. it is the moving part of the switch. You can see a lever on the left being attracted by magnetism when the coil is switched on. Fig.

You should find this information in the supplier's catalogue. Switch contact arrangement (SPDT. Choosing a relay: You need to consider several features when choosing a relay: a) Physical size and pin arrangement If you are choosing a relay for an existing PCB you will need to ensure that its dimensions and pin arrangement are suitable. You will need to check the voltage and current ratings. The diagram shows how a signal diode (e. COM is connected to this when the relay coil is on. Note that the diode is connected 'backwards' so that it will normally not conduct. Some relays operate perfectly well with a supply voltage which is a little lower than their rated value. c) Coil resistance the circuit must be able to supply the current required by the relay coil. Connect to COM and NC if you want the switched circuit to be on when the relay coil is off. Many relays have a coil rated for a 12V supply but 5V and 24V relays are also readily available.NC = Normally Closed. IN4148) is connected across the relay coil to provide this protection. NO = Normally Open. b) Coil voltage the relay's coil voltage rating and resistance must suit the circuit powering the relay coil. COM is connected to this when the relay coil is off. You can use Ohm's law to calculate the current: supply voltage Relay coil current coil resistance Switch ratings (voltage and current) the relay's switch contacts must be suitable for the circuit they are to control. for example: "5A at 24V DC or 125V AC". Conduction only occurs when the 23 . Connect to COM and NO if you want the switched circuit to be on when the relay coil is on.g. Note that the voltage rating is usually higher for AC. DPDT etc). For further information please see the page on switches Protection diodes for relays: Transistors and ICs (chips) must be protected from the brief high voltage 'spike' produced when the relay coil is switched off. Most relays are SPDT or DPDT which are often described as "single pole changeover" (SPCO) or "double pole changeover" (DPCO).

Like relays. transistors can only switch DC. transistors can switch many times per second. "Y Relays can switch many contacts at once. so a low power transistor may be needed to switch the current for the relay's coil. "Y Relays cannot switch rapidly (except reed relays). transistors cannot. Without the diode no current could flow and the coil would produce a damaging high voltage 'spike' in its attempt to keep the current flowing. However transistors cannot switch AC or high voltages (such as mains electricity) and they are not usually a good choice for switching large currents (> SA). "Y Relays require more current than many chips can provide. "Y Relays can switch high voltages. "Y Relays are a better choice for switching large currents (> SA). at this moment current tries to continue flowing through the coil and it is harmlessly diverted through the diode. transistors can be used as an electrically operated switch. Relays and transistors compared. "Y Relays use more power due to the current flowing through their coil.relay coil is switched off. For switching small DC currents « IA) at low voltage they are usually a better choice than a relay. 24 . Disadvantages of relays: "Y Relays are bulkier than transistors for switching small currents. 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 relay's coil! The main advantages and disadvantages of relays are listed below: Advantages of relays: "Y Relays can switch AC and DC.

CHAPTER 4 IMPLEMENT ATION 25 .

38 35 ~ C 0 ill 33p PC7 PC6 PC6 PC4 PC3 PC2 PCl PCO PD7 +5V R1 10K " DEV1a R6 10K PROBES TO SOIL DEV4b 7 1+=+ 1+=7 :::. 26 . R2 10K GND R5 10K ATMega16 2N3904 1 PBG PM PAl PA2 PA3 PM PA5 PA6 PA7 <10 S9 S8 3. Circuit Diagram of Automatic Irrigation System using ATMEGA 16 Microcontroller.+5V R1 10K -r R6 10K DEV1a PROBES TO SOIL DEV4b 7 1+=+ 1+=7 IB :::. R2 10K GND R5 10K Fig.

then RED LED glows indicating us that the water level is low and simultaneously the voltage at the OP AMP is Open circuited. As soon as the water is adequate in the field. and touches the sensors. the motor is going to be in the ON Condition. There by gives the information to the PORT A of ATMEGA 16 Microcontroller According to the program code written in the micro controller using AVR Studio 4. Thus by reaching this stage the motor switches to OFF condition as the sensors sends the signals that all the sensing elements are covered with the water and there is no need for the extra water to flow to the fields.4. If the water is adequate.0. When ever any two or more sensors founds that the water level in the farms are below the sensors fixed level. the motor keeps still running till all the sensors get enough amount of water as such the sensors are short circuited and there is no difference in the voltage among the positive and negative terminals of the sensors. 27 .1 WORKING OF AUTOMATIC IRRIGATION SYSTEM: 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. Motor in the ON condition pumps the water in to the fields. When two or more sensors senses the decrease in the water level or insufficiency in the moisture level of the soil. then the YELLOW LED is indicated to be ON and Pin PBO is set in high position such that the obtained voltage is amplified by the transistor 2N3904 which is an NPN transistor which helps in the amplification of the signal and fed to the RELAY As soon as the coil in the relay is energized. It is indicated by the GREEN LED in the circuit. Thus automation can be obtained without the human intervention.

It can also be used to cut wires into shorter length before being used. Soldering irons are most often used for installation. repairs. Highvolume production lines use other soldering methods. Another heating method includes combustion of a suitable gas. 28 . Side-Cutting Plier: A 4-inch side cutting plier will come in handy as one of the electronic tools when one need to trim off excess component leads on the printed circuit board. A soldering iron is composed of a heated metal tip and an insulated handle. or through an external flame. which can either be delivered through a tank mounted on the iron (flameless).2 COMPONENTS MOUNTING ON PCB TOOLS USED: Soldering iron A soldering iron is a hand tool most commonly used in soldering. Some wire stripper or wire cutter has a measurement engraved on it to indicate the length that will be stripped. Tweezer Small tweezer is used to hold small components especially when doing soldering and de-soldering of surface mount components. Heating is often achieved electrically. and limited production work. Wire 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. It supplies heat to melt the solder so that it can flow into the joint between two workpieces. Less common uses include pyrography (burning designs into wood) and welding.4. by passing an electric current (supplied through an electrical cord or battery cables) through the resistive material of a heating element.

atme1. WIN AVR: WinAVR is ATMEL's native compiler comes with a suite of executable. 29 .net 2.sourceforge. It includes the GNU GCC compiler for C and C++.AVR STUDIO: AVR Studio 4 is a professional Integrated Development Environment (IDE) for This writing and debugging AVR applications in Windows 9x/NT 12000/XP environments. U seful links 1.COMPONENT MOUNTING Now mount all the components on the PCBs using the above mentioned tools. Atmel Corporation: http://www.avrfreaks. 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. open source software development tools for the Atmel AVR series of RISC microprocessors hosted on the Windows platform. c) Click on the "New Project" button.3 SOFTW ARES USED 1. AVR Freaks: http://www.0 : 1. 4. Execute the AVR Studio 4 Integrated Development Environment (IDE): a) Open AVR Studio 4 IDE.4 USAGE OF AVR STUDIO 4.net/ and run WinA VR_instal1. choose the Atmel AVR Assembler as the project type. b) When IDE opens. Download WinA VR from: http://winavr. 4. d) In the next dialog box.exe on your computer.com 2. tutorial assumes that you have installed AVR Studio 4 on your computer.

e) Type in a project name and the initial file name f) Click on the "Next" button g) Choose "AVR Simulator" for the Debug Platform and then scroll down the right. 4. b) When you have completed the program save the program. To start the simulator you may choose "Start Debugging" from The "Debug Menu" or you may click on the arrow button 4. You should then see the IDE 2.Window to choose the ATmega16 AVR processor.5 CODING: Program code can be written in C language or in an Assembly Language. h) Click on the "Finish" button. You may do this by selecting "Build" from the "Build Menu" or by striking the [F7] key directly from your key board a) Continue assembling and correcting errors until the program assembles without error (Note the green dot in the lower window and the comment that states: "Assembly complete. Assembling the program: Assemble your program. Simulating a program: Simulate the program. o warnings") you are ready to simulate. This is done automatically by the IDE and helps you to make corrections as you go. 0 Errors. 3. 30 . Typing in a program: a) Type in the program. Note the color-coded text. Select in the drop down list.

h> void maint) { DDRA=OxOO. if((PINA & ObOOOOI 1OO)==ObOOOO 1 100) PORTB=ObOOO 1000 1. if((PINA & ObOOOIOIOO)==ObOOOIOIOO) PORTB=ObOOO 1000 1. if((PINA & ObOOOI 1OOO)==ObOOO 1 1000) PORTB=ObOOO 1000 1. if((PINA & ObOOOOIOIO)==ObOOOOIOIO) PORTB=ObOOO 1000 1. 31 . if((PINA & ObOOOIIIOO)==ObOOOIIIOO) PORTB=ObOOO 1000 1.C Code for Automatic Irrigation System using Microcontroller: #inc1ude<avrlio. if((PINA & ObOOOOIIIO)==ObOOOOIIIO) PORTB=ObOOO 1000 1. DDRB=Oxff. if((PINA & ObOOOIOOIO)==ObOOOIOOIO) PORTB=ObOOO 1000 1. while(l) { if((PINA & ObOOOOOI1O)==ObOOOOO 1 10) PORTB=ObOOO 1000 1.

if((PINA & ObOOOI 1010)==ObOOOI 1010) PORTB=ObOOO 1000 1. if((PINA & ObOOOIIIIO)==ObOOOOOOOO) PORTB=ObO 1000000. if((PINA & ObOOOIOI 10)==ObOOOI01 10) PORTB=ObOOO 1000 1. if((PINA & ObOOOIIIIO)==ObOOOIIIIO) PORTB=ObOO 10000 1. } } 32 .

CHAPTERS CONCLUSION & FUTURE SCOPE 33 .

Thus. Due 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 zone constant to some extend. The system supplies water only when the humidity in the soil goes below the reference. maintain and managed system can be implemented in large fields like public gardens.1 RESULT The system provides with several benefits and can operate with less manpower. the system is efficient and compatible to the changing environment. Here 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 ON. Properly installed. In present days especially farmers are facing major problems in watering their agriculture fields. Electronic Gardner is a prototype for an automatic irrigation system that can be used in wide landscapes. which makes them to stop doing other activities. 34 .5. Even after then they need to wait until the field is properly watered. lawns. golf fields etc. it's because they have no proper idea about when the power is available so that they can pump water.

the irrigator is available to perform other tasks un-interrupted.5. Simplest Method: Start by drawing a map of your garden and yard. Retaining fertilizer on farm has both economic and environmental benefits. Reduced run-off of water and nutrients: Automation can help keep fertilizer on farm by effectively reducing run-off from the property. A timer delay as per environment can be added to the system for automatic watering. Improved Life Style The irrigator is not required to constantly check the progress of water down the base being irrigated. water penetrates deeply into the soil to get well down into the root zone. 3. because the flow is continuous. Improves growth: Smaller amounts of water applied over a longer amount of time provide ideal growing conditions. 35 . The irrigator is able to be away from the property. 4. relax with the family and sleep through the night. and prevents soil erosion and nutrient runoff. 5. Saves time: Setting and moving sprinklers are not required. Reduced Labour: As the irrigator is not required to constantly monitor the progress of irrigation. showing the location of plantings. Measure the distances required for lengths of hose or plastic tubing to reach the desired areas. 6. 7. Also. 2. Drip irrigation extends watering times for plants.2 ADVANTAGES 1. Adaptable: A drip irrigation system can be modified easily to adjust to the changing needs of a garden or lawn.

More accurate cut-off: Automation of the irrigation system allows cut-off of water at the appropriate point in the bay. Channels should be fenced to protect the automatic units from stock damage. 3. 36 . Reliability: Sometimes 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 excess run off when failures occur 2. 5. Water.3 DIS-ADVANTAGES: 1. Increased Channel Maintenance: There is a need to increase maintenance of channels and equipments to ensure the system works correctly. Soil. This is usually more accurate than manual checking because mistakes can occur if the operator is too late or too early in making a change of water flow. not when it suits the irrigator 9. Slopes in the fields: These systems require careful study of all the relevant factors like land topography.8. More timely irrigation: Irrigators with automation are more inclined to irrigate when the plants need water. Crop and agro-climatic conditions and suitability of irrigation system and its components Due to rust of sensors we cannot predict the water level after a period of time.

Irrigation in gardens. Picsiculture.5. Irrigation in fields. 37 .4 APPLICATIONS 1. 2. parks and golf fields 3 . Very efficient for paddy (Rice) fields. 4.

a number of scientist are investing their time to perfect the system we can implement this module in golf fields and public gardens. Saves time. Protects your financial investment. The increasing interest in this area of research may bring about more and more consumer efficient system. Electronic Gardner is a prototype for an automatic irrigation system that can be used in wide landscapes. 38 . The changing climatic condition and global warming issues prevailing throughout the world can be overcome only through this system. Water scarcity the major problem is well handled by the system.5 FUTURE SCOPE With a numerous fields of application and various advantages of the system has made it one of the major option available for the farmers. Saves water. The automatic irrigation system will be every farmer's choice in a decade or so. helps your house project that fresh. with lush growth and healthy plants. 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. But with the awareness spreading all over the globe the system is earning acceptance and so.5. The improper advertising was the sole reason for the late adoption and acquaintance of the system that took place in the late eighties. An attractively landscaped exterior. 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.

3.com www.net www. Programming & Applications -Ramesh S.com www.6 REFERENCES 1. Electronic Components -D.com 39 . www. Gaonkar. Prasad. Mazidi.atme1. Micro processor Architecture. 6. 5.5. 4.google.wikipedia.avrfreaks. 8051-mirocontrolar and embedded system. V. -Mohd. 2. 7.