You are on page 1of 55

Automatic irrigation System 2017-

2018

Automatic irrigation system


PROJECT REPORT
OF PROJECT-I (EC-498)

BACHELOR OF TECHNOLOGY

Electronics and Communication

SUBMITTED BY

Rohit Kumar BT4060195


Shubham Dutt BT4060199
Rajat Pundir BT4060208
Rohit BT4060209
Sep 2017

SUPERVISOR
Er.Vivek Mankotia

DEPARTMENT OF ELECTRONICS AND


COMMUNICATION ENGINEERING,
JNGEC, SUNDERNAGAR (H.P.) - 175018
DEPARTMENT OF ECE Page 1
Automatic irrigation System 2017-
2018

CERTIFICATE

I hereby certify that the work which is being presented in the Project Report entitled “ Automatic

irrigation System”, in partial fulfillment of the requirements for the award of the degree of
Bachelor of Technology in Electronics and Communication Engineering and submitted to the
Department of Electronics and Communication Engineering of J.N. Government Engineering
College, Sundernagar Distt. Mandi is an authentic record of my own work carried out during a

period from August 2017 to November 2017 (7th semester) under the supervision of Er.VIVEK
MANKOTIA, Assistant Professor, Electronics and Communication Engineering Department.

Signature of Students

Rohit Kumar BT4060195


Shubham Dutt BT4060199
Rajat Pundir BT4060208
Rohit BT4060209
Bhuvnesh Ganpati 22251

This is to certify that the above statement made by the student(s) is correct to
the best of my knowledge.

Signature of Supervisor

Date: Name & Designation


Head
Electronics and Communication Signature of External
Engineering Department Examiner

DEPARTMENT OF ECE Page 2


Automatic irrigation System 2017-
2018

ACKNOWLEDGEMENT

I would like to place on record my deep sense of gratitude to Mr. Vivek Mankotia, Assistant
Prof. Dept. of Electronics and Communication Engineering, Jawaharlal Nehru Government
Engineering College, Sundernagar, District Mandi, for his stimulating guidance, help and
useful suggestions, continuous encouragement and supervision throughout the course of
present work.

I also wish to extend my thanks to other professors and other colleagues for attending

my seminars and for their insightful comments and constructive suggestions to improve the
quality of this project work.

I am extremely thankful to Prof. Raman Parti, Director, JNGEC, Sundernagar, for providing me

infrastructural facilities to work in, without which this work would not have been possible.

DEPARTMENT OF ECE Page 3


Automatic irrigation System 2017-
2018

ABSTRACT

Pump be turned on/off, saves a lot time for the farmers. This also gives much needed rest to
the farmers, as they don’t have to go and turn the pump on/off manually. The motivation for
this project came from the countries where economy is based on agriculture and the climatic
conditions lead to lack of rains & scarcity of water. The farmers working in the farm lands are
solely dependent on the rains and bore wells for irrigation of the land. Even if the farm land
has a water-pump, manual intervention by farmers is required to turn the pump on/off
whenever needed. The aim of our project is to minimize this manual intervention by the
farmer, which is why we are using a micro-controller (89s52).

The micro-controller based automated irrigation system will serve the following purposes:

1) There is no un-planned usage of water, a lot of water is saved from being wasted. 2) The
irrigation is the only when there is not enough moisture in the soil and the microcontroller
decides when should the pump on/off.

DEPARTMENT OF ECE Page 4


Automatic irrigation System 2017-
2018

TABLE OF CONTENTS

TITLE PAGE NO.


Certificate 2
Acknowledgement 3
Abstract 4

Chapter 1: INTRODUCTION

1.1 Introduction 7-8


1.2 Objective 9
1.3 Principle Behind The Circuit 10
1.4 Circuit Diagram 11-12
1.5 Hardware Requirement 13
1.6 Software Requirement 13-14
1.7 Circuit Design 14

Chapter 2: Hardware Description


2.1 Power Supply 16
2.2 Transformer 17
2.3 Rectifier 18-19
2.4 Microcontroller 19-20
2.6 Vacuum Pump 21
2.7 LCD 22-24
2.8 Resistor 25
2.9 Capacitor 26
2.10 Transistor 27-28
2.11 Relay 29-30
2.12 Voltage Regulator 31-32
2.13 LED 33-34
2.14 Comparator 35-37
2.15 Sensing Probe 38-39
2.16 Tools And Platform Used 40

DEPARTMENT OF ECE Page 5


Automatic irrigation System 2017-
2018

Chapter 3: Software Description


3.1 Keil Software 41-51
3.2 Proteus8 Professional 52

Chapter 4
4.1 Conclusion 53
4.2 Future Scope 54
4.3 Reference 55

DEPARTMENT OF ECE Page 6


Automatic irrigation System 2017-
2018

CHAPTER 1

INTRODUCTION

DEPARTMENT OF ECE Page 7


Automatic irrigation System 2017-
2018

1.1 INTRODUCTION

The continuous increasing demand of the food requires the rapid improvement in food
production technology. In a country like India, where the economy is mainly based on
agriculture and the climatic conditions are isotropic, still we are not able to make full use of
agricultural resources. The main reason is the lack of rains & scarcity of land reservoir water.
The continuous extraction of water from earth is reducing the water level due to which lot of
land is coming slowly in the zones of un-irrigated land.

Another very important reason of this is due to unplanned use of water due to which a
significant amount of water goes waste. In the modern drip irrigation systems, the most
significant advantage is that water is supplied near the root zone of the plants as per
requirement to which a large quantity of water is saved. At the present era, the farmers have
been using irrigation technique in India through the manual control in which the farmers
irrigate the land at the regular intervals. This process sometimes consumes more water or
sometimes the water reaches late due to which the crops get dried.

Water deficiency can be detrimental to plants before visible wilting occurs. Slowed growth
rate, lighter weight fruit follows slight water deficiency. This problem can be perfectly
rectified if we use automatic micro controller based drip irrigation system in which the
irrigation will take place only when there will be intense requirement of water. Irrigation
system uses soil moisture sensor to turn irrigation ON and OFF. These valves may be easily
automated by using controllers and soil moisture sensor. Automating farm or nursery
irrigation allows farmers to apply the right amount of water at the right time, regardless of the
availability of labor to turn valves on and off. In addition, farmers using automation
equipment are able to reduce runoff from over watering saturated soils, avoid irrigating at the
wrong time of day, which will improve crop performance by ensuring adequate water and
nutrients when needed maximize their net profits.

DEPARTMENT OF ECE Page 8


Automatic irrigation System 2017-
2018

1.2 OBJECTIVE

 The Objectives of this project is to design and fabricate an automatic irrigation

system thereby saving time & power for the farmer.

 Give the flexibility to the farmer as in case they forgets to irrigate the field

 Overirrigation of the field is reduced.

 To give user more easier way to irrigate the field

 In a more efficient way,The project was to design a small-scale automated irrigation

system that would use water for irrigation purpose.

DEPARTMENT OF ECE Page 9


Automatic irrigation System 2017-
2018

1.3 PRINCIPLE BEHIND THE CIRCUIT

The main component used in the circuit is 8051 controller. In this project moisture sensor

YL69 with comparator YL38 is used which sense the conductivity of soil. The Soil

Moisture Sensor is used to measure the volumetric water content of soil then it turn the

motor on/off according to the water content in soil.

Volumetric Water Content :-

In very simplified terms, dry soil is made up of solid material and air pockets, called pore

spaces. A typical volumetric ratio would be 55% solid material and 45% pore space. As

water is added to the soil, the pore spaces begin to fill with water. Soil that seems damp to

the touch might now have 55% minerals, 35% pore space and 10% water. This would be an

example of 10% volumetric water content. The maximum water content in this scenario is

45% because at that value, all the available pore


BLOCK DIAGRAM

Figure 1.1

DEPARTMENT OF ECE Page 11


Automatic irrigation System 2017-
2018

1.4 Circuit Diagram

Figure 1.2

DEPARTMENT OF ECE Page 12


Automatic irrigation System 2017-
2018

1.5 HARDWARE REQUIREMENT

 AT89S52 microcontroller
 8051 programming board
 Programming cable
 8051 Programmer
 DC battery or 12V,1A adaptor
 16×2 LCD
 ISP cable
 7805 voltage Regulator
 10uF electrolytic capacitor
 33pF capacitors
 12MHz Crystal
 Bridge Rectifier
 LED
 Pot 10k (1/4 watt)
 connecting wires
 Soldering Wire
 Soldering Iron
 Op amp
 Relay
 Water Pump
 Diodes
 Transistor

1.6 SOFTWARE REQUIREMENT

 Keil compiler
 Proteus Professional Suite
 ISP Programmer
1.7 CIRCUIT DESIGN

The sensing arrangement is made by using two stiff metallic rods inserted The project uses
an 8051 series microcontroller which is programmed to receive the input signal of varying
moisture condition of the soil th rough the sensing arrangement. This is achieved by using
an op-amp as comparator which acts as interface between the sensing arrangement and the
microcontroller.Once the controller receives this signal, it generates an output that drives a
relay for operating the water pump. An LCD display is also interfaced to the microcontroller
to display status of the soil and water pump into the field at a distance.

Reset Circuit Design: The reset pin of the microcontroller is kept active till the power
supply is in the specified range and a minimum oscillation level is maintained. In other
words to ensure the supply voltage does not falls below the threshold level of 1.2V and the
reset pulse width is greater than 100ms, we select the values of resistor and capacitor such
that RC >=100ms. Here we select a 10K resistor and a 10uF electrolyte capacitor.

Oscillator Circuit Design: A crystal oscillator is used to provide external clock signal to
the microcontroller. To ensure smooth operation, we connect two ceramic capacitors ranges
from 20pF to 40pF. This crystal oscillator is connected between pin 18 and 19 of the
microcontroller.

Compilation of Microcontroller Code: Once the circuit is designed and drawn on a piece
of paper, the next step is to write and compile the code. Here we select the Kiel uVision
software to write the program in C language.

Prior to writing the code, general steps needs to be followed like creating a new project and
selecting the target device or the required microcontroller. Once the code is written, we
saved it with .c extension and then added it to the source file group under the target folder.
The code is then compiled by pressing F7 key.

Once the code is compiled, a hex file is created. In the next step, we use Proteus software to
draw the circuit. The code is dumped into the microcontroller by right clicking on the IC
and then adding the hex file.

DEPARTMENT OF ECE Page 14


Automatic irrigation System 2017-
2018

CHAPTER 2

HARDWARE DESCRIPTION

DEPARTMENT OF ECE Page 15


Automatic irrigation System 2017-
2018

2.1 POWER SUPPLY

A power supply is an electronic device that supplies electric energy to an electrical load. The
primary function of a power supply is to convert electric current from an AC source to a
regulated DC voltage correct voltage or current to power the load. A power supply convert
mains AC for the electronic components.

In general, all the electronic circuits require a source of DC power for their operation. The 89S52

microcontroller also works on a DC power supply. A DC power supply can also be given by a

battery. Batteries are rarely used for these purposes as they are costly and require frequent

replacement. So in order to run microcontroller, we have to convert AC main power supply to DC

Power supply. This can be done with the help of regulated power supply circuit.

Figure 2.1

2.2 Transformer: A transformer is an electrical device that transfers electrical energy between
two or more circuits through electromagnetic induction. A transformer is a device used to convert
low alternating voltage at high current to high alternating voltage at low current

DEPARTMENT OF ECE Page 16


Automatic irrigation System 2017-
2018

and vice-versa. Transformers are used to increase or decrease the alternating voltages in
electric power applications. Transformers are either step up or step down.

Usually electronics circuits require very small voltages. So step down transformers are
mainly used. Step down transformers converts high alternating voltage at low current to low
alternating voltage at high. Step down Transformers give decreased alternating voltage
output.

A transformer works on the principle of mutual induction. An e.m.f. is induced in a coil,


when a changing current flows through its nearby coil.

Figure 2.1

2.3 Rectifier: An electrical device which converts an alternating current into direct
current by allowing current to flow in one direction only.

We are using a full wave rectifier for producing D.C. regulated power supply for hooter. A full

wave rectifier is a circuit which converts an A.C. voltage into a pulsating D.C. voltage using both

half cycles of the applied ac voltage. It uses two diodes of which one conducts during one half

cycle while the other conducts during the other half cycle of the applied ac voltage.

DEPARTMENT OF ECE Page 17


Automatic irrigation System 2017-
2018

The output voltage given by rectifier is fluctuating or pulsating in nature. So in order to

smoothen the pulsating or fluctuating D.C. output of a rectifier, a used.A full wave rectifier is

sho filter circuit is to be wn in figure:

Figure:2.2

2.4 MICROCONTROLLER

A microcontroller is an integrated circuit that contains a microprocessor, memory and

programmable input/output peripherals, which are used to interact with things connected to

the chip. A microcontroller is different than a microprocessor which only contains a CPU.

The microcontroller used in our Project is AT89S52 which is a variant of 8051.

The various features of microcontroller are like:

 Compatible with MCS-51 Products


 8K bytes of In-System Reprogrammable
 Downloadable Flash Memory
 SPI Serial Interface for Program Downloading
 Endurance: 1,000 Write/Erase Cycles
 4.0V to 5.5V Operating Range
 Fully Static Operation: 0 Hz to 33 MHz
 256 x 8 bit Internal RAM
 32 Programmable I/O Lines

DEPARTMENT OF ECE Page 18


Automatic irrigation System 2017-
2018

 Three 16 bit Timer/Counters


 Eight Interrupt Sources
 Full Duplex UART Serial Channel
 Low Power Idle and Power Down Modes
 Interrupt Recovery from Power Down mode
IC AT89S52

Figure 2.3

 The AT89S52 is a low-power, high-performance CMOS 8-bit microcomputer with


4Kbytes of Flash programmable and erasable read only memory (PEROM).

 This device is manufactured using Atmel’s high-density non-volatile memory


technology and is compatible with the industry-standard MCS-51 instruction set and
pin out.

DEPARTMENT OF ECE Page 19


Automatic irrigation System 2017-
2018

 The on-chip Flash allows the program memory to be reprogrammed in-system or by a


conventional non-volatile memory programmer

 By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel
AT89S52 is a powerful microcomputer which provides a highly-flexible and cost-
effective solution to many embedded control applications

 The AT89S52 provides the following standard features: 4Kbytes of Flash, 128 bytes
of RAM, 32 I/O lines, two 16-bit timer/counters, five vector two-level interrupt
architecture, a full duplex serial port, and on-chip oscillator and clock circuitry

 The Idle Mode stops the CPU while allowing the RAM, timer/counters, serial port
and interrupt system to continue functioning

 The Power-down mode saves the RAM contents but freezes the oscillator, disabling
all other chip functions until the next interrupt or hardware reset

 Most of the ports of the 89S52 have 'dual function' meaning that they can be used for
two different functions. The first one is to perform input/output operations and the
second one is used to implement special features of the microcontroller like counting
external pulses, interrupting the execution of the program according to external
events, performing serial data transfer or connecting the chip to a computer to update
the software

 Each port has 8 pins, and will be treated from the software point of view as an 8-bit
variable called 'register', each bit being connected to a different Input/output pin

 There are two different memory types: RAM and EEPROM. Shortly, RAM is used
to store variable during program execution, while the EEPROM memory is used to
store the program itself, that's why it is often referred to as the 'program memory'.

DEPARTMENT OF ECE Page 20


Automatic irrigation System 2017-
2018

 It is clear that the CPU (Central Processing Unit) is the heart of the micro controllers.
It is the CPU that will Read the program from the FLASH memory and Execute it by
interacting with the different peripherals

PIN DESCRIPTION

Figure 2.4

DEPARTMENT OF ECE Page 21


Automatic irrigation System 2017-
2018

Port 0:

 Port 0 is an 8-bit open drain bidirectional I/O port. As an output port, each pin can

sink eight TTL inputs. When 1s are written to port 0 pins, the pins can be used as

high-impedance inputs.

 Port 0 can also be configured to be the multiplexed low-order address/data bus

during accesses to external program and data memory. In this mode, P0 has internal

pull-ups.

Port 1:

 Port 1 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 1 output
buffer can sink/source four TTL inputs.

 When 1s are written to Port 1 pins, they are pulled high by the internal pull-ups and
can be used as inputs. As inputs, Port 1 pins that are externally being pulled low will
source current (IIL) because of the internal pull-ups.

Port 2:

 Port 2 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 2 output

buffers can sink/source four TTL inputs. When 1s are written to Port 2 pins, they

are pulled high by the internal pull-ups and can be used as inputs.

 As inputs, Port 2 pins that are externally being pulled low will source current (IIL)

because of the internal pull-ups.

 Port 2 emits the high-order address byte during fetches from external program

memory and during accesses to external data memory that use 16-bit addresses

(MOVX @ DPTR)

DEPARTMENT OF ECE Page 22


Automatic irrigation System 2017-
2018

 In this application, Port 2 uses strong internal pull-ups when emitting 1s. During

accesses to external data memory that use 8-bit addresses (MOVX @ RI), Port 2

emits the contents of the P2 Special Function Register

 Port 2 also receives the high-order address bits and some control signals during

Flash programming and verification.

Port 3:

 Port 3 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 3 output

buffers can sink/source four TTL inputs. When 1s are written to Port 3 pins, they

are pulled high by the internal pull-ups and can be used as inputs.

 As inputs, Port 3 pins that are externally being pulled low will source current (IIL)

because of the pull-ups.

 Port 3 receives some control signals for Flash programming and verification.

 Port 3 also serves the functions of various special features of the AT89S52, as

shown in the following table.

Port Pin Alternate Functions


P3.0 RXD (serial input port)

P3.1 TXD (serial output port)

P3.2 INT0 (external interrupt 0)

P3.3 INT1 (external interrupt 1)

P3.4 T0 (timer 0 external input)

P3.5 T1 (timer 1 external input)

P3.6 WR (external data memory write strobe)

P3.7 RD (external data memory read strobe)

DEPARTMENT OF ECE Page 23


Automatic irrigation System 2017-
2018

RST:Reset input

 A high on this pin for two machine cycles while the oscillator is running resets the

device.

 This pin drives high for 98 oscillator periods after the Watchdog times out.

 The DISRTO bit in SFR AUXR (address 8EH) can be used to disable this feature.

 In the default state of bit DISRTO, the RESET HIGH out feature is enabled

ALE/PROG:

 Address Latch Enable (ALE) is an output pulse for latching the low byte of

the address during accesses to external memory.

 This pin is also the program pulse input (PROG) during Flash programming. In

normal operation,

ALE:

 It is emitted at a constant rate of 1/6 the oscillator frequency and may be used for

external timing or clocking purposes.

 However, that one ALE pulse is skipped during each access to external data

memory.

 If desired, ALE operation can be disabled by setting bit 0 of SFR location 8EH.

With the bit set, ALE is active only during a MOVX or MOVC instruction.

 Otherwise, the pin is weakly pulled high. Setting the ALE-disable bit has no effect

if the microcontroller is in external execution mode

DEPARTMENT OF ECE Page 24


Automatic irrigation System 2017-
2018

PSEN:

 Program Store Enable (PSEN) is the read strobe to external program memory. When

the AT89S52 is executing code from external program memory, PSEN is activated

twice each machine cycle, except that two PSEN activations are skipped during each

access to external data memory.

EA/VPP: External Access Enable.

 EA must be strapped to GND in order to enable the device to fetch code from

external program memory locations starting at 0000H up to FFFFH.

 However, if lock bit 1 is programmed, EA will be internally latched on reset. EA

should be strapped to VCC for internal program executions.

XTAL1:

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

XTAL2: Output from the inverting oscillator amplifier

DEPARTMENT OF ECE Page 25


Automatic irrigation System 2017-
2018

2.6 Vacuum pump (Dc Motor)

Figure 2.5 Figure 2.6


Introduction-:

D. C. motors are seldom used in ordinary applications because all electric supply companies
furnish alternating current However, for special applications such as in steel mills, mines and
electric trains, it is advantageous to convert alternating current into direct current in order to use
d.c. motors. The reason is that speed/torque characteristics of d.c. motors are much more
superior to that of a.c .motors. Therefore, it is not surprising to note that for industrial drives,
d.c. motors are as popular as 3-phase induction motors Like d.c. generators, d.c. motors are also
of three types viz., series-wound, shunt-wound and compound wound. The use of a particular
motor depends upon the mechanical load it has to drive.

Working Principle Of A DC Motor


A motor is an electrical machine which converts electrical energy into mechanical energy.
The principle of working of a DC motor is that "whenever a current carrying conductor is
placed in a magnetic field, it experiences a mechanical force". The direction of this force
is given by Fleming's left hand rule and it's magnitude is given by F = BIL. Where, B =
magnetic flux density, I = current and L = length of the conductor within the magnetic
field.

Fleming's left hand rule: If we stretch the first finger, second finger and thumb of our left
hand to be perpendicular to each other AND direction of magnetic field is represented by

DEPARTMENT OF ECE Page 26


Automatic irrigation System 2017-
2018

the first finger, direction of the current is represented by second finger then the thumb
represents the direction of the force experienced by the current carrying conductor.

Figure 2.7 Animation: Working of DC


Motor
Above animation helps in understanding the working principle of a DC motor. When
armature windings are connected to a DC supply, current sets up in the winding.
Magnetic field may be provided by field winding (electromagnetism) or by using
permanent magnets. In this case, current carrying armature conductors experience force
due to the magnetic field, according to the principle stated above.
Commutator is made segmented to achieve unidirectional torque. Otherwise, the
direction of force would have reversed every time when the direction of movement of
conductor is reversed the magnetic field.

2.7 LCD (Liquid Crystal Display)

Figure 2.8
An LCD is an electronic display module which uses liquid crystal to produce a visible
image. Liquid crystal displays are super-thin technology display screen that are generally

DEPARTMENT OF ECE Page 27


Automatic irrigation System 2017-
2018

used in laptop computer screen, TVs, cell phones and portable video games. LCD’s technologies
allow displays to be much thinner when compared to cathode ray tube technology. Also, Cathode
ray tube draws more power compared to LCD’s and are also heavier and bigger.

LCD technology is used for displaying the image in notebook or some other electronic
devices like mini computers. Light is projected from a lens on a layer of liquid crystal. This
combination of coloured light with the grayscale image of the crystal forms the coloured
image. This image is then displayed on the screen.

An LCD is either made up of an active matrix display grid or a passive display grid. Most of
the Smartphone’s with LCD display technology uses active matrix display, but some of the
older displays still make use of the passive display grid designs.

Most of the electronic devices mainly depend on liquid crystal display technology for their
display. The liquid has a unique advantage of having low power consumption than the LED
or cathode ray tube. Liquid crystal display screen works on the principle of blocking light
rather than emitting light. LCD’s requires backlight as they do not emits light by them.

A 16x2 LCD display is very basic module and is very commonly used in various devices
and circuits. These modules are preferred over seven segments and other multi segment
LEDs. The reasons being: LCDs are economical; easily programmable; have no limitation
of displaying special & even custom characters (unlike in seven segments), animations and
so on.

A 16x2 LCD means it can display 16 characters per line and there are 2 such lines. In this
LCD each character is displayed in 5x7 pixel matrix. This LCD has two registers, namely,
Command and Data.

Command Register: The command register stores the command instructions given to the
LCD. A command is an instruction given to LCD to do a predefined task like initializing it,
clearing its screen, setting the cursor position, controlling display etc. Processing for commands

happen in the command register.

DEPARTMENT OF ECE Page 28


Automatic irrigation System 2017-
2018

Data Register: The data register stores the data to be displayed on the LCD. The data is the
ASCII value of the character to be displayed on the LCD. When we send data to LCD it goes
to the data register and is processed there. When RS=1, data register is selected.

Figure 2.9

Pin No Function Name

1 Ground (0V) Ground

2 Supply voltage (5V) Vcc

3 Contrast adjustment through a variable resistor VEE

Selects command register when low; and data


4 Register Select
register when high
Low to write to the register; High to read from the
5 Read/write
register
Sends data to data pins when a high to low pulse is
6 Enable
given

7-14 8 Bit Data Pins DB0 - DB7

15 Backlight VCC (5V) Led+

16 Backlight Ground (0V) Led-

DEPARTMENT OF ECE Page 29


Automatic irrigation System 2017-
2018

2.8 Resistor

Figure 2.10
A linear resistor is a linear, passive two-terminal electrical component that implements
electrical resistance as a circuit element. The current through a resistor is in direct
proportion to the voltage across the resistor's terminals. Thus, the ratio of the voltage
applied across a resistor's terminals to the intensity of current through the circuit is called
resistance. This relation is represented by Ohm's law:
I= V/R.
equipment. Practical resistors can be made of various compounds and films, as well as
resistance wire (wire made of a high-resistivity alloy, such as nickel-chrome).
Network Resistor

Figure 2.11
A resistor network is a combination of several resistors that are configured into a pattern.
Although most resistor networks use resistors that are connected in series, some resistor
networks use resistors in parallel or series-parallel configurations. The resistors in a network

DEPARTMENT OF ECE Page 30


Automatic irrigation System 2017-
2018

act as voltage dividers which divide the voltage that is applied to a circuit into smaller
amounts.

2.9 Capacitors

Figure 2.12

A capacitor (formerly known as condenser) is a passive two-terminal electrical component


used to store energy in an electric field. The forms of practical capacitors vary widely, but
all contain at least two electrical conductors separated by a dielectric (insulator). Capacitors
are used as parts of electrical systems, for example, consist of metal foils separated by a
layer of insulating film.
Capacitors are widely used in electronic circuits for blocking direct current while allowing
alternating current to pass, in filter networks, for smoothing the output of power supplies, in
the resonant circuits that tune radios to particular frequencies and for many other purposes.

DEPARTMENT OF ECE Page 31


Automatic irrigation System 2017-
2018

2.10 Transistors

Figure 2.13

A transistor is a semiconductor device used to amplify and switch electronic signals and
power. It is composed of a semiconductor material with at least three terminals for
connection to an external circuit. A voltage or current applied to one pair of the transistor's
terminals changes the current flowing through another pair of terminals. Because the
controlled (output) power can be much more than the controlling (input) power, a transistor
can amplify a signal. Today, some transistors are packaged individually, but many more are
found embedded in integrated circuits.
The transistor is the fundamental building block of modern electronic devices, and is
ubiquitous in modern electronic systems. Following its release in the early 1950s the
transistor revolutionized the field of electronics, and paved the way for smaller and cheaper
radios, calculators, and computers, among other things.

DEPARTMENT OF ECE Page 32


Automatic irrigation System 2017-
2018

2.11 Relays

Figure 2.14

A relay is an electrically operated switch. Many relays use an electromagnet to operate a


switching mechanism mechanically, but other operating principles are also used. Relays are
used where it is necessary to control a circuit by a low-power signal (with complete electrical
isolation between control and controlled circuits), or where several circuits must be controlled
by one signal. The first relays were used in long distance telegraph circuits, repeating the
signal coming in from one circuit and re-transmitting it to another. Relays were used
extensively in telephone exchanges and early computers to perform logical operations.

2.12 IC 7805 (Voltage Regulator IC)

7805 is a voltage regulator integrated circuit. It is a member of 78xx series of fixed linear
voltage regulator ICs. The voltage source in a circuit may have fluctuations and would not
give the fixed voltage output. The voltage regulator IC maintains the output voltage at a
constant value. The xx in 78xx indicates the fixed output voltage it is designed to provide.
7805 provides +5V regulated power supply. Capacitors of suitable values can be connected at
input and output pins depending upon the respective voltage levels

DEPARTMENT OF ECE Page 33


Automatic irrigation System 2017-
2018

Pin Description:

Pin
Function Name
No
1 Input voltage (5V-18V) Input
2 Ground (0V) Ground
3 Regulated output; 5V (4.8V-5.2V) Output

Description:
This is the basic L7805 voltage regulator, a three-terminal positive regulator with a 5V fixed
output voltage. This fixed regulator provides a local regulation, internal current limiting,
thermal shut-down control, and safe area protection for your project. Each one of these
voltage regulators can output a max current of 1.5A.
Features:

 Output Voltage: 5V
 Output Current: 1.5A
 Thermal Overload Protection
 Short Circuit Protection

2.13 LED :
Light emitting diodes (LEDs) are semiconductor light sources. The light emitted

from LEDs varies from visible to infrared and ultraviolet regions. They operate on low

voltage and power. LEDs are one of the most common electronic components and are

mostly used as indicators in circuits. They are also used for luminance and optoelectronic

applications.

Based on semiconductor diode, LEDs emit photons when electrons recombine with holes

on forward biasing. The two terminals of LEDs are anode (+) and cathode (-) and can be

identified by their size. The longer leg is the positive terminal or anode and shorter one is

negative terminal.

DEPARTMENT OF ECE Page 34


Automatic irrigation System 2017-
2018

2.14 Sensing probe:

YL 69 moisture sensing probe is used to sense the moisture here. It is simply a fork-shaped

PCB with tracks running on both sides of the legs. Just plug this probe into the soil where

you want to sense the moisture. Image of the YL 69 sensing probe is given below.

Figure 2.15

2.15 Comparator circuit.:

YL 38 comparator module is used in this project. It is a single channel opamp comparator

based on L393 IC. This module just compares the output voltage of the sensing probe

with a reference voltage and switches its voltage appropriately for the microcontroller to

read. Circuit diagram of the YL 38 comparator module is shown below.

DEPARTMENT OF ECE Page 35


Automatic irrigation System 2017-
2018

Figure 2.16

The output voltage of the sensing probe is connected to the inverting input of the opamp.

When the moisture level is high more current passes through the sensing probe and so the

voltage at the inverting pin will be higher than the reference. The reference can be set using

the trim pot R2. At this condition output of the opamp goes low and sinks the LED D1 to

make it glow. When the moisture is lower than the set point, the opposite happens. So in

simple words, a LOW output of the opamp indicates a high moisture and a HIGH output of

the opamp indicates a low moisture. The output of the opamp is marked as pin D0 on the

sensor YL 38 module. This pin is connected to the microcontroller for further processing.

LED D2 is just a power ON indicator. Capacitors C1 and C2 are noise filters.

DEPARTMENT OF ECE Page 36


Automatic irrigation System 2017-
2018

2.16 Tools & Platform Used

Various tools are used in this project as:

Printed Circuit Board

Figure 2.17
A printed circuit board, or PCB, is used to mechanically support and electrically connect
electronic components using conductive pathways, tracks or signal traces etched from
copper sheets laminated onto a non-conductive substrate. It is also referred to as printed
wiring board (PWB) or etched wiring board. A PCB populated with electronic components
is a printed circuit assembly (PCA), also known as a printed circuit board assembly
(PCBA). Printed circuit boards are used in virtually all but the simplest commercially-
produced electronic devices.

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 work pieces.
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

DEPARTMENT OF ECE Page 37


Automatic irrigation System 2017-
2018

includes combustion of a suitable gas, which can either be delivered through a tank
mounted on the iron (flameless), or through an external flame.
Soldering irons are most often used for installation, repairs, and limited production work.

Cleaning
When burnt flux and oxidized material begin to accumulate on the tip, they can block heat
transfer and contaminate joints, making soldering difficult or impossible. Therefore, the tips
are periodically cleaned. Many soldering stations come with cellulose sponges which are
dampened and used to wipe a hot iron's tip clean. A wire brush, preferably brass or wire
wheel (mounted on a bench grinder), is sometimes carefully used to remove very severe
oxidation, though this may risk damaging the tip's protective iron plating. A small amount
of fresh solder is usually then applied to the clean tip in a process called tinning. The
working surface of the tip is usually kept tinned (coated with wet solder) to minimize
oxidation. Oxidation blocks heat transfer, corrodes the tip, and contaminates the joint

Soldering Wire
Solder (usually pronounced /ˈsɒldər/, /ˈsoʊdər/ or in USA /ˈsɒdər/) is a fusible metal alloy
used to join together metal work pieces and having a melting point below that of the work
piece(s).
Soft solder is what is most often thought of when solder or soldering are mentioned and it
typically has a melting range of 90 to 450 °C (190 to 840 °F). It is commonly used in
electronics and plumbing. Alloys that melt between 180 and 190 °C (360 and 370 °F) are the
most commonly used. By definition, using alloys with melting point above 450 °C (840 °F)
is called 'hard soldering', 'silver soldering' or brazing. Soft solder can contain lead and/or flux
but in many applications lead free solder is used. Perhaps the most common and most familiar
form of solder is as a wire or rod, though plumbers often use bars of solder while jewelers
often use solder in thin sheets which they cut into snippets. Solder can also come in a paste
or as a preformed foil shaped to match the work piece. The word solder comes from the
Middle English word Souder, via Old French soldure and souldur, from the Latin solid are,
meaning "to make solid".
.

DEPARTMENT OF ECE Page 38


Automatic irrigation System 2017-
2018

Lead solder
Tin/lead solders, also called soft solders, are commercially available with tin concentrations
between 5% and 70% by weight. The greater the tin concentration, the greater the solder’s
tensile and shear strengths. At the retail level, the two most common alloys are 60/40
Tin/lead (Sn/Pb) which melts at 370 °F or 188 °C and 63/37 Sn/Pb used principally in
electrical/electronic work. The 63/37 ratio is notable in that it is a eutectic mixture, which
means:
1) It has the lowest melting point (183 °C or 361.4 °F) of all the tin/lead alloys; and
2) The melting point is truly a point — not a range.

DEPARTMENT OF ECE Page 39


Automatic irrigation System 2017-
2018

CHAPTER 3

SOFTWARE DESCRIPTION

DEPARTMENT OF ECE Page 40


Automatic irrigation System 2017-
2018

3.1 KEIL SOFTWARE

Keil Software, world's leading developer of Embedded Systems Software, makes ANSI C

compilers, macro assemblers, real-time kernels, debuggers, linkers, library managers,

simulators, integrated environments, and evaluation boards for the 8051, 251, ARM7, and

C16x/ST10 microcontroller families. Keil Software implemented the first C compiler

designed from the ground-up specifically for the 8051 microcontroller.

Keil development tools offer a complete development environment for Intel, ARM, Cortex-

M, and Cortex-R processor-based devices. They are easy to learn and use, yet powerful

enough for the most demanding embedded applications.

The MDK Core contains all development tools including IDE, Compiler, and Debugger.

The new Pack Installer adds and updates Software Packs for devices, CMSIS, and

middleware.

The µVision IDE combines project management, run-time environment, build facilities, source

code editing, and program debugging in a single powerful environment. µVision is easy-to-use

and accelerates your embedded software development. µVision supports multiple screens and

allows you to create individual window layouts anywhere on the visual surface.

The µVision Debugger provides a single environment in which you may test, verify, and
optimize your application code. The debugger includes traditional features like simple and
complex breakpoints, watch windows, and execution control and provides full visibility to
device peripherals.

With the µVision Project Manager and Run-Time Environment we can create software
application using pre-build software components and device support from Software Packs.

DEPARTMENT OF ECE Page 41


Automatic irrigation System 2017-
2018

The software components contain libraries, source modules, configuration files, source code
templates, and documentation. Software components can be generic to support a wide range
of devices and applications.

3.2 PROTEUS 8 PROFESSIONAL

The Proteus Design Suite is a proprietary software tool suite used primarily for electronic
design automation. The software is used mainly by electronic design engineers and
technicians to create schematics and electronic prints for manufacturing printed circuit
boards.
It was developed in Yorkshire, England by Labcenter Electronics Ltd and is available in
English, French, Spanish and Chinese languages.
The micro-controller simulation in Proteus works by applying either a hex file or a debug file to
the microcontroller part on the schematic. It is then co-simulated along with any analog and
digital electronics connected to it. This enables its use in a broad spectrum of project
prototyping in areas such as motor control, temperature control and user interface design

DEPARTMENT OF ECE Page 42


Automatic irrigation System 2017-
2018

3.3 Program

RS EQU P2.7

RW EQU P2.6

E EQU P2.5

ORG 00H

SETB P3.51

MOV TMOD,#00000001B

MAIN:ACALL DINT

ACALL TEXT1

JB P3.5, NEXT

ACALL LINE2

ACALL TEXT2

CLR P2.0

SJMP EXIT

NEXT:ACALL LINE2

DEPARTMENT OF ECE Page 43


Automatic irrigation System 2017-
2018

ACALL TEXT3

SETB P2.0

EXIT:ACALL DELAY1

SJMP MAIN

DELAY1:MOV R0,#15D

BACK1: MOV TH0,#00000000B

MOV TL0,#00000000B

SETB TR0

HERE2: JNB TF0,HERE2

CLR TR0

CLR TF0

DJNZ R0,BACK1

RET

TEXT1: MOV A,#"M"

ACALL DISPLAY

MOV A,#"o"

DEPARTMENT OF ECE Page 44


Automatic irrigation System 2017-
2018

ACALL DISPLAY

MOV A,#"i"

ACALL DISPLAY

MOV A,#"s"

ACALL DISPLAY

MOV A,#"t"

ACALL DISPLAY

MOV A,#"u"

ACALL DISPLAY

MOV A,#"r"

ACALL DISPLAY

MOV A,#"e"

ACALL DISPLAY

MOV A,#" "

ACALL DISPLAY

MOV A,#"C"

ACALL DISPLAY

DEPARTMENT OF ECE Page 45


Automatic irrigation System 2017-
2018

MOV A,#"o"

ACALL DISPLAY

MOV A,#"n"

ACALL DISPLAY

MOV A,#"t"

ACALL DISPLAY

MOV A,#"r"

ACALL DISPLAY

MOV A,#"o"

ACALL DISPLAY

MOV A,#"l"

ACALL DISPLAY

RET

TEXT2: MOV A,#"["

ACALL DISPLAY

MOV A,#"O"

DEPARTMENT OF ECE Page 46


Automatic irrigation System 2017-
2018

ACALL DISPLAY

MOV A,#"K"

ACALL DISPLAY

MOV A,#"]"

ACALL DISPLAY

MOV A,#" "

ACALL DISPLAY

MOV A,#"P"

ACALL DISPLAY

MOV A,#"u"

ACALL DISPLAY

MOV A,#"m"

ACALL DISPLAY

MOV A,#"p"

ACALL DISPLAY

MOV A,#" "

ACALL DISPLAY

DEPARTMENT OF ECE Page 47


Automatic irrigation System 2017-
2018

MOV A,#"O"

ACALL DISPLAY

MOV A,#"F"

ACALL DISPLAY

MOV A,#"F"

ACALL DISPLAY

RET

TEXT3: MOV A,#"["

ACALL DISPLAY

MOV A,#"L"

ACALL DISPLAY

MOV A,#"o"

ACALL DISPLAY

MOV A,#"w"

ACALL DISPLAY

MOV A,#"]"

DEPARTMENT OF ECE Page 48


Automatic irrigation System 2017-
2018

ACALL DISPLAY

MOV A,#" "

ACALL DISPLAY

MOV A,#"P"

ACALL DISPLAY

MOV A,#"u"

ACALL DISPLAY

MOV A,#"m"

ACALL DISPLAY

MOV A,#"p"

ACALL DISPLAY

MOV A,#" "

ACALL DISPLAY

MOV A,#"O"

ACALL DISPLAY

MOV A,#"N"

ACALL DISPLAY

DEPARTMENT OF ECE Page 49


Automatic irrigation System 2017-
2018

RET

DINT:MOV A,#0CH

ACALL CMD

MOV A,#01H

ACALL CMD

MOV A,#06H

ACALL CMD

MOV A,#80H

ACALL CMD

MOV A,#3CH

ACALL CMD

RET

LINE2:MOV A,#0C0H

ACALL CMD

DEPARTMENT OF ECE Page 50


Automatic irrigation System 2017-
2018

RET

CMD: MOV P0,A

CLR RS

CLR RW

SETB E

CLR E

ACALL DELAY

RET

DISPLAY:MOV P0,A

SETB RS

CLR RW

SETB E

CLR E

ACALL DELAY

RET

DEPARTMENT OF ECE Page 51


Automatic irrigation System 2017-
2018

DELAY: CLR E

CLR RS

SETB RW

MOV P0,#0FFH

SETB E

MOV A,P0

JB ACC.7,DELAY

CLR E

CLR RW

RET

END

DEPARTMENT OF ECE Page 52


Automatic irrigation System 2017-
2018

4.1 Conclusion

The Microcontroller based irrigation system proves to be a real time feedback control system

which monitors and controls all the activities of irrigation system efficiently. The present

proposal is a model to modernize the agriculture industries at a mass scale with optimum

expenditure. Using this system, one can save manpower, water to improve production and

ultimately profit

DEPARTMENT OF ECE Page 53


Automatic irrigation System 2017-
2018

4.2 FUTURE SCOPE

Various proposed scopes are:

 We can enhance the performance of automatic irrigation system by connection it with

IOTs (internet of things),we can versatility by connecting it with many device.

 GSM can be added for sending SMS to the concerned person in case of any problem.

 Other Parameters such as ambient temperature, light intensity & humidity can be

measured.

 Pesticides & fertilizers can also be added automatically in the water.

 We can also use solar panel for providing electrical energy in remote area.

DEPARTMENT OF ECE Page 54


Automatic irrigation System 2017-
2018

4.3 References

 http://www.google.co.in/#sclient=psyb&hl=en&source=hp&q=microcontroller+
AT89C52P6+pin+diagram&pbx=1&oq=microcontroller+AT89C52P6
 www.electricalprojects.com
 Basic electronics by J.B Gupta.
 www.circuittoday.com

DEPARTMENT OF ECE Page 55

You might also like