Sei sulla pagina 1di 62

CHAPTER 1

1.1 INTRODUCTION:
In India agriculture is the most important occupation of the people. More than
60% of our total population depends for their subsistence on agriculture. After
independence due to various development projects introduced in the field of agriculture,
production of food grains has been continuously increasing. The entire Indian economy
is depends on agriculture. In this regard, a thought is given to develop an Automatic
Plant irrigation System designed with micro-controller.

Irrigation engineering comprises of a full knowledge of sources of irrigation


water, their proper preservation and application of this water to the land after conveying
it from the source through an irrigation system, consisting of canal and connected
works. It also includes a working knowledge of different types of soils and the water
requirements of various crops sown in them.

In this project work lot of importance is given for the drip irrigation, such that
by sensing the soil humidity water supply can be controlled automatically. For this
purpose relay is used, to energizing the pumping motor to supply water to the plants.
The relay is energized automatically when the soil is dry, similarly the relay can be
closed automatically when the soil is in wet condition. For sensing the soil condition
copper electrodes are used.

Irrigation is usually required when the yearly rainfall is either insufficient or ill
distributed or ill timed. Yield is much better where irrigation is practiced and fields are
watered at the proper time. In countries like India and Egypt, Irrigation provides
employment for large sections of people. It raises the standard of living and prosperity.
Irrigation projects are successful only when sufficient quantities of water are available
and the land is suitable to grow remunerative crops. No irrigation is normally required if
the total annual rainfall is 100cms. Or more and takes place at correct times. When it is

1
proposed to grow valuation and better types of crops like Rice, Sugar cane, Vegetables,
Cotton etc., irrigation is very essential.

For this purpose the control circuit is designed with micro-controller unit with the
advancement of technology in the electronics. Particularly in the Hybrid electronics and
Microelectronics, the electronics has entered in to each and every field, whether it is a
communication electronics or control electronics or computer electronics. To make
more innovative and more comfortable for modern irrigation, it is decided to develop a
project in plant irrigation automation.

In this project work, micro-controller chip is playing a major role, the controller
used in this project is ATmega 328p. Nowadays with the advancement of technology in
the field of micro-controllers, all the activities in our day-to-day living have become
part of information technology and we find micro-controllers in each and every
application. Thus, the trend is directing towards controller based project works.
However in this project work, the basic signal processing of information gathering from
the soil condition, is done with analog circuit, for this purpose copper electrodes are
used for sensing the soil condition.

Continuous monitoring of the soil condition manually is quite difficult task, there
by this system is designed which monitors the soil sensitivity continuously, and
energizes the water pumping motor automatically. Similarly, the system de-energizes
pumping motor automatically, when the soil condition becomes wet.

By implementing this kind of monitoring and control systems for the agriculture
purpose, each and every field can be automated. However in this project work micro-
controller is used just as a controller in controlling the relay. In this project relay is used
and is connected at the output of the controller, which energizes or de-energizes
automatically according to the received information from the copper electrodes. Before
we go into concept of field automation first we have to define automation.

2
The term Automation refers to means of control of electrical and mechanical
operations without human interference. Definition of automation can be extended to
field Automation which states “monitoring and control of various electrical equipments
used for modern drip irrigation to their predetermined levels without human
interference”. In real time application with one micro-controller we can process large
number of micro-controller or other IC device to be tailored to implement a specific
function. The application program executed by a micro-controller drives the system
hardware in order to implement the desired system function for a given micro-
controller, different application programs allow different systems function to be
implemented within a range limited by the available system hardware. As the
technology advances, changing lifestyles patterns and willingness to spend in crop
improvement, fulfill the desire for intelligent, fully automated field. In a typical
automated field various equipments can be used for various methods of irrigation.

3
CHAPTER 2

2.1 LITERATURE SURVEY:

Temperature sensors, soil moisture sensors are placed in root zone of plant and
gateway unit handles the information about sensor and carry data to a web
application. One algorithm was developed for measure threshold values of temperature
sensor and soil moisture sensor that was programmed into a microcontroller to control
water quantity. For power photovoltaic panel was used. Another fact like cellular-Internet
interface used that allowed for data inspection and irrigation scheduling to be
programmed through a web page. The automatic system was tested for 142 days and save
92% compared with traditional watering system. Three replicas of the automated system
have been used successfully in other places for 1 year and 6months. Because of its energy
autonomy and low cost, the system has the potential to be useful in water limited
geographically isolated area [1].
Soil moisture content has been detected using a technique that is called acoustic
based and it was developed. The main propose of this technique is development for
measure level of soil moisture in real time method. The technique based on relationship
between speed of sound and the degree of saturation with water in soils. This experiment
found that the speed of sound decreases with the moisture content following, depending
on the kind of soil. [2] .
A model of automatic irrigation system which is based on Controller and solar
power was used only for source of power supply. Various sensor are placed in rice field.
Sensors sense water level regularly and give the information to farmer through cellular
phone. Farmer controls the motor using cellular phone without going in rice or paddy
field. If the water level reaches at danger level, automatically motor will be stop without
conformation of farmer. [3]
The automatic system based on ARM(Advanced RISC Machine) and for
communication GSM(Global System for Mobile communication) technology was used.
Irrigation system provides foe adequate irrigation in particular area which is real time.
Soil moisture sensor placed in root zone in paddy field and sense water level. The system
was set up using ARM7TDMI core and GSM. GSM is an important part of these this
system. System communicates using GSM. GSM operate through SMS and is a link

4
between ARM processor and centralized unit. This system detects climate condition and
field condition in real time. This information send to user in the form of SMS and GSM
modem is controlled with the help of standard set of AT (Attention) commands. These
commands are used to control majority of the functions of GSM model. [4]
In this paper, automatic irrigation technique irrigated using wireless sensor
network i.e. Zig-bee and internet technology. The idea was developed by improve
irrigation system and reduced cost of irrigation water level. Sensors are placed in farm
and sense continuously and collect the information. This information stored at central
monitor and also passes to more data collection interface and then broadcast to the
wireless sensor node. Using this information system was control automatically using
internet.[5]

5
CHAPTER 3

HARDWARE AND SOFTWARE DESIGN

3.1 BLOCK DIAGRAM:

Figure 3.1 Block Diagram

POWERS SUPPLY UNIT:

Figure 3.2 Power Supply Block Diagram

6
Full Wave Rectifier Working & Operation

The working & operation of a full wave bridge rectifier is pretty simple. The circuit
diagrams and wave forms we have given below will help you understand the operation of
a bridge rectifier perfectly. In the circuit diagram, 4 diodes are arranged in the form of a
bridge. The transformer secondary is connected to two diametrically opposite points of
the bridge at points A & C. The load resistance R L is connected to bridge through points
B and D.

Figure 3.3 Full Wave Bridge Rectifier – Circuit Diagram with Input and Output
Wave Forms

7
During The First Half Cycle

During first half cycle of the input voltag e, the upper end of the transformer
secondary winding is positive with respect to the lower end. Thus during the first
half cycle diodes D1 and D3 are forward biased and current flows through arm
AB, enters the load resistance RL, and returns back flowing through arm DC.
During this half of each input cycle, the diodes D 2 and D4 are reverse biased and
current is not allowed to flow in arms AD and BC. The flow of current is
indicated by solid arrows in the figure above. We have developed another
diagram below to help you understand the current flow quickly. See the diagram
below – the continuous circuit path indicate beginning of current flow from
source (transformer secondary) to the load resistance. The dotted circuit path
indicate return path of current from load resistance to the source, thus completing
the circuit.

Figure 3.4 Flow of current in Bridge Rectifier

8
During the Second Half Cycle

During second half cycle of the input voltage, the lower end of the transformer
secondary winding is positive with respect to the upper end. Thus diodes D 2 and D4
become forward biased and current flows through arm CB, enters the load resistance RL,
and returns back to the source flowing through arm DA. Flow of current has been shown
by dotted arrows in the figure. Thus the direction of flow of current through the load
resistance RL remains the same during both half cycles of the input supply voltage. See
the diagram below – the dotted or discontinuous circuit path indicate beginning of current
flow from source (transformer secondary) to the load resistance. The continuous circuit
path indicate return path of current from load resistance to the source, thus completing
the circuit.

Figure 3.5 Path of current in 2nd Half Cycle

Peak Inverse Voltage of a Full wave bridge rectifier:


 Let’s analyse peak inverse voltage (PIV) of a full wave bridge rectifier using the
circuit diagram. At any instant when the transformer secondary voltage attains
positive peak value Vmax, diodes D1 and D3 will be forward biased (conducting)
and the diodes D2 and D4 will be reverse biased (non conducting). If we consider
ideal diodes in bridge, the forward biased diodes D1 and D3 will have zero
resistance. This means voltage drop across the conducting diodes will be zero.

9
This will result in the entire transformer secondary voltage being developed
across load resistance RL.

Thus PIV of a bridge rectifier = Vmax (max of secondary voltage)

Bridge Rectifier Circuit Analysis

The only difference in the analysis between full wave and centre tap rectifier is that:

1. In a bridge rectifier circuit two diodes conduct during each half cycle and
the forward resistance becomes double (2R F).
2. In a bridge rectifier circuit Vsmax is the maximum voltage across the transformer
secondary winding whereas in a centre tap rectifier Vsmax represents that
maximum voltage across each half of the secondary winding.

The different parameters are explained with equations below:

1. Peak Current

Instantaneous value of the voltage applied to the rectifier is given as

Vs = Vsmax Sin wt

If the diode is assumed to have a forward resistance of RF ohms and a reverse resistance
equal to infinity, then current flowing through the load resistance is given as

i1 = Imax Sin wt and i2 = 0 for the first half cycle

and i1 = 0 and i2 = Imax*Sin wt for second half cycle

The total current flowing through the load resistance RL, being the sum of currents i1 and
i2 is given as

10
i = i1 + i2 = Imax *Sin wt for the whole cycle.

Where peak value of the current flowing through the load resistance RL is given as

Imax = Vsmax/(2RF + RL)

2. Output Current

Since the current is the same through the load resistance RL in the two halves of the ac
cycle, magnitude od dc current Idc, which is equal to the average value of ac current, can
be obtained by integrating the current i1 between 0 and pi or current i2 between pi and
2pi.

Output Current of Full Wave Rectifier

3. DC Output Voltage

Average or dc value of voltage across the load is given as

DC Output Voltage of Full Wave Rectifier

11
4. Root Mean Square (RMS) Value of Current

RMS or effective value of current flowing through the load resistance RL is given as

RMS Value of Current of Full Wave Rectifier

5. Root Mean Square (RMS) Value of Output Voltage

RMS value of voltage across the load is given as

RMS Value of Output Voltage of Full Wave Rectifier

6. Rectification Efficiency

Power delivered to load,

Rectification Efficiency of Full Wave Rectifier

12
7. Ripple Factor

Form factor of the rectified output voltage of a full wave rectifier is given as

Ripple Factor of Full Wave Rectifier

2
So, ripple factor, γ = 1.11 – 1) = 0.482

8. Regulation

The dc output voltage is given as

Regulation of Full Wave Rectifier

Merits and Demerits of Full-wave Rectifier Over Half-Wave Rectifier

 Efficiency is double for a full wave bridge rectifier. The reason is that, a half wave
rectifier makes use of only one half of the input signal. A bridge rectifier makes
use of both halves and hence double efficiency
 The residual ac ripples (before filtering) is very low in the output of a bridge
rectifier. The same ripple percentage is very high in half wave rectifier. A simple
filter is enough to get a constant dc voltage from bridge rectifier.
 We know the efficiency of FW bridge is double than HW rectifier. This means
higher output voltage, Higher transformer utilization factor (TUF) and higher
output power.

13
Demerits – Full-wave rectifier needs more circuit elements and is costlier.

Uses of Full wave Bridge rectifier

Full wave rectifier find uses in the construction of constant dc voltage power supplies,
especially in general power supplies. A bridge rectifier with an efficient filter is ideal for
any type of general power supply applications like charging a battery, powering a dc
device (like a motor, led etc) etc. However for an audio application, a general power
supply may not be enough. This is because of the residual ripple factor in a bridge
rectifier. There are limitations to filtering ripples. For audio applications, specially built
power supplies (using IC regulators) may be ideal.

Full Wave Bridge Rectifier with Capacitor Filter

Output of full wave rectifier is not a constant DC voltage. You can observe from the
output diagram that its a pulsating dc voltage with ac ripples. In real life applications, we
need a power supply with smooth wave forms. In other words, we desire a DC power
supply with constant output voltage is designed. A constant output voltage from the DC
power supply is very important as it directly impacts the reliability of the electronic
device that connects to the power supply.

The output of full wave rectifier can be made smooth by using a filter (a capacitor filter
or an inductor filter) across the diode. In some cases an resistor-capacitor coupled filter
(RC) is also used. The circuit diagram below shows a half wave rectifier with capacitor
filter.

14
Figure 3.6 Full Wave Rectifier - with Capacitor Filter

Transformer
A transformer is an electrical device which is used to convert electrical power from
one Electrical circuit to another without change in frequency. Transformers convert AC
electricity from one voltage to another with little loss of power. Transformers work only
with AC and this is one of the reasons why mains electricity is AC. Step-up transformers
increase in output voltage, step-down transformers decrease in output voltage. Most
power supplies use a step-down transformer to reduce the dangerously high mains
voltage to a safer low voltage. The input coil is called the primary and the output coil is
called the secondary. There is no electrical connection between the two coils; instead they
are linked by an alternating magnetic field created in the soft-iron core of the transformer.
The two lines in the middle of the circuit symbol represent the core. Transformers waste
very little power so the power out is (almost) equal to the power in. Note that as voltage
is stepped down current is stepped up. The ratio of the number of turns on each coil,
called the turn’s ratio, determines the ratio of the voltages. A step-down transformer has a
large number of turns on its primary (input) coil which is connected to the high voltage
mains supply, and a small number of turns on its secondary (output) coil to give a low
output voltage.

15
Figure 3.7 An Electrical Transformer

Turns ratio = Vp/ VS = Np/NS

Power Out= Power In

VS x IS=VP x IP

Vp = primary (input) voltage


Np = number of turns on primary coil
Ip = primary (input) current

Regulator

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

16
positive lead of your unregulated DC power supply (anything from 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.

Figure 3.8 A Three Terminal Voltage Regulator

ATmega 328p MicroController Description

The high-performance Atmel picoPower 8-bit AVR RISC-based microcontroller


combines 32KB ISP flash memory with read-while-write capabilities, 1024B EEPROM,
2KB SRAM, 23 general purpose I/O lines, 32 general purpose working registers,

Figure 3.9 Arduino Nano

17
three flexible timer/counters with compare modes, internal and external interrupts,
serial programmable USART, a byte-oriented 2-wire serial interface, SPI serial port, a 8-
channel 10-bit A/D converter (8-channels in TQFP and QFN/MLF packages),
programmable watchdog timer with internal oscillator, and five software selectable power
saving modes. The device operates between 1.8-5.5 volts.

Features:

 28-pin AVR Microcontroller


 Flash Program Memory: 32 Kbytes
 EEPROM Data Memory: 1 Kbytes
 SRAM Data Memory: 2 Kbytes
 I/O Pins: 23
 Timers: Two 8-bit / One 16-bit
 A/D Converter: 10-bit EIGHT Channel
 PWM: Six Channels
 RTC: Yes with Separate Oscillator
 MSSP: SPI and I²C Master and Slave Support
 USART: Yes
 External Oscillator: up to 20MHz

18
Figure 3.10 Arduino Nano with in description

A serial programmable USART, a byte-oriented 2-wire Serial Interface, an SPI serial


port. a 6-channel 10-bit ADC (8 channels in TQFP and QFN/MLF packages), a
programmable Watchdog Timer with internal Oscillator, and five software selectable
power saving modes. EEPROM access much slower than other internal RAM.

AVR Microcontroller Architecture

AVR was developed by Atmel Corporation. The architecture of this


microcontroller was developed by “Alf-Egil Bogen” and “Vegard Wollan”. The term
AVR derives from its developers and stands for Alf-Egil Bogen Vegard Wollan RISC
microcontroller, also known as “Advanced Virtual RISC”.

The architecture of the AVR is shown below, it uses a “Harvard architecture” thus
it has separate buses and memories for data and program. Instructions in the program
memory are performed with a single level pipelining. While one instruction is being
achieved, the subsequent instruction is pre-fetched from the program memory. This
thought allows instructions to be performed in every CLK cycle and that suggest AVR
runs at around 1 MIPS / MHz

19
Block Diagram 3.11 AVR Architecture CPU
The CPU of the AVR microcontroller is same but so simple like the one in a
computer. The main purpose of the CPU is to confirm correct program performance.
Therefore, the CPU must be able to access perform calculations, memories, control
peripherals & handle interrupts. The CPUs of Atmel’s 8-bit and 32-bit AVR are based on
an innovative “Harvard architecture” thus every IC has two buses namely one instruction
bus and data bus. The CPU reads executable instructions in instruction bus, wherein the
data bus, is to read or write the corresponding data. The CPU core of the AVR consists of
the ALU, General Purpose Registers, Program Counter, Instruction Register, Instruction
Decoder, Status Register and Stack Pointer

20
I. FLASH PROGRAM MEMORY

The program of the AVR microcontroller is stored in non-volatile programmable Flash


program memory which is just similar to the flash storage in your SD Card or Mp3
Player. The Flash program memory is separated into two units. The first unit is the
Application Flash section. It is where the program of the AVR is stored. The second
section is named as the Boot Flash section and can be fixed to perform directly when the
device is powered up. One significant fact to note is that the microcontrollers Flash
program memory has a resolution of at least 10,000 writes/erase cycles.

II. SRAM

The SRAM (Static Random Access Memory) of the AVR microcontroller is just like
computer RAM. While the registers are used to execute calculations, the SRAM is used
to supply data through the runtime. This volatile memory is prearranged in 8-bit registers.

III. EEPROM

The term EEPROM stands for Electronically Erasable Read-Only Memory is like a
nonvolatile memory, but you can’t run a program from it, but it is used as long time
storage. The EEPROM doesn’t get removed when the IC loses power. It’s a great place
for storing data like device parameters and configuration of the system at runtime so that
it can continue between resets of the application processor. One significant fact to note is
that the EEPROM memory of the AVR has a limited lifetime of 100,000 writes /
EEPROM page – reads are limitless. Keep this in mind in your application and try to
keep writing to a minimum, so that you only write the small amount of info required for
your application every time you update the EEPROM.

21
IV. DIGITAL I/O MODULES

The digital I/O modules let digital communication or logic communication with the AVR
microcontroller and the exterior world. Communication signals are that of TTL/CMOS
logic.

V. ANALOG I/O MODULES

Analog I/O modules are used to input or output analog information from or to the exterior
world. These modules comprise analog comparators and analog-to-digital converters
(ADC).

VI. INTERRUPT UNIT

Interrupts have enabled the microcontroller to monitor particular events in the


background while performing and application program & respond to the occurrence if
required pausing the unique program. This is all synchronized by the interrupt Unit.

VII. TIMER

Most AVR microcontrollers have at least one Timer or Counter module which is used to
achieve timing or counting operations in the microcontroller. These comprise time
stamping, counting events, measuring intervals, etc.

VIII. WATCHDOG

All AVR microcontrollers have an internal Watchdog Timer. It has very limited useful
features comprising: distinct 128kHz CLK source, skill to reset the microcontroller and
produce an interrupt.

22
IX. USART / SPI / I2C

The units like USART or SPI or I2C are used for serial communication with the exterior
world. An instance is the USART peripheral which uses the RS232 standard.

23
ATmega 328p INTERNAL ARCHITECTURE

Figure 3.12 Atmega 328p Internal Architecture

24
The AVR core combines a rich instruction set with 32 general purpose working
registers. All the 32 registers are directly connected to the Arithmetic Logic Unit (ALU),
allowing two independent registers to be accessed in one single instruction executed in
one clock cycle. The resulting architecture is more code efficient while achieving
throughputs up to ten times faster than conventional CISC microcontrollers.

The ATmega328P provides the following features: 4K bytes of In-System


Programmable Flash with Read-While-Write capabilities, 1K bytes EEPROM, 2K bytes
SRAM, 23 general purpose I/O lines, 32 general purpose working registers, three flexible
Timer/Counters with compare modes, internal and external interrupts, a serial
programmable USART, a byte-oriented 2-wire Serial Interface, an SPI serial port, a 6-
channel 10-bit ADC, a programmable Watchdog Timer with internal Oscillator, and five
software selectable power saving modes. The Idle mode stops the CPU while allowing
the SRAM, Timer/Counters, USART, 2-wire Serial Interface, SPI port, and interrupt
system to continue functioning.

The Power-down mode saves the register contents but freezes the Oscillator,
disabling all other chip functions until the next interrupt or hardware reset. In Power-save
mode, the asynchronous timer continues to run, allowing the user to maintain a timer
base while the rest of the device is sleeping. The ADC Noise Reduction mode stops the
CPU and all I/O modules except asynchronous timer and ADC, to minimize switching
noise during ADC conversions. In Standby mode, the crystal/resonator Oscillator is
running while the rest of the device is sleeping. This allows very fast start-up combined
with low power consumption.

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


technology. The On-chip ISP Flash allows the program memory to be reprogrammed In-
System through an SPI serial interface, by a conventional non-volatile memory
programmer, or by an On-chip Boot pro-gram running on the AVR core. By combining
an 8-bit RISC CPU with In-System Self-Programmable Flash on a monolithic chip, the
Atmel ATmega328P is a powerful microcontroller that provides a highly flexible and cost
effective solution to many embedded control applications.

25
.
Table 3.1 Interrupts of ATmega328p:

Source Interrupt definition


Reset External pin, power-on reset, brown-out
reset and watchdog system reset

Int0 External interrupt request 0


Int1 External interrupt request 1
Pcint0 Pin change interrupt request 0
Pcint1 Pin change interrupt request 1
Pcint2 Pin change interrupt request 2
Wdt Watchdog time-out interrupt
Timer2 compa Timer/counter2 compare match a
Timer2 compb Timer/counter2 compare match b
Timer2 ovf Timer/counter2 overflow
Timer1 capt Timer/counter1 capture event
Timer1 compa Timer/counter1 compare match a
Timer1 compb Timer/counter1 compare match b
Timer1 ovf Timer/counter1 overflow
Timer0 compa Timer/counter0 compare match a
Timer0 compb Timer/counter0 compare match b
Timer0 ovf Timer/counter0 overflow
Spi,spc Spi serial transfer complete
Usart,rx Usart rx complete
Usart,udre Usart, data register empty
Usart,tx Usart, tx complete
Adc Adc conversion complete
Ee ready Eeprom ready
Analog comp Analog comparator
Tw1 2 wire serial interface
Spm ready Store program memory ready

26
Relay Section

A relay is an electromagnetic switch, which can be used to make or break the


circuit. In the present module, the relay is used for controlling the pumping motor. In
this project work to simulate the pumping motor, a small DC pumping motor is used
and it is connected through the relay contact. To energize the electrical devices,
normally open contacts are used, when the relay is energized, normally open contact
gets closed and supply is provided to that particular electrical device.

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. These contacts can be
either Normally Open (NO), Normally Closed (NC), or change-over contacts. A relay
is able to control an output circuit of higher power than the input circuit, it can be
considered to be, in a broad sense, a form of an electrical amplifier. So a relay can be
defined as an automatic electromagnetic/electronic switch, which can be used to make
or break the circuit.

Normally-open contacts connect the circuit when the relay is activated; the
circuit is disconnected when the relay is inactive. It is also called Form A contact or
"make" contact. Form A contact is ideal for applications that require to switch a high-
current power source from a remote device.

Normally-closed contacts disconnect the circuit when the relay is activated; the
circuit is connected when the relay is inactive. It is also called Form B contact or
"break" contact. Form B contact is ideal for applications that require the circuit to
remain closed until the relay is activated. Change-over contacts control two circuits:
one normally-open contact and one normally-closed contact with a common terminal.
It is also called Form C contact.

The electromagnetic relay, one of mankind’s first electrical device, was used
practically in telegraphy as early as 1850. The modern relay, properly applied, is one
of the most simple, effective and dependable component available. In the majority of
instances, it can achieve better reliability at lesser cost than an equivalent solid-state

27
complex type of relay. The term ‘relay’ was used for the first time to describe an
invention made by Samuel Morse in 1836. The device invented by Morse was a
“Telegraph Amplifying Electromagnetic Device” which enabled a small current
flowing in a coil to switch on a large current in another circuit and thus helped in
“relay” of signals.

Figure 3.13 Relay

28
Operation

The relay used in this project work is electromagnetic relay. The


electromagnetic relay is basically a switch (or a combination of switches) operated by
the magnetic force generated by a current flowing through a coil. Essentially, it
consists of four parts an electromagnet comprising a coil and a magnetic circuit, a
movable armature, a set of contacts, and a frame to mount all these components.
However, very wide ranges of relays have been developed to meet the requirements of
the industry.

This relay is nothing but a switch, which operates electromagnetically. It opens


or closes a circuit when current through the coil is started or stopped. When the coil is
energized armature is attracted by the electromagnet and the contacts are closed. That
is how the power is applied to the signals (indicators). The construction of the typical
relay contains a code surrounded by a coil of copper wire. The core is mounted on a
metal frame. The movable part of the relay is called armature. When a voltage is
applied to the coil terminals, the current flowing through the coil produces a magnetic
field in the core.

In other words, the core acts as an electromagnet and attracts the metal
armature. When the armature is attracted to the core, the magnetic path is from the
core through armature, through the frame, and back to the core. On removing the
voltage the spring attached to the armature returns the armature to its original position.
In this position, there is a small air-gap in the magnetic path. Hence, more power is
needed to pull in the armature than that needed to keep it held in the attracted position.

The working of relay is described as follows: when a logic 1 ( 5V) is applied


the at the base of the transistor, it conducts and the current flows from collector to
emitter and the coil present across the supply and the collector terminal gets
magnetized (as current flows through it, moving charges produce a magnetic field
around them ) and attracts the metal contact which closes the switch of the circuit (to
be controlled ) . When logic 0 is applied at the base of the transistor, transistor does

29
not conduct and coil loses its charge and demagnetizes so the relay contact will not be
attached to the coil anymore, and the circuit switch will be opened.

Figure 3.14 Internal circuit of relay

30
Moisture Sensor

Soil moisture sensors measure the volumetric water content in soil. Since the
direct gravimetric measurement of free soil moisture requires removing, drying, and
weighting of a sample, soil moisture sensors measure the volumetric water content
indirectly by using some other property of the soil, such as electrical resistance, dielectric
constant, or interaction with neutrons, as a proxy for the moisture content.

The relation between the measured property and soil moisture must be calibrated
and may vary depending on environmental factors such as soil type, temperature, or
electric conductivity. Reflected microwave radiation is affected by the soil moisture and
is used for remote sensing in hydrology and agriculture. Portable probe instruments can
be used by farmers or gardeners. Soil moisture sensors typically refer to sensors that
estimate volumetric water content.

Another class of sensors measure another property of moisture in soils called


water potential; these sensors are usually referred to as soil water potential sensors and
include tensiometers and gypsum blocks. The below moisture sensor can be used to send
an analog value to the microcontroller’s analog pins (A0 – A7) or the potentiometer on
the sensor module can be calibrated to send a digital value that is logic 0 or logic 1 to the
digital pins (D0-D13) of the microcontroller.

Figure 3.15 Moisture Sensor

31
Sensor Installation

A single sensor can be used to control the irrigation for many zones (where an
irrigation zone is defined by a solenoid valve) or multiple sensors can be used to irrigate
individual zones. In the case of one sensor for several zones, The zone that is normally
the driest, or most in need of irrigation, is selected for placement of the sensor in order to
ensure adequate irrigation in all zones. Some general rules for the burial of the soil
moisture sensor are. Sensors should be buried in the root zone of the plants to be
irrigated, because this is where plants will extract water.

Burial in the root zone will help ensure adequate turf or landscape quality. For turf
grass, the sensor should typically be buried at about three inches deep. Sensors need to be
in good contact with the soil after burial; there should be no air gaps surrounding the
most sun exposure. Sensors should be placed at least 5 feet from the home, place the
sensor. Soil should be packed firmly but not excessively around the sensor. If one sensor
is used to control the entire irrigation system, it should be buried in the zone that requires
water first, to ensure that all zones get adequate irrigation.

Typically, this will be an area with full sun or the area with erty line, or an
impervious surface (such as a driveway) and 3 feet from a planted bed area. Sensors
should also be located at least 5 feet from irrigation heads and toward the center of an
irrigation zone. Sensors should not be buried in high traffic areas to prevent excess
compaction of the soil around the sensor.

LCD (LIQUID CRYSTAL DISPLAY):

Liquid Crystal Display(LCD) is a flat display used in digital watches, cameras


and many portable computers. LCD displays utilize two sheets of polarizing material
with a liquid crystal solution between them. An electric current passed through the liquid
causes the crystals to align so that light cannot pass through them. Each crystal, therefore,
is like a shutter, either allowing light to pass through or blocking the light. LCD's
consume much less power than LED and gas-display displays because they work on the
32
principle of blocking light rather than emitting it. LCD's are used in flat screen TV's,
smartphones, computer monitors, digital watches, etc.

PIN DESCRIPTION:

Figure 3.16 LCD Display

All LCDs have 14 or 16 pins. Let's see them in the following.

 GND or VSS: Ground or 0V


 VCC or VDD: Supply Voltage 5V
 VEE:Contrast adjustment through a variable resistor
 RS: Register select.Generally,everyLcd has two types of registers namely Command
Register and Data Register. When RS=0 or low,Command Register is selected and
When RS=1 or high,Data Register is selected.
 R/W:Read/Write.When RW=1,data is read from Lcd and When RW=0,writes the data
to Lcd.

33
 EN:Enable.Sends data to data pins when a high to low pulse is given.
 Eight Data pins(DB0 to DB7):This 8-Data pins carries 8-bit data or command from
an external unit such as micro controller.
 Led+:Back light of the LCD which should be connected to Vcc or 5V.
 Led-:Back light of the LCD which should be connected to Gnd or 0V.

Table 3.2 PIN DECRIPTION


Pin No Function Name
1 Ground (0V) Ground
2 Supply voltage; 5V (4.7V – 5.3V) Vcc
3 Contrast adjustment; through a variable resistor VEE
4 Selects command register when low; and data register when Register Select
high

5 Low to write to the register; High to read from the register Read/write
6 Sends data to data pins when a high to low pulse is given Enable
7 DB0
8 DB1
9 DB2
10 8-bit data pins DB3
11 DB4
12 DB5
13 DB6
14 DB7
15 Backlight VCC (5V) Led+
16 Backlight Ground (0V) Led-

34
Programming LCD using Arduino NANO

Hardware and Software required

1. Liquid Crystal display


2. Arduino NANO board
3. Arduino IDE

Interfacing LCD to Arduino

Here 16x2 Lcd is used which has 16 pins and can be operated in 4-bit mode or 8-bit
mode.For 4-bit mode,the data pins DB4 to DB7 are used whereas for 8-bit mode all the
data pins have been used.The connections should be made as given below:

 LCD Gnd pin & - pin tto Ground


 LCD Vccpin to 5V
 LCD VEE pin to wiper
 LCD RS pin to digital pin 12
 LCD R/W pin to ground
 LCD Enable pin to digital pin 11
 LCD D4 pin to digital pin 5
 LCD D5 pin to digital pin 4
 LCD D6 pin to digital pin 3
 LCD D7 pin to digital pin 2
 LCD Led+ pin to 5V

35
Servo Motor:

A servo motor controller is a circuit that is used to control the position of a servo
motor. It is also called as a servo motor driver. A servo motor controller consists of a
controller, the servo motor and the power supply unit. For understanding servo motor
control let us consider an example of servomotor that we have given a signal to rotate by
an angle of 45° and then stop and wait for further instruction. The shaft of the DC motor
is coupled with another shaft called output shaft, with help of gear assembly. This gear
assembly is used to step down the high rpm of the motor's shaft to low rpm at output
shaft of the servo system. The voltage adjusting knob of a potentiometer is so arranged
with the output shaft by means of another gear assembly, that during rotation of the shaft,
the knob also rotates and creates an varying electrical potential according to the principle
of potentiometer. Servo motor this signal i.e. electrical potential is increased with angular
movement of potentiometer knob along with the system shaft from 0° to 45°. This
electrical potential or voltage is taken to the error detector feedback amplifier along with
the input reference commends i.e. input signal voltage. As the angle of rotation of the
shaft increases from 0° to 45° the voltage from potentiometer increases. At 45° this
voltage reaches to a value which is equal to the given input command voltage to the
system. As at this position of the shaft, there is no difference between the signal voltage
coming from the potentiometer and reference input voltage (command signal) to the
system, the output voltage of the amplifier becomes zero.

Figure 3.17 Servo Motor

36
Figure 3.18 Internal of Servo Motor

DS 1307(Real Time Clock):

DESCRIPTION
The DS1307 Serial Real-Time Clock is a low-power, full binary-coded decimal
(BCD) clock/calendar plus 56 bytes of NV SRAM. Address and data are transferred
serially via a 2-wire, bi-directional bus. The clock/calendar provides seconds, minutes,
hours, day, date, month, and year information. The end of the month date is automatically
adjusted for months with fewer than 31 days, including corrections for leap year. The
clock operates in either the 24-hour or 12-hour format with AM/PM indicator. The
DS1307 has a built-in power sense circuit that detects power failures and automatically
switches to the battery supply.

Figure 3.19 DS1307

37
PIN ASSIGNMENT:

Figure 3.20 DS1307 Pin Assignment

PIN DESCRIPTION

 VCC - Primary Power Supply

 X1, X2 - 32.768kHz Crystal Connection

 VBAT - +3V Battery Input

 GND - Ground

 SDA - Serial Data

 SCL - Serial Clock

 SQW/OUT - Square Wave/Output Driver

38
3.2 CIRCUIT DIAGRAM:

Fig 3.21 Circuit Diagram

39
3.3 FLOW CHART:

Figure 3.22

40
3.4 PROGRAM CODE:

#include <Servo.h>
#include <Wire.h> #include
<LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
#include "RTClib.h"
Servo myservo;
RTC_DS1307 rtc;
int value;
int value1;
char daysOfTheWeek[7][12] = {"Sunday", "Monday", "Tuesday", "Wednesday",
"Thursday", "Friday", "Saturday"};//real time clock setup
const int moisturesense1=A0; // moisture sensor one
const int moisturesense2=A1; // moisture sensor two
//const int moisturesense3=6; // moisture sensor connected to digital pin,
made by the group
const int relay=10; //relay connected to control the pump
//const int relayy=11;
const int threshold_for_moisturesensor_one=800; //moisture value for the soil
const int threshold_for_moisturesensor_two=800; //moisture value for the soil

int a[3],dec;

void setup ()

{ while (!

Serial);

Serial.begin(9600);
41
if (! rtc.begin())
{ Serial.println("Couldn't find
RTC"); while (1);
}

if (! rtc.isrunning()) { Serial.println("RTC

is NOT running!");

rtc.adjust(DateTime(F(__DATE__), F(__TIME__)));

}//rtc setup
pinMode(moisturesense1,INPUT);
pinMode(moisturesense2,INPUT);
/ pinMode(moisturesense3,INPUT);
pinMode(relay,OUTPUT);
/ pinMode(relayy,OUTPUT);
myservo.attach(9);
myservo.write(0);

lcd.begin(16, 2);

void loop() {
// put your main code here, to run repeatedly:

DateTime now = rtc.now(); //calling the function of DS1307 IC

if(analogRead(moisturesense1)>threshold_for_moisturesensor_one )
{ a[0]=1;
}

42
else{
a[0]=0;
}
if((now.hour() == 6 && now.minute()== 00)||(now.hour() == 18 && now.minute()==
+00)){
a[1]=1;
}
else{
a[1]=0;
}
if((now.hour() == 5 && now.minute()== 00)||(now.hour() == 17 && now.minute()== 00)
&& (analogRead(moisturesense2)<threshold_for_moisturesensor_two)){
a[2]=1;
}
else{
a[2]=0;
}

dec=a[0]*pow(10,2)+a[1]*pow(10,1)+a[2]*pow(10,0);

switch(dec){

case 000:
{
digitalWrite(relay,LOW); // turn on the relay, to turn on the
myservo.write(180); // position the servo to the field2
delay(500); // wait for the servo to get positioned

lcd.clear();

lcd.setCursor(0, 0);

43
lcd.print("field 2 will be");
lcd.setCursor(0, 1);
lcd.print("watered at 6 am");
}
break;
case 001:
{
lcd.clear(); lcd.setCursor(0, 0);
lcd.print("field 3 is being");
lcd.setCursor(4, 1);
lcd.print("watered");
myservo.write(10); // position the servo to the field3
delay(500); // wait for the servo to be positioned
digitalWrite(relay,HIGH); //turn on the water pump
delay(5000); // usually it would be on for one to two hours or more
}
break;
case 010:
{

lcd.clear(); lcd.setCursor(0,
0); lcd.print("field 2 is
being");
lcd.setCursor(4, 1);
lcd.print("watered");
myservo.write(60); // position the servo to the field3
delay(500); // wait for the servo to be positioned
digitalWrite(relay,HIGH); //turn on the water pump
delay(5000); // usually it would be on for one to two hours or more
}
break;
case 011:
44
{
lcd.clear();
lcd.setCursor(1, 0);
lcd.print(" two fields are");
lcd.setCursor(1, 1);
lcd.print("being watered");
myservo.write(60); //position the servo to the field1
delay(500); // wait for the servo to get positioned
digitalWrite(relay,HIGH); // turn on the relay, to turn on the pump
delay(5000);
digitalWrite(relay,LOW);
myservo.write(10); // position the servo to the field2
delay(500); // wait for the servo to get positioned
digitalWrite(relay,HIGH); // turn on the relay, to turn on the
delay(5000);

digitalWrite(relay,LOW);
}
break;

case 100:
{
lcd.clear(); lcd.setCursor(0,
0); lcd.print("field 1 is
being"); lcd.setCursor(4,
1); lcd.print("watered");

myservo.write(120); //position the servo to the field1


delay(500); // wait for the servo to get positioned

digitalWrite(relay,HIGH); // turn on the relay, to turn on the pump


}

45
break;
case 101:
{
lcd.clear();
lcd.setCursor(1, 0);
lcd.print(" two fields are");
lcd.setCursor(1, 1);
lcd.print("being watered");
myservo.write(120); //position the servo to the field1
delay(500); // wait for the servo to get positioned
digitalWrite(relay,HIGH); // turn on the relay, to turn on the pump
delay(5000);
digitalWrite(relay,LOW);
myservo.write(10);
delay(500);
digitalWrite(relay,HIGH);
delay(5000);
digitalWrite(relay,LOW);

}
break;
case 110:
{

lcd.clear();
lcd.setCursor(1, 0);
lcd.print(" two fields are");
lcd.setCursor(1, 1);
lcd.print("being watered");
myservo.write(120); //position the servo to the field1
delay(500); // wait for the servo to get positioned
digitalWrite(relay,HIGH); // turn on the relay, to turn on the pump

46
delay(5000);
digitalWrite(relay,LOW);
myservo.write(60); // position the servo to the field2
delay(500); // wait for the servo to get positioned
digitalWrite(relay,HIGH); // turn on the relay, to turn on the
delay(5000);
digitalWrite(relay,LOW);
}

break;
case 111:
{
lcd.clear();
lcd.setCursor(1, 0);
lcd.print(" all fields are");
lcd.setCursor(1, 1);
lcd.print("being watered");
myservo.write(120); //position the servo to the field1
delay(500); // wait for the servo to get positioned
digitalWrite(relay,HIGH); // turn on the relay, to turn on the pump
delay(5000);
digitalWrite(relay,LOW);
myservo.write(60); // position the servo to the field2
delay(500); // wait for the servo to get positioned
digitalWrite(relay,HIGH); // turn on the relay, to turn on the
delay(5000);
digitalWrite(relay,LOW);

myservo.write(10);
delay(500);
digitalWrite(relay,HIGH);
delay(5000);
digitalWrite(relay,LOW);

47
}

break;

/*

Serial.print(now.year(), DEC);
Serial.print('/');
Serial.print(now.month(), DEC);
Serial.print('/');
Serial.print(now.day(), DEC);
Serial.print(" (");
Serial.print(daysOfTheWeek[now.dayOfTheWeek()]);
Serial.print(") ");
Serial.print(now.hour(), DEC);
Serial.print(':');
Serial.print(now.minute(), DEC);
Serial.print(':');
Serial.print(now.second(), DEC);
Serial.println();
*/
}

48
3.5 APPLICATIONS :

 Roof Gardens
 Lawns
 Agriculture Lands
 Home Gardens

49
3.6 ADVANTAGES:

 Highly sensitive: The moisture sensors used are highly sensitive and the plant is
watered immediately.
 Works according to the soil condition: Depending on the moisture condition of
the soil the system can be configured to water the plants when needed.
 Fit and Forget system: This system is highly reliable and does not require any
supervision.
 Low cost and reliable circuit: The circuit operates based on the moisture level
present in the soil.
 Complete elimination of manpower: This system automatically turns on the pump
and we need not monitor the soil condition and hence manpower is reduced.
 Saves Water: Studies show that this type of domestic automated irrigation system
consumes 40-50% less water as compared to the traditional system.
 Improves Growth: Ideal growth condition is been provided when small amount of
water is been applied over large amount of time. This smart irrigation system
extends watering time for plants, and provides ideal growth condition.
 Adaptable: This smart irrigation system can be adjusted and modified according to
the changing environment.
 Simpler Method: It is simple to operate it starts by designing the map of your
garden and marking the location of planting. Then the required distance is been
measured for length of plastic tubing so that the desired area can be reached.

50
CHAPTER 4

OPERATING PROCEDURE:

OPERATION OF THE CIRCUIT

In this project we use five functional components. Those are Arduino Nano, soil
moisture sensor, a real time clock, relay and servo motor. Here we used Arduino Nano
where programming is done by using Arduino IDE software.
The moisture sensors are installed in the field, should be in accordance with
installation method discussed above in circuit description for efficient working. Once the
moisture sensors are being installed in the field we need to decide whether to give an
analog input or digital input to the microcontroller. To give an analog input to
microcontroller, analog pin present on the sensor module should be connected to the pin
A0. The analog pin is chosen for the project because analog values are more accurate and
reliable.
The moisture sensor has two electrodes one supplied with 5V and other pulled
down to ground, two resistors are connected to the electrodes and a potential divider circuit
is formed this potential divider circuit formed produces a potential difference which is
between 0V and 5V. This value is then fed to the Analog pin of the microcontroller, this is
further converted to a numerical value through Analog to Digital converter present in the
Arduino Nano. Based on this the value, we can decide whether to water the plants or not.

The analog value obtained from the moisture sensor is compared with a threshold
value If the value is greater than the threshold value we need not water the field, if the
value is lesser than the threshold value, it means that we need to water field. This is
because soil is a mixture of salts, minerals and rocks, when the electrodes or the plates of
the moisture sensor are in the soil some amount of conduction happens between them. The
amount of conduction is proportional to the analog value interpreted by the
microcontroller’s analog to digital converter. The electrodes conduct more when the soil
51
is wet, as water combined with soil acts as good conductor. The electrodes do not conduct
or conduct very less when there is less or no water present in the soil. Depending on the
conduction, an analog value is obtained, this is compared to a predetermined threshold
value. The threshold value varies for different plants and different soil types.

The moisture sensor sends an analog value based on this watering is done. If the
analog value from the moisture sensor is greater than the threshold value, the
microcontroller sends digital high signal to the relay, the relay turns on the water pump
which waters the field until the field’s or plant’s moisture level becomes lower than the
threshold value.
The relay controls the switching operation of the motor pump. The relay used can
be configured in two ways, in normally closed or in normally open position. In normally
closed position when the low signal is applied to the control input pin, the relay turns on
the circuit, when the high signal is applied to the control input pin, the relay turns off the
circuit.
The normally closed configuration is inverse with the normally open configuration,
in normally open configuration the circuit is normally open and stays open until the high
signal is given to control pin of the relay, similarly when the control pin is given digital
low from the microcontroller the relay turns off the circuit that is pump in this situation.
This being the basic operation of the circuit we also have a choice to choose digital pin of
the moisture sensor as the input to the microcontroller, to do this we need to vary the
potentiometer available on the moisture sensor module. We should keep in mind that the
digital pin output is either zero or one it is not an analog value, if it were analog value the
output would be between zero and five volts.
So for using digital output pin available on the moisture sensor we need to calibrate
or tune the potentiometer present on moisture sensor. This should be done by comparing
and installing the moisture sensor in the soil and the digital output obtained should be
should be in coincidence to the threshold value that is when the analog value is less than
the threshold value the digital output of the moisture sensor should go high. This

52
way we can utilize the digital pins of the microcontroller too. Since the analog pins
available on the microcontroller are only eight of them and two of them are used for real
time clock, we will be only left with six analog pins, so for installing more number of
moisture sensors we can use the digital pins available on the microcontroller for effective
utilization. There won’t be any difference in operation in the rest of the circuit explained
above.
To water plants without using sensors we employ a real time clock in the circuit
which waters the plants at regular intervals of time, this sensor reduces the use of moisture
sensors. The real time clock use is DS1307. This IC is simply a device which keeps track
of time including year, month, week and day of the week along with hour, minute and
seconds. Using this functionality of the real time clock we water the plants on regular
intervals. DS1307 is interfaced with arduino using ds1307 library. The time from the real
time clock is obtained by SDA pin on the real time clock module. The time can be
configured in any manner, we can water the plants whenever we want, it could be more
than once in a day, it could also be configured to water the plants once in a week or once in
a month and even once in a year. This kind of watering system is efficient in closed and
controlled environment such as greenhouses.
This can also be implemented in open environment but the problem would be that
real time clock will not consider the water or moisture level available in the soil, it will
water the plants or the field at particular time of the day even though the field is watered
already or the moisture level in soil is high. The moisture level in the soil could be due to
several reasons one of them could be due to rains. To avoid this we use the soil moisture
sensor along with the real time clock, so what this does is it will water the field at a
particular time of the day only when the moisture level is low in the soil. This kind of setup
would be ideal for almost any plant or crop in any environment to water them
automatically.
These three cases are implemented in project and they are best suited for the
different scenarios discussed above. Since there are three scenarios considered, there are
three plants or three fields. So we need to water the different plants individually, to water

53
the plants individually we need to use three different motor pumps and three different
relays to control the motor pumps individually this setup would consume more power and
hence it is inefficient. We use a servo to solve this problem, a servo is basically a motor
which is limited to rotate only to 180 degrees, this is done by controlling the gear
mechanism, the servo can rotate both anticlockwise and clockwise this is done by the
control signal given to the servo’s internal control system which consists of H bridge motor
driver. The control signal is a PWM signal which is given from the microcontroller, the
digital pin which is capable of delivering a PWM signal is used for the control of the
servo’s shaft. To write a PWM signal to the control line of the servo we use a analogWrite
function, this can also be achieved by servo.write() function which is available in the servo
library.
Servo is used to change the direction of flow of water, without using individual
motors pumps or relays. For plant one we change the direction of the servo motor by some
angle where the pipe of the pump points to the plant two, the servo is positioned at an angle
of 120 degrees, for plant two we change the direction of the servo motor by some angle
where the pipe of the pump points to the plant two at an angle of 60 degrees and for plant
three we change the direction of the servo motor by some angle where the pipe of the pump
points to the plant three at an angle 10 degrees. The watering is done after the servo is
pointed to the particular plant direction.
The motor will be turned on by the relay, so the relay will be turned on only after
the servo has turned to the specific plant position and then the plant will be watered, unlike
using individual motor pumps and relays we use a servo motor so when multiple plants or
fields require water at the same time the microcontroller is programmed in such a way that
there is a hierarchy, plant one will be watered first and then plant two will be watered
second and lastly plant three will be watered second so by using this method all the plants
are watered simultaneously without any additional power supply and equipment this
method is efficient because it saves a lot of power and easily configurable.
The Soil moisture sensor senses the level of moisture in the soil and the output of
the sensor is given to an analog pin of the arduino Nano, but since the analog pins

54
available on the arduino Nano are few we can also use Digital pins. Digital pins are utilized
by calibrating the potentiometer available on the soil moisture sensor , based on the this an
appropriate signal is fed as an input to the arduino and the it decides whether to water the
field or not. The motor/water pump supplies water to the plants. Deploying the moisture
sensors in a huge field is onerous task, so we also utilize a real time clock which indicates
the microcontroller to water the field at a particular time.

Steps for Using Arduino IDE:

Step 1

Arduino microcontrollers come in a variety of types. The most common is the


Arduino NANO, but there are specialized variations. Before we begin building, we need to
do a little research to figure out which version will be the most appropriate for our project.

Step 2

To begin, we'll need to install the Arduino Programmer, also known as the
integrated development environment (IDE).
Step 3

Connect Arduino to the USB port of computer. This may require a specific USB
cable. Every Arduino has a different virtual serial-port address, so we'll need to reconfigure
the port if we're using different Arduinos.

55
Step 4

Set the board type and the serial port in the Arduino Programmer.

Step 5

Test the microcontroller by using one of the preloaded programs, called sketches, in
the Arduino Programmer. Open one of the example sketches, and press the upload button
to load it. The Arduino should begin responding to the program: If we've set it to blink an
LED light, for example, the light should start blinking.

Step 6

To upload new code to the Arduino, either we'll need to have access to code you
can paste into the programmer, or we'll have to write it ourself, using the Arduino
programming language to create your own sketch. An Arduino sketch usually has five
parts: a header describing the sketch and its author; a section defining variables; a setup
routine that sets the initial conditions of variables and runs preliminary code; a loop
routine, which is where you add the main code that will execute repeatedly until you stop
running the sketch; and a section where you can list other functions that activate during the
setup and loop routines. All sketches must include the setup and loop routines.
Step 7

Once we've uploaded the new sketch to your Arduino, disconnect it from your
computer and integrate it into your project as directed.

Step 8

Upload the program now; simply click the "Upload" button in the environment.
Wait a few seconds -we should see the RX and TX leds on the board flashing. If the upload
is successful, the message "Done uploading." will appear in the status bar.
56
CHAPTER 5

RESULTS:

Watering plants easy, accurate and practical with the idea above shared and can be
implemented in agricultural fields in future to promote agriculture to next level. The output
from moisture sensor and the real time clock plays major role in producing the output.

Figure 5.1

Figure 5.2
57
CHAPTER 6

CONCLUSION:

Thus the “AUTOMATIC WATERING SYSTEM IN AGRICULTURE BY


IMPLEMENTING MOISTURE SENSORS AND REAL TIME CLOCK” has been
designed and tested successfully. It has been developed by integrated features of all the
hardware components used. Presence of every module has been reasoned out and placed
carefully, thus contributing to the best working of the unit. The system has been tested to
function automatically. The moisture sensors measure the moisture level (water content) of
the different plants. If the moisture level is found to be below the desired level, the
moisture sensor sends the signal to the microcontroller which triggers the Water Pump to
turn ON and supply the water to respective plant. When the desired moisture level is
reached, the system halts on its own and the Water Pump is turned OFF. The Real Time
Clock is used to water the plant at regular intervals of time. The moisture sensor
complements the usage of the Real Time Clock in the system. Thus, the functionality of the
entire system has been tested thoroughly and it is said to function successfully.

58
CHAPTER 7

FUTURE SCOPE:

 Plantation will be successful in low water quantities.


 Environment balancing like tree plantation & saving trees kind of activities will
become easy once implemented.
 It is possible to pump the water by solar energy.
 It is possible to connect humidity sensor to sense humidity
 This system can also be used for the betterment of farmers by including the some
more sensors which work over quality of soil and nutrients present in soil.
 The system can also be connected with the android or windows mobile app to make
its use more users friendly.

59
REFERENCES:

 [1] Joaquín Gutiérrez, Juan Francisco Villa-Medina, Alejandra Nieto-Garibay, and


Miguel Ángel Porta- Gándara “Automated Irrigation System Using a Wireless Sensor
Network and GPRS Module ” IEEE 2013
 [2] Samy Sadeky, Ayoub Al-Hamadiy, Bernd Michaelisy, Usama Sayedz,“ An
Acoustic Method for Soil Moisture Measurement ”, IEEE 2004
 [3] Thomas J. Jackson, Fellow, IEEE, Michael H. Cosh, Rajat Bindlish, Senior
Member, IEEE, Patric J. Starks, David D. Bosch, Mark Seyfried, David C. Goodrich,
Mary Susan Moran, Senior Member, IEEE, and Jinyang Du ,“Validation of Advanced
Microwave Scanning Radiometer Soil Moisture Products”, IEEE 2010
 [4] Jia Uddin, S.M. Taslim Reza, Qader Newaz, Jamal Uddin, Touhidul Islam, and
Jong-Myon Kim,“Automated Irrigation System Using Solar Power” ©2012 IEEE
 [5] Ms. Sweta S. Patil, Prof. Mrs. A.V. Malvijay, “Review for ARM based agriculture
field monitoring system”,International Journal of Scientific and Research
Publications, Volume 4, Issue 2, February 2014.
 Wikepedia.com
 Instructables.com

60
61

Potrebbero piacerti anche