Beruflich Dokumente
Kultur Dokumente
College of Technology
Department of Electrical and Computer Engineering
Design and Simulation of Automatic Plant Watering System
Using Microcontroller
Group members
Name ID Number
ii
CERTIFICATE/ DECLARETION
This is to certify that the project report entitled Automatic plant Watering system using
microcontroller design and simulation being submitted.
Group Members
Name ID Number
Signature
Acknowledgement
First of all, we would like to acknowledge the Almighty God help us for giving physical
and spiritual strength during our studies. Then we would like to express our deep
appreciation to electrical and computer engineering department instructors and our
adviser Mr. Lakishmi who gave us comment advice and any technical support to
complete this project.
i
Abstract
In crop production a healthy water balance is essential for high quality yields. New
irrigation electrical control technologies improve irrigation efficiency, promoting water
conservation and reducing the environmental impacts. The objectives of this project is
to avoid wastage of water and increase irrigation efficiency by using microcontroller
based plant watering system with the help of soil moisture sensor, and water level
sensor. The purpose of our project is to implement manual planting system by automatic
planting system. Soil moisture sensor inserted in the soil to sense whether the soil is
moisture or dry.
This automatic plant watering system has the following uses: As there is no unplanned
usage of water, a lot of water is saved from being wasted. The irrigation is the only
when there is not enough moisture in the soil and the sensor detects when the pump be
turned on/off save a lot of time for the farmers. This also gives much needed rest to the
farmers, as they do not have to go and turn the pump on/off manually .The level of the
water in a field is controlled by this equipment using microcontroller. Main components
are arduino, motor, sensors etc. The sensors sense the intensity of water and give
indication to the arduino. The arduino produces the control signals to drive the motor. If
there is no water then arduino gives control signal to start the motor and if there is
sufficient water in the field then the arduino give control signal to stop the motor.
ii
Table of Contents
Acknowledgement ..........................................................................................................................i
Abstract .......................................................................................................................................... ii
List of figures .................................................................................................................................. v
List of tables .................................................................................................................................. vi
List of abbreviations ..................................................................................................................... vii
Chapter one .................................................................................................................................. 1
Introduction .................................................................................................................................. 1
1.1 Background of the Study ..................................................................................................... 1
1.2 Statement of the Problem .................................................................................................. 3
1.3 Motivation........................................................................................................................... 3
1.4 Objectives of the Study ....................................................................................................... 4
1.4.1 General objective ......................................................................................................... 4
1.4.2 Specific Objective ......................................................................................................... 4
1.5 Scope ................................................................................................................................... 4
1.6 The limitation ...................................................................................................................... 4
1.7 Significance of the Study ..................................................................................................... 5
1.8 Theoretical frame work....................................................................................................... 5
Chapter two .................................................................................................................................. 6
Literature review........................................................................................................................... 6
2.1 Automatic plant watering system review ........................................................................... 6
2.2 Materials requirement ........................................................................................................ 6
2.2.1 Microcontroller ............................................................................................................ 6
2.2.2 Types of micro controller ............................................................................................. 6
2.2.3 Types of arduino boards .............................................................................................. 8
2.2.4 Liquid crystal display .................................................................................................... 9
2.2.5 Sensor........................................................................................................................... 9
2.2.6 Level sensor................................................................................................................ 10
2.2.7 Types of level sensor .................................................................................................. 10
2.2.8 Moisture sensor ......................................................................................................... 11
2.2.9 Types of soil moisture sensors ................................................................................... 11
2.2.10 pumping Motor ........................................................................................................ 16
2.2.11 DC motor .................................................................................................................. 16
iii
2.2.12 Relay ......................................................................................................................... 17
2.2.13 Diode ........................................................................................................................ 18
2.2.14 Motor drive .............................................................................................................. 18
2.2.15 Sprinkler ................................................................................................................... 19
2.2.16 Components of Sprinkler Irrigation System ............................................................. 19
2.2.17 Resistor .................................................................................................................... 21
Chapter three .............................................................................................................................. 22
Materials and Methodology ....................................................................................................... 22
3.1 materials ........................................................................................................................... 22
3.2 Placement of Sensors ........................................................................................................ 27
3.3 Block diagram.................................................................................................................... 27
3.4 Flow chart........................................................................................................................ 28
3.5 Arduino interfacing with moisture sensor ........................................................................ 30
3.6 Arduino interfacing with level sensor ............................................................................... 30
3.7 Arduino interfacing with moisture sensor and level sensor ............................................. 31
Chapter four ................................................................................................................................ 31
Simulation results and Discussion............................................................................................... 32
Chapter five ................................................................................................................................. 35
Conclusion and Recommendation .............................................................................................. 35
5.1 Conclusion ......................................................................................................................... 35
5.2 Recommendation.............................................................................................................. 35
5.3 Future work ....................................................................................................................... 35
Reference .................................................................................................................................... 36
Appendix ..................................................................................................................................... 37
iv
List of figures
Fig 2.1 arduino uno ....................................................................................................................... 9
Fig 2.2 LCD ..................................................................................................................................... 9
Fig 2.3 Level Detection Using a Float Sensor .............................................................................. 10
Fig 2.4 homemade soil moisture sensor ..................................................................................... 12
Fig 2.5 heat dissipation sensor.................................................................................................... 15
Fig 2.6 YL-69 moisture sensor ..................................................................................................... 16
Fig 2.7 pump Motor .................................................................................................................... 16
Fig 2.8 DC motor ......................................................................................................................... 17
Fig 2.9 Relay ................................................................................................................................ 18
Fig 2.10 diodes ............................................................................................................................ 18
Fig 2.11 sprinkler irrigation system ............................................................................................. 21
Fig 2.12 resistors ......................................................................................................................... 21
Fig 3.1 arduino uno ..................................................................................................................... 23
Fig 3.2 transistor ......................................................................................................................... 23
Fig 3.3 single pole double through relay ..................................................................................... 24
Fig 3.1block diagram of automatic plant watering system ......................................................... 28
Fig 3.2 flow chart......................................................................................................................... 29
Fig 3.4 simulation circuit diagram for soil moisture sensor ........................................................ 30
Fig 3.5 simulation circuit diagram for water level sensor ........................................................... 30
Fig 3.6 the overall simulation circuit diagram............................................................................. 31
Fig 4.1 circuit shows tank full and moisture ok .......................................................................... 32
Fig 4.2 circuit shows water to tank and moisture is ok .............................................................. 33
Fig 4.3 circuit shows water to tank and soil dray ........................................................................ 33
Fig 4.4 circuit shows weather bad and user take another option .............................................. 34
Fig 4.5 circuit shows water to tank and soil very dray ................................................................ 34
v
List of tables
Table 1.1 theoretical frame work ................................................................................................. 5
Table3.1 Contact characteristics ................................................................................................. 24
Table 3.2 Coil characteristics ...................................................................................................... 25
Table 3.4 LCD pins description .................................................................................................... 25
Table 3.5 YL-69 soil moisture sensor specifications.................................................................... 26
Table 3.6 YL-69 soil moisture sensor reading ............................................................................. 26
vi
List of abbreviations
AC Alternative Current
DC Direct Current
NC Normal Close
NO Normal Open
vii
USB Universal Serial
viii
Chapter one
Introduction
1.1 Background of the Study
The Ethiopian government has recognized Ethiopia’s irrigation potential and has
identified the important role of irrigation development for reducing vulnerability to
inconsistent rain fall distribution and at the same time addressing poverty reduction of
the people. Traditional irrigation is very old in Ethiopia. The traditional small-scale
schemes are, in general, simple river diversions. The diversion structures are elementary
and subject to frequent damage by flood. ‘Modern' irrigation was started at the
beginning of the 1960s by private investors in the middle awash valley where big sugar
estates, fruit and cotton farms are found. With the1975 rural land proclamation, the
large irrigated farms were placed under the responsibility of the Ministry of State
Farms. Almost all small-scale irrigation schemes built after 1975 were made into
Producers' Cooperatives.
1
convenience for the manager but into substantial water savings compared to irrigation
management based on average historical weather conditions.
Irrigation is the most important cultural practice and most labour intensive task in daily
agriculture sector. Knowing when and how much to water is two important aspects of
irrigation. To do this automatically, sensors and methods are available to determine
when plants may need water. In Ethiopia, the agriculture plays the important role in the
economy and development of the country. Since irrigation system in Ethiopia has given
high priority in economic development, many new technologies should be developed to
allow agriculture automation to flourish and deliver its full potential. At the present
time, the farmers have been using irrigation technique in Ethiopia through the manual
control in which the farmers irrigate the land at the regular intervals. This process
sometimes consumes more water or sometimes the water reaches late due to which the
crops will get dried. So this research project is an excellent solution for such kind of
problems. Here is a simple project more useful in watering plants automatically without
any human interference. We may call it as automatic plant irrigation system. The system
will be electronic device, It will allow irrigation to take place in zones where watering is
required, while by passing zones where adequate soil moisture is indicated. The main
aim of this research project is to provide automatic irrigation to the plants which helps
in saving money, labour-power, and water.
The aforementioned arguments presented play a very important role in the pursuit to
improve the irrigation system of Ethiopian farmlands. The relevant facts about the
irrigation status of the country and the impact of its efficiency to the economy and the
environment may have tremendous effect to the country’s stability. Thus, the
compelling evidence of the challenges posed by this current phenomenon motivated the
conduct of the study on design and simulation of a low-cost electronic-based automatic
irrigation system. The project concept provides an excellent design to local farmers to
venture into irrigated farming by using an irrigation system that is anchored on compact
electronic circuit that controls a simple and affordable control concept.
Since proper use of water resources and environmental preservation has become key
factors to optimize farm productivity, the need to examine key factors on resource
optimization are required. The key factors relative to soil moisture, rainfall, wind, and
2
sunlight intensity availability compels the conduct of this study where water availability
to irrigate the farmlands have to be discretely operated with most efficiency without
compromising cost. Hence, the conduct of this study provides better way to address cost
effectiveness and environmental balance.
These systems have low requirement for infrastructure and technical equipment but
need high labour input, so our project comes up with a remedy to solve the above
problem with high efficiency and low water wastage.
In order to maintain the condition and overcome the problem, Automatic Plant watering
System is used. This system is created to reduce the time by using automatic system
rather than manual way of watering. An automatic farm irrigation system will provide
proper and moderate irrigation system for the country low cost and almost no man
power for farm irrigation and it will increase also productivity in the country.
1.3 Motivation
The motivation of this project comes from our country economic policy. Since our
country economy is based on agriculture and the climate condition lead to lack of rain
and scarcity of water. This lack of rain and scarcity of water leads to decrease product
and productivies. The main aim of our project to proved automatic irrigation based on
microcontroller to the plant in order to increase productivity, saving time, money and
water.
3
1.4 Objectives of the Study
1.5 Scope
The scope of this project entails the design and implementation of a micro controller
based irrigation system, depending on the soil moisture content. Moisture sensor and
level sensor will be the inputs of the system and irrigation pump and water pump will be
the output of the microcontroller.
The automatic plant irrigation control system has been used in farmlands. The sensors
that is soil moisture sensor and water level sensor used to detect the value of soil
moisture and water level respectively.
4
1.7 Significance of the Study
The proposed study will offer automatic irrigation solution to the country providing
improvement to conventional irrigation using microcontroller based control intervention
The application of automation technology to farm irrigation paves the way for an
efficient and productive farming across the country thereby provides significant
economic impact. Moreover, the technology adopted also provides potent technology
transfer to various academic and technical institutions in the country through which
training and livelihood of country may be enhance.
5
Chapter two
Literature review
2.1 Automatic plant watering system review
An automatic plant watering system refers to the operation of the system with no or just
a minimum manual intervention apart from field surveillance which requires human
critical thinking. Almost every system (drip, sprinkler, surface) can be automated with
the help of microcontroller, sensors and some electro-mechanical devices. It makes the
irrigation process more efficient and workers can concentrate on other important
farming tasks. On the other hand, such a system can be expensive and very complex in
its design and may needs experts to plan and implement it.
2.2.1 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. There are
different microcontroller families including: 8051, PIC (Programmable Interface
Controller), arduino and AVR. Microcontrollers are used in digital applications as
control units. 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. 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. In our project we use arduino.
6
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 [11].
This is single chip microcontroller which 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. AVR controllers has number of I/O ports, timers/counters,
interrupts, A/D converters, USART, I2C interfaces, PWM channels, on-chip analog
comparators[11].
c) Arduino
To put that in layman’s terms, an Arduino is a tiny computer that you can program to
process inputs and outputs between the device and external components you connect to
it. The Arduino is what is known as a Physical or Embedded Computing platform,
which means that it is an interactive system that can interact with its environment
through the use of hardware and software.
To program the Arduino (make it do what you want it to) you use the Arduino IDE
(Integrated Development Environment), which is a piece of free software in which you
write code in the language that the Arduino understands (a language called C). The IDE
7
lets you to write a computer program, which is a set of step-by-step instructions that you
then upload to the Arduino. Your Arduino will then carry out these instructions and
interact with whatever you have connected to it [1].
The Arduino hardware and software are both open source, which means that the code,
schematics, design, etc. can be taken freely by anyone to do what they like with them.
2.2.3 Types of arduino boards
i) 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. 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.
ii) 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.
iii) 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.
iv) Arduino Mega ADK
This arduino board is specifically designed to interact with android devices.
v) Arduino Uno
This is the most common arduino type. This arduino type uses ATmega328 AVR
microcontroller.
8
Fig 2.1 arduino uno
LCD1
LM016L
VDD
VSS
VEE
RW
RS
D0
D1
D2
D3
D4
D5
D6
D7
E
1
2
3
4
5
6
7
8
9
10
11
12
13
14
2.2.5 Sensor
A sensor is advice that detects and responds to some type of input from the physical
environment. The specific input could be light, heat, motion, moisture, level or any one
of other environmental phenomena. The output is generally a signal that is converted
to human readable display at the sensor location or transmitted electronically over a
network for reading further processing. Examples of sensors include: oxygen sensors,
temperature sensors, infra red sensors, humidly sensors, soil moisture sensors and
9
motion detection sensors. The output of the sensors is usually charge, current or voltage.
We are use two important sensor in our project such as level sensory and moisture
sensor [13].
Level detection of liquids is often done with a float-type liquid level switch. The float
transfers on a mechanical arm or sliding pole and activates a switch when the level
moves towards upward direction. Sometimes the float itself contains a small magnet that
varies the state of a switch when the liquid level gets moving up and moves into the
original position. This type of level sensor comes with many advantages like it is very
simple, highly accurate, and best suitable for various products [14].
Principle of operation: The principle used in this system states that “the presence of a
product will make a change in the resistance between the two conductors.” This system
is applicable for level measurement in conductive liquids. The conductivity of the
10
insulated material can be varied if the probe is covered or not covered within the
conductive product. There are two electrodes: one is used as a metal wall of the tank,
and the other electrode is inserted into the tank. This principle can be explained with a
practical application. A Conductive probe is used as a liquid level indicator for
measuring the level of electrically conductive products in a metal water tank, or other
container, which can be obtained by means of a probe isolated from the container and a
conductivity amplifier. When the product is not in connection with the probe, the
electrical resistance is relatively high or infinite between the probe and the metal tank
wall. If the level of the liquid rises completely between the probe and the tank wall, then
the resistance gradually decreases [14].
The Soil Moisture Sensor is used to measure the volumetric water content of soil. This
makes it ideal for performing experiments in courses such as soil science, agricultural
science, environmental science, horticulture, botany, and biology. Use the Soil Moisture
Sensor to:
• Measure the loss of moisture over time due to evaporation and plant uptake.
11
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)
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.
12
b) 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. 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 electricity. A large volume of water will mean more ions and thus
better electric conduction. Electrical conductivity probes sensors takes advantage of this
phenomenon. 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.
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 classified into two types namely:
Capacitance sensors and Time Domain Reflectometry (TDR) sensors. These sensors do
not measure electrical conductivity while measuring soil moisture.
13
d) 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 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.
e) 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 they
require different calibrations depending on different soil types.
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. 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.
14
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.
g) 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. 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 cent bars.
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.
15
Fig 2.6 yl-69 moisture sensor
2.2.11 DC motor
16
A DC motor is any of a class of electrical machines that converts direct
current electrical power into mechanical power. The most common types rely on the
forces produced by magnetic fields.
DC(direct current)motor is a fairly simple electric motor that uses electrical and
magnetic filed to produce torque, which is turns the rotor and hence give mechanical
work.
2.2.12 Relay
A relay is an electrical switch that opens and closes under the control of another
electrical circuit. In the original form, the switch is operated by an electromagnet to
open or close one or many sets of contacts. A relay is able to control an output circuit of
higher power than the input 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.
By default when there is no excitation in the coil the NC (Normally Closed) and C
(Common Terminal) are connected through the contact internally. When the coil is
excited by providing the required coil voltage, the contact switches from the NC to NO
(Normally Open) side. In this case, the C and NC terminals are connected internally.
17
RL1
2.2.13 Diode
An electrical semiconductor device that allows current to flow only one direction. It is a
two terminal device that rectifies signals (passes current in only one direction).Most
commonly a semiconductor consisting of a p-n junction.
Zener diodes, light emitting diode, constant current diodes, Shockley diode, varactor
diode e.t.c. in our project we use light emitting diode and ideal diode.
LED
D
DIODE
18
i) Starting
ii) Speed control and
iii) Braking.
It can be said that the electrical drives enable us to control the motor in every aspect.
But control of electrical drives is also necessary because all the functions accomplished
by the drives are mainly transient operations i.e the change in terminal voltage, current,
etc are huge which may damage the motor temporarily or permanently. In very simple
words, the systems which control the motion of the electrical machines are known as
electrical drives. Atypical drive system is assembled with electric motor (may be
several) and a sophisticated control system that controls the rotation of the motor shaft.
Now a day, this control can be done easily with the help of software. So, the controlling
becomes more and more accurate and this concept of drive also provides the ease of use.
2.2.15 Sprinkler
Sprinkler irrigation is a method of applying irrigation water which is similar to natural
rainfall. Water is distributed through a system of pipes usually by pumping. It is then
sprayed into the air through sprinklers so that it breaks up into small water drops which
fall to the ground. The pump supply system, sprinklers and operating conditions must be
designed to enable a uniform application of water. Sprinkler Irrigation water is applied
through a pressurized system. The pressure causes the water to flow out through the
sprinkler nozzle and fly through the air and falls onto the soil surface.
Sprinkler irrigation systems distribute water by spraying it over the fields. The water is
pumped under pressure to the fields. The pressure forces the water through sprinklers or
19
through perforations or nozzles in pipelines and then forms a spray. A high speed
centrifugal or turbine pump can be used for operating sprinkler irrigation for individual
fields. Centrifugal pump is used when the distance from the pump inlet to the water
surface is less than eight meters. For pumping water from deep wells or more than eight
meters, a turbine pump is suggested.
ii) Tubing
Mains/sub-mains: The Tubing consists of mainline, sub-mains. Main line conveys water
from the source and distributes it to the sub-mains. The sub-mains convey water to the
laterals which in turn supply water to the sprinklers. HDPE (HIGH DESITY POLY
ETHYLENE) pipes are used for sub-mains, PVC e usually used for main lines.
iii) Couplers
Are used for connecting two pipes and uncoupling quickly and easily. Essentially a
coupler should provide: A reuse and flexible connection, not leak at the joint, be simple
and easy to couple and uncouple, be light, non-corrosive, durable.
Sprinkler head distribute water uniformly over the field without runoff or excessive loss
due to deep percolation. Different types of sprinklers are available. They are either
rotating or fixed type. The rotating type can be adapted for a wide range of application
rates and spacing. They are effective with pressure of about 10 to 70 m head at the
sprinkler. Pressures ranging from 16 to 40 m head are considered the most practical for
most farmers. Fixed head sprinklers are commonly used to irrigate small lawns and
gardens. Perforated lateral lines are sometimes used as sprinklers. They require less
pressure than rotating sprinklers. They release more water per unit area than rotating
sprinklers. Hence fixed head sprinklers are adaptable for soils with high intake rat.
20
Fig 2.11 sprinkler irrigation system
2.2.17 Resistor
A resistor is a two terminal electric circuit component that provides opposition to an
electric current. It is available in several common forms: wire wound resistors are
formed from windings of fine wire; film resistor, commonly found in consumer
electronic devices. Resistor absorbs power from a circuit and converts to heat. They are
normally rated for the maximum amount of power that they can simply handle.
21
Chapter three
Materials and Methodology
3.1 Materials
We have used in our project are websites; which we go through different books,
journals, and thesis and ongoing projects in automatic water planting system. From this
we are going to select appropriate rating of arduino uno, transistor, irrigation pump,
pumping motor, resistors, relays, soil moisture sensor, water level sensor, potentiometer
and liquid crystal display based on their application in automatic plant watering system.
1) Arduino uno
It is one type of microcontroller used to upload our system c-code and interface the
input and output of the system. It has analog input and digital output.
Microcontroller –Atmega328
Operating voltage-5v
Input voltage (recommended)-7-12V
Digital input/output pin-14(of which 6 provides PWM output )
Analog input pins – 6
Dc current per I/O pin -40Ma
Dc current for 3.3V pin- 50Ma
Flash memory – 32KB (ATmega328) of which 0.5KB used by bootloader
SRAM-2KB (ATmega328)
EEPROM-1KB (ATmega328)
Clock speed -16MHZ
22
Fig 3.1 arduino uno [8]
2) Transistor
In this project we use NPN transistor as a drive. It amplifies output current of arduino
uno and it supply to relay. Transistor has three terminals; emitter, collector and base.
The emitter terminal connected with ground, the base terminal connected with arduino
uno and the collector terminal connected with relay.
We use 2N2222 bipolar junction transistor (BJT).Because it used for general purpose
low power amplifying or switching application. It is designed for low to medium
voltage, and can operate at moderate high speeds [6].
23
3) Relay
A relay is an electrical switch that opens and closes under the control of another
electrical circuit. In the original form, the switch is operated by an electromagnet to
open or close one or many sets of contacts.
0.25 A
Current Rating
Contact Configuration SPDT with Clamping Diode
24
Table 3.2 Coil characteristics
We use 16×2 LCD type to display our output parameter. It has14 pins with their
corresponding functions. Its function is described by the following table [1].
25
5) YL-69 soil moisture sensor
The soil moisture sensor (YL-69) used is a resistance sensor type. Its output is the
resistance in the soil between the two soil moisture sensor probes. The value of the soil
resistance decreases with increase in water content to a certain point. Different soil
types have different moisture content. Example the three soil type (sand soil, loam soil
and red soil) has the following moisture content. The soil was measured in equal
amount of 250gramms. Water was added in the soils in steps and the sensor values
recorded [15].
26
We find the total average of seven experiments for the three soil type shown on the
above table the average value is 416, so we write our code using 416 as desired set
value.
6) Float sensor
Principle of Operation: A liquid level control system by using a float sensor works on
the principle of buoyancy, which states, “A float immersed in a liquid is buoyed
towards upward direction by an applied equal force to the weight of the displaced
liquid”. As a result, the body drives partially and gets submerged upon the liquid
surface and covers the same distance the liquid level moves.
27
LCD
Motor Pumpi
Level Arduion Relay Reservoir
driver ng
sensor tank
uno motor
Moisture
sensor Motor Irrigati
driver Relay Sprinkler
on
sensor
Pump
If the level that is detected by the sensor is below the threshold value, the Arduino send
a message signal to the motor to fetch water. But when the level detected by the sensor
is above the pre-set value the motor doesn’t rotate. Since water does not inter the
reservoir tank.
In the same manner if the soil moisture value that is detected by the sensor is above the
threshold value, then Arduino send a message signal to the irrigation pump water to
irrigate. But when the soil moisture value detected by the sensor is below the pre-set
value then irrigation pump doesn’t irrigate.
28
Start
Initialize parameters
Is tank
not full?
No Is soil moisture
value
>=desired set?
Yes
Pump on Yes No
NO Irrigation
pump on
Is tank
No
full?
Is soil
moisture value
Yes
<desired set?
Pump is off
Yes
Stop
29
3.5 Arduino interfacing with moisture sensor
Figure shown below describes the interfacing of arduino uno with soil moisture sensor
as input to arduino uno (pin A4) and at the output port of arduino uno pins(2,3,4) with
LCD pins (12,13,14) and arduino uno pin (7) with irrigation pump are interfaced.
30
3.7 Arduino interfacing with moisture sensor and level sensor
Figure shown below describes the interfacing of arduino uno with level sensor and
moisture sensor as input to arduino uno (pin A3,pin A4) respectively and at the output
port of arduino uno pins (2, 3, 4) with LCD pins (12, 13, 14) and arduino uno pins (pin
6, pin 7) with pumping motor and irrigation pump are interfaced.
Working principle: the soil moisture sensor and water level sensor senses the water
content of soil and the amount of water in the reservoir tank respectively and sends
signal to the arduion uno; the arduino uno interprets the received signal and compare it
with their per-set value. Then the relays energize or de energizes based on the arduino
uno output command and the LCD displays the parameters.
Chapter four
31
Simulation results and Discussion
Simulation is the imitation of the operation of a real-world process or system over time.
The act of simulating something first requires that a model be developed; this model
represents the key characteristics or behaviours/functions of the selected physical or
abstract system or process. The simulation results of our project described below.
When the level sensor and moisture sensor detects the value of tank and soil moisture
respectively if the value of tank greater than desired set and soil moisture value less than
the desired set; then the arduino output pins (pin 6 and 7) which is connected to
pumping and irrigation motors are in active(not energize). Then LCD displays ‘tank
full’ and ‘moisture ok’. These parameters are shown as the circuit below.
When the level sensor and moisture sensor detects the value of tank and soil moisture
respectively if the value of tank less than desired set and soil moisture value less than
the desired set; then the arduino output pin (pin 6) which is connected to pumping motor
is active (energize) and arduino output pin (pin 7) which is connected to irrigation
motor is in active (not energize). Then LCD displays ‘water to tank’ and ‘moisture ok’.
These parameters are shown as the circuit below.
32
Fig 4.2 circuit shows water to tank and moisture is ok
When the level sensor and moisture sensor detects the value of tank and soil moisture
respectively if the value of tank less than desired set and soil moisture value greater than
the desired set; then the arduino output pins (pin 6 and 7) which is connected to
pumping and irrigation motors are active (energize) . Then LCD displays ‘water to tank’
and ‘soil dray’. These parameters are shown as the circuit below.
When the level sensor and moisture sensor detects the value of tank and soil moisture
respectively if the value of tank much greater than desired set and soil moisture value
much less than the desired set; then the arduino output pins (pin 6 and 7) which is
connected to pumping and irrigation motors are in active(not energize). Then LCD
displays ‘weather bad’ and ‘user take another option’. These parameters are shown as
the circuit below.
33
Fig 4.4 circuit shows weather bad and user take another option
When the level sensor and moisture sensor detects the value of tank and soil moisture
respectively if the value of tank less than desired set and soil moisture value much
greater than the desired set; then the arduino output pins (pin 6 and 7) which is
connected to pumping and irrigation motors are active (energize) . Then LCD displays
‘water to tank’ and ‘soil very dray’. These parameters are shown as the circuit below.
Fig 4.5 circuit shows water to tank and soil very dray
34
Chapter five
Conclusion and Recommendation
5.1 Conclusion
The microcontroller based automatic plant watering System is a valuable tool for
accurate soil moisture and water level control in highly specialized crop and vegetable
production and it is a simple, precise method of irrigation. An important of the system
is: Closed loop automatic plant watering system, moisture and water usage monitoring.
Users can observe the current output action of the system on the LCD. The switching
mechanism of the motors can be done automatically with the help of microcontroller
using relays. The proposed controller eliminates the manual switching mechanism used
by the farmers to ON/OFF the irrigation system.
5.2 Recommendation
We know that agriculture is the most important source of income in countries like
Ethiopia, so to improve agricultural products irrigation system is the first method to
achieve this goal. It is recommended to implement this project for a country which
follows agro-industrial economy policy.
The system should be tested to be practical in agricultural sectors to assist the economic
activities of the country and therefore stakeholders such as our university and ministry
of agriculture must cooperate to see the fruit of this project.
35
Reference
[1] Beginning arduino by Michael McRoberts Copyright @ 2010
[2] Beginning Arduino Programming Writing Code for the Most Popular
Microcontroller Board in the World
[4] Schaum’s outline of theory and problems of programming with C++ second edition
by JOHN R. HUBBARD, Ph.D. Copyright 2000 The McGraw-Hill Companies, Inc.
[6] Electronic Devices and Circuit Theory by Robert Boylestad Louis Nashelsky
[8] https://www.ntu.edu.sg/home/ehchua/programming/arduino/Arduino.html
[9] http://www.hobbytronics.co.za/p/607/npn-transistorp2n2222a-06a-ic-10vce
[13] Clemmens, A.J. Feedback Control for Surface Irrigation Management, ASAE
Publication 04 -90, 1990.
[14] https://www.efxkits.co.uk/liquid-level-sensor-and-types-of-level-sensors/
[15] Soares Book on Grounding and Bonding, 9th addition (ISBN 1890659-36-3)
36
Appendix
The c-code of our project is given below.
#include <LiquidCrystal.h>
int PumpPin = 7;
int MotorPin=6; // initialize the library with the numbers of the interface pins
void setup(){
// serial initialization
pinMode(PumpPin,OUTPUT);
pinMode(MotorPin,OUTPUT);
lcd.begin(16, 2);
void loop()
digitalWrite(MotorPin,LOW);
37
lcd.clear();
lcd.setCursor(0,0);
digitalWrite(MotorPin,HIGH);
lcd.clear();
lcd.setCursor(0,0);
digitalWrite(PumpPin,HIGH);
lcd.setCursor(1,1);
digitalWrite(PumpPin,LOW);
lcd.setCursor(1,1);
38
lcd.print("mosture ok"); // in case of moist soil:
digitalWrite(MotorPin,LOW);
digitalWrite(PumpPin,LOW);
lcd.clear();
lcd.setCursor(0,0);
lcd.setCursor(1,1);
lcd.print("user take anoption"); //in case of dry soil and empty reservoir tank:
lcd.setCursor(1,1);
delay(100);
39