You are on page 1of 21

Plant-O-Bot

Harsha R. Dr. Veena K.N.


Assistant Professor Associate professor
Department of Electronics and Communication School of Electronics and Communication
Dr. Ambedkar Institute of Technology REVA university, Bengaluru
Bengaluru, India. veenakn@reva.edu.in
Research scholar
School of Electronics and Communication
REVA university, Bengaluru

Amrutha B P Gajan Gowda A B


1DA17EC010 1DA17EC040
Department of Electronics and Communication Department of Electronics and Communication
Dr. Ambedkar Institute of Technology Dr. Ambedkar Institute of Technology
Bengaluru, India. Bengaluru, India.

I. INTRODUCTION field spraying water through it. This robot can


Irrigation systems require large piping be equipped with geo fencing sensors so it will
setups along with many sprinklers in order to cover the complete field without needing any
achieve proper irrigation. This system has manual intervention.
many problems associated with it. It requires The system reads the moisture content of the
extensive piping as well as sprinkler costs along soil using soil moisture sensor and switches ON
with high powered motors in order to drive the motor when the moisture is below the set
water through such long pipes. There is always limit. When the moisture level rises above the
chance of leakages that may cause oversupply set point, the system switches off the pump.
of water to a particular area and undersupply in The status of the tank, motor and the moisture
another leading to plantation loss. Also this will level will be displayed on a 16×2 LCD display.
incur heavy repairing loss.
II. LITERATURE SURVEY
Our proposed system uses a robot with a single
Irrigation in India includes a network of major
sprinkler that moves through the filed with a
and minor canals from Indian rivers,
water tank that moves throughout the field
groundwater well based systems, tanks, and
spraying water all over it. It is like a moving
other rainwater harvesting projects for
water tank that automatically moves all over the
agricultural activities. Of these ground water

Dr.AIT DEPT. OF ECE 1


system is the largest. In 2013-14, only about water supplies to a growing population, control
36.7% of total agricultural land in India was floods and prevent drought.
reliably irrigated, and remaining 2/3rd
There has been a numerous research
cultivated land in India is dependent on
and development in the agriculture field and it
monsoons. 65% of the irrigation in India is
is increasing at a greater speed. The need of
from groundwater.
increasing the yield directly depends on the soil
Indian government launched a demand pH, soil temperature and various other factors
side water management plan costing INR6000 which has become the main area of interest for
crore or USD854 million across 8,350 water the researchers. Using electromagnetic sensors,
stressed villages of 78 districts in 7 states - the soil moisture was detected, based on which
Gujarat, Haryana, Karnataka, Madhya Pradesh, the land was irrigated. This has proved to
Maharashtra, Rajasthan and Uttar Pradesh - reduce the wastage of water by 53%.
over five years from 2021-2022 to 2026-27,
Drip irrigation has proved to be advantageous
with the view to harvest rainwater, enhance
as it minimizes the wastage of water by directly
water table, water recharge rate with village
applying water and fertilizers to the root zone.
panchayat level water management plans. Most
Microcontroller based drip irrigation system
of the canal irrigation is in the canal network of
using the sensors have been a major
Ganges-Yamuna basin mainly in the states of
advancement in the agriculture.
Punjab, Haryana, and Uttar Pradesh and
somewhat in Rajasthan and Bihar, while small Another important parameter to be

local canal networks also exist in the south in considered for irrigation is the

Tamil Nadu, Karnataka, and Kerala, etc. The evapotranspiration rate of the plant.

largest canal in India is Indira Gandhi Canal, Abbreviated as ET, evapotranspiration is the

which is about 650 km long. India has an water transpiration rate of the plant which

ambitious river linking national project to mainly depends on the temperature, humidity,

enhance the coverage of canal irrigated area, wind speed, plant density etc.

reduce floods and water shortage. Surveys conducted by the Tata Institute

Irrigation in India helps improve food of Social Sciences (TISS) showed most of

security, reduce dependence on monsoons, urban cities are water deficient. Nearly 40% of

improve agricultural productivity and create water demand in urban India is met by ground

rural job opportunities. Dams used for water. As a result, ground water tables in most

irrigation projects help produce electricity and cities are falling at alarming rate of 2-3 meters

transport facilities, as well as provide drinking per year.1 Water scarcity has many negative

Dr.AIT DEPT. OF ECE 2


impacts on the environment, including lakes, Block Diagram:
rivers, wetlands, and other fresh water
Fig. 3.1: Base Station Module Block
resources. Additionally, water overuse can
cause water shortage, often occurs in areas of
irrigation agriculture, and harms the
environment in several ways including
increased salinity, nutrient pollution, and the
degradation and loss of flood plains and
wetlands. Furthermore, water shortage makes
flow management in the rehabilitation of urban
streams problematic. Owing to poor water
resource management system and climate
change India faces a persistent water shortage.
As per OECD environmental outlook 2050,
India would face severe water constrains by
2050. Indian agriculture accounts for 90%
water use due to fast track ground water
depletion and poor irrigation systems.

III. SYSTEM ARCHITECTURE

Objective of the project

Diagram

To Determine the Moisture Content of


the soil, this data is matched with the data fed
according to the different moisture content
requirement of the particular soil, according to
which irrigation time is determined and
proceeded as programed.

Dr.AIT DEPT. OF ECE 3


while the inner shaft spins. The actuator
does not spin on its own, but is threaded
onto the spindle draw tube of the lathe.
When the spindle runs, the actuator shaft
spins, while the outer housing of the
actuator is held in a stationary position by a
bracket which is usually mounted to the
frame of the lathe. There will be typically
three hose lines which run to the actuator.
Two lines which handle the extend and
retract movements, and one line for an oil
drain path. The spindle shaft they connect
to is commonly called the spindle draw tube
Fig. 3.2: Soil Moisture Detection Block
Diagram and it goes through the center of the spindle

➢ ATmega328p has the Arduino bootloader and connects to the back of the chuck. The

on it, you can upload programs to it using actuator extending and retracting action

the USB-to-serial convertor (FTDI chip) on controls the jaws of the chuck of which the

an Arduino board. To do, you remove the body of the chuck is mounted to the spindle.

microcontroller from the Arduino board so This motion causes the jaws to either move

the FTDI chip can talk to the in, or to move outward. The jaws are

microcontroller on the breadboard instead. typically designed so you can move them in

The diagram at right shows how to connect to clamp on the outside of a part, or to move

the RX and TX lines from the Arduino them out to clamp a hollow part from the

board to the ATmega on the breadboard. To inside.

program the microcontroller, select ➢ The GPS concept is based on time and the

"Arduino Duemilanove or Nano w/ known position of GPS specialized

ATmega328" from the the Tools > Board satellites. The satellites carry very stable

menu (or "ATmega328 on a breadboard (8 atomic clocks that are synchronized with

MHz internal clock)" if you're using the one another and with the ground clocks.

minimal configuration described below). Any drift from time maintained on the

➢ The rotary actuator is a hydraulic cylinder ground is corrected daily. In the same

on which the center shaft can move back manner, the satellite locations are known

with hydraulic force as it holds that force with great precision. GPS receivers have

Dr.AIT DEPT. OF ECE 4


clocks as well, but they are less stable and factors such as soil type, temperature, or
less precise. electric conductivity. Reflected microwave
➢ A coil of wire with a current running radiation is affected by the soil moisture
through it generates an electromagnetic and is used for remote sensing in hydrology
field aligned with the center of the coil. The and agriculture. Portable probe instruments
direction and magnitude of the magnetic can be used by farmers or gardeners.
field produced by the coil can be changed
with the direction and magnitude of the Model preview:

current flowing through it.


➢ An irrigation sprinkler (also known as a
water sprinkler or simply a sprinkler) is a
device used to irrigate agricultural crops,
lawns, landscapes, golf courses, and other
areas. They are also used for cooling and for
the control of airborne dust. Sprinkler
irrigation is the method of applying water in
a controlled manner in way similar to IV. SYSTEM REQUIREMENTS
rainfall. The water is distributed through a
Hardware requirements
network that may consist of pumps, valves,
pipes, and sprinklers. • 4 DC Motors

➢ Soil moisture sensors measure the • Sprinkler


• Pump Motor
volumetric water content in soil. Since the
• Water Tank
direct gravimetric measurement of free soil
• Turbo Wheels
moisture requires removing, drying, and
• Waterproof robot body
weighing of a sample, soil moisture sensors
• Pipes
measure the volumetric water content
• Atmega328
indirectly by using some other property of
• Soil Moisture Sensor
the soil, such as electrical resistance, • LCD Display
dielectric constant, or interaction with • Switch
neutrons, as a proxy for the moisture
Software requirements
content.
➢ The relation between the measured property
and soil moisture must be calibrated and
may vary depending on environmental

Dr.AIT DEPT. OF ECE 5


Fig. 4.1: Arduino

• Arduino software
• Embedded C

DETAILS OF THE COMPONENTS:

A. Arduino:

Arduino/Genuino Uno is a microcontroller


board based on the ATmega328P. It has 14 Arduino specification:
digital input/output pins (of which 6 can be
used as PWM outputs), 6 analog inputs, a 16 Microcontroller ATmega328P
MHz quartz crystal, a USB connection, a Operating Voltage 5v
power jack, an ICSP header and a reset Input voltage 7-12v
button. It contains everything needed to Input voltage limit 6-20v
support the microcontroller; simply connect it Digital I/O Pins 6

to a computer with a USB cable or power it Analogue input Pins 6

with an AC-to-DC adapter or battery to get DC current perI/O 20 Ma


pins
started. DC current for 3.3v 50 Ma
Pin
You can tinker with your UNO Flash Memory Of which o.5KB is
used
without worrying too much about doing SRAM 2 KB
something wrong, worst case scenario you can EEPROM 1KB
replace the chip for a few dollars and start Clock Speed 16MHz
over again. "Uno" means one in Italian and was Length 68.6mm
chosen to mark the release of Arduino Width 53.4nm
Software (IDE) 1.0. The Uno board and version Weight 25g
1.0 of Arduino Software (IDE) were the Arduino programming:
reference versions of Arduino, now evolved
The Arduino/Genuino Uno can be programmed
to newer releases. The Uno board is the
with the (Arduino Software (IDE)).Select
first in a series of USB Arduino boards, and
"Arduino/Genuino Uno from the Tools >
the reference model for the Arduino platform;
Board menu (according to the
for an extensive list of current, past or outdated
microcontroller on your board). The
boards see the Arduino index of boards. [1]
ATmega328 on the Arduino/Genuino Uno

Dr.AIT DEPT. OF ECE 6


comes preprogrammed with a boot loader that not use the FTDI USB-to-serial driver chip.
allows us to upload new code to it without the Instead, it features the Atmega16U2
use of an external hardware programmer. It (Atmega8U2 up to version R2) programmed
communicates using the original STK500 as a USB-to-serial converter. [1]
protocol (reference, C header files).
Power: The Arduino/Genuino Uno board can
We can also bypass the boot loader and be powered via the USB connection or with
program the microcontroller through the ICSP an external power supply. The power source is
(In-Circuit Serial Programming) header using selected automatically.
Arduino ISP or similar. The
External (non-USB) power can come either
ATmega16U2/8U2 is loaded with a DFU boot
from an AC-to-DC adapter (wall-wart) or
loader,
battery. The adapter can be connected by
which can be activated by: plugging a 2.1mm center-positive plug into the
board's power jack. Leads from a battery can
• On Rev1 boards: connecting the solder
be inserted in the GND and VIN pin headers
jumper on the back of the board (near the map
of the POWER connector.
of Italy) and then rese ing the 8U2.
The board can operate on an external supply
• On Rev2 or later boards: there is a
from 6 to 20 volts. If supplied with less than
resistor that pulling the 8U2/16U2 HWB line
7V, however, the 5V pin may supply less than
to ground, making it easier to put into DFU
five volts and the board may become
mode. [1]
unstable. If using more than 12V, the voltage
Warnings: regulator may overheat and damage the

The Arduino/Genuino Uno has a resettable board. The recommended range is 7 to 12 volts.

polyfuse that protects your computer's USB The power pins are as follows:
ports from shorts and overcurrent. Although
• VIN. The input voltage to the
most computers provide their own internal
Arduino/Genuino board when it's using an
protection, the fuse provides an extra layer of
external power source (as opposed to 5 volts
protection. If more than 500 mA is applied to
from the USB connection or other regulated
the USB port, the fuse will automatically break
power source). One can supply voltage
the connection until the short or overload is
through this pin, or, if supplying voltage via
removed. [1]
the power jack, access it through this pin.
Differences with other boards: The Uno
differs from all preceding boards in that it does

Dr.AIT DEPT. OF ECE 7


• 5V.This pin outputs a regulated 5V an internal pull- up resistor (disconnected by
from the regulator on the board. The board default) of 20-50k ohm. A maximum of 40mA
can be supplied with power either from the DC is the value that must not be exceeded on any
power jack (7 - 12V), the USB connector (5V), I/O pin to avoid permanent damage to the
or the VIN pin of the board (7-12V). microcontroller.
Supplying voltage via the 5V or 3.3V pins In addition, some pins have specialized
bypasses the regulator, and can damage your functions:
board. We don't advise it. • Serial: 0 (RX) and 1 (TX). Used to
receive (RX) and transmit (TX) TTL serial
• 3V3. A 3.3 volt supply generated by the
data. These pins are connected to the
on-board regulator. Maximum current
corresponding pins of the ATmega8U2 USB-
draw is 50 mA. to-TTL Serial chip.

• GND. Ground pins. • External Interrupts: 2 and 3. These pins

• IOREF. This pin on the can be configured to trigger an interrupt on a

Arduino/Genuino board provides the voltage low value, a rising or falling edge, or a change

reference with which the microcontroller in value. See the attach interrupt () function

operates. A properly configured shield can for details.

read the IOREF pin voltage and select the • PWM: 3, 5, 6, 9, 10, and 11. Provide 8-
appropriate power source or enable voltage bit PWM output with the analog write ()
translators on the outputs to work with the 5V function.
or 3.3V. [1]
• SPI: 10 (SS), 11 (MOSI), 12 (MISO),
Memory: The ATmega328 has 32 KB (with 13 (SCK). These pins support SPI
0.5 KB occupied by the boot loader). It also communication using the SPI library.
has 2 KB of SRAM and 1 KB of EEPROM
• LED: 13. There is a built-in LED driven
(which can be read and written with the
by digital pin 13. When the pin is HIGH
EEPROM library). [1]
value, the LED is on, when the pin is LOW, it's
Input & Output: Each of the 14 digital pins on
off.
the Uno can be used as an input or output,
using pin mode (), digital write (), and digital • TWI: A4 or SDA pin and A5 or SCL
read () functions. They operate at 5 volts. Each pin. Support TWI communication using the
pin can provide or receive 20 mA as Wire library.
recommended operating condition and has

Dr.AIT DEPT. OF ECE 8


The Uno has 6 analog inputs, labeled A0 communication, which is available on digital
through A5, each of which provide 10 bits of pins 0 (RX) and 1 (TX). An ATmega16U2
resolution (i.e. 1024 different values). By on the board channels this serial
default they measure from ground to 5 volts, communication over USB and appears as a
though is it possible to change the upper end of virtual com port to software on the computer.
their range using the AREF pin and the analog The 16U2 firmware uses the standard USB
reference () function. COM drivers, and no external driver is needed.
However, on Windows, an
There are a couple of other pins on the board:
.inf file is required. The Arduino Software
• AREF. Reference voltage for the analog
(IDE) includes a serial monitor which allows
inputs. Used with analog Reference ().
simple textual data to be sent to and from the
• Reset. Bring this line LOW to reset the board. The RX and TX LEDs on the board
microcontroller. Typically used to add a reset will flash when data is being transmitted via
button to shields which block the one on the the USB-to-serial chip and USB connection
board. [1] to the computer (but not for serial
communication on pins 0 and 1).

A Software serial library allows serial


communication on any of the Uno's digital
pins. The ATmega328 also supports I2C
(TWI) and SPI communication. The Arduino
Software (IDE) includes a Wire library to
simplify use of the I2C bus; see the
documentation for details. For SPI
communicatio n, use the SPI library. [1]

Fig. 4.2 : Pin Specification Automatic (Software) Reset:

Communication: Rather than requiring a physical press


of the reset button before an upload, the
Arduino/Genuino Uno has a number of
Arduino/Genuino Uno board is designed in a
facilities for communicating with a
way that allows it to be reset by software
computer, another Arduino/Genuino board, or
running on a connected computer. One of the
other microcontrollers. The ATmega328
hardware flow control lines (DTR) of the
provides UART TTL (5V) serial
ATmega8U2/16U2 is connected to the reset

Dr.AIT DEPT. OF ECE 9


line of the ATmega328 via a 100 nano farad Power Supply:
capacitor. When this line is asserted (taken A regulated power supply is an embedded
low), the reset line drops long enough to reset circuit; it converts unregulated AC (Alternating
the chip. The Arduino Software (IDE) uses this Current)into a constant DC. With the help of a
capability to allow you to upload code by rectifier it converts AC supply into DC. Its
simply pressing the upload button in the function is to supply a stable voltage (or less
interface toolbar. This means that the boot often current), to a circuit or device that must
loader can have a shorter timeout, as the be operated within certain power supply limits.
lowering of DTR can be well-coordinated with The output from the regulated power supply
the start of the upload. This setup has other may be alternating or unidirectional, but is
implications. When the Uno is connected to nearly always DC.
either a computer running Mac OS X or Linux,
The circuit needs two different
it resets each time a connection is made to it
voltages, +5V & +12V, to work. These dual
from software (via USB). For the following
voltages are supplied by this specially designed
half-second or so, the boot loader is running
power supply. [6]
on the Uno. While it is programmed to ignore
malformed data (i.e. anything besides an The power supply, unsung hero of every
upload of new code), it will intercept the first electronic circuit, plays very important role in
few bytes of data sent to the board after a smooth running of the connected circuit. The
connection is opened. main object of this ‘power supply’ is, as the
name itself implies, to deliver the required
If a sketch running on the board
amount of stabilized and pure power to the
receives one-time configuration or other data
circuit.
when it first starts, make sure that the
software with which it communicates waits a The stabilization of DC output is
second after opening the connection and before achieved by using the three terminal voltage
sending this data. regulator IC. This regulator IC comes in two
flavors: 78xx for positive voltage output and
The Uno board contains a trace that can
79xx for negative voltage output. For example
be cut to disable the auto-reset. The pads
7812 gives +12V output and 7912 gives -12V
on either side of the trace can be soldered
stabilized output. These regulator ICs have in-
together to re-enable it. It's labeled "RESET-
built short-circuit protection and auto-thermal
EN". You may also be able to disable the
cutout provisions. If the load current is very
auto-reset by connecting a 110 ohm resistor
high the IC needs ‘heat sink’ to dissipate the
from 5V to the reset line.[1]

Dr.AIT DEPT. OF ECE 10


internally generated power. [6] practical for the construction of cathode ray
ower. [6] tube (crt) display technology. Its low electrical

KIA 78xx power consumption enables it to be used in


battery-powered electronic equipment. It is an
electronically-modulated optical device made
up of any number of pixels filled with liquid
crystals and arrayed in front of a light source
(backlight) or reflector to produce images in
color or monochrome.
1 2 3
Fig 4.3: Voltage Regulator IC KIA 78xx The earliest discovery leading to the
development of LCD technology, the discovery
B. Liquid Crystal Display:
of liquid crystals, dates from 1888. By 2008,
worldwide sales of televisions with LCD
screens had surpassed the sale of crt units.

Each pixel of an LCD typically consists


of a layer of molecules aligned between two
transparent electrodes, and two polarizing
filters, the axes of transmission of which are (in
most of the cases) perpendicular to each other.
Fig 4.4: Liquid Crystal Display
With no actual liquid crystal between the
A liquid crystal display (LCD) is a thin, polarizing filters, light passing through the first
flat panel used for electronically displaying filter would be blocked by the second (crossed)
information such as text, images, and moving polarizer.
pictures. Its uses include monitors for
The surfaces of the electrodes that are in
computers, televisions, instrument panels, and
contact with the liquid crystal material are
other devices ranging from aircraft cockpit
treated so as to align the liquid crystal
displays, to every-day consumer devices such
molecules in a particular direction. This
as video players, gaming devices, clocks,
treatment typically consists of a thin polymer
watches, calculators, and telephones. Among
layer that is unidirectional rubbed using, for
its major features are its lightweight
example, a cloth. The direction of the liquid
construction, its portability, and its ability to be
crystal alignment is then defined by the
produced in much larger screen sizes than are
direction of rubbing. Electrodes are made of a

Dr.AIT DEPT. OF ECE 11


transparent conductor called indium tin oxide By the register selector (RS) signal, these two
(ito). registers can be selected.

Interface Pin Function:

Busy Flag (BF)

Function description

The LCD display Module is built in a LSI


When the busy flag is 1, the controller LSI is in
controller, the controller has two 8-bit registers,
the internal operation mode, and the next
an instruction register (IR) and a data register
instruction will not be accepted. When RS=0
(DR).
and R/W=1, the busy flag is output to DB7. The
The IR stores instruction codes, such as display next instruction must be written after ensuring
clear and cursor shift, and address information that the busy flag is 0.
for display data RAM (DDRAM) and character
Address Counter (AC)
generator (CGRAM). The IR can only be
written from the MPU. The DR temporarily The address counter (AC) assigns addresses to
stores data to be written or read from DDRAM both DDRAM and CGRAM\
or CGRAM. When address information is
Display Data RAM (DDRAM)
written into the IR, then data is stored into the
DR from DDRAM or CGRAM. This DDRAM is used to store the display data
represented in 8-bit character codes. Its
extended capacity is 80×8 bits or 80 characters.

Dr.AIT DEPT. OF ECE 12


Below figure are the relationships between (3) Don’t disassemble the LCM.
DDRAM addresses and positions on the liquid (4) Don’t operate it above the absolute
crystal display. maximum rating.
(5) Don’t drop, bend or twist LCM.
Character Generator ROM (CGROM)
(6) Soldering: only to the I/O terminals.
The CGROM generate 5×8 dot or 5×10 dot
(7) Storage: please storage in anti-static
character patterns from 8-bit character codes.
electricity container and clean environment.
See Table 2.
(8) Winstar have the right to change the passive
Character Generator RAM (CGRAM)
components
In CGRAM, the user can rewrite character by
(9) Winstar have the right to change the PCB
program. For 5×8 dots, eight character patterns
Rev.
can be written, and for 5×10 dots, four
character patterns can be written. General specifications:
Write into DDRAM the character code at the C. DC Motor:
addresses shown as the left column of table 1.
A DC motor is any of a class of rotary electrical
To show the character patterns stored in
CGRAM. machines that converts direct current electrical
energy into mechanical energy. The most
common types rely on the forces produced by
magnetic fields. Nearly all types of DC motors
have some internal mechanism, either
electromechanical or electronic, to periodically
change the direction of current flow in part of
the motor.

Precautions in use of LCD modules


Fig 4.5: DC Motor
(1)Avoid applying excessive shocks to the H-Bridge:
module or making any alterations or
modifications to it. You take a battery; hook the positive side to one
side of your DC motor. Then you connect the
(2) Don’t make extra holes on the printed
circuit board, modify its shape or change the negative side of the battery to the other motor
components of LCD module.

Dr.AIT DEPT. OF ECE 13


lead. The motor spins forward. If you swap the Apply a logical zero, which is usually a ground,
battery leads the motor spins in reverse. causes the motor to stop spinning.
Ok, that's basic. Now lets say you want a Micro If you hook up these circuits you can
Controller Unit (MCU) to control the motor, only get the motor to stop or turn in one
how would you do it? direction, forward for the first circuit or reverse
for the second circuit.
You can also pulse the motor control
line, (A or B) on and off. This powers the motor
in short burst and gets varying degrees of
torque, which usually translates into variable
motor speed.
Figure 4.6: Connections for clockwise
rotation of motor
But if you want to be able to control the
motor in both forward and reverse with a
If you connect this circuit to a small
processor, you will need more circuitry. You
hobby motor you can control the motor with a
will need an H-Bridge.
processor (MCU, etc.) Applying a logical one,
(+12 Volts in our example) to point A causes
An H-bridge is an electronic circuit
the motor to turn forward. Applying a logical
which enables a voltage to be applied across a
zero, (ground) causes the motor to stop turning
load in either direction. These circuits are often
(to coast and stop).
used in robotics and other applications to allow
DC motors to run forwards and backwards. H-
bridges are available as integrated circuits, or
can be built from discrete components.
Let's start with the name, H-bridge.
Sometimes called a "full bridge" the H-bridge
is so named because it has four switching
Figure 4.7: Connections for anti-clockwise
elements at the "corners" of the H and the motor
rotation of motor

Hook the motor up in this fashion and


the circuit turns the motor in reverse when you
apply a logical one (+12Volts) to point B.

Dr.AIT DEPT. OF ECE 14


forms the cross bar. The basic bridge is shown drivers" are the relays that control the negative
in the figure to the right. voltage to sink current to the motor. "Sinking
current" is the term for connecting the circuit to
the negative side of the power supply, which is
usually ground.
The switches are turned on in pairs, either high
left and lower right, or lower left and high right,
but never both switches on the same "side" of
the bridge. If both switches on one side of a
bridge are turned on it creates a short circuit
\Figure 4.7: Basic H-bridge
between the battery plus and battery minus
The key fact to note is that there are, in
terminals. This phenomenon is called shoot
theory, four switching elements within the
through in the Switch-Mode Power Supply
bridge. These four elements are often called,
(SMPS) literature.
high side left, high side right, low side right,
Semiconductor H-Bridges:
and low side left (when traversing in clockwise
We can better control our motor by
order).
using transistors or Field Effect Transistors
(FETs). Most of what we have discussed about
the relays H-Bridge is true of these circuits.
You don't need diodes that were across the
relay coils now. You should use diodes across
your transistors though. See the following
diagram showing how they are connected.
These solid state circuits provide power
and ground connections to the motor, as did the
relay circuits. The high side drivers need to be
current "sources" which is what PNP transistors
and P-channel FETs are good at. The low side
drivers need to be current "sinks" which is what
Fig. 4.8: Schematic diagram of H-Bridge
using relay
The "high side drivers" are the relays
that control the positive voltage to the motor.
This is called sourcing current. he "low side

Dr.AIT DEPT. OF ECE 15


NPN transistors and N-channel FETs are good It is important that the four quadrants
at. of the H-Bridge circuits be turned on and off
properly. When there is a path between the
positive and ground side of the H-Bridge, other
than through the motor, a condition exists
called "shoot through". This is basically a direct
short of the power supply and can cause
semiconductors to become ballistic, in circuits
with large currents flowing.
Fig. 4.9: Semiconductor H-Bridge
There are H-bridge chips available that
Transistors, being a semiconductor
are much easier, and safer, to use than
device, will have some resistance, which causes
designing your own H-Bridge circuit.
them to get hot when conducting much current.
This is called not being able to sink or source
D. Soil Moisture Sensor:
very much power, i.e.: Not able to provide
much current from ground or from plus voltage. The soil moisture sensor consists of
Mosfets are much more efficient, they two probes which are used to measure the
can provide much more current and not get as volumetric content of water. The two probes
hot. They usually have the flyback diodes built allow the current to pass through the soil and
in so you don't need the diodes anymore. This then it gets the resistance value to measure the
helps guard against flyback voltage frying your moisture value.When there is more water, the
MCU. soil will conduct more electricity which means
To use Mosfets in an H-Bridge, you that there will be less resistance. Therefore, the
need P-Channel Mosfets on top because they moisture level will be higher. Dry soil conducts
can "source" power, and N-Channel Mosfets on electricity poorly, so when there will be less
the bottom because then can "sink" power. N- water, then the soil will conduct less electricity
Channel Mosfets are much cheaper than P- which means that there will be more resistance.
Channel Mosfets, but N-Channel Mosfets used Therefore, the moisture level will be lower.
to source power require about 7 volts more than
the supply voltage, to turn on. As a result, some
people manage to use N-Channel Mosfets, on
top of the H-Bridge, by using cleaver circuits to
overcome the breakdown voltage.

Dr.AIT DEPT. OF ECE 16


This sensor can be connected in two modes; • VCC: For power
Analog mode and digital mode. First, we will • A0: Analog output
connect it in Analog mode and then we will use • D0: Digital output
• GND: Ground
it in Digital mode.
The Module also contains a potentiometer
which will set the threshold value and then this
threshold value will be compared by the
LM293 comparator. The output LED will light
up and down according to this threshold value.

E. Water Pump:

Fig. 4.10 Soil Moisture Sensor


Fig 4.11: Water Pump

Specifications The pumping of water is a basic and practical


technique, far more practical than scooping it
The specifications of the soil moisture sensor
FC-28 are as follows up with one's hands or lifting it in a hand-held
bucket. This is true whether the water is drawn

Input Voltage 3.3 – 5V from a fresh source, moved to a needed


location, purified, or used for irrigation,
washing, or sewage treatment, or for
Output Voltage 0 – 4.2V
evacuating water from an undesirable location.
Regardless of the outcome, the energy required
Input Current 35mA to pump water is an extremely demanding
component of water consumption. All other
Output Signal Both Analog and Digital processes depend or benefit either from water
descending from a higher elevation or some
pressurized plumbing system.
Pin Out – Soil Moisture Sensor
Software requirements:
The soil Moisture sensor FC-28 has four pins
Software Requirements Description:

Dr.AIT DEPT. OF ECE 17


Software Requirements is a field within vendor development boards. The Arduino IDE
software engineering that deals with supports the languages C and C++ using special
establishing the needs of stakeholders that are rules of code structuring. It is an official
to be solved by software. The IEEE Standard Arduino software, making code compilation
Glossary of Software Engineering too easy that even a common person with no
Terminology defines a requirement as: prior technical knowledge can get their feet wet
with the learning process. The main code, also
• A condition or capability needed by a
known as a sketch, created on the IDE platform
user to solve a problem or achieve an objective.
will ultimately generate a Hex File which is
• A condition or capability that must be then transferred and uploaded in the controller
met or possessed by a system or system on the board. The main code, also known as a
component to satisfy a contract, standard, sketch, created on the IDE platform will
specification, or other formally imposed ultimately generate a Hex File which is then
document. transferred and uploaded in the controller on

Some of the important Software requirements the board.

required in our project are:

A. Arduino IDE

The Arduino integrated development


environment (IDE) (figure 4.4.1) is a cross-
platform application for Windows, macOS,
Linux that is written in the programming
language Java. It is used to write and upload
programs to Arduino compatible boards, but Fig. 4.12: Arduino IDE
also, with the help of 3rd party cores, other
The IDE environment is mainly distributed into not a part of the C language. C is the most
three sections: widely used programming language for
embedded processors/controllers. Assembly is
▪ Menu Bar
also used but mainly to implement those
▪ Text Editor
portions of the code where very high timing
▪ Output Pane
accuracy, code size efficiency, etc. are prime
Embedded C is an extension to C programming requirements.
language that provides support for developing
efficient programs for embedded devices. It is

Dr.AIT DEPT. OF ECE 18


Arduino IDE (Integrated development C language is possible because Arduino IDE
Environment) is fully developed into can compile both Arduino code as well as AVR
functionality of full of libraries, as long as standard code.
programming the Arduino UNO in Embedded
V. METHODOLOGY VI. RESULT:

The soil moisture sensor continuously monitors


the volumetric moisture content in the soil and
sends that information to the Arduino with
values lying in the range 0 to 1023. Then the
sensor obtains the data from the soil and display
on the LCD screen. If the soil moisture content
Fig 5.1: System Block Diagram
goes above a certain point, which is decided by
The automatic irrigation system was designed the threshold value given in the Arduino code,
to continuously sense the moisture and the servo motor and the DC motor to start the
temperature level of the soil. The system watering mechanism. As soon as the Arduino
responds appropriately by watering the soil decides that the soil needs watering, it tells the
with the exact amount of water required and servo motor how much to rotate and along with
then shuts down the water supply when the it the water holding container is tilted to let the
required amount of soil moisture is achieved. water flow. The water pump is used as the DC
The reference amount of soil moisture is motor for running to maintain a steady flow of
already fed to the microcontroller beforehand. water.
This reference soil moisture content was made The program in the Arduino reads the moisture
to be adjustable for the three most common soil value from the sensor every 20 seconds. If the
types (sandy, loamy and clayey soils).The value reaches the threshold value, the program
moisture sensors and temperature sensors were runs the following three things:
designed using probes made from corrosion • It moves the servo motor horn, along with the
resistant material which can be stuck into soil water pipe fixed on it, toward potted plant,
sample. Voltage levels corresponding to the whose moisture level is greater than the
wet and dry status of the soil sample were predetermined and threshold level.
computed by measuring the resistance between • It starts the water pump to supply water to the
the moisture probes and matching them to plant for fixed period of time and then stops the
output voltage of a comparator circuit. water pump.

Dr.AIT DEPT. OF ECE 19


• It brings back the servo motor horn to its motor horn rotates to 90° to the second pot,
initial position. At first the moisture sensor water pump is ON for five seconds and then
senses the amount of moisture present in the stop automatically. The servo motor returns to
soil and accordingly it sends its output to the its original position.
microcontroller through the input and output Finally, a third sensor is used, the moisture
pins provided in the Arduino board. Then the sensor senses the amount of moisture present in
sensor obtains the data from the soil and display the soil and accordingly it sends its output to the
on the LCD screen. Place the flower pots where microcontroller through the input and output
the pipe from the servo motor horn is easily pins provided in the Arduino board. Then the
reach them. When the moisture level dips sensor obtains the data from the soil and display
above 600, servo horn rotates at an angle of 30°. on the LCD screen. The servo motor horn
That is, after servo motor horn moves 30° rotates to 150° to the third pot, water pump is
toward the first pot, the water pump is ON for ON six seconds and then stop automatically.
four seconds and then stops automatically. The servo motor returns to its original position.
Then, the servo returns to its original position. If the sensor value below the threshold value 600,
Similarly, if a second sensor is used, the nothing display on LCD screen. And servo motor
moisture sensor senses the amounts of moisture horn its initial position at 10° has not changed any
presented in the soil and accordingly it sends its other degrees. And also, the motor driver L293D

output to the microcontroller through the input is not working, so the water pump is not pumped

and output pins provided in the Arduino board. for plants. This situation is generally same as the

Then the sensor obtains the data from the soil operation of sensor 1, 2 and 3.

and display on the LCD screen. The servo

Dr.AIT DEPT. OF ECE 20


VII. REFERENCE: 3. Morgan, Robert (1993). Water and the
Land. Cathedral City, CA: Adams Publishing
1. International Research Journal of
Corp. pp. 35–36. ISBN 0935030026.
Engineering and Technology (IRJET).
4. Hoiberg, Dale (2000). Students' Britannica
2. Economic Times: How to solve the
India. Encyclopedia Britannica. p. 260. ISBN
problems of India's rain-dependent on
978-0-85229-760-5.
agricultural land.

Dr.AIT DEPT. OF ECE 21

You might also like