28 1 656KB
CHAPTER 1
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 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 & 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
Drip Irrigation:
3
This is known as the most water efficient method of irrigation. Water drops right near the root zone 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. Sprinkler System: This is an irrigation system based on overhead sprinklers, sprays or guns, installed on permanent risers. You 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
Rotary Systems:
4
This method of irrigation is best suited for larger areas, for the sprinklers can reach distances of up to 100 feet. The word “Rotary” 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. Water 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. Excess water eroes the soil and damages the civil structures of water tanks. All in all, there is a huge loss of energy in many ways. Considering this, automating the irrigation sector is vital. 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 in water conservation. Dead lawn grass and plants need to be replaced, and that can be expensive. But the savings from automatic irrigation systems can go beyond that. Watering with a hose or with oscillator wastes water. Neither method targets plant roots with any significant degree of precision. Automatic irrigation systems can be programmed to discharge more precise amounts of water in a targeted area, which promotes water conservation. 1.2 EMBEDDED SYSTEMS: 5
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. Unlike a generalpurpose computer, such as a personal computer, an embedded system performs one or a few predefined tasks, usually with very specific requirements. Since the system is dedicated to specific tasks, design engineers can optimize it, reducing the size and cost of the product. Embedded systems are often mass-produced, benefiting from economies of scale. Physically, embedded systems ranges from portable devices such as digital watches and MP3 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. Examples of Embedded Systems:
Avionics, such as inertial guidance systems, flight control hardware/software and other integrated systems in aircraft and missiles.
Cellular telephones and telephone switches.
Engine controllers and antilock brake controllers for automobile.
Home automation products, such as thermostats, air conditioners, sprinklers, and security monitoring systems.
Household appliances, including microwave ovens, washing machines, television sets, DVD players and recorder.
Computer peripherals such as routers and printers.
Handheld calculators.
Handheld computers.
Medical equipment.
Personal digital assistant.
Videogame consoles.
Fig. Embedded system.
6
CHAPTER 2 LITERATURE REVIEW
7
The chapter covers an overview about the previous and future projects related to the system. 2.1 PREVIOUS RELATED WORK: In India, normal irrigation technique, which are manually operated are used widely due to its low cost and high profits. Automatic irrigation techniques are not so prevalent here. But 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. More over Volume 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. Here 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 rainwater-collection tray having an opening and mounted so that the portion of the opening exposed to rainwater during a rainstorm is adjustable. 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, and it also prevents from the debris to fall in the tray. 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. This method is patent to Richard E. Morrison, (Salt Lake City, UT) and Kent C. Erickson (Centerville, UT). 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. But 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
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. 2.2 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 optimize the water consumption further and will make maximum use of all agricultural resource.
9
CHAPTER 3
BLOCKS & EXPLANATION
10
The main content of the chapter is about the total block diagram and detailed designing of the System. 3.1 BLOCK DIAGRAM
EXPLANATION OF BLOCKS 3.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. A RPS (Regulated Power Supply) is the Power Supply with Rectification, Filtering and Regulation being done on the AC mains to get a Regulated power supply for Microcontroller and for the other devices being interfaced to it. A power supply can be broken down into a series of blocks, each of which performs a particular function. A D.C power supply which maintains the output voltage constant irrespective of A.C mains fluctuations or load variations is known as “Regulated D.C Power Supply”
11
For example a 5V regulated power supply system as shown below:
3.3 Voltage Regulators: Voltage regulator ICs is available with fixed (typically 5, 12 and 15V) or variable output voltages. The maximum 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 excessive current ('overload protection')
and
overheating ('thermal protection'). Many of the fixed voltage regulators ICs have 3 leads and look like power transistors, such as the 7805 +5V 1A regulator shown on the right. The LM7805 is simple to use. You simply connect the positive lead of your unregulated DC power supply (anything from
Fig. LM 7805
9VDC to 24VDC) to the Input pin, connect the negative lead to the Common pin and then when you turn on the power, you get a 5 volt supply from the output pin. Here in this project we use a LM7805 IC as ATMEGA 16 works on 5v DC . 78XX The Bi Linear LM78XX is integrated linear positive regulator with three terminals. The LM78XX offer several fixed output voltages making them useful in wide range of applications. When used as a zener diode/resistor combination replacement, the LM78XX usually results in 12
an effective output impedance improvement of two orders of magnitude, lower quiescent current. The LM78XX is available in the TO-252, TO-220 & TO-263packages, FEATURES:
Output Current of 1.5A
Output Voltage Tolerance of 5%
Internal thermal overload protection
Internal Short-Circuit Limited
Output Voltage 5.0V, 6V, 8V, 9V, 10V, 12V, 15V, 18V, 24V.
3.4 MICRO CONTROLLER: In this project work the micro-controller plays a major role. Micro-controllers were originally used as components in complicated process-control systems. However, because of their small size and low price, Micro-controllers are now also being used in regulators for individual control loops. In several areas Micro-controllers are now outperforming their analog counterparts and are cheaper as well. 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. 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. 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.
13
ATMEGA 16 Microcontroller:
Fig. PIN DIAGRAM OF ATMEGA 16 Pin Descriptions: VCC: Digital supply voltage, the supply for the ATmega16 is 5V. It works on the single supply. The voltage applied here powers the entire circuitry inside the microcontroller.
GND: It is pin 31 on the microcontroller. Ground should be providing for the perfect functioning of the circuit inside the microcontroller.
Port A (PA7-PA0): Port A serves as the analog inputs to the A/D Converter. Port A also serves as an 8-bit bidirectional I/O port, if the A/D Converter is not used. Port pins can provide internal pull-up resistors (selected for each bit). The Port A output buffers have symmetrical drive characteristics with both high sink and source capability. When pins PA0 to PA7 are used as inputs and are externally pulled low, they will source current if the internal pull-up resistors are activated. The Port A pins are tri-stated when a reset condition becomes active, even if the clock is not running. 14
Port B (PB7-PB0): Port B is an 8-bit bi-directional I/O 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. As inputs, Port B pins that are externally pulled low will source the pull-up resistors are activated. The Port B pins are tri-stated when a reset condition becomes active, even if the clock is not running. Port B also serves the functions of various special features of the ATmega16.
Port C (PC7-PC0): Port C is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). The Port C output buffers have symmetrical drive characteristics with both high sink and source capability. As inputs, Port C pins that are externally pulled low will source current if the pull-up resistors are activated. The Port C pins are tri-stated when a reset condition becomes active, even if the clock is not running. If the JTAG interface is enabled, the pull-up resistors on pins PC5 (TDI), PC3 (TMS) and PC2 (TCK) will be activated even if a reset occurs. Port C also serves the functions of the JTAG interface and other special features of the ATmega16.
Port D (PD7..PD0): Port D is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). The Port D output buffers have symmetrical drive characteristics with both high sink and source capability. As inputs, Port D pins that are externally pulled low will source current if the pull-up resistors are activated. The Port D pins are tri-stated when a reset condition becomes active, even if the clock is not running.
RESET: Reset Input. A low level on this pin for longer than the minimum pulse length will generate reset, even if the clock is not running. Shorter pulses are not guaranteed to generate a reset.
15
XTAL1: Input to the inverting Oscillator amplifier and input to the internal clock operating circuit.
XTAL2: Output from the inverting Oscillator amplifier.
AVCC: AVCC is the supply voltage pin for Port A and the A/D Converter. It should be externally connected to VCC, even if the ADC is not used. If the ADC is used, it should be connected to VCC through a low-pass filter.
AREF: AREF is the analog reference pin. It is provided for the Analog to Digital conversion. For A to D conversion we need reference voltage which will be provided by this pin.
FEATURES OF ATmega16: a) High-performance, Low-power Atmel® AVR® 8-bit Microcontroller 2) Advanced RISC Architecture a) 131 Powerful Instructions – 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 of In-System Self-programmable Flash program memory b) 512 Bytes EEPROM c) 1 Kbyte Internal SRAM 16
d) Write/Erase Cycles: 10,000 Flash/100,000 EEPROM e) Data retention: 20 years at 85°C/100 years at 25°C(1) f) Optional Boot Code Section with Independent Lock Bits g) In-System Programming by On-chip Boot Program h) True Read-While-Write Operation i) Programming Lock for Software Security 4) JTAG (IEEE std. 1149.1 Compliant) Interface a) Boundary-scan Capabilities According to the JTAG Standard b) Extensive On-chip Debug Support c) Programming of Flash, EEPROM, Fuses, 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, Compare Mode, and Capture c) Mode d) Real Time Counter with Separate Oscillator e) Four PWM Channels f) 8-channel, 10-bit ADC g) 8 Single-ended Channels h) 7 Differential Channels in TQFP Package Only i) 2 Differential Channels with Programmable Gain at 1x, 10x, or 200x j) Byte-oriented Two-wire Serial Interface k) Programmable Serial USART l) 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, ADC Noise Reduction, Power-save, Power-down, Standby e) and Extended Standby 7) I/O and Packages a) 32 Programmable I/O Lines b) 40-pin PDIP, 44-lead TQFP, and 44-pad QFN/MLF 8) Operating Voltages 17
a) 2.7V - 5.5V for ATmega16L b) 4.5V - 5.5V for ATmega16 9) Speed Grades a) 0 - 8 MHz for ATmega16L b) 0 - 16 MHz for ATmega16 10) Power Consumption @ 1 MHz, 3V, and 25°C for ATmega16L a) Active: 1.1 mA b) Idle Mode: 0.35 mA c) Power-down Mode: < 1 μA
3.5 LED DISPLAY SECTION: A Light-Emitting Diode (LED) is a semiconductor device that emits visible light when an electric current passes through it. The light is not particularly bright, but in most LEDs it is monochromatic, occurring at a single wavelength. The output from an LED can range from red (at a wavelength of approximately 700 nanometers) to blue-violet (about 400 nanometers). Some LEDs emit infrared (IR) energy (830 nanometers or longer); such a device is known as an infrared-emitting diode (IRED). LED or IRED consists of two elements of processed material called P-type semiconductors and N-type semiconductors. These two elements are placed in direct contact, forming a region called the P-N junction. In this respect, the LED or IRED resembles most other diode types, but there are important differences. The LED or IRED has a transparent package, allowing visible or IR energy to pass through. Also, the LED or IRED has a large PN-junction area whose shape is tailored to the application
. Fig. Light Emitting Diodes This section is basically meant to show up the status of the project. This project makes use of Light Emitting Devices to display / prompt for necessary information. 18
Benefits of LEDs: Low power requirement: Most types can be operated with battery power supplies. High efficiency: Most of the power supplied to an LED or IRED is converted into radiation in the desired form, with minimal heat production. Long life: When properly installed, an LED or IRED can function for decades. 3.6 Operational Amplifiers: An operational amplifier ("op-amp") is a DC-coupled high-gain electronic voltage amplifier with a differential input and, usually, a single-ended output. An op-amp 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 computers where they were used in many linear, nonlinear and frequency-dependent circuits. 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 changes and manufacturing variations in the op-amp itself. Op-amps are among the most widely used electronic devices today, being used in a vast array of consumer, industrial, and scientific devices. Many standard IC op-amps cost only a few cents in moderate production volume; however some integrated or hybrid operational amplifiers with special performance specifications may cost over $100 US in small quantities. Op-amps may be packaged as components, or used as elements of more complex integrated circuits. The op-amp is one type of differential amplifier. Other types of differential amplifier include the fully differential amplifier (similar to the op-amp, but with two outputs), the instrumentation amplifier (usually built from three op-amps), the isolation amplifier (similar to the instrumentation amplifier, but with tolerance to common-mode voltages that 19
would destroy an ordinary op-amp), and negative feedback amplifier (usually built from one or more op-amps and a resistive feedback network). LM 358 – OPERATIONAL AMPLIFIER The LM158 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.
Fig. Op Amp Pin Diagram Application 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. For example, 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. 3.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.
20
Fig. Moisture Sensor Soil moisture sensors measure the water that contains in the soil. A soil moisture probe is made up of multiple soil moisture sensors. One common type of soil moisture sensor is in commercial use & a frequency domain sensors such as a capacitance sensor. Another sensor the neutron moister gauge, utilize the modulator properties of water for neutron.By simply inserting the soil moisture sensors in the soil to be tested and volumetric water content of soil is reported in percent. Soil moisture sensors are used to conduct experiments in ecology, environmental science and agricultural science, horticulture, biology and more. 3.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. In the original form, the switch is operated by an electromagnet to open or close one or many sets of contacts. RELAY: Relay is an electrically operated switch. Current 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
Relays allow one circuit to switch a second circuit which can be completely separate from the first. For example a low voltage battery circuit can use a relay to switch a 230V AC mains circuit. There is no electrical connection inside the relay between the two circuits; the link is magnetic and mechanical. The coil of a relay passes a relatively large current, typically 30mA for a 12V relay, but it can be as much as 100mA for relays designed to operate from lower voltages. 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. The maximum output current for the popular 555 timer IC is 200mA so these devices can supply relay coils directly without amplification. Relays are usually SPDT or DPDT but they can have many more sets of switch contacts, for example relays with 4 sets of changeover contacts are readily available. For further information about switch contacts and the terms used to describe them please see the page on switches. 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. Relay coils produce brief high voltage 'spikes' when they are switched off and this can destroy transistors and ICs in the circuit. To prevent damage you must connect a protection diode across the relay coil. The animated picture shows a working relay with its coil and switch contacts. You 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 (SPDT) in the foreground and another behind them, making the relay DPDT.
Fig. Connecting a Relay The relay's switch connections are usually labeled as COM, NC and NO: COM = Common, always connect to this, it is the moving part of the switch. 22
NC = Normally Closed, COM is connected to this when the relay coil is off. NO = Normally Open, COM is connected to this when the relay coil is on. Connect to COM and NO if you want the switched circuit to be on when the relay coil is on. Connect to COM and NC if you want the switched circuit to be on when the relay coil is off. 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 should find this information in the supplier's catalogue. b) Coil voltage the relay's coil voltage rating and resistance must suit the circuit powering the relay coil. Many relays have a coil rated for a 12V supply but 5V and 24V relays are also readily available. 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. 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. You will need to check the voltage and current ratings. Note that the voltage rating is usually higher for AC, for example: "5A at 24V DC or 125V AC". Switch contact arrangement (SPDT, DPDT etc). Most relays are SPDT or DPDT which are often described as "single pole changeover" (SPCO) or "double pole changeover" (DPCO). 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. The diagram shows how a signal diode (e.g. 1N4148) is connected across the relay coil to provide this protection. Note that the diode is connected 'backwards' so that it will normally not conduct. Conduction only occurs when the relay coil is switched off, at this moment current tries to continue flowing through the coil and 23
it is harmlessly diverted through the diode. 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. Relays and transistors compared. Like relays, transistors can be used as an electrically operated switch. For switching small DC currents (< 1A) at low voltage they are usually a better choice than a relay. However transistors cannot switch AC or high voltages (such as mains electricity) and they are not usually a good choice for switching large currents (> 5A). 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:
Relays can switch AC and DC, transistors can only switch DC. Relays can switch high voltages, transistors cannot. Relays are a better choice for switching large currents (> 5A). Relays can switch many contacts at once. Disadvantages of relays:
Relays are bulkier than transistors for switching small currents. Relays cannot switch rapidly (except reed relays), transistors can switch many times per second. Relays use more power due to the current flowing through their coil. Relays require more current than many chips can provide, so a low power transistor may be needed to switch the current for the relay's coil.
24
CHAPTER 4
IMPLEMENTATION
25
Fig. Circuit Diagram of Automatic Irrigation System using ATMEGA 16 Microcontroller. 4.1 WORKING OF AUTOMATIC IRRIGATION SYSTEM: 26
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 GREEN LED in the circuit. When ever any two or more sensors founds that the water level in the farms are below the sensors fixed level, then RED LED glows indicating us that the water level is low and simultaneously the voltage at the OP AMP is Open circuited, 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.0, 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 PB0 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, the motor is going to be in the ON Condition. Motor in the ON condition pumps the water in to the fields. As soon as the water is adequate in the field, and touches the sensors, 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. 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. Thus automation can be obtained without the human intervention.
4.2 COMPONENTS MOUNTING ON PCB 27
TOOLS USED: Soldering 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 joint between two workpieces. A soldering iron is composed of a heated metal tip
and
an insulated handle. Heating 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. Another 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. Less common uses include pyrography (burning designs into wood) and welding. Soldering irons are most often used for installation, repairs, and limited production work. Highvolume production lines use other soldering methods. 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. Some wire stripper or wire cutter has a measurement engraved on it to indicate the length that will be stripped. 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. It can also be used to cut wires into shorter length before being used. Tweezer Small tweezer is used to hold small components especially when doing soldering and de-soldering of surface mount components.
COMPONENT MOUNTING Now mount all the components on the PCBs using the above mentioned tools. 28
4.3 SOFTWARES USED 1.AVR STUDIO: AVR Studio 4 is a professional Integrated Development Environment (IDE) for writing and debugging AVR applications in Windows 9x/NT/2000/XP environments. This tutorial assumes that you have installed AVR Studio 4 on your computer. Useful links 1. Atmel Corporation: http://www.atmel.com 2. AVR Freaks: http://www.avrfreaks.net 2. WIN AVR: WinAVR is ATMEL’s native compiler comes with a suite of executable, open source software development tools for the Atmel AVR series of RISC microprocessors hosted on the Windows
platform.
It
includes
the
GNU
GCC
compiler
for
C
and
C++.
Download WinAVR from: http://winavr.sourceforge.net/ and run WinAVR_install.exe on your computer.
4.4 USAGE OF AVR STUDIO 4.0 : 1. Execute the AVR Studio 4 Integrated Development Environment (IDE): a) Open AVR Studio 4 IDE. b) When IDE opens, you will see the programming and simulator environment as well as a dialog c) d) e) f) g)
box requesting to start a new project or opening a saved project. Click on the “New Project” button. In the next dialog box, choose the Atmel AVR Assembler as the project type. Type in a project name and the initial file name Click on the “Next” button Choose “AVR Simulator” for the Debug Platform and then scroll down the right- Window to
choose the ATmega16 AVR processor. Select in the drop down list. h) Click on the “Finish” button. You should then see the IDE
29
2. Typing in a program: a) Type in the program. Note the color-coded text. This is done automatically by the IDE and helps you to make corrections as you go. b) When you have completed the program save the program.
3. Assembling the program: Assemble your program. 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, 0 Errors, 0 warnings”) you are ready to simulate.
4. Simulating a program: Simulate the program. To start the simulator you may choose “Start Debugging” from The “Debug Menu” or you may click on the arrow button
4.5 CODING: Program code can be written in C language or in an Assembly Language.
C Code for Automatic Irrigation System using Microcontroller: #include void main() { DDRA=0x00; 30
DDRB=0xff; while(1) { if((PINA & 0b00000110)==0b00000110) PORTB=0b00010001; if((PINA & 0b00001100)==0b00001100) PORTB=0b00010001; if((PINA & 0b00011000)==0b00011000) PORTB=0b00010001; if((PINA & 0b00010010)==0b00010010) PORTB=0b00010001; if((PINA & 0b00001010)==0b00001010) PORTB=0b00010001; if((PINA & 0b00010100)==0b00010100) PORTB=0b00010001; if((PINA & 0b00001110)==0b00001110) PORTB=0b00010001; if((PINA & 0b00011100)==0b00011100) PORTB=0b00010001; if((PINA & 0b00011010)==0b00011010) PORTB=0b00010001; if((PINA & 0b00010110)==0b00010110) PORTB=0b00010001; if((PINA & 0b00011110)==0b00011110) 31
PORTB=0b00100001; if((PINA & 0b00011110)==0b00000000) PORTB=0b01000000; } }
32
CHAPTER 5
CONCLUSION & FUTURE SCOPE
33
5.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. 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. 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, it’s because they have no proper idea about when the power is available so that they can pump water. Even after then they need to wait until the field is properly watered, which makes them to stop doing other activities. 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. Electronic Gardner is a prototype for an automatic irrigation system that can be used in wide landscapes. Properly installed, maintain and managed system can be implemented in large fields like public gardens, lawns, golf fields etc.
34
5.2 ADVANTAGES 1. Reduced run-off of water and nutrients: Automation can help keep fertilizer on farm by effectively reducing run-off from the property. Retaining fertilizer on farm has both economic and environmental benefits. 2. Improves growth: Smaller amounts of water applied over a longer amount of time provide ideal growing conditions. Drip irrigation extends watering times for plants, and prevents soil erosion and nutrient runoff. Also, because the flow is continuous, water penetrates deeply into the soil to get well down into the root zone. 3. Reduced Labour: As the irrigator is not required to constantly monitor the progress of irrigation, the irrigator is available to perform other tasks un-interrupted. 4. Saves time: Setting and moving sprinklers are not required. A timer delay as per environment can be added to the system for automatic watering. 5. Improved Life Style The irrigator is not required to constantly check the progress of water down the base being irrigated. The irrigator is able to be away from the property, relax with the family and sleep through the night. 6. Adaptable: A drip irrigation system can be modified easily to adjust to the changing needs of a garden or lawn. 7. Simplest Method: Start 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.
35
8. More timely irrigation: Irrigators with automation are more inclined to irrigate when the plants need water, not when it suits the irrigator 9. More accurate cut-off: Automation of the irrigation system allows cut-off of water at the appropriate point in the bay. 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.
5.3 DIS-ADVANTAGES:
1. 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. Increased Channel Maintenance: There is a need to increase maintenance of channels and equipments to ensure the system works correctly. Channels should be fenced to protect the automatic units from stock damage. 3. Slopes in the fields: These systems require careful study of all the relevant factors like land topography, Soil, 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.
36
5.4 APPLICATIONS
1. Irrigation in fields. 2. Irrigation in gardens, parks and golf fields 3. Very efficient for paddy (Rice) fields. 4. Picsiculture.
37
5.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. The increasing interest in this area of research may bring about more and more consumer efficient system. Water 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 farmer’s 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. But 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. Electronic Gardner 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. Saves time, Saves 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. Protects your financial investment. An attractively landscaped exterior, with lush growth and healthy plants, helps your house project that fresh.
.
38
5.6 REFERENCES 1.
8051-mirocontrolar and embedded system. -Mohd. Mazidi.
2.
Micro processor Architecture, Programming & Applications -Ramesh S. Gaonkar.
3.
Electronic Components -D. V. Prasad.
4.
www.atmel.com
5.
www.wikipedia.com
6.
www.avrfreaks.net
7.
www.google.com
39