Automatic Plant Watering System Gelagay PDF

Download as pdf or txt
Download as pdf or txt
You are on page 1of 54

Automatic Plant Watering System

ACKNOWLDEGEMENT

First of all our heartfelt gratitude goes to our School of Electrical and Computer Engineering for
giving such a chance to work. Next, we would like to thank our advisor Mr. Abere Getachew for
his unreserved guidance, suggestions and advices. We are grateful to his motivation for the
timely completion of the project, and his dynamic suggestions for solutions to any challenges
during the total work of this project.

Finally, we extend our gratefulness to one and all who are directly or indirectly involved in the
successful completion of this project work.

Wolaita Sodo University Electrical And Computer Engineering Page I


Automatic Plant Watering System

ABSTRACT

In present days, in the field of agriculture farmers are facing major problems in watering their
crops. It‟s because they don‟t have proper idea about the availability of the power. Even if it is
available, they need to pump water and wait until the field is properly watered, which compels
them to stop doing other activities which are also important for them, and thus they loss their
precious time and efforts. But, there is a solution “An Automatic Plant watering System “not
only helps farmers but also others for watering their gardens as well.

The aim of this project is to use control engineering principles and concepts to provide a
microcontroller based automatic plant watering system. The system will help in saving money
and water and at the same time increasing crops production. The automatic plant watering system
is controlled using ATmega328 micro controller based on arduino platform. The soil
moisture/humidity levels are checked using soil moisture sensor. Whenever there is a change in
moisture/humidity in the soil this sensor senses the change and gives an interrupt signal to the
micro-controller and thus the watering system is activated or deactivated.

KEY WORDS: Automatic watering, Soil moisture, Arduino uno, sensor, water pump.

Wolaita Sodo University Electrical And Computer Engineering Page II


Automatic Plant Watering System

LIST OF FIGURES Pages

Figure 1.1 Methodology of the project…………………………………………………………….3

Figure 2.1 Homemade soil moisture sensor……………………………………………………….6

Figure2.2 Diagram of a tensiometer……………………………………………………………….9

Figure 2.3 YL-69 Sensors………………………………………………………………………….9

Figure 2.4 Digipot schematic……………………………………………………………………..10

Figure2.5 Installation of flat probe SMS…………………………………………………………12

Figure2.6 SMSs with node probes installation…………………………………………………...12

Figure2.7 Different types of arduino……………………………………………………………..15

Fig 2.8 Atmega 328 microcontroller pin configuration………………………………………….16

Figure2.9 Arduino mega 2560 pin configuration………………………………………………...17

Figure2.10 Triac circuit…………………………………………………………………………..18

Figure3.1 Block diagram of automatic plant watering system…………………………………..22

Figure 3.2: Block diagram of regulated power supply system…………………………………..23


Figure3.3 Regulated Power Supply………………………………………………………………24
Figure3.4 The bridge rectifier circuit…………………………………………………………….25
Figure3.5 flow chart of automatic plant watering system………………………………………..27
Figure 3.6 Parts of arduino uno…………………………………………………………………..28
Figure 3.7 YL-69 Sensor…………………………………………………………………………31
Figure3.8 sensor Connection to arduino board………………………………………………….32
Figure 3.9 LEDs Connection to arduino board………………………………………………….33
Figure3.10 Water pump………………………………………………………………………….34
Figure 3.11 Relay interfacing of arduino to the 240VAC pump………………………………..35
Figure3.12 LCD (16X2) …………………………………………………………………………37
Figure3.13 circuit diagram of automatic plant watering system…………………………………38
Figure4.1.First condition of simulation results…………………………………………………..40

Wolaita Sodo University Electrical And Computer Engineering Page III


Automatic Plant Watering System

Figure4.2 Second Condition of simulation result………………………………………………...41


Figure4.3 Third Condition of simulation result…………………………………………………..42

Wolaita Sodo University Electrical And Computer Engineering Page IV


Automatic Plant Watering System

List of Table Page


Table 3.1 Selected pins on arduino……………………………………………………………….30
Table 3.2 YL-69 specifications…………………………………………………………………..31
Table 3.3 LCD Pin configuration………………………………………………………………...37

Wolaita Sodo University Electrical And Computer Engineering Page V


Automatic Plant Watering System

LIST OF ABBREVIATIONS

LCD -Liquid crystal Display

SMS –Soil Moisture Sensor

FDR -Frequency Domain Reflectometry

TDR -Time Domain Reflectometry

VWC -Volumetric Water Content

LED -Light Emitting Diode

RDAC -resistive digital-to-analog converters

IC – Integrated Circuit

Wolaita Sodo University Electrical And Computer Engineering Page VI


Automatic Plant Watering System

CHAPTER ONE

1. INTRODUCTION
1.1 Brief Background

The continuous increase in food demand requires a rapid improvement in food production
technologies. Food insecurity is a major challenge in developing countries. In a country like
Ethiopia where the economy is mainly agriculture based, use of technology to improve on yields
is paramount.

Agriculture in Ethiopia is mainly rain fed. Global warming has led to climate changing thus
rendering the rain fed agricultural systems unreliable. This has resulted on more land being put
under irrigation to meet the food demand for the growing population.

In agriculture, one of the most important job is to watering the farming land. Most of the farmers
use the manual control over the land that is to monitor the pumping or watering the land by
visiting the site. This will surely need more and more labor and as a result the efficiency of work
may be degraded. An automatic system can be developed to monitor all the controlling operation.
Automatic control system reduces the human labor and increase the efficiency of the
corresponding work.

In this project, an automatic control system is introduced for watering the land by measuring the
humidity or in other word the temperature. The system measures the humidity of the soil and
depending upon the condition it will provide the needed water in the land.

The agriculture technique has been developed day to day all over the world and so the agriculture
engineering has been enhanced gradually to serve the world with more integrated and efficient
system. It will sense the humidity in a continuous fashion. There is a sensor included in this
system which senses the humidity and sends the record to the Microcontroller. The pumps are
connected with the system relay circuit. There are two conditions are set in between which the
pump will be ON or OFF. When the water supply is needed, Microcontroller sends digital pulse
to the system to enable the relay circuit and the water will be supplied till the time the pump will
be ON.

Wolaita Sodo University Electrical And Computer Engineering Page 1


Automatic Plant Watering System

This project uses Arduino board, which consists of ATmega328 Microcontroller. It is


programmed in such a way that it will sense the moisture level of the plants and supply the water
if required.

1.2 Statement of the problem

The majority of the farmers need to travel to the field every time to switch on/off the motor,
hence wasting time. To overcome this problem, we designed an automatic plant watering system
using arduino microcontroller. With the proposed work, the farmer can save his time by turning
on/off the motor automatically.

1.3 Project Objective

The objective of this project is to provide water to the plants automatically using microcontroller.
The objectives of our system can be divided into two categories which are as follows.

1.3.1 General Objective

To develop effective and convenient automatic plant watering system to increase the productivity
of crops.

1.3.2 Specific Objectives

The secondary objectives of this study are as follows:

 To develop system that automatically regulates the moisture of the soil.


 To minimize human labor used in irrigation.

 Improve crop quality,


 To provide convenience in accessing the system from anywhere at any time.
 Most importantly conserve water thus saving money.

 The system checks the temperature, humidity.


 To save time of the owner for the large fields.

Wolaita Sodo University Electrical And Computer Engineering Page 2


Automatic Plant Watering System

1.4 Methodology
For successful completion of this project some steps will be followed to carry out different tasks.
Different literature will be revised relating to this project and data will be collected about
automatic plant watering system. Some software's were selected to develop the software
programming. All the required materials are not available Arduino software so some sensors like
YL-69 SMS were replaced by equivalent materials.
The system consists of hardware and software. The hardware part involves Arduino Uno R3
microcontroller, motor pump, sensors, Relay and power supply. The software part is the Arduino
Board is programmed using the Arduino IDE software used to interface hardware and proteus 8
professional. The Arduino Based Automatic model atomization of agricultural environment for
social modernization of agricultural system will be made in the following steps:
 Complete layout of the whole setup will be drawn inform of a block diagram.
 Sensor will first sense the condition and give its output to the Arduino microcontroller &
displayed on the LCD.
 The soil condition is checked by moisture sensor, depending upon the soil condition &
water level, water pump motor is turned on or off.

Literature review

Collection of data

Analyzing the
selected data

Simulate using Arduino


software

Figure 1.1 Methodology of the project

Wolaita Sodo University Electrical And Computer Engineering Page 3


Automatic Plant Watering System

1.5 Project Justification


The increasing world population has led to exponential increase in food demand. This event has
necessitated the need for more land to be cultivated. Due to change of weather patterns brought
about by global warming, irrigation remains as the only reliable method of crops production.
With more and more land now being under irrigation there is a need for optimal use of water.
Over the last few years knowledge in electronics and computation has been used to solve present
day challenges. The microcontroller has been used together with various sensors to measure and
control physical quantities like temperature, humidity, heat and light. By controlling these
physical quantities using the microcontroller; automatic systems have been achieved.
Irrigation systems in crop production can and has also been automated. This solves the challenge
brought about by the unreliability of climate changes thus need for water optimization.
Automation of the irrigation systems is one of the most convenient, efficient and effective
method of water optimization. The systems helps in saving water and thus more land can be
brought under irrigation. Crops grown under controlled conditions tend to be healthier and thus
give more yields.
1.6 Project Scope
The scope of this project entails the design and implementation of a micro controlled plant
watering system, depending on the soil moisture content. Humidly/moisture sensor will be the
input of the system and an electric water pump will be the output of the microcontroller.
1.7 Project organization
This project report is organized into five chapters:
 Chapter one gives the introduction to the project, the project objectives and the scope.
 Chapter Two is the literature review which describes the system and the components used
in the design.
 Chapter Three gives a complete technical aspect of the design.
 Chapter Four analyses and discusses the project.
 Chapter Five gives the conclusion of the whole project, if the objective and scope of the
project were achieved. This chapter also includes appendices and the references used.

Wolaita Sodo University Electrical And Computer Engineering Page 4


Automatic Plant Watering System

CHAPTER TWO
2. LITERATURE REVIEW
2.1 SENSORS
A sensor is a device that detects and measures a physical quantity from the environment and
converts it into an electronic signal. The physical quantity could be moisture, temperature,
motion, light or any other physical phenomenon. Examples of sensors include: oxygen sensors,
temperature sensors, infra-red sensors, humidly sensors, soil moisture sensors and motion
detection sensors. The output of the sensors is usually charge, current or voltage. [4]
2.1.1 Soil Moisture Sensors
A soil moisture sensor is a device that measures the volumetric water content (VWC) of soil.
Mathematically VWC, θ, is given as follows;
Θ=Vw/VT
Equation 2-1: mathematical representation of VWC
Where: Vw is the water volume and VT is the total volume (soil volume + water volume).
Soil moisture sensors are classified according to how they measure the soil moisture content.
2.1.2 Types of soil moisture sensors
2.1.2.1 Electrical resistance blocks Sensors
These sensors are made up of two electrodes made from a porous substance like sand ceramic
mixture or gypsum. The two electrodes are imbedded in the soil during installation. [4] Moisture
is allowed to move freely in and out of the sensors electrodes as the soil becomes moist or dries
up. The resistance of the electrodes to the flow current is correlated with moisture content. To
measure this resistance the electrodes are biased (energized) with a dc voltage and the current
flowing through them measured. Applying Ohm‟s law;
R=V/I
Where: R is resistance (Unknown) (Ω)
V is biasing voltage (3.3V to 5.0V)
I is the current flowing through the electrodes (Amps)

Wolaita Sodo University Electrical And Computer Engineering Page 5


Automatic Plant Watering System

Figure 2.1 Homemade soil moisture sensors


When the moisture content in the soil is high more current will be allowed to flow thus indicating
low resistance. On the other hand for dry soils the sensor will indicate higher resistance portrayed
by the low current reading. This type of sensor is cheap and readily available. Electrical
resistance blocks Sensors can also be readily assembled from home using two metal plates or
steel nails. Electrical resistance blocks Sensors are mostly used in small projects and gardens due
to the following disadvantages;
 They are badly affected by soil PH and salinity thus requiring regular maintenance
 They have low sensitivity.
 The electrodes; especially which provides a constant source of ions; do not dry at the
same rate as the soil surrounding it.
2.1.2.2 Electrical conductivity probe sensors
Electrical conductivity probes employ the same principle as the Electrical resistance blocks
Sensors. The one major difference between the two types of sensors is that Electrical conductivity
probes sensors have their electrodes/probes in direct contact with the soil. [4]
By definition electricity is the flow of charges and water in its pure form cannot conduct
electricity. The amount of impurities in water and mineral salts make it polar thus able to conduct

Wolaita Sodo University Electrical And Computer Engineering Page 6


Automatic Plant Watering System

electricity. A large volume of water will mean more ions and thus better electric conduction.
Electrical conductivity probes sensors takes advantage of this phenomenon. [4]
The amount of current passing between the probes is directly proportional to the soil moisture
content. Moist soil allow more current to flow between the probes while drier soils only allow a
little current to flow between the probes. Better conductivity indicates a lower electrical
resistance. Most of the soil moisture sensors currently in the market especially for small projects
are Electrical conductivity probes sensors. They have the following advantages.
 They are cheap
 They are readily available
 Easy to calibrate and install
2.1.2.3 Dielectric sensors
Dielectric sensors measure the soil water content in the soil by measuring the dielectric
permittivity of the soil. A dielectric material is substance that does not conductor electricity, but
supports electrostatic fields efficiently. At some cases dielectric substance are referred to as
insulators. The volume of water in the soil influences the dielectric permittivity of soil. [4].The
dielectric of water which is 80.4 is greater than other soil constituents. Therefore change in the
amount of water in the soil will directly lead to change in the soil dielectric permittivity.
Dielectric sensors are very complex to build thus making them very expensive. These sensors are
mostly used in scientific research owing to their high accuracy and cost.
Dielectric sensors are classified into two types namely: Capacitance sensors and Time Domain
Reflectometry (TDR) sensors. These sensors do not measure electrical conductivity while
measuring soil moisture. [7]
2.1.2.4 Capacitance sensors
Capacitance sensors use frequency domain reflectometry (FDR).Frequency domain reflectometry
is the measure of signal reflections through a medium across frequency. Capacitance sensors
contain two electrodes which are separated by a dielectric material.
The soil becomes the dielectric component after the electrodes are inserted into the soil; it could
even be inserted into the access tube in the soil to achieve the same results. A high oscillating
frequency is thereafter applied to the electrodes to induce a resonant frequency. The magnitude of
the resonant frequency is dependent on the dielectric constant of the soil which in turns

Wolaita Sodo University Electrical And Computer Engineering Page 7


Automatic Plant Watering System

depends on or can change to the soil‟s moisture content. The change of the frequency as a result
of the soil‟s moisture content is converted into the measurement of the soil moisture.
2.1.2.5 Time Domain Reflectometry (TDR) sensors
Time Domain Reflectometry uses the principle of waveguides. The actual content of water in the
soil is measured under this technology and not the water potential. [7] The TDR device sends
signals to the rods inserted in the soil. The time required for an electromagnetic signal to travel
along the wave guide is measured. The rate at which the send signal returns is used to measure
the water content in the soil. The return rate is dependent on the dielectric properties of the soil.
The signal takes longer time in moisture soils and shorter time in dry soil. This pulse signal is
then converted into soil moisture measurement. [4] TDR sensors give accurate readings faster
and require very little maintenance. The major disadvantage of TDR sensors is that they require
different calibrations depending on different soil types.
2.1.2.6 Heat dissipation sensors
Heat dissipation sensors measure the soil moisture content by measuring the amount of heat
dissipated from a medium which is of ceramic kind in most cases. The water contained in the
medium spaces is directly proportional to the heat dissipated from the medium. [8]The less the
water contained in the medium the less the heat dissipated and more heat is dissipated if the water
contained in the medium is high. More heat dissipated leads to lower reading on the sensor and
less heat dissipated leads to higher reading on the sensor.
The sensor uses the principle of capillarity. Capillary forces influence movement of water
between the sensor medium and the surrounding soil. Heat dissipation sensors are independent of
soil salinity thus not affected by soil type. They require minimum or no calibration at all. On the
downside this type of sensors are very expensive.
2.1.2.7 Tensiometer Sensors
Tensiometers sensors measure the soil moisture content in the soil by measuring the moisture
tension/suction in the soil. Tensiometers sensors is made up of two major parts; a plastic tube
which has a ceramic porous medium at its tip and a vacuum gauge on the opposite end. [7]
During installation the ceramic tip is buried in the soil at the calibrated depth which should be as
near as possible to the plants root area. The vacuum gauge measures the effort the plants roots
have to put to extract water from the soil. [4]This is the measure of the soil measure tension
which is measured in centibars.

Wolaita Sodo University Electrical And Computer Engineering Page 8


Automatic Plant Watering System

Figure2.2 Diagram of a tensiometer


If the soil moisture content is low the roots work harder to extract water from the soil. The
reading on the sensor is high. When water is more available in the soil the roots works less and
thus lower reading is indicated on the sensor. [8]
2.1.2.8 YL-69 Moisture Sensor
This is an Electrical resistance Sensor. The sensor is made up of two electrodes. This soil
moisture sensor reads the moisture content around it. A current is passed across the electrodes
through the soil and the resistance to the current in the soil determines the soil moisture. If the
soil has more water resistance will be low and thus more current will pass through. On the other
hand when the soil moisture is low the sensor module outputs a high level of resistance. This
sensor has both digital and analogue outputs. Digital output is simple to use but is not as accurate
as the analogue output.

Figure 2.3 YL-69 Sensors

Wolaita Sodo University Electrical And Computer Engineering Page 9


Automatic Plant Watering System

2.1.2.8.1 Digital potentiometer


A potentiometer is basically a variable resistor. Like analog potentiometers, digital
potentiometers are used to scale or adjust resistance of a circuit. Digital potentiometers are also
known as a digital pot or digipot. Digipots are used mostly in scaling analog signals to be used in
a microcontroller.

Figure 2.4 Digipot schematic


Digipot output resistance is variable based on digital inputs and thus also known as resistive
digital-to-analog converters (RDACs). Some RDACs come with nonvolatile memory thus
provide wiper setting retention after a power ON to OFF cycle. Digipots are available as
integrated circuits (ICs).
On the soil moisture sensor the digital potentiometer acts as a low resolution digital to analog
convertor (DAC) thus adjusting it varies the sensitivity of the sensor.
2.1.2.8.2 LM393 comparator
A compactor is an electronic device that compares two voltages or currents and gives a digital
signal as the output. It indicates which of the two compared quantities is large. A comparator has
a least two input pins and one output pin. Operational amplifier operating in open loop
configuration and without negative feedback can be used as a simple comparator.

Wolaita Sodo University Electrical And Computer Engineering Page 10


Automatic Plant Watering System

2.1.3 Sensor Selection


When deciding on which sensor to use the following factors should be put into consideration: [4]
[8]
Price: This is the most important parameter when selecting any component. The price of the
sensor will ultimately affect the price of the whole system as this is one of the major system
modules. Sensor with the most competitive price should be chosen.
Power: In any electrical system power efficiency is critical. Moisture sensor will low power
consumption should be selected. Sensors which can be battery powered can be used in areas
without electricity connection.
Technology: Technology used to design sensor dictate the sensitivity, cost and durability of the
sensors. Most low cost sensors have poor sensitivity, rust and corrode over time. Resistive or
conductive sensors which are affected by soli salinity thus have a short life.
Shape: Long and slender sensors can be used in many applications than bulky ones.
Durability: Soil moisture sensor which are not affected by soil salinity, corrode or rust should be
selected. Soil moisture sensor probes that measure conductivity should be avoided, since they
will wear out over time.
Accuracy and Linearity: A quality soil moisture sensor probe should give an output which is
proportional to water content over the full output range. In addition, the soil moisture sensor
probe should have a good output range to reduce sensitivity to noise.
Voltage Range: Choose a sensor that has a big supply voltage range. Powering a sensor with the
wrong voltage will damage the sensor or give inaccurate results.
Sensor Installation
Sensors orientation and installation depends on the sensor type, size and shape (flat, node, and
rod). Installation should be guided by the manufacturer's installation manual. But in general the
sensor should be installed as close to the root area as possible. [4]
On new fields; the SMS should be installed prior to planting crops. The sensor should be installed
at approximately 3 inches deep. For existing fields trenches are dug at uniform intervals and SMS
installed. [8]

Wolaita Sodo University Electrical And Computer Engineering Page 11


Automatic Plant Watering System

Figure2.5 Installation of flat probe SMS


Flat sensor probes are commonly found in two types and typically use TDT technology. These
are the Exposed wave guides and the Encased wave guides. Both of these sensor types are
installed horizontally. [7]
Node probes type soil moisture sensors are usually installed vertically around the root area.
Granular Matrix technology is typically used in this SMS type.

Figure2.6 SMSs with node probes installation


For rod type probes SMSs; the probes are installed inclined at 450 to the ground to allow the
probes to the read moisture content from the root zone. TDR technology is typically used in this
class of sensors. SMSs should be installed away from structures, tree canopy, construction roads
and plant debris.
2.1.4 Sensor Calibration
As is the case of sensors installation, sensor calibration should also be done in line with the
manufacturer's specifications. Different sensors have different calibration procedures.

Wolaita Sodo University Electrical And Computer Engineering Page 12


Automatic Plant Watering System

Development stage of the plants root also determines the SMSs calibration. [7] The soil type and
crops water requirements greatly influence the sensors calibration.
2.1.5 Maintenance
The technology used to design the sensors determines the regularity of maintenance. Electric
resistance and conductance sensors tend to corrode with time and thus require regular
maintenance and replacement. TDT and TDR sensors are the most stable and durable thus
requiring minimum maintenance.
2.2 Microcontroller
A microcontroller is a single on chip computer which includes number of peripherals like RAM,
EEPROM, Timers etc., required to perform some predefined task. [1] There are different
microcontroller families including: 8051, PIC (Programmable Interface Controller) and AVR.
Microcontrollers are used in digital applications as control units. [3] Some microcontrollers come
with their in-build circuits like Analog to digital convertors or digital to analog convertors.
Microcontrollers are mostly programmed using assembly language but in recent years high level
languages like C, C++ PASCAL and java have been used. [5] High level programming of
microcontrollers brings the advantage of not having a different program for each microcontroller
manufacturer. High level programming is also neat, easy to document and maintain and user
friendly.
2.2.1 Types of Microcontrollers
2.2.1.1 8051
These are among the earlier microcontrollers to be fabricated. Due to superiority in technology in
the newer versions, very few companies still fabricate 8051. Earlier types of 8051 have 12 clocks
per instruction whereas the newer versions have 6 clocks per instruction. 8051 microcontroller
does not have an in built memory bus and ADC. First 8051 microcontroller to be fabricated with
Harvard architecture was done in 1980 by Intel. [1]
2.2.1.2 Programmable Interface Controller (PIC)
Programmable Interface Controllers are commonly referred to as PIC. PICs are slightly older
than 8051 microcontrollers. PICs are preferred to 8051 because of their small low pin count
devices. PICs perform better and are affordable than 8051. [3] The Microchip technology
fabricated the single chip microcontroller PIC with Harvard architecture. The only major

Wolaita Sodo University Electrical And Computer Engineering Page 13


Automatic Plant Watering System

downside of PIC is its programming part is very tedious. PICs are hence not recommended for
beginners.
2.2.1.3 AVR:
In 1996, Atmel fabricated this single chip microcontroller with a modified Harvard Architecture.
This chip is loaded with C- compiler and a free IDE. Like PIC, AVR microcontrollers are
difficult for the beginners to work with. AVR microcontroller has on-chip boot-loader thus AVR
can be programmed easily without any external programmer. [3] AVR controllers has number of
I/O ports, timers/counters, interrupts, A/D converters, USART, I2C interfaces, PWM channels,
on-chip analog comparators.[8]
2.2.2 Arduino
Arduino is an open-source electronics design platform. The Arduino board is specially designed
for programming and prototyping with Atmel microcontrollers. [5] An arduino interacts with
physical world via sensors. Using arduino; electric equipments can be designed to respond to
change in physical elements like temperature, humidity, heat or even light. [5] This is the
automation process. For example, reading a humidity sensor and turning on and off of an
automatic irrigation system. There several types of arduino boards.
The open-source Arduino environment allows one to write code and load it onto the Arduino
board's memory. The development environment is written in Java and based on Processing,
AVR-GCC, and other open source software. [5] The Arduino programming language is an
implementation of Wiring, a similar physical computing platform, which is based on the
Processing multimedia programming environment. The arduino software is published as open
source tools, available for extension by experienced programmers. The language can be expanded
through C++ libraries, and people wanting to understand the technical details can make the leap
from Arduino to the AVR C programming language on which it's based. Similarly, AVR-C code
can be added directly into the Arduino programs if one so wishes. [5]
2.2.3 Types of arduino boards
2.2.3.1 Legacy Versions
Arduino legacy versions include Arduino NG, Diecimila, and the Duemilanove. These arduinos
use ATMEGA168 chips. They require manual selection of either USB or battery power.[5] For
Arduino NG one is required to hold the rest button on the board for a few seconds before
uploading a program on to it.

Wolaita Sodo University Electrical And Computer Engineering Page 14


Automatic Plant Watering System

Figure2.7 Different types of arduino


2.2.3.2 Arduino Uno
This is the most common arduino type. This arduino type uses ATmega328 AVR
microcontroller.
ATmega328 is more preferred due to the following features:

 Have three 8-bit bi-directional I/O ports with internal pull-up resistors.
 1K Bytes EEPROM
 32K Bytes of flash memory.
 2K Bytes of RAM
 Operating Voltage 1.8 - 5.5V
 Programmable Serial USART

Wolaita Sodo University Electrical And Computer Engineering Page 15


Automatic Plant Watering System

Fig 2.8 Atmega 328 microcontroller pin configuration

2.2.3.3 Arduino Mega 2560


This is regarded as an advancement of arduino uno. It has more memory than arduino uno. It has
a total of 54 input pins of which 16 are analog inputs. It has a larger PCB board than arduino.
Overall it is more powerful than arduino uno. This arduino board is based on ATmega2560. [5]

Wolaita Sodo University Electrical And Computer Engineering Page 16


Automatic Plant Watering System

Figure2.9 Arduino mega 2560 pin configuration


2.2.3.4 Arduino LilyPad
This arduino board is designed for wearable applications. It is usually sewn on fabric. This board
requires the use of a special FTDI-USB TTL serial programming cable. Arduino LilyPad is used
to design "smart" wearable. [5]
2.2.3.5 Arduino Mega ADK
This arduino board is specifically designed to interact with android devices.
2.3Automatic switching circuits
In electronics automation many times the designer is confronted by a situation where he/she has
to switch very high voltage equipment on, using a low voltage circuit. For example using a 5v dc
voltage, it is possible to switch on/off a 230v ac machine. [6] Digital or discrete signals enables

Wolaita Sodo University Electrical And Computer Engineering Page 17


Automatic Plant Watering System

as opposed to analog signals are used. There are a number of components used in electronic
switching today.
2.3.1The Triac Switching circuit
The Triac is a two thyristors connected back to back, used for high or medium power control for
both a.c and d.c applications. Either of electrodes A2 and A1 can act as anode and either is
cathode. The device can be triggered by either positive or negative voltage on the gate with
respect to A2. This device is effectively two thyristors (SCR s) back to back in construction with
an external n-region which is the gate.
Triode for Alternating Current (TRIAC) is an electronic component-of the thyristor family- that
can conduct current in either direction when it is triggered. Due to this capability a TRIAC is also
known as bidirectional triode thyristor or bilateral triode thyristor. TRIAC has 3-terminals. There
are two Main Terminals, A1 and A2 which carry the heavy current that is being switched, and a
control terminal, the Gate, G, which accepts the control signal to turn the switch on.
The bi-directionality makes TRIACs very convenient switches for AC circuits, also allowing
them to control very large power flows with only mill ampere-scale gate currents. In addition,
applying a trigger pulse at a controlled phase angle in an AC cycle allows one to control the
percentage of current that flows through the TRIAC to the load (phase control), which is
commonly used, for example, in controlling the speed of low-power induction motors, in
dimming lamps and in controlling AC heating resistors.

Figure2.10 Triac circuit

Wolaita Sodo University Electrical And Computer Engineering Page 18


Automatic Plant Watering System

2.3.2Relay switching circuit


This is an electromagnetic switch which is activated when a current is applied to it. A relay uses
small currents to switch huge currents. Most relays use principle of electromagnetism to operate
but still other operating principles like solid state are also used. [6] A contactor is a type of relay
which can handle a high power required to control an electric motor or other loads directly. Solid
state relays have no moving parts and they use semiconductor devices to perform switching.
A relay is an electrically operated switch. Relays are used where it is necessary to control a
circuit by a low-power signal (with complete electrical isolation between control and controlled
circuits), or where several circuits must be controlled by one signal.
A relay is usually an electromechanical device that is actuated by an electrical current. The
current flowing in one circuit causes the opening or closing of another circuit. Relays are like
remote control switches and are used in many applications because of their relative simplicity,
long life, and proven high reliability. Relays are used in a wide variety of applications throughout
industry, such as in telephone exchanges, digital computers and automation systems.
Highly sophisticated relays are utilized to protect electric power systems against trouble and
power blackouts as well as to regulate and control the generation and distribution of power.
Although relays are generally associated with electrical circuitry, there are many other types such
as pneumatic and hydraulic. Input may be electrical and output directly mechanical, or vice versa.
2.4RESISTORS
A resistor is a passive two-terminal electrical component that implements electrical resistance as
a circuit element. Resistor is a component that resists the flow of direct or alternating electric
circuit. Resistors can limit or divide the current, reduce the voltage, protect an electric circuit, or
provide large amounts of heat or light. They are often color coded by three or four color bands
that indicate the specific value of resistance. The current through a resistor is in direct proportion
to the voltage across the resistor's terminals. This relationship is represented by Ohm's law.
2.5TRANSISTORS
A transistor is a semiconductor device used to amplify and switch electronic signals and electrical
power. It is composed of semiconductor material with at least three terminals for connection to an
external circuit. A voltage or current applied to one pair of the transistor's terminals changes the
current through another pair of terminals. Because the controlled (output) power can be higher

Wolaita Sodo University Electrical And Computer Engineering Page 19


Automatic Plant Watering System

than the controlling (input) power, a transistor can amplify a signal. Today, some transistors are
packaged individually, but many more are found embedded in integrated circuits.
The transistor is the fundamental building block of modern electronic devices, and is ubiquitous
in modern electronic systems. Following its development in the early 1950s, the transistor
revolutionized the field of electronics, and paved the way for smaller and cheaper radios,
calculators, and computers, among other things. Transistors are commonly used as electronic
switches, both for high-power applications such as switched-mode power supplies and for low
power applications such as logic gates. (5) In a typical transistor switch, when the mechanical
switch is open, there is no base current; therefore there is no collector current. When the switch is
closed, the base rises to value equal to VBE, now current flows in the collector of the transistor;
in this case, the transistor is a closed switch. This is the basis of operation of transistors. The
transistor's low cost, flexibility, and reliability have made it a ubiquitous device. Transistorized
mechatronic circuits have replaced electromechanical devices in controlling appliances and
machinery. It is often easier and cheaper to use a standard microcontroller and write a computer
program to carry out a control function than to design an equivalent mechanical control function.

Wolaita Sodo University Electrical And Computer Engineering Page 20


Automatic Plant Watering System

CHAPTER THREE

3 SYSTEM DESIGN AND DESCRIPTION

3.1 Components of Automatic plant watering system

The overall project consists of the following components:-

 Arduino
 Relay
 LED
 Resistor
 Transistor
 LCD
 Motor
 Diode
 Soil moisture sensor
 Battery

3.2 Overall operation of the project


The automatic plant watering system has three major parts; humidity sensing part, control section
and the output section. The input to the circuit is applied from the regulated power supply. The
a.c. input i.e. 230v from the mains supply is step down by the transformer to 5v and is fed to a
rectifier. The output obtained from the rectifier is a pulsating d.c voltage. So in order to get a pure
d.c voltage, the output voltage from the rectifier is fed to a filter to remove any a.c components
present even after rectification. Now, this voltage is given to a voltage regulator to obtain a pure
constant dc voltage. The soil humidity was detected using YL-69 soil sensor (a resistance type
sensor). The control unit was achieved using ATMega328 microcontroller based on arduino
platform. The output was the control unit was used to control the plant watering system by
switching it on and off depending on the soil moisture contents.

Wolaita Sodo University Electrical And Computer Engineering Page 21


Automatic Plant Watering System

3.3 System description of the project

Power supply

LCD 16x2 ARDUINO UNO

Relay Motor/
Moisture motor
sensor

Plants Water sprinkler

Figure3.1 Block diagram of automatic plant watering system

Working principle of block Diagram

The power supply provides power to the Arduino, to the LCD and motor pump. There are two
functional components in this project. They are the moisture sensors and the motor/water pump.
Thus the Arduino Board is programmed using the Arduino IDE software. The function of the
moisture sensor is to sense the level of moisture in the soil. The motor/water pump supplies water
to the plants. This project uses Arduino Uno to controls the motor. Follow the schematic to
connect the Arduino to the motor driver, and the driver to the water pump. The motor can be
driven by a 10-12 volt power sources. The moisture sensor measures the level of moisture in the
soil and sends the signal to the Arduino if watering is required. The motor/water pump supplies
water to the plants until the desired moisture level is reached.

Wolaita Sodo University Electrical And Computer Engineering Page 22


Automatic Plant Watering System

3.4 POWER SUPPLY


Power supply is the circuit from which we get a desired dc voltage to run the other circuits. The
voltage we get from the main line is 230V AC but the other components of our circuit require 5V
DC. Hence a step-down transformer is used to get 12V AC which is later converted to 12V DC
using a rectifier.
The output of rectifier still contains some ripples even though it is a DC signal due to which it is
called as Pulsating DC. To remove the ripples and obtain smoothed DC power filter circuits are
used. Power supplies are designed to convert high voltage AC mains to a suitable low voltage
supply for electronic circuits and other devices. A power supply can be broken down into a series
of blocks, each of which performs a particular function.
A 5V regulated supply is taken as follows:

230v Transform Rectifier Smoothing Regulator 5V DC


50HZ er

AC
Figure 3.2: Block diagram of regulated power supply system
Each of the blocks has its own function as described below:
1. Transformer – steps down high voltage AC mains to low voltage AC.
2. Rectifier – converts AC to DC, but the DC output is varying.

3. Smoothing – smoothes the DC from varying greatly to a small ripple.

4. Regulator – eliminates ripple by setting DC output to a fixed voltage.


Almost all electronics circuit required DC power supply. DC power supply is the circuit which
converts the AC wave form of power lines to direct voltage of constant amplitude. An ideal
regulated power supply is designed to provide a pre-determined Dc voltage which is independent
of the current drown from the source. These circuits are special class of feedback amplifiers. All
the benefits of TCs‟ are thus obtained: excellent performance small size, ease of use, low cost,
and high reliability .unregulated power supply has many disadvantages due to which it is not
sufficient for many application.
 Poor regulation
 Dc output voltage varies with the AC input

Wolaita Sodo University Electrical And Computer Engineering Page 23


Automatic Plant Watering System

 DC output voltage variation varies with temperature because of semiconductor use to


overcome the above disadvantages.
A 5V-dc power requirement will be used as input supply to the system. The choice of using a
transformer is due to the low voltage requirement of the system. A transformer of 240/12V in
conjunction with a regulator will be able to provide the needed input 5Vdc. This means that the
RMS value of the transformer secondary is Vrms = 12Vac. The whole section of the project is
powered from a 5V dc power source. To achieve this 5-volt output, a variable output adapter is
used. The adapter takes in 240Vac and gives out from its variable tapped output V dc, 4.5Vdc,
9Vdc, 12Vdc; the output to the required 5Vdc, the output of the adapter is passed through the
regulator that makes sure that at any point in time, the output it gives is 5V. For convenience, we
tap the output of the adapter and hence the input to the regulator at 6Vdc.

Figure3.3 Regulated Power Supply


3.4.1 STEP DOWN TRANSFORMER
Transformer is the electrical device that converts one voltage to another with little loss of power.
Most power supplies use a step-down transformer to reduce the dangerously high mains voltage
to a safer low voltage. Here a step down transformer is used to get 12V AC from the supply i.e. 230V
AC.
A transformer is a device which step-up or step down the electrical quantities according to the
need. It adjusts the Ac level so that the appropriate DC amplitude is achieved. Its load handling
capacity must be sufficient to supply the load and account for the losses in the rectifier, filter and
regulator. The turn‟s ratio is determined by the output level required relative to the Ac input

Wolaita Sodo University Electrical And Computer Engineering Page 24


Automatic Plant Watering System

amplitude. What is a step down transformer: is one whose secondary voltage is less than its
primary voltage. It is designed to reduce the voltage from the primary winding to the secondary
winding. This kind of transformer “steps down” the voltage applied to it. As a step-down unit, the
transformer converts high-voltage, low-current power into low-voltage, high-current power. The
larger-gauge wire used in the secondary winding is necessary due to the increase in current. The
primary winding, which doesn‟t have to conduct as much current, may be made of smaller gauge
wire.
3.4.2 BRIDGE RECTIFIER
A rectifier is a circuit that converts AC signals to DC. A rectifier circuit is made using diodes.
There are two types of rectifier circuits as Half-wave rectifier and Full-wave rectifier depending
Upon the DC signal generated. Here Full-wave bridge rectifier is used to generate dc signal.
A bridge rectifier makes use of four diodes in a bridge arrangement to achieve full-wave
rectification. This is a widely used configuration, both with individual diodes wired as shown and
with single component bridges where the diode bridge is wired internally.

Figure3.4 The bridge rectifier circuit


3.4.3 Smoothing
Smoothing is performed by a large value electrolytic capacitor connected across the DC supply to
act as reservoir, supplying current to the output when the varying DC voltage from the rectifier is
decreasing. The diagram shows the unsmoothed varying DC and the smoothed DC. The capacitor
charges quickly to the peak of the varying DC and then discharges as it supplies current to the
output.

Wolaita Sodo University Electrical And Computer Engineering Page 25


Automatic Plant Watering System

3.4.4 THE VOLTAGE REGULATOR


A voltage regulator is designed to automatically maintain a constant voltage level. A voltage
regulator may be a simple "feed-forward" design or may include negative feedback control loops.
It may use an electromechanical mechanism, or electronic components. Depending on the design,
it may be used to regulate one or more AC or DC voltages. Electronic voltage regulators are
found in devices such as computer power supplies where they stabilize the DC voltages used by
the processor and other elements. In automobile alternators and central power station generator
plants, voltage regulators control the output of the plant. In an electric power distribution system,
voltage regulators may be installed at a substation or along distribution lines so that all customers
receive steady voltage independent of how much power is drawn from the line.
A simple voltage regulator can be made from a resistor in series with a diode (or series of
diodes). Due to the logarithmic shape of diode V-I curves, the voltage across the diode changes
only slightly due to changes in current drawn or changes in the input. When precise voltage
control and efficiency are not important, this design may work fine. Feedback voltage regulators
operate by comparing the actual output voltage to some fixed reference voltage. Any difference is
amplified and used to control the regulation element in such a way as to reduce the voltage error.
This forms a negative feedback control loop; increasing the open-loop gain tends to increase
regulation accuracy but reduce stability (avoidance of oscillation, or ringing during step changes).
There will also be a trade-off between stability and the speed of the response to changes. If the
output voltage is too low (perhaps due to input voltage reducing or load current increasing), the
regulation element is commanded, up to a point, to produce a higher output voltage–by dropping
less of the input voltage (for linear series regulators and buck-switching regulators), or to draw
input current for longer periods (boost-type switching regulators); if the output voltage is too
high, the regulation element will normally be commanded to produce a lower voltage. However,
many regulators have over-current protection; so that they will entirely stop sourcing current (or
limit the current in some way) if the output current is too high, and some regulators may also shut
down if the input voltage is outside a given range.

Wolaita Sodo University Electrical And Computer Engineering Page 26


Automatic Plant Watering System

3.5 Flow chart of the project

Start

Select humidity
mode

YES Moisture<desi NO
red value

Turn off
Turn on motor pump
motor pump

end

Figure3.5 flow chart of automatic plant watering system

Working Principle

First the system starts and select humidity mode then,

If the moisture value less than the desired value, the motor will pump water.

If the moisture value greater than the desired value, the motor will stop pumping water.

Wolaita Sodo University Electrical And Computer Engineering Page 27


Automatic Plant Watering System

3.6 Hardware design

3.6.1 Control unit

ATMega328 microcontroller on arduino platform.

Arduino uno is the most common arduino type. This arduino type uses ATmega328 AVR
microcontroller.

Figure 3.6 Parts of arduino uno


The Arduino has several different kinds of pins, each of which is labeled on the board and used
for different functions.

GND: short for „Ground‟. This ground pin on the Arduino can be used to ground our circuit.

5V&3.3V: The 5v pin supplies 5volts of power, and the 3.3v pin supplies 3.3 volts of power.

Wolaita Sodo University Electrical And Computer Engineering Page 28


Automatic Plant Watering System

Analog: The area of pins under the „Analog in‟ label (A0 through A5 on the UNO) are analog in
pins. These pins can read the signal form an analog sensors (like a temperature sensor) and
convert it into a digital value that we can read.

Digital: Across from the analog pins are the digital pins (0 through 13 on the UNO). These pins
can be used for both digital input (like telling if button is pushed) and digital output (like
powering an LED).

PWM: Some of the digital pins (3, 5, 6,9,10 and 11 on the UNO). These pins act as normal
digital pins, but can also be used for something called Pulse-Width Modulation (PWM). These
pins as being able to simulate analog output (like fading an LED in and out). PWM signal is
needed for the buzzer to generate sound.

AREF: Stand for Analog Reference. Most of the time we can leave this pin alone. It is sometimes
used to set an external reference voltage (between 0 and 5 volts) as the upper limit for the analog
input pins.

TX RX LEDs: TX is short for transmit, RX short for receive. These marking appear quite a bit in
electronics to indicate the pins responsible for serial communication. In our case, there are two
places on the Arduino UNO where TX and RX appear-once by digital pins 0 and 1, and a second
time next to the TX and RX indicator LEDs. These LEDs will give as some nice visual indication
s whenever or Arduino is receiving or transmitting data (like when we are loading a new program
on to the board).

ATMega328 microcontroller on arduino platform was selected the control unit of the
microcontroller. Arduino Uno was selected from the expansive arduino family. Arduino Uno has
a total of 20 inputs pins of which 14 are digital and 6 are analog inputs. The digital pins can be
used as either inputs or outputs and also 6 of the 14 pins can be utilized as PMW. The board has a
16 MHz ceramic resonator, a USB connection and a power jack.

In the design of the system analog pins were selected as the arduino input and digital pin was selected as
the arduino output pins.

Wolaita Sodo University Electrical And Computer Engineering Page 29


Automatic Plant Watering System

The pins on the arduino were selected as shown below.

Pin Connections
Analog Pin 1 Connection to Soil Moisture
Sensor
Analog Pin 2 Connection to battery 1.5v
Digital pin 2 LCD D7 pin
Digital pin 3 LCD D6 pin
Digital pin 4 LCD D5 pin
Digital pin 5 LCD D4 pin
Digital pin 8 LED-RED
Digital pin 9 LED-GREEN
Digital pin 10 LED-YELLOW
Digital pin 11 LCD Enable
Digital pin 12 LCD RS pin
Digital pin 13 Connection to Water Pump
VCC 5VDC
GND Ground
Table 3.1 Selected pins on arduino

3.6.2 Sensing Unit

3.6.2.1 YL-69 soil moisture sensor connection to arduino

YL-69 soil moisture sensor was interfaced to the arduino through a digital a PCB drive. The PCB
drive has a digital potentiometer and a LM393 comparator. The LM393 comparator is used to
compare the voltages across the sensor probes and the set Vcc voltage. The dig pot is used to
alter the sensitivity of the sensor when connected in digital mode.

Wolaita Sodo University Electrical And Computer Engineering Page 30


Automatic Plant Watering System

Figure 3.7 YL-69 Sensor

YL-69 soil moisture sensor has the following specifications:

Vcc power supply 3.3V or 5V


Current 35Ma
Signal output voltage 0-4.2V
Digital Outputs 0 or 1
Analog Resistance (Ω)
Panel Dimension 3.0cm by 1.6cm
Probe Dimension 6.0cm by 3.0cm
GND Connected to ground
Table 3.2 YL-69 specifications

The analogue configuration was selected as its more stable compared to the digital configuration.

Wolaita Sodo University Electrical And Computer Engineering Page 31


Automatic Plant Watering System

Figure3.8 sensor Connection to arduino board

The circuit Diagram works as a sensor the POT meter or variable resistance measures the
moisture level depending on the amount of water in soil. When the amount of water in the soil
high the conductivity is high and resistivity low vice versa. Depending on this way the moisture
sensor measures the amount of Relative Humidity (RH) in the soil. The output of POT connects
to analog input pin of Arduino Uno. If the soil or plant needs the water, POT sends the signals to
Arduino Uno R3 then the relay become energized.

The output of the sensor to the arduino analog pin A1 was resistance. The resistance to flow of
current between the sensor probes changes with soil moisture level and soil type. The current
passing through the sensor probes (Iout) for different soils and different soil moisture levels was
calculated as shown below:

Iout = Vcc / {Soil Resistance value (RS)}

3.6.3 LIGHT EMMITING DIODE (LED)


A light-emitting diode (LED) is a semiconductor light source which is used as indicator lamps
in many devices and is increasingly used for other lighting purposes. The color of the light

Wolaita Sodo University Electrical And Computer Engineering Page 32


Automatic Plant Watering System

(corresponding to the energy of the photon) which is determined by the energy gap of the
semiconductor pattern. LEDs are cheap and faster switching.

A light-emitting diode is a two-lead semiconductor light source. It is a p-n junction diode, which
emits light when activated. When a suitable voltage is applied to the leads, electrons are able to
recombine with electron holes with in the device, releasing energy in the form of photons.

This stage of the system consist light emitting diodes (LEDs) that display when executing the
operation. Each phase consists of three patterns of LEDs.

Principle operation of light emitting diode


Light emitting diode (LED) is a semiconductor device that operates in forward bias. It consists of
two pins, the long pin which is positive and the short one which is negative.
Benefits of LED
 Low power requirement: most types can be operated with battery power supplies.
 High efficiency
 Long life: when properly installed, an LED function for decades.
The three LEDs were connected to the microcontroller as shown below.

Figure 3.9 LEDs Connection to arduino board

Wolaita Sodo University Electrical And Computer Engineering Page 33


Automatic Plant Watering System

3.6.4 Water pump connection to the Arduino

Figure3.10 Water pump


The water pump is used to artificially supply water for a particular task. It can be electronically
controlled by interfacing it to a microcontroller. It can be triggered ON/OFF by sending signals
as required. The process of artificially supplying water is known as pumping.

To implement the final bit of the automated irrigation system an electric motor (240VAC) was
selected as the water pump. The first two units of the system i.e. sensing unit and the control unit
(microcontroller) are powered by 12VDC. To interface the two units a 12VDC relay was used as
the isolation unit. The microcontroller was connected to the relay via an NPN transistor
(2N2222). To protect the transistor; while turning it on, a resistor was used. The resistor limits the
current flowing through the transistor.

Relays can generate a very high voltage across the coil when switched off. This can damage other
components in the circuit. To prevent this a diode is connected across the coil.

Working Principles of RELAY


All relays contain a sensing unit, the electric coil, which is powered by AC or DC current. When
the applied current or voltage exceeds a threshold value, the coil activates the armature, which
operates either to close the open contacts or to open the closed contacts. When a power is
supplied to the coil, it generates a magnetic force that actuates the switch mechanism. The

Wolaita Sodo University Electrical And Computer Engineering Page 34


Automatic Plant Watering System

magnetic force is, in effect, relaying the action from one circuit to another. The first circuit is
called the control circuit.
There are three basic functions of a relay: On/Off Control, Limit Control and Logic Operation.
 On/Off Control: Example: Air conditioning control, used to limit and control a “high
power “load, such as a compressor

 Limit Control: Example: Motor Speed Control, used to disconnect a motor if it runs
slower or faster than the desired speed

 Logic Operation: Example: Test Equipment, used to connect the instrument to a number
of testing points on the device under test.
To protect the microcontroller from back e.m.f during switching a diode was connected across
the relay. The connection was as shown below.

Figure 3.11 Relay interfacing of arduino to the 240VAC pump

Wolaita Sodo University Electrical And Computer Engineering Page 35


Automatic Plant Watering System

3.6.5 Liquid Crystal Display (LCD)


Liquid Crystal Display (LCD) screen is an electronic display module. An LCD has a wide range
of applications in electronics. The most basic and commonly used LCD in circuits is the 16x2
display. LCDs are commonly preferred in display because they are cheap, easy to program and
can display a wide range of characters and animations.
A 16x2 LCD have two display lines each capable of displaying 16 characters. This LCD has
Command and Data registers. The command register stores command instructions given to the
LCD while the Data register stores the data to be displayed by the LCD.
The voltage needed is preferable 2-20 V A.C. The voltage threshold for watch type LCD display
is 1to 2V. It is a16 pin device with 16*2 displays. LCD used to display the state of the motor and
the value of relative humidity.

Figure3.12 LCD (16X2)

Wolaita Sodo University Electrical And Computer Engineering Page 36


Automatic Plant Watering System

When using 8-bit configuration all 8 data pins (DB0-DB7) are used while only 4 data pins (DB4-
DB7) are used in a 4-bit configuration.

Pin Function Symbol


number
1 Ground (0V) VSS
2 Supply voltage (5V) VDD
3 Contrast adjustment; through a variable V0
resistor(potentiometer)
4 Selects command register when low; and data RS
register when high
5 Low to write to the register; High to read from RW
the register
6 Sends data to data pins when a high to low E
pulse is given
7 8-bit data pins D0
8 8-bit data pins D1
9 8-bit data pins D2
10 8-bit data pins D3
11 8-bit data pins D4
12 8-bit data pins D5
13 8-bit data pins D6
14 8-bit data pins D7
15 Backlight VCC (5V) A
16 Backlight Ground (0V) K
Table 3.3 LCD Pin configuration

Wolaita Sodo University Electrical And Computer Engineering Page 37


Automatic Plant Watering System

3.6.6 Over all circuit of Automatic plant watering system


Working Principle

An automatic plant watering system using microcontroller ATMEGA328P is programmed such


that it gives the interrupt signals to the motor via the relay. Soil sensor is connected to the
Arduino board which senses the moisture content present in the soil. Whenever there is a change
in the moisture content of the soil, the sensor senses the change, giving signal to the
microcontroller so that the pump (motor) can be activated. This concept can be used for
automatic plant watering system.

The circuit Diagram works as a sensor the POT meter or variable resistance measures the
moisture level depending on the amount of water in soil. When the amount of water in the soil
high the conductivity is high and resistivity low vice versa. Depending on this way the moisture
sensor measures the amount of Relative Humidity (RH) in the soil. The output of POT connects
to analog input pin of Arduino Uno.

Figure3.13 circuit diagram of automatic plant watering system

Wolaita Sodo University Electrical And Computer Engineering Page 38


Automatic Plant Watering System

CHAPTER FOUR

4 RESULTS ANALYSIS AND DISCUSSIONS

4.1 RESULT

ATMEGA 328P micro controller is the brain of the project which initiates the Relay and LED
signal at a junction. The LED‟s are automatically on and off by making the corresponding port
pin of the microcontroller high.so the sequence of the lights determine the moisture level in the
soil.

An automatic plant watering system using microcontroller ATMEGA328P is programmed such


that it gives the interrupt signals to the motor via the relay. Soil sensor is connected to the
Arduino board which senses the moisture content present in the soil. Whenever there is a change
in the moisture content of the soil, the sensor senses the change, giving signal to the
microcontroller so that the pump (motor) can be activated. This concept can be used for
automatic plant watering system.

The circuit Diagram works as a sensor the POT meter or variable resistance measures the
moisture level depending on the amount of water in soil. When the amount of water in the soil
high the conductivity is high and resistivity low vice versa. Depending on this way the moisture
sensor measures the amount of Relative Humidity (RH) in the soil. The output of POT connects
to analog input pin of Arduino Uno. If the soil or plant needs the water, POT sends the signals to
Arduino Uno R3 then the relay become energized. When the relay energized the motor pump
start to pump water to plant until the required moisture level is reached. The three LED indicates
that RH ranges, RED LED indicates high range of RH, GREEN LED indicates that suitable RH
range and YELLOW LED shows that low ranges of RH values. The LCD display RH values in
the soil and the motor pump state or condition. There are three conditions that the system
implements.

Wolaita Sodo University Electrical And Computer Engineering Page 39


Automatic Plant Watering System

First condition:
This is the normal condition meaning the soil moisture is at suitable to the plant. In this condition
the motor pumper off and yellow and Green LED indicates this condition. The RH range for this
condition is that greater than 70.

Figure4.1.First condition of simulation results

Wolaita Sodo University Electrical And Computer Engineering Page 40


Automatic Plant Watering System

Second condition:
This is the condition to which pumping activity takes places, meaning the soil moisture is low or
the temperature is above the desired point.so the plant needs water. In this condition the motor
pump on the water pump until the desired point reached. Green LED indicates this condition.

The RH range for this condition is than 40-69.

Figure4.2 Second Condition of simulation result

Wolaita Sodo University Electrical And Computer Engineering Page 41


Automatic Plant Watering System

Third condition:
This condition is problem indicator by Red LED. Even if the moisture sensor sends a signal to
arduino to pump water but there is no response to signal, in this time the temperature rises above
the desired ranges. The Rh range for this condition is that less than 40.

Figure4.3 Third Condition of simulation result

4.2 Discussion:

In present days, farmers are facing major problems in watering their agriculture fields, it‟s
because they have no proper idea about when the power is available to so that they can pump
water .Even after they need to wait until the field is properly watered, which makes them to stop
doing other activities. So we represent an idea to minimize their sufferings. Thus the
“AUTOMATIC PLANT WATERING SYSTEM” has been designed and tested successfully.

Wolaita Sodo University Electrical And Computer Engineering Page 42


Automatic Plant Watering System

It has been developed by integrated features of all the hardware components used. Presence of
every module has been reasoned out and placed carefully, thus contributing to the best working
of the unit. The system has been tested to function automatically.

The moisture sensors measure the moisture level (water content) of the different plants. If the
moisture level is found to be below the desired level, the moisture sensor sends the signal to the
Arduino board which triggers the Relay to turn ON the Water Pump and supply the water to
respective plant. When the desired moisture level is reached, the system halts on its own and the
Water Pump is turned OFF. Thus, the functionality of the entire system has been tested
thoroughly and it is said to function successfully.

Wolaita Sodo University Electrical And Computer Engineering Page 43


Automatic Plant Watering System

CHAPTER FIVE

5 CONCLUSION AND RECOMMENDATIONS

5.1 CONCLUSION

The system provides with several benefits and can be operated with less manpower. The system
supplies water only when the humidity in the soil goes below the reference. Due to the direct
transfer of water to the roots water conservation takes place. Thus the system is efficient and
compatible to changing environment.

A system to monitor moisture levels in the soil was designed. The system was used to switch
on/off the watering system/pump according to set soil moisture levels. The moisture content of
the soil is continuously measured by the sensor. It‟s value and the status of motor i.e. ON or OFF
condition of motor is displayed continuously on the LCD. If there is a enough moisture in the soil
i.e. there is no need to irrigate the field then the motor is not switched on but if the moisture
content is very less i.e. there is a need of irrigation then the motor is switched on automatically
and after the field attains the required moisture content, then the motor is switched off
automatically. The control unit the prototype was implemented using a microcontroller on
arduino platform while the sensing bit was implemented using a SMS YL-69. Three LEDs and an
LCD were used to implement the display of the motor pump state or condition. To switch
between the control and the irrigation systems a relay switching circuit was used.

5.2 RECOMMNDATION

This project can be enhanced in such a way as to control automatically the signals depending on
relative humidity using moisture sensors. Water pump motor automatic turn off when RH range
value at high level because RH value and soil moisture directly relation which helps in power
consumption saving. In future this system can be used to inform people about different places.
This can be done through Data transfer between the microcontroller and computer can also be
done through telephone network, data call activated SIM this technique allows the operator to
gather the recorded data from a far end to his home computer or phone without going site and
also used to GSM technology for fault indication.

Wolaita Sodo University Electrical And Computer Engineering Page 44


Automatic Plant Watering System

REFERENCES

1. Massimo Banzi, Getting started with Arduino, Second Edition, O‟Reilly Media, Inc, 2011
2. Francis Z. Karina and Alex Wambua Mwaniki, irrigation agriculture in Kenya, Nairobi,
Kenya, 2011
3. Allan Trevennor, Practical AVR Microcontrollers, New York , USA, Springer Science +
Business Media, 2012
4. Clemmens, A.J. Feedback Control for Surface Irrigation Management, ASAE Publication
04 -90, 1990.
5. www.arduino.cc Accessed on 6th Dec,2013 , 25th Dec,2013 and 17th Jan,2014
6. Songle relay Datasheet
7. Soil moisture sensor datasheet
8. W. C. Dunn, Introduction to Instrumentation Sensors, and Process Control, British
Library Cataloguing, 2005
9. General Purpose Transistors NPN Silicon (KSP2222A) datasheet
10. http://www.vision2030.go.ke/ accessed on 12th January 2014
11. Greenfield, J. (2000). Digital Design using Integrated Circuits.
12. M. A. Mazidi, J. G. Mazidi & R. D. Mckinlay, “The 8051 microcontroller and Embedded
System”,prentice hall.(c) 3,No. 2(2006)
13. www.engineersgarage.com

Wolaita Sodo University Electrical And Computer Engineering Page 45


Automatic Plant Watering System

APPENDIX

Arduino Software Code

#include <LiquidCrystal.h>

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

int YELLOW=10;

int GREEN=9;

int RED=8;

int RELAYPIN=13;

float RH;

void setup() {

lcd.begin(16, 2);

pinMode(RELAYPIN,OUTPUT);

pinMode(YELLOW,OUTPUT);

pinMode(GREEN,OUTPUT);

pinMode(RED,OUTPUT);

lcd.setCursor(0,0);

lcd.print("RH=");

void loop() {

lcd.setCursor(0, 1);

float u= analogRead(A1);

Wolaita Sodo University Electrical And Computer Engineering Page 46


Automatic Plant Watering System

RH=map(u,0,1023,0,100);

lcd.setCursor(3,0);

lcd.print(RH);

if(RH>=70){

lcd.setCursor(0,1);

lcd.print("MOTOR.PUMPER-OFF ");

digitalWrite(RELAYPIN,LOW);

digitalWrite(YELLOW,HIGH);

digitalWrite(GREEN,HIGH);

digitalWrite(RED,LOW);

else if(RH<70&&RH>=40){

digitalWrite(RELAYPIN,HIGH);

digitalWrite(GREEN,HIGH);

digitalWrite(RED,LOW);

digitalWrite(YELLOW,LOW);

lcd.setCursor(0,1);

lcd.print("MOTOR.PUMPER-ON ");

else

digitalWrite(RELAYPIN,LOW);
Wolaita Sodo University Electrical And Computer Engineering Page 47
Automatic Plant Watering System

digitalWrite(GREEN,LOW);

digitalWrite(RED,HIGH);

digitalWrite(YELLOW,LOW);

lcd.setCursor(0,1);

lcd.print("MOTOR.PUMPER-OFF");

Wolaita Sodo University Electrical And Computer Engineering Page 48

You might also like