You are on page 1of 33

ABSTRACT

The project we have undertaken is “Automatic Plant Irrigation System”. This project is taken up as India is an agriculture oriented country and the rate at which water resources are depleting is a dangerous threat hence there is a need of smart and efficient way of irrigation. In this project we have implemented sensors which detect the humidity in the soil (agricultural field) and supply water to the field which has water requirement. The project is 8051 microcontroller based design which controls the water supply and the field to be irrigated. There are sensors present in each field which are not activated till water is present on the field. Once the field gets dry sensors sense the requirement of water in the field and send a signal to the microcontroller. Microcontroller then supply water to that particular field which has water requirement till the sensors is deactivated again. In case, when there are more than one signal for water requirement then the microcontroller will prioritize the first received signal and irrigate the fields accordingly.

1

1. INTRODUCTION
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 more simpler and convenient, we have made “AUTOMATIC PLANT 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 .

2

2.BLOCK DIAGRAM

PROBES TO SOIL LCD SCREEN MICRO CONTROLLER AT89S52

SENSOR CIRCUIT

MOTOR DRIVER CIRCUIT

DC MOT0R

POWER SUPPLY

3

3.CIRCUIT DIAGRAM 4 .

 The output of microcontroller PORT 21 is given as input to the motor driver circuit(L293D) at PORT 2 and makes motor to switch ‘ON’ and supply water to field.  Now when the soil becomes wet i.  In this manner.  When the soil condition is dry i. whenever the field is in dry condition the motor is switch ‘ON’ and supplies water to the field. 10.  The condition of soil in the field is sensed and compare with the reference voltage(5v) this is done by the timer 555 IC in sensor circuit. the high signal(logic ‘1’) appears on the output PORT 3 of the sensor.16) are connected to LCD screen which is used to display the condition of soil and motor.  The microcontroller output pins(PORT 1 to P0RT 8.e. it switch ‘OFF’ the motor which is connected at PORT 3 of the motor driver circuit. When microcontroller receives this signal . the sensor sends low signal (logic ‘0’) to microcontroller.  This complete the design of Automatic Plant Irrigation System using Microcontroller. higher than reference voltage. 5 .WORKING  Initially 12v voltage is given to motor driver circuit to drive the motor and to the microcontroller.lower than reference voltage in the field.e. The output pin of the sensor is connected to the PORT 39 of microcontroller.4.11.

2 K (for power on Reset Ckt.5. potentiometer(100K) Capacitor LCD DC Motor AC Adapter : 1000 uf(for Power supply).10 uf(reset) 33p F( for crystal oscillator) : 16 x 2 : AT89S52 : Step down transformer (220/12) : IC 555 : IC 7805 : 11. COMPONENTS LIST Microcontroller Transformer Comparator Voltage Regulator Crystal oscillator Diode LED Resistor : 470 ohm (for LED) . 10 K (for sensors) . ).0592 M Hz : IN 4007 6 . 8.

There are 3 basic "sizes" of the 8051: Short. but the Extended 8051 models often have a different form factor.  16-bit program counter and data pointer. Some of the features that have made the 8051 popular are: 4 KB on chip program memory.  Four 8-bit ports.  1 Microsecond instruction cycle with 12 MHz Crystal.6. but may have more.  4 reg banks.  128 user defined software flags.  128 bytes on chip data memory(RAM).  3 internal and 2 external interrupts. The Short and Standard chips are often available in DIP (dual in-line package) form. 7 . (short models have two 8-bit ports). and Extended. All these things are called 8051 because they can all be programmed using 8051 assembly language. or less).  Bit as well as byte addressable RAM area of 16 bytes.  8-bit data bus  16-bit address bus  32 general purpose registers each of 8 bits  16 bit timers (usually 2. and are not "drop-in compatible".COMPONENT DESCRIPTION I). Standard. and they all share certain features (although the different models all have their own special features). 8051 μCONTROLLER The Intel 8051 is an 8-bit microcontroller which means that most available operations are limited to 8 bits.

P1. should be connected to ground to indicate the presence of external memory.8051 models may also have a number of special. also called EA/VPP. The other ports P0. The 8051 chip needs +5V 500mA to function properly. This is "program store enable". but Port P3 has additional functions such as. serial transmit and receive pins. P2 and P3. PIN 30 is called ALE (address latch enable). P2 and P3 have dual roles or additional functions associated with them based upon the context of their usage... In order to use the external memory it is required to provide the low voltage (0) on both PSEN and EA pins. PORT P3 (Pins 10 to 17): PORT P3 acts as a normal IO port. ADC. as can be seen from fig 1. which is used when multiple memory chips are connected to the controller and only one of them needs to be selected. PORT P2 (pins 21 to 28): PORT P2 can also be used as a general purpose 8 bit port when no external memory is present. 30 & 31: As described in the features of the 8051.We will deal with this in depth in the later chapters. In order to program this we need to supply a voltage of +12V at pin 31. OpAmps. read and write pins for memory access. 2 external interrupt pins.1 PORT P0 (pins 32 to 39) PORT P0 can be used as a general purpose 8 bit port when no external memory is present. If external memory is connected then PIN 31. this chip contains a built-in flash memory. There are 4 8-bit ports: P0. PIN 40 and 20: Pins 40 and 20 are VCC and ground respectively. PORT P2 acts as A8-A15. such as UARTs. but if external memory access is required then PORT P2 will act as an address bus in conjunction with PORT P0 to access external memory. PORT P1 (Pins 1 to 8): The port P1 is a general purpose input/output port which can be used for a variety of interfacing tasks. although there are lower powered versions like the Atmel 2051 which is a scaled down version of the 8051 which runs on +3V. PIN 29 is called PSEN. PIN CONFIGURATION PIN 9: PIN 9 is the reset pin which is used reset the microcontroller‟s internal registers and ports upon starting up. but if external memory access is required then PORT P0 acts 8 . 2 external counter inputs. etc.) PINS 18 & 19: The 8051 has a built-in oscillator amplifier hence we need to only connect a crystal at these pins to provide clock pulses to the circuit. PINS 29. model-specific features. (Pin should be held high for 2 machine cycles.

TRANSFORMER IMAGE OF TRANSFORMER 9 .as a multiplexed address and data bus that can be used to access external memory in conjunction with PORT P2. P0 acts as AD0-AD7. PIN DIAGRAM II) .

The changing magnetic flux induces a voltage in the secondary coil. Thus.e. DC voltages are required to operate various electronic equipment and these voltages are 5V. Changing the current in the primary coil changes the magnetic flux that is developed. pulse generation. III) IC 555 TIMER The 555 timer IC is an integrated circuit (chip) used in a variety of timer. and.Usually. and as a flip-flop element. 10 . 9V or 12V. 230V is to be brought down to the required voltage level. Derivatives provide up to four timing circuits in one package. Thus the a. Basic principles: The transformer is based on two principles: first. that an electric current can produce a magnetic field (electromagnetism). This is done by a transformer. a step down transformer is employed to decrease the voltage to a required level.c input available at the mains supply i. But these voltages cannot be obtained directly. and oscillator applications. The 555 can be used to provide time delays. as an oscillator.. second that a changing magnetic field within a coil of wire induces a voltage across the ends of the coil (electromagnetic induction).

low level (0 V) Purpose OUT rises. when this input falls below 1/3 VCC. 11 . The CONTROL VOLTAGE input can be used to build an astable with a frequency modulated output.IMAGE OF IC 555 IC 555 PIN DIAGRAM PIN 5 is also called control voltage pin! By applying a voltage to the CONTROL VOLTAGE input. you can alter the timing characteristics of the device. Pin Name 1 2 GND TRIG Ground. It is usual to connect a 10 nF capacitor between pin 5 and 0 V to prevent interference. pin 5. the CONTROL VOLTAGE input is not used. In most applications. and interval starts.

pulsewidth modulation (PWM) and so on. Applications include timers. Overrides TRIG which overrides THR. The use of a  12 . pulse position modulation and so on. The 555 can be used as a simple ADC. In phase with output. 2/3 VCC). A timing interval may be reset by driving this input to GND. may discharge a capacitor between intervals. but the timing 4 RESET does not begin again until RESET rises above approximately 0. 7 DIS 8 VCC Modes The 555 has three operating modes:  Monostable mode: in this mode. logic clocks. Astable: free running mode: the 555 can operate as an oscillator. tone generation.7 volts. Uses include LED and lamp flashers. the 555 functions as a "one-shot" pulse generator. THR The interval ends when the voltage at THR is greater than at CTRL. security alarms. capacitance measurement. pulse generation. Positive supply voltage is usually between 3 and 15 V.g. frequency divider. missing pulse detection. selecting a thermistor as timing resistor allows the use of the 555 in a temperature sensor: the period of the output pulse is determined by the temperature. touch switches.3 OUT This output is driven to approximately 1. converting an analog value to a pulse length. bouncefree switches. 5 6 CTRL "Control" access to the internal voltage divider (by default. Open collector output.7V below +VCC or GND. E.

They come in three main types of packages SO-8. Uses include bounce-free latched switches.1A.microprocessor based circuit can then convert the pulse period to temperature. LM7805 voltage regulator is a linear regulator made by several manufacturers like Fairchild. Short circuit protection. if the DIS pin is not connected and no capacitor is used. They also have Thermal overload protection. For output current up to 1A there may be two types of packages: TO-220 (vertical) and DPAK (horizontal). They can come in several types of packages. linearize it and even provide calibration means. VOLTAGE REGULATOR IC 7805 This is most common voltage regulator that is still used in embedded designs. or ST Microelectronics. With proper heat sink these LM78xx types can handle even more than 1A current. IV).  Bistable mode or Schmitt trigger: the 555 can operate as a flip-flop.1A current you may chose regulator LM78L05 with smaller packages and lower maximum current up to 0. SOT-89 and TO-92 13 . If your design wanna exceed 0.

radios. to provide a stable clock signal for digital integrated circuits. and oscilloscopes. clocks. Quartz crystals are also found inside test and measurement equipment. The most common type of piezoelectric resonator used is the quartz crystal. and to stabilize frequencies for radio transmitters and receivers. such as counters. and cellphones. 14 . computers. signal generators. so oscillator circuits designed around them became known as "crystal oscillators. More than two billion (2×109) crystals are manufactured annually.V). This frequency is commonly used to keep track of time (as in quartz wristwatches). Most are used for consumer devices such as wristwatches." Quartz crystals are manufactured for frequencies from a few tens of kilohertz to tens of megahertz. CRYSTAL OSCILLATOR IMAGE OF CRYSTAL OSCILLATOR SYMBOL A crystal oscillator is an electronic oscillator circuit that uses the mechanical resonance of a vibrating crystal of piezoelectric material to create an electrical signal with a very precise frequency.

VI).0 amp general purpose silicon rectifier diodes commonly used in AC adapters for common household appliances. The series was second sourced by many manufacturers. The table below shows the maximum repetitive reverse blocking voltages of each of the members of the 1N4000 and 1N5400 series 15 . up to 3 A. The 1N5400 series is a similarly popular series for higher current applications. along with the now lesser known 1. These are fairly low-speed rectifier diodes.DIODE IMAGE OF DIODE SYMBOL The 1N4007 series (or 1N4000 series) is a family of popular 1. Blocking voltage varies from 50 to 1000 volts. This diode is made in an axiallead DO-41 plastic package. as replacements for 1N2609 through 1N2617. The 1N4000 series were in the Motorola Silicon Rectifier Handbook in 1966. These diodes come in the larger DO-201 axial package. The 1N5400 series were announced in Electrical Design News in 1968. These devices are widely used and recommended.5-ampere 1N5391 series. being inefficient for square waves of more than 15 kHz.

and infrared wavelengths. and sensors to be developed. video displays. improved physical robustness. ultraviolet. while their high switching rates are also useful in advanced communications technology. and faster switching.VII). automotive lighting. LEDs have allowed new text. LED Symbol of LED When a light-emitting diode is forward-biased (switched on). releasing energy in the form of photons. Appearing as practical electronic components in 1962. An LED is often small in area (less than 1 mm2). and traffic signals. with very high brightness. Infrared LEDs are also used in the 16 .[4] LEDs are used as indicator lamps in many devices and are increasingly used for other lighting. smaller size. electrons are able to recombine with electron holes within the device. advertising. and integrated optical components may be used to shape its radiation pattern.[5] early LEDs emitted lowintensity red light. LEDs powerful enough for room lighting are relatively expensive and require more precise current and heat management than compact fluorescent lamp sources of comparable output. This effect is called electroluminescence and the color of the light (corresponding to the energy of the photon) is determined by the energy gap of the semiconductor. general lighting.[6] LEDs present many advantages over incandescent light sources including lower energy consumption. but modern versions are available across the visible. Light-emitting diodes are used in applications as diverse as aviation lighting. LED A light-emitting diode (LED) is a semiconductor light source. longer lifetime.

VIII). All other factors being equal. and other domestic appliances. because these are indirect band gap materials. which produces no optical emission. or near-ultraviolet light. it falls into a lower energy level. or anode. IMAGE OF RESISTOR SYMBOL 17 . DVD players. When an electron meets a hole. and directly proportional to the voltage across it. the electrons and holes recombine by a nonradiative transition. Resistors can also be used to provide a specific voltage for an active device such as a transistor. In alternating-current (AC) circuits. current flows easily from the p-side. The wavelength of the light emitted. The LED consists of a chip of semiconducting material doped with impurities to create a p-n junction.remote control units of many commercial products including televisions. The materials used for the LED have a direct band gap with energies corresponding to near-infrared. in a directcurrent (DC) circuit. In silicon or germanium diodes. the current through a resistor is inversely proportional to its resistance. and releases energy in the form of a photon. or cathode. this rule also applies as long as the resistor does not contain inductance or capacitance. to the n-side. Charge-carriers — electrons and holes — flow into the junction from electrodes with different voltages. This is the well-known Ohm's Law. and thus its color depends on the band gap energy of the materials forming the p-n junction. visible. but not in the reverse direction. As in other diodes. RESISTOR A resistor is an electrical component that limits or regulates the flow of electrical current in an electronic circuit.

These plates are separated by a dielectric or other form of insulator. is able to handle higher currents than a carbon-composition resistor of the same physical size. which helps them maintain an electric charge. Other common capacitor insulators include air. Another type of resistor is made from winding Nichrome or similar wire onan insulating form. CAPACITOR IMAGE OF ELECTROLYTIC CAPACITOR IMAGE OF CERAMIC CAPACITOR A capacitor is a tool consisting of two conductive plates. and polystyrene. the lower the resistance. Another type of capacitor is used in the telecommunications equipment industry. but can have an adverse effect in AC circuits because inductance renders the device sensitive to changes in output. polyester. A capacitor is often used to store analogue signals and digital data. This component. tantalum air. and plastic. because the wire is wound into a coil. The most common type inelectronic devices and systems is the carbon-composition resistor. Examples include ceramic. IX). However. paper. called a wire wound resistor. This type of capacitor is 18 . the component acts as an inductors as well as exhibiting resistance. each of which hosts an opposite charge.Resistors can be fabricated in a variety of ways. There are several types of insulators used in capacitors. This does not affect performance in DC circuits. the higher this ratio. Each effectively prevents the plates from touching each other. The resistance depends on the proportion of carbon to clay. Finegr anulated carbon (graphite) is mixed with clay and hardened.

To understand the flow of voltage in a capacitor. however. Both plates of the capacitor are charged. LCD Liquid Crystal Display 19 . The lightning is the charging factor moving between the ground and the cloud. A capacitor is also ideal for storing an electron. but the current flows in opposite directions. it is helpful to look at naturally occurring examples. make electrons. At the same time. Lightning. is similar to a capacitor.able to adjust the frequency and tuning of telecommunications equipment and is often referred to a variable capacitor. the current flows away from the other plate.5 volts which is the same voltage found in a common AA battery. The cloud represents one of the plates and the ground represents the other. A capacitor measures in voltage. X). for example. As voltage is used in a capacitor. one of the two plates becomes filled with a steady flow of current. which differs on each of the two interior plates. A capacitor cannot. A capacitor contains 1.

R/W=1 for read 6 E I/O Enable 7 PB0 I/O The 8 bit data bus 8 PB1 I/O The 8 bit data bus 9 DB2 I/O The 8 bit data bus 10 DB3 I/O The 8 bit data bus 11 DB4 I/O The 8 bit data bus 12 DB5 I/O The 8 bit data bus 13 DB6 I/O The 8 bit data bus 14 DB7 I/O The 8 bit data bus XI).Power supply to control contrast 4 RS I RS=0 to select command register. This is due to the declining prices of LCD.+5V power supply 3 VEE . DC MOTOR 20 . their by relieving the CPU of the task of refreshing the LCD and also the ease of programming for characters and graphics. RS=1 to select data register.Liquid crystal displays (LCD) are widely used in recent years as compares to LEDs. HD 44780 based LCDs are most commonly used. Pin Symbol I/O Description 1 VSS . incorporation of a refreshing controller into the LCD. the ability to display numbers. 5 R/W I R/W=0 for write.Ground 2 VCC . characters and graphics.

The magnetic field is maintained using either permanent magnets or electromagnetic windings. The physical principle behind production of mechanical force by the interactions of an electric current and a magnetic field. instead of motors. was discovered by Michael Faraday in 1831. DC motors are configured in many types and sizes.IMAGE OF DC MOTOR An electric motor is a machine which converts electrical energy into mechanical energy. and so are not generally referred to as electric motors.AC ADAPTER 21 .servo. The first commercially successful motors were made around 1873 by Zénobe Gramme. Some devices convert electricity into motion but do not generate usable mechanical power as a primary objective. magnetic solenoids and loudspeakers are usually described as actuators and transducers respectively. but commercial exploitation of electric motors on a large scale required efficient electrical generators and electrical distribution networks. Faraday's law of induction. DC motors are most commonly used in variable speed and torque. Some electric motors are used to produce torque or force XII). including brush less. Electric motors of increasing efficiency were constructed from 1821 through the end of the 19th century. A motor consists of a rotor and a permanent magnetic field stator. For example. and gear motor types.

adapter block. The internal circuitry of an external power supply is very similar to the design that would be used for a built-in or internal supply. AC adapters are used with electrical devices that require power but do not contain internal components to derive the required voltage and power from mains power. AC/DC adapter or AC/DC converter[1] is a type of external power supply.The AC adapter. Use of an external power supply allows portability of battery-powered equipment without the added bulk of internal power components and makes it unnecessary to produce equipment for use only with a specified power source. 22 . when plugged in. Other names include plug pack. where the supply. or power adapter. plug-in adapter. domestic mains adapter. often enclosed in a case similar to an AC plug. line power adapter. can sometimes charge the battery in addition to powering the equipment. External power supplies are used both with equipment with no other source of power and with battery-powered equipment.

ch1 23 .0.#00H MOV P1.7.0 l1: MOV A.A setb p2.soil moisure based water irrigation control system $mod51 org 0000H MOV A.#0FFH MOV P0.A MOV P2.A MOV A.PROGRAM .P0 JB P0.A MOV P3.

0 acall sms1 sjmp l2 ch2: clr p2.0 acall sms2 sjmp l1 sms1: MOV A.l2: JNB P0.#38H ACALL COMNWRT ACALL DELAY MOV A.#80H ACALL COMNWRT ACALL DELAY 24 .#0EH ACALL COMNWRT ACALL DELAY MOV A.#01H ACALL COMNWRT ACALL DELAY MOV A.ch2 SJMP l1 ch1: setb p2.0.

#'I' ACALL DATAWRT ACALL DELAY MOV A.#'L' ACALL DATAWRT ACALL DELAY MOV A.#'O' ACALL DATAWRT ACALL DELAY MOV A.#'D' ACALL DATAWRT ACALL DELAY MOV A.MOV A.#'Y' ACALL DATAWRT ACALL DELAY 25 .#':' ACALL DATAWRT ACALL DELAY MOV A.#'S' ACALL DATAWRT ACALL DELAY MOV A.#'R' ACALL DATAWRT ACALL DELAY MOV A.

#'P' ACALL DATAWRT ACALL DELAY MOV A.#'M' ACALL DATAWRT ACALL DELAY MOV A.#'U' ACALL DATAWRT ACALL DELAY MOV A.#':' ACALL DATAWRT ACALL DELAY MOV A.#'O' ACALL DATAWRT ACALL DELAY MOV A.#' ' ACALL DATAWRT ACALL DELAY MOV A.#'P' ACALL DATAWRT ACALL DELAY MOV A.MOV A.#'N' ACALL DATAWRT 26 .

#'O' ACALL DATAWRT ACALL DELAY MOV A.#'I' ACALL DATAWRT 27 .#80H ACALL COMNWRT ACALL DELAY MOV A.#38H ACALL COMNWRT ACALL DELAY MOV A.#01H ACALL COMNWRT ACALL DELAY MOV A.#0EH ACALL COMNWRT ACALL DELAY MOV A.#'S' ACALL DATAWRT ACALL DELAY MOV A.ACALL DELAY ret sms2: MOV A.

#'L' ACALL DATAWRT ACALL DELAY MOV A.#'T' ACALL DATAWRT ACALL DELAY MOV A.#'E' ACALL DATAWRT ACALL DELAY MOV A.#'W' ACALL DATAWRT ACALL DELAY MOV A.#' ' ACALL DATAWRT ACALL DELAY MOV A.#'P' ACALL DATAWRT ACALL DELAY MOV A.ACALL DELAY MOV A.#':' ACALL DATAWRT ACALL DELAY MOV A.#'U' 28 .

#'F' ACALL DATAWRT ACALL DELAY ret COMNWRT: MOV P1.0 CLR P3.ACALL DATAWRT ACALL DELAY MOV A.#'M' ACALL DATAWRT ACALL DELAY MOV A.#':' ACALL DATAWRT ACALL DELAY MOV A.#'P' ACALL DATAWRT ACALL DELAY MOV A.A CLR P3.#'O' ACALL DATAWRT ACALL DELAY MOV A.0 RET 29 .1 SETB P3.

A SETB P3. Parks.0 RET DELAY: MOV R3.DATAWRT: MOV P1. APPLICATION  Irrigation In Fields.HERE2 RET end 8.0 CLR P3.HERE DJNZ R3. 30 .  Picsiculture.#255 HERE: DJNZ R4. Rice Fields.  Irrigation In Gardens.#50 HERE2: MOV R4.  Very Efficient For Paddy.1 SETB P3.

arid climate when exposed to ultraviolet light.  Complete elimination of manpower.MERITS & DEMERITS MERITS:  Highly sensitive. Low cost and reliable circuit.  Works according to the soil condition. 31 .  Have limited life after installation due to the detoriation of the plastic component in a hot. DEMERITS:  This is applicable for only large farms.9.  Require frequent maintenance for effective operation.  Can handle heavy loads up to 7A  System can be switched into manual mode whenever required.

For this we will have to adopt the DTMF technology. By using this we will be able to irrigate the desired field & in desired amount.FUTURE EXTENSION The working of project is basically dependent on the output of the humidity sensors. Whenever there is need of excess water in the desired field(RICE crops) then it will not be possible by using sensor technology.10. 32 .

Gaonkar.11.V. “Electronic Components” 33 .Prasad. “Micro processor Architecture.REFERENCES  Muhammad Ali Mazidi . “The 8051 Microcontroller & Embedded Systems ”  Ramesh S. Programming & Applications”  D.