Sunteți pe pagina 1din 36

AUTOMATIC PLANT IRRIGATION SYSTEM

CHAPTER-1
INTRODUCTION

The main aim of this project was to provide water to the plants or
gardening automatically using microcontroller (Arduino Uno). We can
automatically watering the plants when we are going on vacation or don’t we
have to bother my neighbors, Sometimes the neighbors do too much of watering
and the plants end up dying anyway.

There are timer based devices available in India which waters the soil
on set interval. They do not sense the soil moisture and the ambient temperature
to know if the soil actually needs watering or not. Assimilation is that the
artificial application of water to the land or soil It is used to assist in the growing
of agricultural crops [3], maintenance of landscapes, and re vegetation
of 319 disturbed soils in dry areas and during periods of inadequate rainfall.
When a zone comes on, the water flows through the lateral lines and ultimately
finally ends up at the irrigation electrode (drip) or mechanical device heads.

Several sprinklers have pipe thread inlets on the lowest of them that
permits a fitting and also the pipe to be connected to them. The sprinklers are
usually used in the top of the head flush with the ground surface [9]. As the
method of dripping will reduce huge water losses it became a popular method by
reducing the labor cost and increasing the yields.

When the components are activated, all the components will read
and gives the output signal to the controller, and the information will be
displayed to the user (farmer). The sensor readings are analog in nature so the
ADC pin in the controller will convert the analog signals into digital format [8].
Then the controller will access information and when the motors are turned
On/Off it will be displayed on the LCD Panel, and serial monitor windows [10].
There are many systems are available to water savings in various crops, from
basic ones to more technologically advanced ones. For instance, in one system
plant watering status was monitored and irrigation scheduled based on
temperature presents in soil content of the plant.

BIET 1 DEPARTMENT OF EEE


AUTOMATIC PLANT IRRIGATION SYSTEM

CHAPTER-2

EMBEDDED SYSTEMS
2.1INTRODUCTION TO EMBEDDED SYSTEMS:

An embedded system is a system which is going to do a predefined specified task is the


embedded system and is even defined as combination of both software and hardware. A
general-purpose definition of embedded systems is that they are devices used to control,
monitor or assist the operation of equipment, machinery or plant. "Embedded" reflects the fact
that they are an integral part of the system. At the other extreme a general-purpose computer
may be used to control the operation of a large complex processing plant, and its presence will
be obvious. All embedded systems are including computers or microprocessors. Some of these
computers are however very simple systems as compared with a personal computer. The very
simplest embedded systems are capable of performing only a single function or set of
functions to meet a single predetermined purpose. In more complex systems an application
program that enables the embedded system to be used for a particular purpose in a specific
application determines the functioning of the embedded system. The ability to have programs
means that the same embedded system can be used for a variety of different purposes. In some
cases a microprocessor may be designed in such a way that application software for a
particular purpose can be added to the basic software in a second process, after which it is not
possible to make further changes. The applications software on such processors is sometimes
referred to as firmware.The simplest devices consist of a single microprocessor (often called a
"chip”), which may itself be packaged with other chips in a hybrid system or Application
Specific Integrated Circuit (ASIC). Its input comes from a detector or sensor and its output
goes to a switch or activator which (for example) may start to an engine.

2.1.1 DEFINATION OF AN EMBEDDED SYSTEM:

Embedded system is defined as, for a particular/specific application implementing the


software code to interact directly with that particular hardware what we built. Software is used
for providing features and flexibility, Hardware = {Processors, ASICs, Memory…} is used for
Performance (& sometimes security).There are many definitions of embedded system but all of
these can be combined into a single concept. An embedded system is a special purpose
computer system that is used for particular task.As the embedded system is the combination of
both software and hardware.

BIET 2 DEPARTMENT OF EEE


AUTOMATIC PLANT IRRIGATION SYSTEM

Embedded

System

Software Hardware

o ALP o Processor
o C o Peripherals
o VB o memory
Etc.,

Figure 2.1 Block diagram of Embedded System

Software deals with the languages like ALP, C, and VB etc., and Hardware deals with
Processors, Peripherals, and Memory.

Memory: It is used to store data or address.

Peripherals: These are the external devices connected

Processor: It is an IC which is used to perform some task

2.1.2 FEATURES OF EMBEDDED SYSTEMS:

The versatility of the embedded computer system lends itself to utility in all kinds of
enterprises, from the simplification of deliverable products to a reduction in costs in their
development and manufacture. Complex systems with rich functionality employ special
operating systems that take into account major characteristics of embedded systems.
Embedded operating systems have minimized footprint and may follow real-time operating
system specifics. The special computers system is usually less powerful than general-purpose
systems, although some expectations do exist where embedded systems are very powerful and
complicated. Usually a low power consumption CPU with a limited amount of memory is used
in embedded systems. Many embedded systems use very small operating systems; most of

BIET 3 DEPARTMENT OF EEE


AUTOMATIC PLANT IRRIGATION SYSTEM

these provide very limited operating system capabilities. Since the embedded system is
dedicated to specific tasks, design engineers can optimize it, reducing the size and cost of the
product, or increasing the reliability and performance.Some embedded systems are mass-
produced, benefiting from scale. Some embedded systems have to operate in extreme
environment conditions such as very high temperature & humidity. For high volume systems
such as portable music players or mobile phones, minimizing cost is usually the primary
design consideration. Engineers typically select hardware that is just “good enough” to
implement the necessary functions.For low volume or prototype embedded systems, general
purpose computers may be adapted by limiting the programs or by replacing the operating
system with a real-time operating system.

2.1.3 APPLICATIONS OF EMBEDDED SYSTEMS:

Some of the most common embedded systems used in everyday life

Small embedded controllers: 8-bit CPUs dominate simple or no operating system (e.g.,
thermostats).

Control systems: Often use DSP chip for control computations (e.g., automotive engine
control).

Distributed embedded control: Mixture of large and small nodes on a real-time Embedded
networks (e.g., cars, elevators, factory automation).

System on chip: SIC design tailored to application area (e.g., consumer electronics, set-top
boxes).

Network equipment: Emphasis on data movement/packet flow (e.g., network switches;


telephone switches).

Critical systems: Safety and mission critical computing (e.g., pacemakers, automatic trains).

Signal processing: Often use DSP chips for vision, audio, or other signal Processing (e.g.,
face recognition).

Robotics: Uses various types of embedded computing (especially Vision and control) (e.g.,
autonomous vehicles).

Computer peripherals: Disk drives, keyboards, laser printers, etc.


BIET 4 DEPARTMENT OF EEE
AUTOMATIC PLANT IRRIGATION SYSTEM

Wireless systems: Wireless network-connected “sensor networks” and “Motes” to gather and
report information.

Embedded PCs: Palmtop and small form factor PCs embedded into Equipment.

Office Telephones, computers, security systems, fax machines, microwave, copier, laser
printer, color printer, paging.

Auto Trip computer, engine control, air bag, ABS, instrumentation, security system,
transmission control, entertainment, climate control, cellular phone, keyless entry.

2.2 CLASSIFICATION OF PROCESSORS:


2.2.1 Processors are classified into four types like:
Micro Processor (µp)
Micro controller (µc)
Digital Signal Processor (DSP)
Application Specific Integrated Circuits (ASIC)
Micro Processor (µp):

A silicon chip that contains a CPU. In the world of personal computers, the terms
microprocessor and CPU are used interchangeably. At the heart of all personal computers and
most workstations sits a microprocessor. Microprocessors also control the logic of almost all
digital devices, from clock radios to fuel-injection systems for automobiles.

Three basic characteristics differentiate microprocessors:

 Instruction set: The set of instructions that the microprocessor can execute.

 Bandwidth : The number of bits processed in a single instruction.

 Clock speed : Given in megahertz (MHz), the clock speed determines how many
instructions per second the processor can execute.

In both cases, the higher the value, the

more powerful the CPU. For example, a 32-bit microprocessor that runs at 50MHz is more
powerful than a 16-bit microprocessor that runs at 25MHz. In addition to bandwidth and clock

BIET 5 DEPARTMENT OF EEE


AUTOMATIC PLANT IRRIGATION SYSTEM

speed, microprocessors are classified as being either RISC (reduced instruction set computer)
or CISC (complex instruction set computer).

Figure 2.2.1 Three Basic Elements of a Microprocessor


Micro Controller (µc):

microcontroller is a small computer on a single integrated circuit containing a


processor core, memory, and programmable input/output peripherals. Program memory in the
form of NOR flash or OTP ROM is also often included on chip, as well as a typically small
amount of RAM. Microcontrollers are designed for embedded applications, in contrast to the
microprocessors used in personal computers or other general purpose applications.

ALU

CU

Memory

Figure 2.2.2 Block Diagram of Micro Controller (µc)

BIET 6 DEPARTMENT OF EEE


Timer, Counter, serial
communication ROM,
ADC, DAC, Timers,
AUTOMATIC PLANT IRRIGATION SYSTEM

Digital Signal Processors (DSPs):


Digital Signal Processors is one which performs scientific and mathematical operation.
Digital Signal Processor chips - specialized microprocessors with architectures designed
specifically for the types of operations required in digital signal processing. Like a general-
purpose microprocessor, a DSP is a programmable device, with its own native instruction
code. DSP chips are capable of carrying out millions of floating point operations per second,
and like their better-known general-purpose cousins, faster and more powerful versions are
continually being introduced. DSPs can also be embedded within complex "system-on-chip"
devices, often containing both analog and digital circuitry.

Application Specific Integrated Circuit (ASIC):

ASIC is a combination of digital and analog circuits packed into an IC to achieve the
desired control/computation function

ASIC typically contains:

 CPU cores for computation and control

 Peripherals to control timing critical functions

 Memories to store data and program

2.3 COMPUTER INSTRUCTION SET :

There are two different types of computer instruction set there are:

 RISC (Reduced Instruction Set Computer) and


 CISC (Complex Instruction Set computer)
2.3.1 Reduced Instruction Set Computer (RISC):

A RISC (reduced instruction set computer) is a microprocessor that is designed to


perform a smaller number of types of computer instruction so that it can operate at a higher
speed (perform more million instructions per second, or millions of instructions per second).
Since each instruction type that a computer must perform requires additional transistors and
circuitry, a larger list or set of computer instructions tends to make the microprocessor more
complicated and slower in operation.

BIET 7 DEPARTMENT OF EEE


AUTOMATIC PLANT IRRIGATION SYSTEM

Besides performance improvement, some advantages of RISC and related design


improvements are:

 A new microprocessor can be developed and tested more quickly if one of its aims is to
be less complicated.

 Operating system and application programmers who use the microprocessor's


instructions will find it easier to develop code with a smaller instruction set.

 The simplicity of RISC allows more freedom to choose how to use the space on a
microprocessor.

Higher-level language compilers produce more efficient code than formerly because they have
always tended to use the smaller set of instructions to be found in a RISC computer.

RISC characteristics:

 Simple instruction set: In a RISC machine, the instruction set contains simple, basic
instructions, from which more complex instructions can be composed.

 Same length instructions: Each instruction is the same length, so that it may be
fetched in a single operation.

 1 machine-cycle instructions: Most instructions complete in one machine cycle,


which allows the processor to handle several instructions at the same time. This
pipelining is a key technique used to speed up RISC machines.

2.3.2 Complex Instruction Set Computer (CISC):

CISC, which stands for Complex Instruction Set Computer, is a philosophy for
designing chips that are easy to program and which make efficient use of memory. Each
instruction in a CISC instruction set might perform a series of operations inside the processor.
This reduces the number of instructions required to implement a given program, and allows the
programmer to learn a small but flexible set of instructions.

The advantages of CISC:

At the time of their initial development, CISC machines used available technologies to
optimize computer performance.

BIET 8 DEPARTMENT OF EEE


AUTOMATIC PLANT IRRIGATION SYSTEM

 Microprogramming is as easy as assembly language to implement, and much less


expensive than hardwiring a control unit.

 The ease of micro-coding new instructions allowed designers to make CISC machines
upwardly compatible: a new computer could run the same programs as earlier
computers because the new computer would contain a superset of the instructions of
the earlier computers.

 As each instruction became more capable, fewer instructions could be used to


implement a given task. This made more efficient use of the relatively slow main
memory.

 Because micro program instruction sets can be written to match the constructs of

The disadvantages of CISC:

 Still, designers soon realized that the CISC philosophy had its own problems, including:

 Earlier generations of a processor family generally were contained as a subset in every new
version --- so instruction set & chip hardware become more complex with each generation
of computers.

 So that as many instructions as possible could be stored in memory with the least possible
wasted space, individual instructions could be of almost any length---this means that
different instructions will take different amounts of clock time to execute, slowing down
the overall performance of the machine.

 Many specialized instructions aren't used frequently enough to justify their existence ---
approximately 20% of the available instructions are used in a typical program.

 CISC instructions typically set the condition codes as a side effect of the instruction. Not
only does setting the condition codes take time, but programmers have to remember to
examine the condition code bits before a subsequent instruction changes them.

2.4 MEMORY ARCHITECTURE :

There are two different type’s memory architectures there are:

 Harvard Architecture

BIET 9 DEPARTMENT OF EEE


AUTOMATIC PLANT IRRIGATION SYSTEM

 Von-Neumann Architecture

2.4.1 Harvard Architecture:

Computers have separate memory areas for program instructions and data. There are
two or more internal data buses, which allow simultaneous access to both instructions and data.
The CPU fetches program instructions on the program memory bus.

The Harvard architecture is a computer architecture with physically separate


storage and signal pathways for instructions and data. The term originated from the Harvard
Mark I relay-based computer, which stored instructions on punched tape (24 bits wide) and
data in electro-mechanical counters.

Figure 2.4.1 Harvard Architecture

These early machines had limited data storage, entirely contained within the central
processing unit, and provided no access to the instruction storage as data. Programs needed to
be loaded by an operator, the processor could not boot itself.

BIET 10 DEPARTMENT OF EEE


AUTOMATIC PLANT IRRIGATION SYSTEM

2.4.2 Von-Neumann Architecture:

A computer has a single, common memory space in which both program instructions
and data are stored. There is a single internal data bus that fetches both instructions and data.
They cannot be performed at the same time

The Von Neumann architecture is a design model for a stored-program digital computer that
uses a central processing unit (CPU) and a single separate storage structure ("memory") to
hold both instructions and data. It is named after the mathematician and early computer
scientist John von Neumann. Such computers implement a universal Turing machine and have
a sequential architecture.

Figure 2.4.2 Schematic of the Von-Neumann Architecture.

Basic Difference between Harvard and Von-Neumann Architecture:


 The primary difference between Harvard architecture and the Von Neumann
architecture is in the Von Neumann architecture data and programs are stored in the
same memory and managed by the same information handling system.

 Whereas the Harvard architecture stores data and programs in separate memory devices
and they are handled by different subsystems.

 In a computer using the Von-Neumann architecture without cache; the central


processing unit (CPU) can either be reading and instruction or writing/reading data
to/from the memory. Both of these operations cannot occur simultaneously as the data
and instructions use the same system bus.

BIET 11 DEPARTMENT OF EEE


AUTOMATIC PLANT IRRIGATION SYSTEM

 In a computer using the Harvard architecture the CPU can both read an instruction and
access data memory at the same time without cache. This means that a computer with
Harvard architecture can potentially be faster for a given circuit complexity because
data access and instruction fetches do not contend for use of a single memory pathway.

 Today, the vast majority of computers are designed and built using the Von Neumann
architecture template primarily because of the dynamic capabilities and efficiencies
gained in designing, implementing, operating one memory system as opposed to two.
Von Neumann architecture may be somewhat slower than the

 Harvard architectures are typically only used in either specialized systems or for very
specific uses. It is used in specialized digital signal processing (DSP), typically for
video and audio processing products. It is also used in many small microcontrollers
used in electronics applications such as Advanced RISK Machine (ARM) based
products for many vendors.

2.5 LCD MODULE:


To display interactive messages we are using LCD Module. We examine an intelligent LCD
display of two lines, 16 characters per line that is interfaced to the controllers. The protocol
(handshaking) for the display is as shown. Whereas D0 to D7th bit is the Data lines, RS, RW
and EN pins are the control pins and remaining pins are +5V, -5V and GND to provide supply.
Where RS is the Register Select, RW is the Read Write and EN is the Enable pin.

The display contains two internal byte-wide registers, one for commands (RS=0) and
the second for characters to be displayed (RS=1). It also contains a user-programmed RAM
area (the character RAM) that can be programmed to generate any desired character that can
be formed using a dot matrix. To distinguish between these two data areas, the hex command
byte 80 will be used to signify that the display RAM address 00h will be chosen.Port1 is used
to furnish the command or data type, and ports 3.2 to 3.4 furnish register select and read/write
levels.The display takes varying amounts of time to accomplish the functions as listed. LCD
bit 7 is monitored for logic high (busy) to ensure the display is overwritten.

Liquid Crystal Display also called as LCD is very helpful in providing user interface as well as
for debugging purpose. The most common type of LCD controller is HITACHI 44780 which
provides a simple interface between the controller & an LCD. These LCD's are very simple to
interface with the controller as well as are cost effective.

BIET 12 DEPARTMENT OF EEE


AUTOMATIC PLANT IRRIGATION SYSTEM

Fig:2.5.1 2x16 Line Alphanumeric LCD Display

The most commonly used ALPHANUMERIC displays are 1x16 (Single Line & 16
characters), 2x16 (Double Line & 16 character per line) & 4x20 (four lines & Twenty
characters per line). The LCD requires 3 control lines (RS, R/W & EN) & 8 (or 4) data lines.
The number on data lines depends on the mode of operation. If operated in 8-bit mode then 8
data lines + 3 control lines i.e. total 11 lines are required. And if operated in 4-bit mode then 4
data lines + 3 control lines i.e. 7 lines are required. How do we decide which mode to use? It’s
simple if you have sufficient data lines you can go for 8 bit mode & if there is a time constrain
i.e. display should be faster then we have to use 8-bit mode because basically 4-bit mode takes
twice as more time as compared to 8-bit mode.

Pin Symbol Function

1 Vss Ground

2 Vdd Supply Voltage

3 Vo Contrast Setting

4 RS Register Select

5 R/W Read/Write Select

6 En Chip Enable Signal

DB0-
7-14 Data Lines
DB7

Gnd for the


15 A/Vee
backlight

Vcc for
16 K
backlight

Table:2.5.1Pin Description

BIET 13 DEPARTMENT OF EEE


AUTOMATIC PLANT IRRIGATION SYSTEM

When RS is low (0), the data is to be treated as a command. When RS is high (1), the
data being sent is considered as text data which should be displayed on the screen.
When R/W is low (0), the information on the data bus is being written to the LCD. When RW
is high (1), the program is effectively reading from the LCD. Most of the times there is no need
to read from the LCD so this line can directly be connected to Gnd thus saving one controller
line.The ENABLE pin is used to latch the data present on the data pins. A HIGH - LOW signal
is required to latch the data. The LCD interprets and executes our command at the instant the
EN line is brought low. If you never bring EN low, your instruction will never be executed.

Fig:2.5.2 Interfacing with microcontroller

BIET 14 DEPARTMENT OF EEE


AUTOMATIC PLANT IRRIGATION SYSTEM

CHAPTER-3

POWER SUPPLY

3.1 POWER SUPPLY:-

All digital circuits require regulated power supply. In this article we are going to learn how to
get a regulated positive supply from the mains supply.

Figure 2.1 shows the basic block diagram of a fixed regulated power supply. Let us go
through each block.

FIG.3.1 POWER SUPPLY


3.2 TRANSFORMER:-

FIG 3.2 TRANSFORMER

A transformer consists of two coils also called as “WINDINGS” namely


PRIMARY & SECONDARY.
They are linked together through inductively coupled electrical conductors

BIET 15 DEPARTMENT OF EEE


AUTOMATIC PLANT IRRIGATION SYSTEM

also called as CORE. Achanging current in the primary causes a change in the Magnetic Field
in the core & this in turn induces analternating voltage in the secondary coil. If load is applied
to the secondary then an alternating current willflow through the load. If we consider an ideal
condition then all the energy from the primary circuit will betransferred to the secondary
circuit through the magnetic field.
So

The secondary voltage of the transformer depends on the number of turns in the
Primary as well as in thesecondary.

3.3 RECTIFIER:-
A rectifier is a device that converts an AC signal into DC signal. For
rectification purpose we use a diode, adiode is a device that allows current to pass only in one
direction i.e. when anode of the diode is positive with respect to the cathode also called as
forward biasecondition &blocks current in the reversedbiased condition.

Rectifier can be classified as follows:

a. HALF WAVE RECTIFIER:-

This is the simplest type of rectifier as you can see in the diagram a half wave rectifier consists
of only onediode. When an AC signal is applied to it during the positive half cycle the diode is
forward biased & current flows through it. But during the negative half cycle diode is reverse
biased & no current flows through it. Since only one half of the input reaches the output, it is
very inefficient to be used in power supplies.

Fig.3.3 half wave rectifier

b. FULL WAVE RECTIFIER:-

BIET 16 DEPARTMENT OF EEE


AUTOMATIC PLANT IRRIGATION SYSTEM

Fig.3.4 full wave rectifier

Half wave rectifier is quite simple but it is very inefficient, for greater efficiency we
would like to use both the half cycles of the AC signal. This can be achieved by using a center
tapped transformer i.e. we would have to double the size of secondary winding & provide
connection to the center. So during the positive half cycle diode D1 conducts & D2 is in
reverse biased condition. During the negative half cycle diode D2 conducts & D1 is reverse
biased. Thus we get both the half cycles across the load. One of the disadvantages of Full
Wave Rectifier design is the necessity of using a center tapped transformer, thus increasing the
size & cost of the circuit. This can be avoided by using the Full Wave Bridge Rectifier.
c. BRIDGE RECTIFIER:-

Fig.3.5 BRIDGE RECTIFIER


As the name suggests it converts the full wave i.e. both the positive & the negative half cycle
into DC thus it is much more efficient than Half Wave Rectifier & that too without using a
center tapped transformer thus much more cost effective than Full Wave Rectifier.
Full Bridge Wave Rectifier consists of four diodes namely D1, D2, D3 and D4. During
the positive half cycle diodes D1 & D4 conduct whereas in the negative half cycle diodes D2
& D3 conduct thus the diodes keep switching the transformer connections so we get positive
half cycles in the output.
If we use a center tapped transformer for a bridge rectifier we can get both positive &
negative half cycles which can thus be used for generating fixed positive & fixed negative

BIET 17 DEPARTMENT OF EEE


AUTOMATIC PLANT IRRIGATION SYSTEM

voltages.
3.4 FILTER CAPACITOR:-
Even though half wave & full wave rectifier give DC output,
none of them provides a constant output voltage. For this we require to smoothen the
waveform received from the rectifier. This can be done by using a capacitor at the output of the
rectifier this capacitor is also called as “FILTER CAPACITOR” or “SMOOTHING
CAPACITOR” or “RESERVOIR CAPACITOR”. Even after using this capacitor a small
amount of ripple will remain.
We place the Filter Capacitor at the output of the rectifier the capacitor will charge to
the peak voltage during each cycle then will discharge its stored energy slowly through the
load while the rectified voltage drops to zero, thus to keep the voltage as constant as possible.

FIG.3.6 WAVE FORMS OF FILTER CAPACITOR

If we go on increasing the value of the filter capacitor then the Ripple will decrease.
But then the costing will increase The value of the Filter capacitor depends on the current
consumed by the circuit, the frequency of the waveform & accepted ripple.
Where,
Vr= accepted ripple voltage.( should not be more than 10% of the voltage)
I= current consumed by the circuit in Amperes.
F= frequency of the waveform. A half wave rectifier has only one peak in one cycle so
F=25hz
Whereas a full wave rectifier has Two peaks in one cycle so F=100hz.

BIET 18 DEPARTMENT OF EEE


AUTOMATIC PLANT IRRIGATION SYSTEM

3.4 VOLTGE REGULATION:-


A Voltage regulator is a device which converts varying input voltage into a constant regulated
output voltage. Voltage regulator can be of two types
1) Linear Voltage Regulator

Fig 3.7 voltage regulator


Also called as Resistive Voltage regulator because they dissipate the excessive voltage
resistively as heat.
2) Switching Regulators.
They regulate the output voltage by switching the Current ON/OFF very rapidly. Since
their output is either ON or OFF it dissipates very low power thus achieving higher efficiency
as compared to linear voltage regulators. But they are more complex & generate high noise due
to their switching action. For low level of output power switching regulators tend to be costly
but for higher output wattage they are much cheaper than linear regulators.
The most commonly available Linear Positive Voltage Regulators are the 78XX series
where indicates the output voltage. And 79XX series is for Negative Voltage Regulators.
After filtering the rectifier output the signal is given to a voltage regulator. The
maximum input Voltage that can be applied at the input is 35V.Normally there is a 2-3 Volts
drop across the regulator so the input voltage should be at least 2-3 Volts higher than the
output voltage. If the input voltage gets below the Vmin of the regulator due to the ripple
voltage or due to any other reason the voltage regulator will not be able to produce the correct
regulated voltage.

BIET 19 DEPARTMENT OF EEE


AUTOMATIC PLANT IRRIGATION SYSTEM

3.5 IC 7805:-
7805 is an integrated three-terminal positive fixed linear voltage regulator. It
supports an input voltage of 10 volts to 35 volts and output voltage of 5 volts. It has a current
rating of 1 amp although lower current models are available. Its output voltage is fixed at 5.0V.
The 7805 also has a built-in current limiter as a safety feature. 7805 is manufactured by
many companies, including National Semiconductors and Fairchild Semiconductors. The 7805
will automatically reduce output current if it gets too hot. The last two digits represent the
voltage; for instance, the 7812 is a 12-volt regulator.
The 78xx series of regulators is designed to work in complement with the
79xx series of negative voltage regulators in systems that provide both positive and negative
regulated voltages, since the 78xx series can't regulate negative voltages in such a system. The
7805 & 78 is one of the most common and well-known of the 78xx series regulators, as it's
small component count and medium-power regulated 5V make it useful for powering TTL
devices.

3.6 SPECIFICATIONS OF IC 7805:-


 Vout - 5V
 Vein - Vout Difference - 5V - 20V
 Operation Ambient Temp - 0 - 125°C
 Output Imax - 1A

BIET 20 DEPARTMENT OF EEE


AUTOMATIC PLANT IRRIGATION SYSTEM

CHAPTER-4
RELAYS

4.1 RELAY:

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


operate a switching mechanism, but other operating principles are also used. Relays find
applications where it is necessary to control a circuit by a low-power signal, 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 found extensive use in telephone exchanges and early
computers to perform logical operations. A type of relay that can handle the high power
required to directly drive an electric motor is called a contactor. Solid-state relays control
power circuits with no moving parts, instead using a semiconductor device triggered by
light to perform switching. Relays with calibrated operating characteristics and sometimes
multiple operating coils are used to protect electrical circuits from overload or faults; in
modern electric power systems these functions are performed by digital instruments still
called "protection relays".

Fig: 4.4.1 Circuit for controlling an AC or other high current device from a
microtroller by using a relay

BIET 21 DEPARTMENT OF EEE


AUTOMATIC PLANT IRRIGATION SYSTEM

4.1.1 Applications of Relays Control


a high-voltage circuit with a low-voltage nsignal, as in some types of modems or audio amplifiers,

Control a high-current circuit with a low-current sigal, as in the starter solenoid of an


automobile,

Detect and isolate faults on transmission and distribution lines by opening and closing circuit
breakers (protection relays),

Fig 4.4.1(a): A DPDT AC coil relay with "ice cube" packaging

Isolate the controlling circuit from the controlled circuit when the two are at
different potentials, for example when controlling a mains-powered device from a low-voltage
switch. The latter is often applied to control office lighting as the low voltage wires are easily
installed in partitions, which may be often moved as needs change. They may also be
controlled by room occupancy detectors in an effort to conserve energy,

Logic functions. For example, the Boolean AND function is realized by connecting
normally open relay contacts in series, the OR function by connecting normally open contacts
in parallel. The change-over or Form C contacts perform the XOR (exclusive or) function.
Similar functions for NAND and NOR are accomplished using normally closed contacts. The
Ladder programming language is often used for designing relay logic networks.

Early computing. Before vacuum tubes and transistors, relays were used as logical
elements in digital computers. See ARRA (computer), Harvard Mark II, Zuse Z2, and Zuse Z3.

BIET 22 DEPARTMENT OF EEE


AUTOMATIC PLANT IRRIGATION SYSTEM

Safety-critical logic. Because relays are much more resistant than semiconductors to
nuclear radiation, they are widely used in safety-critical logic, such as the control panels of
radioactive waste-handling machinery.

Time delay functions. Relays can be modified to delay opening or delay closing
a set of contacts. A very short (a fraction of a second) delay would use a copper disk between
the armature and moving blade assembly. Current flowing in the disk maintains magnetic field
for a short time, lengthening release time. For a slightly longer (up to a minute) delay, a
dashpot is used. A dashpot is a piston filled with fluid that is allowed to escape slowly. The
time period can be varied by increasing or decreasing the flow rate. For longer time periods, a
mechanical clockwork timer is installed.

4.1.2 Advantages of relays:

 Relays can switch AC and DC, transistors can only switch DC.
 Relays can switch high voltages, transistors cannot.
 Relays are a better choice for switching large currents (> 5A).
 Relays can switch many contacts at once.

Disadvantages of relays:

 Relays are bulkier than transistors for switching small currents.


 Relays cannot switch rapidly (except reed relays), transistors can switch many times
per second.
 Relays use more power due to the current flowing through their coil.
 Relays require more current than many ICs can provide, so a low power transistor
may be needed to switch the current for the relay's coil.

BIET 23 DEPARTMENT OF EEE


AUTOMATIC PLANT IRRIGATION SYSTEM

CHAPTER-5

DC MOTOR

5.1 INTRODUCTION OF DC MOTOR:

DC motors are configured in many types and sizes, including brush less, servo, and
gear motor types. A motor consists of a rotor and a permanent magnetic field stator. The
magnetic field is maintained using either permanent magnets or electromagnetic windings.
DC motors are most commonly used in variable speed and torque.Motion and controls cover a
wide range of components that in some way are used to generate and/or control motion.Areas
within this category include bearings and bushings, clutches and brakes, controls and drives,
drive components, encoders and resolves, Integrated motion control, limit switches, linear
actuators, linear and rotary motion components, linear position sensing, motors (both AC and
DC motors), orientation position sensing, pneumatics and pneumatic components, positioning
stages, slides and guides, power transmission (mechanical), seals, slip rings, solenoids, springs.
Motors are the devices that provide the actual speed and torque in a drive system. This family
includes AC motor types (single and multiphase motors, universal, servo motors, induction,
synchronous, and gear motor) and DC motors (brush less, servo motor, and gear motor) as well
as linear, stepper and air motors, and motor contactors and starters.

BIET 24 DEPARTMENT OF EEE


AUTOMATIC PLANT IRRIGATION SYSTEM

5.2 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 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.

Fig:5.2.1 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.

This is how a DC motor works!


Back EMF :According to fundamental laws of nature, no energy conversion is possible until
BIET 25 DEPARTMENT OF EEE
AUTOMATIC PLANT IRRIGATION SYSTEM

there is something to oppose the conversion. In case of generators this opposition is provided
by magnetic drag, but in case of dc motors there is back emf.When the armature of the motor is
rotating, the conductors are also cutting the magnetic flux lines and hence according to
the Faraday's law of electromagnetic induction, an emf induces in the armature conductors. The
direction of this induced emf is such that it opposes the armature current (Ia) . The circuit
diagram below illustrates the direction of the back emf and armature current. Magnitude
of Back emf can be given by the emf equation of DC generator.

Fig:5.2.2 Significance Of Back Emf:

Magnitude of back emf is directly proportional to speed of the motor. Consider the load on a dc
motor is suddenly reduced. In this case, required torque will be small as compared to the
current torque. Speed of the motor will start increasing due to the excess torque. Hence, being
proportional to the speed, magnitude of the back emf will also increase. With increasing back
emf armature current will start decreasing. Torque being proportional to the armature current, it
will also decrease until it becomes sufficient for the load. Thus, speed of the motor will
regulate.

On the other hand, if a dc motor is suddenly loaded, the load will cause decrease in the speed.
Due to decrease in speed, back emf will also decrease allowing more armature current.
Increased armature current will increase the torque to satisfy the load requirement. Hence,
presence of the back emf makes a dc motor ‘self-regulating’.

BIET 26 DEPARTMENT OF EEE


AUTOMATIC PLANT IRRIGATION SYSTEM

CHAPTER-6

WATER LEVEL SENSOR:


6.1 INTRODUCTION OF MOISTURE SENSOR:

1.Introduction

2.Specifications

3.Working Principle of Moisture Sensor

4.How to Connect Moisture Sensor with Arduino?

4.1.Hardware and Software Required

5.Hardware Connections

6.Program for Moisture Sensor

7.References

Fig:6.6.1 Moisture Sensor

BIET 27 DEPARTMENT OF EEE


AUTOMATIC PLANT IRRIGATION SYSTEM

6.2 INTRODUCTION:

The Moisture sensor is used to measure the water content(moisture) of soil.when the soil
is having water shortage,the module output is at high level, else the output is at low
level.This sensor reminds the user to water their plants and also monitors the moisture
content of soil.It has been widely used in agriculture,land irrigation and botanical
gardening.

6.3 Specifications:

 Working Voltage:5V
 Working Current:<20mA
 Interface type:Analog
 Working Temperature:10°C~30°C

6.4 Working Principle of Moisture Sensor:


The Soil Moisture Sensor uses capacitance to measure dielectric permittivity of the
surrounding medium. In soil, dielectric permittivity is a function of the water content. The
sensor creates a voltage proportional to the dielectric permittivity, and therefore the water
content of the soil. The sensor averages the water content over the entire length of the
sensor. There is a 2 cm zone of influence with respect to the flat surface of the sensor, but it
has little or no sensitivity at the extreme edges.The Soil Moisture Sensor is used to measure
the loss of moisture over time due to evaporation and plant uptake,evaluate optimum soil
moisture contents for various species of plants,monitor soil moisture content to control
irrigation in greenhouses and enhance bottle biology experiments.

How to Connect Moisture Sensor with Arduino?


Hardware and Software Required:

 Moisture Sensor Module


 Arduino Uno
 Arduino IDE(1.0.6 Version)

BIET 28 DEPARTMENT OF EEE


AUTOMATIC PLANT IRRIGATION SYSTEM

Hardware Connections:
The moisture sensor module should be connected to the as follows:

 Vcc to 5V
 GND to GND
 A0 to Analog 0 of Arduino

BIET 29 DEPARTMENT OF EEE


AUTOMATIC PLANT IRRIGATION SYSTEM

CHAPTER-7

PIN CONFIGURATION OF ATMEGA328P

Fig.7.7.1.Daigram of Arduino Uno

7.1 PRODUCT OVERVIEW:

The Arduino Uno is a microcontroller board based on the ATmega328 (datasheet). It has 14
digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16
MHz crystal oscillator, a USB connection, a power jack, an ICSP header, and a reset button.
It contains everything needed to support the microcontroller; simply connect it to a computer
with a USB cable or power it with a AC-to-DC adapter or battery to get started. The Uno
differs from all preceding boards in that it does not use the FTDI USB-to-serial driver chip.
Instead, it features the Atmega8U2 programmed as a USB-to-serial converter."Uno" means
one in Italian and is named to mark the upcoming release of Arduino 1.0. The Uno and
version

BIET 30 DEPARTMENT OF EEE


AUTOMATIC PLANT IRRIGATION SYSTEM

Schematic diagram of Arduino uno

BIET 31 DEPARTMENT OF EEE


AUTOMATIC PLANT IRRIGATION SYSTEM

7.2 POWER SUPPLY:


The Arduino Uno can be powered via the USB connection or with an external power supply.
The power source is selected automatically.

External (non-USB) power can come either from an AC-to-DC adapter (wall-wart) or battery.
The adapter can be connected by plugging a 2.1mm center-positive plug into the board's
power jack. Leads from a battery can be inserted in the Gnd and Vin pin headers of the
POWER connector.

The board can operate on an external supply of 6 to 20 volts. If supplied with less than 7V,
however, the 5V pin may supply less than five volts and the board may be unstable. If using
more than 12V, the voltage regulator may overheat and damage the board. The recommended
range is 7 to 12 volts.

The power pins are as follows:

 VIN. The input voltage to the Arduino board when it's using an external power source (as
opposed to 5 volts from the USB connection or other regulated power source). You can
supply voltage through this pin, or, if supplying voltage via the power jack, access it through
this pin.
 5V. The regulated power supply used to power the microcontroller and other components on
the board. This can come either from VIN via an on-board regulator, or be supplied by USB
or another regulated 5V supply.
 3V3. A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50 mA.
 GND. Ground pins.

7.3 MEMORY:

The Atmega328 has 32 KB of flash memory for storing code (of which 0,5 KB is used
for the bootloader); It has also 2 KB of SRAM and 1 KB of EEPROM (which can be read
and written with the EEPROM library).

7.4 INPUT AND OUTPUT:

Each of the 14 digital pins on the Uno can be used as an input or output, using pinMode(),
digitalWrite(), and digitalRead() functions. They operate at 5 volts. Each pin can provide or
receive a maximum of 40 mA and has an internal pull-up resistor (disconnected by default)
of20-50 kOhms. In addition, some pins have specialized functions:

 Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data. TThese
pins are connected to the corresponding pins of the ATmega8U2 USB-to-TTL Serial chip .
BIET 32 DEPARTMENT OF EEE
AUTOMATIC PLANT IRRIGATION SYSTEM

 External Interrupts: 2 and 3. These pins can be configured to trigger an interrupt on a low
value, a rising or falling edge, or a change in value. See the attachInterrupt() function for
details.
 PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the analogWrite() function.
 SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI communication,
which, although provided by the underlying hardware, is not currently included in the
Arduino language.
 LED: 13. There is a built-in LED connected to digital pin 13. When the pin is HIGH
value, the LED is on, when

 the pin is LOW, it's o

The Uno has 6 analog inputs, each of which provide 10 bits of resolution (i.e. 1024 different
values). By default they measure from ground to 5 volts, though is it possible to change the
upper end of their range using the AREF pin and analogReference() function. Additionally,
some pins have specialized functionality:

 I2C: 4 (SDA) and 5 (SCL). Support I2C (TWI) communication using the Wire library.
There are a couple of other pins on the board:

 AREF. Reference voltage for the analog inputs. Used with analogReference().
 Reset. Bring this line LOW to reset the microcontroller. Typically used to add a reset button
to shields which block the one on the board.
See also the mapping between Arduino pins and Atmega328 ports

7.5 COMMUNICATION:
The Arduino Uno has a number of facilities for communicating with a computer, another
Arduino, or other microcontrollers. The ATmega328 provides UART TTL (5V) serial
communication, which is available on digital pins 0 (RX) and 1 (TX). An ATmega8U2 on
the board channels this serial communication over USB and appears as a virtual com port to
software on the computer. The '8U2 firmware uses the standard USB COM drivers, and no
external driver is needed. However, on Windows, an *.inf file is required..
The Arduino software includes a serial monitor which allows simple textual data to be sent to
and from the Arduino board. The RX and TX LEDs on the board will flash when data is being
transmitted via the USB-to- serial chip and USB connection to the computer (but not for serial
communication on pins 0 and 1).
A SoftwareSerial library allows for serial communication on any of the Uno's digital pins.The
ATmega328 also support I2C (TWI) and SPI communication. The Arduino software includes a
Wire library to simplify use of the I2C bus; see the documentation for details. To use the SPI
communication, please see the ATmega328 datasheet.

BIET 33 DEPARTMENT OF EEE


AUTOMATIC PLANT IRRIGATION SYSTEM

7.6 PROGRAMMING :
The Arduino Uno can be programmed with the Arduino software (download). Select "Arduino
Uno w/ ATmega328" from the Tools > Board menu (according to the microcontroller on your
board). For details, see the reference and tutorials.
The ATmega328 on the Arduino Uno comes preburned with a bootloader that allows you to
upload new code to it without the use of an external hardware programmer. It communicates
using the original STK500 protocol (reference, C header files).
You can also bypass the bootloader and program the microcontroller through the ICSP (In-
Circuit Serial Programming) header; see these instructions for details.
The ATmega8U2 firmware source code is available . The ATmega8U2 is loaded with a DFU
bootloader, which can be activated by connecting the solder jumper on the back of the board
(near the map of Italy) and then resetting the 8U2. You can then use Atmel's FLIP software
(Windows) or the DFU programmer (Mac OS X and Linux) to load a new firmware. Or you
can use the ISP header with an external programmer (overwriting the DFU bootloader).

7.7 AUTOMATIC (SOFTWARE) RESET:


Rather than requiring a physical press of the reset button before an upload, the Arduino Uno is
designed in a way that allows it to be reset by software running on a connected computer. One of
the hardware flow control lines (DTR) of the ATmega8U2 is connected to the reset line of the
ATmega328 via a 100 nanofarad capacitor. When this line is asserted (taken low), the reset line
drops long enough to reset the chip. The Arduino software uses this capability to allow you to
upload code by simply pressing the upload button in the Arduino environment. This means that
the bootloader can have a shorter timeout, as the lowering of DTR can be well-coordinated with
the start of the upload.

This setup has other implications. When the Uno is connected to either a computer running
Mac OS X or Linux, it resets each time a connection is made to it from software (via USB).
For the following half-second or so, the bootloader is running on the Uno. While it is
programmed to ignore malformed data (i.e. anything besides an upload of new code), it will
intercept the first few bytes of data sent to the board after a connection is opened. If a sketch
running on the board receives one-time configuration or other data when it first starts, make
sure that the software with which it communicates waits a second after opening the
connection and before sending this data.

The Uno contains a trace that can be cut to disable the auto-reset. The pads on either side of
the trace can be soldered together to re-enable it. It's labeled "RESET-EN". You may also be

BIET 34 DEPARTMENT OF EEE


AUTOMATIC PLANT IRRIGATION SYSTEM

able to disable the auto-reset by connecting a 110 ohm resistor from 5V to the reset line; see
this forum thread for details.

7.8 USB OVERCURRENT PROTECTION:


The Arduino Uno has a resettable polyfuse that protects your computer's USB ports from

shorts and overcurrent. Although most computers provide their own internal
protectioninternal protection, the fuse provides an extra layer of protection. If more than500
mA is applied to the USB port, the fuse will automatically break the connection until the
short or overload is removed

7.9 PHYSICAL CHARACTERISTICS:

The maximum length and width of the Uno PCB are 2.7 and 2.1 inches respectively, with the
USB connector and power jack extending beyond the former dimension. Three screw holes
allow the board to be attached to a surface or case. Note that the distance between digital pins
7 and 8 is 160 mil (0.16"), not an even multiple of the 100 mil spacing of the other pins

BIET 35 DEPARTMENT OF EEE


AUTOMATIC PLANT IRRIGATION SYSTEM

BIET-B.TECH DEPARTMENT OF EEE

S-ar putea să vă placă și