Design and Construction of An Automatic
Design and Construction of An Automatic
Design and Construction of An Automatic
1.0 Introduction
Irrigation is the artificial application of water to the land or soil. It is used to assist in the
dry areas and during periods of inadequate rainfall. When a zone comes on, the water flows
through the lateral lines and ultimately ends up at the irrigation emitter (drip) or sprinkler heads.
Many sprinklers have pipe thread inlets on the bottom of them which allows a fitting and the pipe
to be attached to them. The sprinklers are usually installed with the top of the head flush with the
ground surface. When the water is pressurized, the head will pop up out of the ground and water
the desired area until the valve closes and shuts off that zone. Once there is no more water
pressure in the lateral line, the sprinkler head will retract back into the ground. Emitters are
generally laid on the soil surface or buried a few inches to reduce evaporation losses.
Water is a resource that all living species need. It is therefore very precious and has to be
used with moderation to be preserved for the generations to come. Agriculture is an industry that
uses a lot of water. Most of the time, this resource is not used efficiently and substantial amounts
of water are wasted. In the near future, these wastes will represent a large sum of money. The ones
who manage this resource efficiently will be winning time and money.
In this project report, an automated irrigation system is suggested to minimize the water
input and human intervention, while satisfying the plants needs. First, the details of the problem are
summarized. The objective and the scope of the project are described. Some general approaches to
the design are reviewed. The results and conclusions of an experiment to determine the required
amounts of water are discussed. Then, the suggested design is explained in detail with the purpose,
requirements and constraints, simulation and test results for each of its parts. A brief cost analysis is
1
performed to estimate the viability of such a project on the market. Finally, the design is criticized,
An automatic irrigation system does the operation of a system without requiring manual
involvement of persons. Every irrigation system such as drip, sprinkler and surface gets automated
with the help of electronic appliances and detectors such as computer, timers, sensors and other
mechanical devices.
Healthy plants can transpire a lot of water, resulting in an increase in the humidity of the
greenhouse air. A high relative humidity (above 80-85%) should be avoided because it can
increase the incidence of disease and reduce plant transpiration. Sufficient venting or successive
heating and venting can prevent condensation on plants surfaces and the greenhouse structure. The
use of cooling systems during the warmer summer months increases the greenhouse air humidity.
During periods with warm and humid outdoor conditions, humidity control inside the greenhouse
can be a challenge. Greenhouses located in dry, dessert environments benefit greatly from
evaporative cooling systems because large amounts of water can be evaporated into the incoming
Since the relative humidity alone does not tell us anything about the absolute water holding
capacity of air, a different measurement is sometime used to describe the absolute moisture status
of the soil. The vapor pressure deficit is a measure of the difference between the amount of
moisture the air contains at a given moment and the amount of moisture it can hold at that
temperature when the air would be saturated. Pressure deficit measurement can tell us how easy it
is for plants to transpire: higher values stimulate transpiration (but too high can cause wilting), and
lower values inhibit transpiration and can lead to condensation on leaf and surfaces.
2
1.1.1 Types of Irrigation
1. Ditch Irrigation
Ditch Irrigation is a rather traditional method, where ditches are dug out and seedlings are
planted in rows. Siphon tubes are used to move the water from the main ditch to the canals.
2. Terraced Irrigation
This is a very labor-intensive method of irrigation where the land is cut into steps and
supported by retaining walls. . The flat areas are used for planting and the idea is that the water
flows down each step watering each plot. This allows steep land to be used for planting crops.
3. Drip Irrigation
This is known as the most water efficient method of irrigation. Water drops right near the
root zone of a plant in a drip- ping motion. If the system is installed properly you can steadily
4. Sprinkler System
permanent risers. You can also have the system buried underground and the sprinklers rise up when
water pressure rises, which is a popular irrigation system for use on golf courses and parks.
5. Rotary Systems
This method of irrigation is best suited for larger areas, for the sprinklers can reach
distances of up to 100 feet. The word “Rotary” is indicative of the mechanical driven sprinklers
moving in a circular motion, hence reaching greater distances. This system waters a larger area
amount of time, it requires a large amount of human resources. Traditionally, all the steps were
executed by humans. Nowadays, some systems use technology to reduce the number of workers
3
or the time required to water the plants. With such systems, the control is very limited, and
Water is one of these resources that are used excessively. Mass irrigation is one method
used to water the plant. This method represents massive losses since the amount of water given is
in excess of the plants needs. The excess water is evacuated by the holes of the pots in
The contemporary perception of water is that of a free, renewable resource that can be used
in abundance. However, this is not reality; in many parts of North America, water consumption is
taxed. It is therefore reasonable to assume that it will soon become a very expensive resource
everywhere.
In addition to the excess cost of water, labour is becoming more and more expensive. As a
result, if no effort is invested in optimizing these resources, there will be more money involved in
the same process. Technology is probably a solution to reduce costs and prevent loss of resources.
The aim of this project is to build an automatic plant irrigation system that sense soil moisture using
microcontroller.
To prevent over labour of the pumping machine and prevent it from getting bad or burned
i. Installation costs;
4
iv. Reliability;
v. Power consumption;
vi. Maintenance;
vii. Expandability.
A critical consideration is the installation costs, since costs generally determine the
feasibility and viability of a project. The installation must be simple enough for a domestic user.
The water savings was also an important aspect, since there is a demand to minimize water loss and
to maximize the efficiency of water used. Since the objective is to minimize the cost of labour,
minimal supervision and calibration must be needed. The system must operate with optimized
consistency. The power consumption must also be monitored. For maintenance, the replacement
parts must be readily available and easy to install in the case of failure. Finally, the possibility
for implementing the system at a larger scale (e.g. in greenhouses) should be investigated.
The increasing world population has lead 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. In the forefront of the electronics revolution has been the microcontroller.
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
5
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 soil moisture sensor 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. Controlled watering system results in reduction of fertilizer use and thus
This project involves the evolution of watering manually to watering automatically. The
controlling of the automatic watering system is use in a house, institution or any organization
with flowers planted for decoration. Sensor used to control the watering system is soil moisture
sensor. Other than that, this system should also monitor the water level.
The continuous increasing demand of food requires the rapid improvement in food
production technology. In a country like Nigeria, where the economy is mainly based on agriculture
and the climatic conditions are isotropic, still we are not able to make full use of agricultural
resources. The main reason is the lack of rains & scarcity of land reservoir water. The continuous
extraction of water from earth is reducing the water level due to which lot of land is coming slowly
in the zones of un-irrigated land. Another very important reason of this is due to unplanned use of
water due to which a significant amount of water goes to waste. This problem can be rectified if we
use microcontroller based automated irrigation system in which the irrigation will take place only
i. Saves water - Studies show that drip irrigation systems use 30 - 50% less water than
6
conventional watering methods, such as sprinklers.
ii. Improves growth - Smaller amounts of water applied over a longer amount of time provide
ideal growing conditions. Drip irrigation extends watering times for plants, and prevents
soil erosion and nutrient runoff. Also, because the flow is continuous, water penetrates
deeply into the soil to get well down into the root zone.
iv. Saves time - Setting and moving sprinklers are not required. A timer delay as per
v. Helps control fungal diseases, which grow quickly under moist conditions. Also, wet
vi. Adaptable - A drip irrigation system can be modified easily to adjust to the changing needs
of a garden or lawn.
vii. Simplest Method - Start by drawing a map of your garden and yard, showing the location
of plantings. Measure the distances required for lengths of hose or plastic tubing to reach
Highly sensitive
7
Roof Gardens
Lawns
Agriculture Lands
Home Gardens
1.7 Motivation
The increasing demand of the food supplies requires a rapid improvement in food
production technology. In many countries where agriculture plays an important part in shaping up
the economy and the climatic conditions are isotropic, but still we are not able to make full use of
agricultural resources. One of the main reasons is the lack of rains & scarcity of land reservoir
water. Extraction of water at regular intervals from earth is reducing the water level as a result of
Also, the unplanned use of water inadvertently results in wastage of water. In an Automated
Irrigation System using ATMega328, the most significant advantage is that water is supplied only
when the moisture in soil goes below a pre-set threshold value. This saves us a lot of water. In
recent times, the farmers have been using irrigation technique through the manual control in which
the farmers irrigate the land at regular intervals by turning the water-pump on/off when required.
This process sometimes consumes more water and sometimes the water supply to the land is
delayed due to which the crops dry out. Water deficiency deteriorates plants growth before visible
wilting occurs. In addition to this slowed growth rate, lighter weight fruit follows water deficiency.
This problem can be perfectly rectified if we use Automated Irrigation System in which the
irrigation will take place only when there will be intense requirement of water, as suggested by the
8
1.8 Thesis Outline
This study comprises of five different chapters arranged sequentially. Chapter one gives a
brief history of the various forms of locks and their technological advancements. Chapter two
explains the operating principles of the various stages involved in the digital combination lock
using microcontroller. In chapter three, the design and implementation of the whole project work is
discussed fully. Chapter four presents the results and discussions drawn from tests performed on the
system, while lastly; Chapter gives a conclusion and recommendation on the entire work.
9
CHAPTER TWO
LITERATURE REVIEW
2.0 Introduction
The development of models and strategies to control the environment of plants started
with the shoot environment, that is, with the climate. One important reason was that influencing
variables such as temperature, humidity, and irradiation or CO2 concentration are easier to
From this research, we can see that there are a few factors that need to be control in
Khriji et al (2014) presented a complete irrigation solution for the farmers based on WSN. The
automated irrigation system using low-cost sensor nodes having reduced power consumption can
reduce the water waste and is cost effective. A node is deployed using Telos B mote and adequate
sensors/actuators. Field nodes are used to detect the level of moisture and temperature in the soil.
Weather nodes monitor the climatic changes, and the nodes connected to actuators are used to
Mahir et al (2014) proposed an efficient water usage system by pump power reduction
using solar-powered drip irrigation system in an orchard. Soil moisture content is analyzed by
Artificial Neural Networks (ANN) to provide even distribution of water for the required location.
This will prevent the unnecessary irrigation and reduce the water demand. This system reduces the
Farid et al (2013) presented a practical solution based on intelligent and effective system for a field
of hyper aridity. The system consists of a feedback FLC that logs key field parameters through
specific sensors and a Zigbee-GPRS remote monitoring and database platform. The system is
10
deployed in existing drip irrigation systems without any physical modification. FLC acquires
data from these sensors and fuzzy rules are applied to produce appropriate time and duration for
irrigation.
vegetable plants based on the fuzzy logic methodology. In this system the amount of water
given to the plants depends on its size, moisture control of soil, which is affected by temperature
of environment, evaporation due to wind velocity and water budget. The system feed water to
plants in a controlled and optimal way. Solar energy conversion technology is used to feed power
integration of a center pivot irrigation system with wireless underground sensor networks.
The wireless underground sensor aided center pivot system will provide autonomous irrigation
management capabilities by monitoring the soil conditions in real time using wireless underground
sensors. Experiments were conducted with a hydraulic drive and continuous-move center pivot
irrigation system.
Robert (2013) promoted a commercial wireless sensing and control networks using valve
control hardware and software. The valve actuation system included development of custom node
firmware, actuator hardware and firmware, an internet gateway with control, and communication
and web interface software. The system uses single hop radio range using a mesh network with
J.S. Awati and V.S. Patil, “Automatic Irrigation Control by Using Wireless Sensor
Networks”. The system was integrated with sensors into a wireless monitoring network to
determine and evaluate calibration functions for the integrated sensors. The system
compares the measuring range and the reaction time of both sensor types in a soil layer during
drying. Data were transmitted over several kilometers and made available via Internet access.
11
Nolz et al (2007) integrated the sensors into a wireless monitoring network to determine
and evaluate calibration functions for the integrated sensors, and compare the measuring
range and the reaction time of both sensor types in a soil layer during drying. The integration of the
sensors into the telemetry network worked well. Data were transmitted over several kilometers and
Christos et al (2014) described the design of an adaptable decision support system and its
zone-specific irrigation. Using ontology for defining the application logic emphasizes system
flexibility and adaptability and supports the application of automatic inferential and validation
mechanisms. A machine learning process is applied for inducing new rules by analyzing logged
datasets for extracting new knowledge and extending the system ontology in order to cope.
An automatic irrigation system does the work quite efficiently and with a positive impact on
the place where it is installed. Once it is installed in the agricultural field, the water distribution to
crops and nurseries becomes easy and doesn’t require any human support to perform the operations
appliances such as clay pots or bottle irrigation system. It’s very hard to implement irrigation
systems because they are very expensive and complex in their design. By taking some basic points
into considerations from experts’ support, we have implemented some projects on automatic
In this article, we are describing about three types of irrigation systems that work
automatically and each system is an advancement of the previous one as we go from first system to
12
The automatic irrigation system on sensing soil moisture project is intended for the
development of an irrigation system that switches submersible pumps on or off by using relays to
Automatic irrigation systems are convenient, especially for those who travel. If installed
and programmed properly, automatic irrigation systems can even save you money and help in
water conservation. Dead lawn grass and plants need to be replaced, and that can be expensive. But
the savings from automatic irrigation systems can go beyond that. Watering with a hose or with
oscillator wastes water. Neither method targets plant roots with any significant degree of precision.
Automatic irrigation systems can be programmed to discharge more precise amounts of water in a
2.3 Microcontroller
computer, but with a great deal of additional functionality combined onto the same monolithic
are used to control a wide range of electrical and mechanical appliances. Since they were first
introduced, microcontrollers have evolved to the point where they can use for increasing
complex applications. Some microcontrollers in use today are also programmable, expanding the
2.4 Sensors
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
13
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
The soil moisture sensor is often sensing devices embedded within some sort of
insulation. The insulation may often be for electrical purposes - to isolate the sensor electrically.
Soil moisture sensors measure the water content in soil. A soil moisture probe is made up of
Neutron moisture gauges, utilize the moderator properties of water for neutrons.
In this particular project, we will use the moisture sensors which can be inserted in the soil, in order
Soil electrical
conductivity is simply
soil except that dissolved salts greatly alter the water conductivity and can confound the
measurements. An inexpensive fix is to embed conductors in a porous gypsum block which releases
14
calcium and sulphate ions to swamp the soil background level of ions. The water absorbed by the
block is correlated with soil water potential over the range -60 to -600 kPa providing a tertiary
indicator for use in medium to heavy soils. Non-dissolving granular matrix sensors are now
available with a more exacting specification for the range 0 to -200 kPa and use internal calibration
Methods for exploiting soil dielectric properties actually measure proxy variables that more
or less include a component due to the soil electrical conductivity and are thus inherently sensitive
to variations in soil salinity and temperature as well as water. Measurements are also affected by
soil bulk density and the proportion of bound and free water determined by the soil type.
Nevertheless, good accuracy and precision can be achieved under specific conditions and some
1. For conversion of change in resistance to change in voltage, the sensor is connected with a
2. It gives a voltage output corresponding to the conductivity of the soil. The conductivity of
soil varies depending upon the amount of moisture present in it. It increases with increase in
the water content of the soil. The higher the water contents of the blocks, the lower the
electrical resistance.
3. The voltage output is taken from the output terminal of this circuit. The moisture sensor is
immersed into the specimen soil whose moisture content is under test.
15
1. Dry condition:
The sensor is placed in the soil under dry conditions and embedded up to a fair depth of the
soil. In dry condition, as there is no conduction path between the two copper leads the sensor gives
a high resistance value (nearly 700 kΩ). The voltage output of the potential divider in this case
2. Optimum condition:
When water is added to the soil, it percolates through the successive layers of it and spreads
across the layers of soil due to capillary force. This increases the moisture content of the soil. Thus
a conductive path is established between the two copper leads. This leads to a decrease in resistance
of sensor. The optimum condition of the soil can be set manually depending on the type of soil.
With the increase in water content beyond the optimum level, there is drastic increase in the
conductivity of the soil and the sensor resistance is further decreased to around 50kΩ. The voltage
output of the potential divider in this case ranges from upper optimum level 5V to 10V.
In general, conversions from raw sensor readings to volumetric moisture content or water
potential using secondary or tertiary methods tend to be sensor or soil specific, affected or
typically have laboratory measured accuracy worse than +/- 4% when relying on factory settings or
as good as +/- 1% when calibrated for the specific soil. Sensors based on the TDR method seem to
require least calibration but may be unsuitable for soils with very high salinity or clay content.
There are no comparable laboratory specifications for granular matrix sensors, possibly because
they are technically more difficult to calibrate, their response times are relatively slow and the
16
Soil dielectric measurement is the method of choice for most research studies where expertise is
available for calibration, installation and interpretation, but scope for cost reduction through sensor
multiplexing is limited due to the possibility of stray capacitances. A lower manufacturing cost is
possible through development of application specific integrated circuits (ASICS), though this
requires a high level of investment. Multiple sensors are required to provide a depth profile and
cover a representative area, but this cost can be minimized through use of a computer model to
extend the measurements in a predictive way. Thus, by using the moisture sensors, the over-riding
factor will be reliable, cost- effective sensors and electronic systems for accessing and interpreting
the data.
Name Specification
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 1: Soil Moisture Sensor Specifications
Irrigation is the most important cultural practice and most labor intensive task in daily
greenhouse operation. 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
suggested soil moisture detector are tensiometer and dielectric sensor. Advantage of a
17
tensiometer is that they are not affected by the temperature of the soil water solution or the
osmotic potential (the amount of salts dissolved in the soil water), as the salts can move into
and out of the ceramic cup freely. Therefore tensiometer readings are not affected b y electro-
conductivity (EC) o r soil temperature. But, this type of sensor will need maintenance. Water in
the tensiometer cavity needs frequent refilling when tensiometers are used in dry environments
where the tensiometer becomes a source of water that seeps out due to drier surrounding soil.
A soil moisture sensor is a device that measures the volumetric water content (VWC) of
Soil moisture sensors are classified according to how they measure the soil moisture
content. Two methods are used in determining the volumetric water content (VWC); direct and
indirect. The direct method entails drying a known volume of soil in an oven and weighing it.
The direct method of measuring VWC is done using the following mathematical notation:
Where:
c) ρw i s w a t e r d e n s i t y
18
Indirect method is based on correlating soil physical and chemical properties with water
content. Three techniques are used in this method namely: chemical titrations, geophysical sensing
Chemical titration determines the moisture loss in sample soil after freeze drying or
heating. Satellite remote sensing uses microwave radiation to check on the difference in dielectric
properties of dry and wet soils. Geophysical sensing uses physical devices which are inserted in
the soil to determine the soil moisture content. Techniques used in this method include: electrical
resistance, electrical conductivity, soil dielectric, soil tension, TDR, FDR, soil capacitance
among others.
A controlled irrigation system can include a control device for determining whether to
irrigate soil and at least one irrigation structure having an actuator for controlling water flow.
The actuator can be communicably coupled to the control device for delivering water to
irrigate a region. The controlled irrigation system further can include at least one time domain
reflectometry sensor ("TDRS") located in the soil and communicably coupled to the control
device for measuring soil moisture where the control device determines whether to irrigate
the soil based on data from the at least one TDRS. Additionally, a method for controlling an
irrigation system can include providing multiple. TDRS's having probes, distributing each TDRS
at a different soil depth, measuring soil moisture content, and irrigating soil based on the
A single sensor can be used to control the irrigation for many zones (where an irrigation
zone is defined by a solenoid valve) or multiple sensors can be used to irrigate individual zones. In
the case of one sensor for several zones, the zone that is normally the driest, or most in need of
irrigation, is selected for placement of the sensor in order to ensure adequate irrigation in all zones.
19
Some general rules for the burial of the soil moisture sensor are:
i. Sensors should be buried in the root zone of the plants to be irrigated, because this is where
plants will extract water. Burial in the root zone will help ensure adequate turf or landscape
quality. For turf grass, the sensor should typically be buried at about three inches deep.
ii. Sensors need to be in good contact with the soil after burial; there should be no air gaps
surrounding the sensor. Soil should be packed firmly but not excessively around the sensor.
iii. If one sensor is used to control the entire irrigation system, it should be buried in the zone
that requires water first, to ensure that all zones get adequate irrigation. Typically, this will
be an area with full sun or the area with the most sun exposure.
iv. Sensors should be placed at least 5 feet from the home, property line, or an impervious
v. Sensors should also be located at least 5 feet from irrigation heads and toward the center of
an irrigation zone.
vi. Sensors should not be buried in high traffic areas to prevent excess compaction of the soil
2.5 Valve
running an electrical current through a solenoid, in order to change the state of the valve. A
solenoid is a coil of wire that is magnetized when electricity runs through it. The solenoid
valve makes use of this solenoid in order to activate a valve, thus controlling water flow, airflow
and other things with electricity. Basically, there are three types of solenoid valves: the
general-purpose type, low- pressure steam type and the high pressure steam type. (Jimmy Sturo,
2006)
In this article, it stated that there are three types of solenoid valve which are general-purpose
20
type, low pressure steam type and the high pressure steam type. Valve is one the components
that will need maintenance. The solenoid valve can get damaged after a period of time. Thus, a
The model consists of a series of tanks arranged one below the other. The volume of the
tanks is in descending order (The highest tank being the largest). Water flows from the top tank
through outlets at the bottom. Three tanks or trophic levels chosen for the model is the optimum
number required to analyze the effect of top down and bottom up controls. Each tank has two
outlets, outlet a. and outlet b. Each outlet has the water flow through it regulated by means of
valves. These valves are controlled by floats in the tanks. Valve of each tank is controlled by the
level of water in the tank above it (preceding) while valve b is controlled by the level of the water
in the given tank itself. The water from the last tank and outlets a flow into a large basin from
In this journal, it discuss on the mod el of a flow control. This model can used to control
the flow control of the water in the tank. From this model, the idea for monitoring water level
is produced. This is to ensure that the plant will always get water even though drought
happens.
The Arduino Uno is a microcontroller board based on the ATmega328. It has 14 digital
input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz ceramic
resonator, a USB connection, a power jack, an ICSP header, and a reset button. It contains
everything needed to support the microcontroller; simply connect it to a computer with a USB cable
21
The Uno differs from all preceding boards in that it does not use the FTDI USB-to-serial driver
chip. Instead, it features the Atmega16U2 (Atmega8U2 up to version R2) programmed as a USB-
to-serial converter.
2.7.1 ATmega328P
Features:
v. I/O Pins: 23
22
Figure 2.7.1 ATMEGA 328 (Pin Configuration)
The maximum length and width of the Uno PCB are 2.7 and 2.1 inches respectively, with
the USB connector and power jack extending beyond the former dimension. Four screw holes allow
the board to be attached to a surface or case. Note that the distance between digital pins 7 and 8 is
16 mil (0.16"), not an even multiple of the 100 mil spacing of the other pins. Interface almost
anything; the best choice for beginners – this is the Arduino UNO board. Using an ATmega328
microcontroller and 14 I/O pins, Arduino UNO is one of the most popular development boards in
robotics and electronics as well. We take a look around and select the best tutorials to start working
with the board. From tutorials to setup Arduino UNO, and up to blink an LED or how to control a
robot wirelessly using an Android phone. This article is a good starting point and a good
23
Figure: 2.7.2 ArduinoUno IDE
Step 1
Arduino microcontrollers come in a variety of types. The most common is the Arduino
UNO, but there are specialized variations. Before you begin building, do a little research to figure
out which version will be the most appropriate for your project.
Step 2
To begin, you'll need to install the Arduino Programmer, aka the integrated development
environment (IDE).
Step 3
Connect your Arduino to the USB port of your computer. This may require a specific USB
cable. Every Arduino has a different virtual serial-port address, so you'll need to reconfigure the
Step 4
Set the board type and the serial port in the Arduino Programmer.
24
Step 5
Test the microcontroller by using one of the preloaded programs, called sketches, in the
Arduino Programmer. Open one of the example sketches, and press the upload button to load it.
The Arduino should begin responding to the program: If you've set it to blink an LED light, for
Step 6
To upload new code to the Arduino, either you'll need to have access to code you can paste
into the programmer, or you'll have to write it yourself, using the Arduino programming language
to create your own sketch. An Arduino sketch usually has five parts: a header describing the sketch
and its author; a section defining variables; a setup routine that sets the initial conditions of
variables and runs preliminary code; a loop routine, which is where you add the main code that will
execute repeatedly until you stop running the sketch; and a section where you can list other
functions that activate during the setup and loop routines. All sketches must include the setup and
loop routines.
Step 7
Once you've uploaded the new sketch to your Arduino, disconnect it from your computer
Step 9
Upload the program now; simply click the "Upload" button in the environment. Wait a few
seconds - you should see the RX and TX lids on the board flashing. If the upload is successful, the
Liquid Crystal Display (LCD) screen is an electronic display module. An LCD has a wide
25
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
programme 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
When using 8-bit configuration all 8 data pins (DB0-DB7) are used while only 4 data pins (DB4-
26
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 2: LCD Pin configuration
The water pump is used to artificially supply water for a particular task. It can be
sending signals as required. The process of artificially supplying water is known as pumping. There
are many varieties of water pumps used. This project employs the use of a small water pump which
is connected to a H-Bridge.
The pumping of water is a basic and practical technique, far more practical than scooping it
up with one's hands or lifting it in a hand-held bucket. This is true whether the water is drawn from
a fresh source, moved to a needed location, purified, or used for irrigation, washing, or sewage
27
treatment, or for evacuating water from an undesirable location. Regardless of the outcome, the
energy required to pump water is an extremely demanding component of water consumption. All
other processes depend or benefit either from water descending from a higher elevation or some
2.10.1 Transistor
A transistor is a semiconductor device used to amplify and switch electronic signals and
electrical power. It is the modern miniature semiconductor equivalent of the harmonic value and
was invented in 1947 by Bardeen, shocking at USA. Transistors are packaged as separate and
discrete-component. There are two basic types of transistor, the bipolar junction transistor (BJT)
external circuit. A voltage or current applied to one pair of the transistor's terminals changes the
current flowing through another pair of terminals. Because the controlled (output) power can be
higher than the controlling (input) power, a transistor can amplify a signal.
From the project in study, the type of transistor used belongs to the class of bipolar junction
transistor. Bipolar transistor consists of three pieces of semiconductor material Sandwiched together
known as base, collector and emitter. It is known as a three-terminal device. The Bipolar junction
28
1. NPN 2. PNP
(a) (b)
NPN is one of the two types of bipolar transistors, consisting of a layer of P-doped
semiconductor (the "base") between two N-doped layers. A small current entering the base is
amplified to produce a large collector and emitter current. That is, when there is a positive potential
difference measured from the emitter of an NPN transistor to its base (i.e., when the base is high
relative to the emitter) as well as positive potential difference measured from the base to the
collector, the transistor becomes active. In this "on" state, current flows between the collector and
emitter of the transistor. Most of the current is carried by electrons moving from emitter to collector
as minority carriers in the P-type base region. To allow for greater current and faster operation,
most bipolar transistors used today are NPN because electron is mobility higher than hole mobility.
The type of transistor used is the C945 that amplify electrical signal for switching the relay
A diode is two terminal active, non-linear device used in containing voltage and current in a circuit.
29
It allows current to flow in one direction, the device is said to be forward current biased when the
voltage applied the diode is positive related to the cathode. The direction of forward biased the
effective resistance across the diode is very low. But when reversed biased would be a perfect
conductor for forward current and a perfect insulator for reverse current.
Carrying such currents requires a large junction area so that the forward resistance of the diode is
kept as low as possible. Even so the diode is likely to get quite warm. The black resin case helps
The resistance to current in the reverse direction (when the diode is "off") must be high, and the
insulation offered by the depletion layer between the P and N layers extremely good to avoid the
possibility of "reverse breakdown", where the insulation of the diode fails due to the high reverse
Silicon diodes are made in many different forms with widely differing parameters. They vary in
current carrying ability from milli-amps to tens of amps, some will have reverse breakdown
voltages of thousands of volts; others use their junction capacitance to act as tuning devices in radio
and TV tuners. Look in suppliers lists to see the many types available.
2.12.1 Resistor
30
A resistor is a device designed to have a specific amount of resistance to the passage of
current. Resistor is used in circuit to limit current flow, provide a voltage drop or other related
functions like limiting current passing through some components like the liquid crystal display
(LCD), transistor and diodes. The value of each resistor determines the current flowing through it
and the value can be determined by the color band on the resistor. The resistance of a resistor is a
R = V/I
Where;
Resistor can be connected in series or parallel depending on the need. Its unit is measured in Ohms
()
The resistors are joined end-on-end as shown below. It can be proved that the equivalent resistance
or total resistance between points A and D is equal to the sum of the three individual resistances.
RT = R1 + R2 + R3 + ………
They are joined in parallel, in this case the potential difference across one resistance is the
same and the current in each resistor is different and is given by ohm‘s law
31
Plate 1: Resistor Colour Code
The colors brown, red, green, blue, and violet are used as tolerance codes on 5-band
resistors only. All 5-band resistors use a colored tolerance band. The blank (20%) “band” is only
2.12.5 Potentiometer
contact that forms an adjustable voltage divider. If only two terminals are used, one end and the
32
(a) External View (b) Internal View
electronic signal is called as an electronic oscillator. The electronic signal produced by an oscillator
is typically a sine wave or square wave. An electronic oscillator converts the direct current signal
into an alternating current signal. The radio and television transmitters are broad casted using the
signals generated by oscillators. The electronic beep sounds and video game sounds are generated
by the oscillator signals. These oscillators generate signals using the principle of oscillation. One of
the most important features of any oscillator is its frequency stability, or in other words its ability to
provide a constant frequency output under varying load conditions. Crystal Oscillator symbol and
picture;
33
2.13.1 Microprocessor Oscillator
Most microprocessors, micro-controllers and PIC’s have two oscillator pins labelled OSC1
and OSC2 to connect to an external quartz crystal circuit, standard RC oscillator network or even a
ceramic resonator. In this type of microprocessor application the Quartz Crystal Oscillator produces
a train of continuous square wave pulses whose fundamental frequency is controlled by the crystal
itself. This fundamental frequency regulates the flow of instructions that controls the processor
device.
A quartz crystal has the following values after being cut, Rs = 1kΩ, Cs = 0.05pF, Ls = 3H
and Cp = 10pF. Calculate the crystals series and parallel oscillating frequencies.
34
Then the frequency of oscillation for the crystal will be between 411kHz and 412kHz
2.14 Capacitor
insulating medium called dielectric. The conducting surface may be in the form of either circular
(or rectangular) plates or be of spherical or cylindrical shape. The purpose of a capacitor is to store
electrical energy by electrostatic stress in the dielectric. Its plates are at different potential and it is
referred to as capacitance of the capacitor. The unit of capacitance is farads (f), which may be
defined as the capacitance of a capacitor between the plates of which there appears a potential
Or symbol Q/V = C
Therefore Q = CV coulombs
CT = C1 + C2 + C3 +……….
35
While the reciprocal of the resultant capacitance of capacitors connected in series is the reciprocal
i. Area of plates
iii. The dielectric constant of the dielectric material between the plates.
36
Multiplier Table (Ceramic)
Number Multiply By (Additional # of Zeros)
0 None (0)
1 10 (1)
2 100 (2)
3 1,000 (3)
4 10,000 (4)
5 100,000 (5)
6 1,000,000 (6)
Code Tolerance
C ±0.25pF
J ±5%
K ±10%
M ±20%
D ±0.5pF
Z +80% / -20%
37
Table 2.14.3: Ceramic Capacitor General Table
38
CHAPTER THREE
3.0 Introduction
The system has three major parts; Moisture sensing part, control section and the output
section. 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 unit used to control the irrigation system by switching it on and off depending on
the soil moisture contents. Two stages of design were undertaken; hardware and software.
39
3.1.1 Block Diagram Description
There are three functional components in this project. They are the moisture sensors, gravity
tank & reservoir sensor 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
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 230volt. 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.
Electrical power is the rate of movement of electrons that create energy. As a result of the
electronic age many products need electrical power to perform certain activities. Being able to
manipulate electrical power comes at a cost. In today's world there is always the bottom line, cost.
Power supplies are the devices that can manipulate electrical power to be used in various
applications. Power supplies can be expensive but there are cheaper alternative solutions that can
produce the same output. A power supply includes conversion steps and has to be reliable enough
not to damage what it is hooked up to. Both aspects need specific parts in a certain orientations to
Every circuit runs on a different voltage, some circuits’ runs on 5V, 9V and so on. But in this
project we will be using 5V and 12V if we are using an ATMEGA 16bit micro control then we
40
need a 5V power supply because the operating voltage for ATMEGA 16 micro control is 5V. If
you will give voltage greater than 5V than your micro controller may get damaged. For avoiding
Below is a block diagram of dc power supply in which four steps are given named as:
Stepping down voltage:-First step is scale down the voltage by a step down
transformer. Step down transformer converts the 230 AC voltages to the lower AC voltage.
Maximum people think that a transformer give dc output voltage because we do not get shock
by touching its output wire. But this is totally wrong. A step down transformer gives (alternating
current) at output
41
Fig 3.2.3 Transformer
Mathematically:
N s Es Es
= , Ns ¿ N p x
N p EP EP
I P N s Es
And for current, I = =
I S N p EP
Np = Primary Turns
Es = Secondary Voltage
Ep = Primary Voltage
Is = Secondary Current
Ip = Primary Current
Rectifier: These are the equipment that converts the alternating current into direct current.
rectification. These are very important circuits in the designing the dc power supply. In our
power supply we are using full wave bridge rectifier. This rectifier is made up of pn-
42
junction diodes.
When terminal 1 is positive with respect to 2, diodes D1 and D3 conduct. When terminal
2 is positive with respect to 1, diodes D2 and D4 would conduct, thereby giving a pulsating D.C
Voltage, V
Time, t
Fig 3.2.5 Rectifier Output
Filter: After rectification a filtering process of dc current is carried out with the help of fill
because the output of the Rectifier contains some ripples or you can say distortion. So we ne to
filter these distortions, in our power supply we are using a 50V 1000uF capacitor. You can
also use a 25V 1000uF or 35V 1000uF capacitor instead of 50V 1000uF capacitor.
43
Fig 3.2.6: Capacitor Filtering connection
Equation below refers to the relationship between the filter capacitor and other supply parameters.
Vs
V dc =
I dc
1+
4 FC V s
It is preferable to choose a filtering capacitor that will hold the peak-to-peak ripples at
Vripple = 0.1Vpeak
Vripple = 1.697V
44
Where;I = current taken by the load, f = frequency of supply
Where,
f= Supply frequency
Voltage Regulator IC: The regulator is a single chip that regulates the ripple free
rectified voltage to give a constant output voltage. Since the circuit needs a supply voltage of
12V and 5V, a 12V and 5V regulators were used. The percentage regulation or simply regulator
In a general form
The voltage regulator provides the regulated output. There are many voltage regulator
ICs available in the market. For 5V dc output we are using LM7805 and for 12V dc power
45
Description:
This is a simple approach to obtain a 12V and 5V DC power supply using a single circuit.
The circuit uses two ICs 7812(IC1) and 7805 (IC2) for obtaining the required voltages. The AC
mains voltage will be stepped down by the transformer T1, rectified by bridge B1 and filtered by
capacitor C1 to obtain a steady DC level. The IC1 regulates this voltage to obtain a steady 12V DC.
The output of the IC1 will be regulated by the IC2 to obtain a steady 5V DC at its output. In this
way both 12V and 5V DC are obtained. Such a circuit is very useful in cases when we need two DC
voltages for the operation of a circuit. By varying the type number of the IC1 and IC2, various
combinations of output voltages can be obtained. If 7806 is used for IC2, we will get 6V instead of
Notes:
46
The LED D1 acts as a power ON indicator.
This unit consists of a transistors (BC109) operating as a switch, relays and a DC motor.
3.3.1 Transistor
This is a three terminal, three layer device formed by adding a second p or n region to a p-n
junction diode. With two n-regions and one p-region, two junctions are formed and it is known as
an NPN transistor. The common emitter configuration for an NPN transistor is generally used in
NPN
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. 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.
47
Figure 3.4: 5VDC Coil Relay
Relays are switches and thus terminologies applied to switches are also applied to relays. A relay
switches one or more poles, each of whose contacts can be thrown by energizing the coil in one
of three ways.
NO contacts connect the circuit when the relay is activated; the circuit is disconnected
NC contacts disconnect the circuit when the relay is activated; the circuit is connected
CO or double-throw (DT), contacts control two circuits: one normally-open contact and
A contact relay switches one or more poles each of whose contacts can be thrown by
energizing the coil in three ways namely; normally open(NO), normally closed(NC) or change
over(CO). Just like manual switches the relay switch part is available in various configurations.
Double pole, double throw (DPDT) configuration is most common configuration. DPDT means
that the relay separately controls two switches that work together. Both switches have a
SPST – Single Pole Single Throw. This relay configuring has four terminals. Two of the
SPDT – Single Pole Double Throw. This configuring has five terminals. One of the
48
terminals is a common terminal which connects to either of the two others.
DPST ( Double Pole Single Throw):- This relay configuring has six terminals. It is
A simple example of relay switching unit (application) where a 12VDC circuit can be used
Whenever a relay is driven from a circuit that has delicate components such as integrated
circuits or transistors, a diode is always included across the relay coil to prevent the relay from
49
The working of the relay for various test conditions is tabulated below
Soil moisture sensor was interfaced to the arduino through a digital a PCB drive. The PCB
drive has a digital potentiometer. The digipot is used to alter the sensitivity of the sensor when
connected in digital mode. The out of the PCB drive has four connections pins as shown in the
table below.
Sign Connect
The analogue configuration was selected as its more stable compared to the digital
configuration. The PCB drive pin A0 was connected to the arduino analog pin A0.
50
Figure 3.5.1: Connection to arduino board
The output of the sensor to the arduino analog pin A0 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
V cc
I ou t=
{S oil R e si s tan c e v a lue( R S )}
To affect display a 16x2 Liquid Crystal Display (LCD) was chosen. LCD pins D4, D5,
D6 and D7 were used as data lines in a 4 bit mode configuration. These pins were connected to
arduino pins 5, 4, 3 and 2 respectively. Pin 15(A) was connected to Vcc and pin 16 (K) was
connected to GND. These pins (A and K) are for the LEDs integrated on the LCD circuit board.
LCD’s pin E (Enable) was connected to digital pin 11 on the arduino board. Pin RS (Register
Select) on the LCD was connected to arduino digital pin 12. R/W pin of the LCD was connected to
51
GND (ground). The figure below shows the LCD-microcontroller interface.
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 5VDC. To interface the two units a 5VDC relay (SLT73-
5D-1Z) was used as the isolation unit. The microcontroller was connected to the relay via an NPN
transistor (2N4123). To protect the transistor; while turning it on, a resistor was used. The resistor
limits the current flowing through the transistor. As was the case with LEDs ohms law was used as
shown below.
( 5−0.7 ) V
Rmin = = 107.5
40 mA
A resistor of 470𝛺 was selected and thus the current through the transistor was limited to;
I = 4.3V / 470𝛺 = 9.12 mA
To protect the microcontroller from back e.m.f during switching a diode was connected
52
Figure 3.7 Relay interfacing of arduino to the 230VAC pump
Proteus allows engineers to run interactive simulations of real designs for circuit simulation.
It has a range of simulator models for popular micro-controllers and a set of animated models for
related peripheral devices such as LED and LCD displays, keypads and more. It is possible to
simulate complete micro-controller systems and thus to develop the software for them without
It has simulated our hardware model using the software Proteus ISIS. The simulator models
such as Atmega328, LED, LCD display, Switches, pot, Relay, Resistors, Transistor and sources
3.8.2 Programming
53
The Arduino Uno can be programmed with the Arduino IDE software. The Arduino
microcontroller is an easy to use yet powerful single board computer that has gained considerable
traction in the hobby and professional market. The Arduino is open-source, which means hardware
is reasonably priced and development software is free. The Arduino Uno board features an Atmel
ATmega328 microcontroller operating at 5 V with 2 Kb of RAM, 32Kb of flash memory for storing
programs and 1 Kb of EEPROM for storing parameters. The clock speed is 16 MHz, which
translates to about executing about 300,000 lines of C source code per second. The board has 14
digital I/O pins and 6 analog input pins. There is a USB connector for talking to the host computer
and a DC power jack for connecting an external 6-20 V power source, for example a 9 V battery,
when running a program while not connected to the host computer. Headers are provided for
programming the Arduino will be familiar. If you do not know C, no need to worry as only a few
commands are needed to perform useful functions. An important feature of the Arduino is that you
can create a control program on the host PC, download it to the Arduino and it will run
automatically. Remove the USB cable connection to the PC, and the program will still run from the
top each time you push the reset button. Remove the battery and put the Arduino board in a closet
for six months. When you reconnect the battery, the last program you stored will run. This means
that you connect the board to the host PC to develop and debug your program, but once that is done,
54
START
Initialize Processor
Is Soil WET?
Yes
No
Is Tank Dry? Is Tank Full?
No Yes No Yes
55
CHAPTER FOUR
56
TESTS, RESULTS AND DISCUSSION
4.0 Introduction
This chapter deals with the description of tests performed on the various sections of the
overall system and their corresponding results as well as the result of the overall system. In order to
verify the correct functionality of the system, each component had to be tested individually. To
achieve the effective testing of these various components, the following tools were used:
Digital Multimeter
Sensor Probes
Designing the PBC board, mounting the component and soldering them
The testing was done on each and every components/sections that make up the circuit to ensure
proper and satisfactory operation of the safe lock. The debugging was done using the Arduino Uno
and Proteus LAB simulation software; Each and every section of the code was debugged properly
to ensure proper functionality thus a step debugging was done. This is a facility in the Arduino Uno
and Proteus LAB simulation software that enables you step into program and at the same Time
57
The system consists of Soil Moisture Sensor, a PIC Microcontroller and a Relay interface
board. The irrigation system consists of lanes through which each segment of the land is flooded
and the flooding is controlled using valves as shown in the Figure 5. There is also a motor pump
The power supply unit of +5V and +12V were tested for the output voltage under no-load
Under no-load, the voltage of the +5V supply section was measured to be 4.95V while that
of the +12V supply was measured to be 11.94V. At full- load, the respective voltages were
58
V NL V FL
V .R 100 %
V NL
Where,
From the results obtained above, the performance of the power supply is satisfactory.
By varying the resistance (700 kΩ) in the potential divider circuit as a representation for the
dry/wet condition of the sample soil, the circuit was tested and the results are tabulated below:
S/N Soil Moisture level Output of the sensor circuit Output of the main pump
(in Volts) controlling circuit (in Volts)
1 Below lower level 2.375 0
59
4.3.2 The working of the relay for various test conditions is tabulated below
S/N Voltage Soil condition Q Amplifier Relay Relay 'NO' Water pump
output reference contact operation
range
(digital) pin voltage
1 > 5V Excess wet 0 1 1 open OFF
The VWC Of sand soil, red soil and black soils were calculated. The raw data collected
from the soil moisture sensor was recorded as shown in table 4.4.3. The soil was measured in equal
amount of 250gramms. Water was added in the soils in steps and the sensor values recorded.
3 Sensor
Soil water content (cm )
Loam soil Sand soil
Reading Red soil
The data obtained from the sensor reading and recorded in table 3.1 was used to plot a graph
60
Figure 4.3.3: Graph of Soil Condition
Comment:
The SMS (YL-69) used is a resistance sensor type. Its output is the resistance in the soil
between the two SMS probes. The obtained graph is an exponential one. The value of the soil
To come up with the results the three soils were dried using a frying pan until all the moisture
content was lost. 250 grams was measured for the red soil, black soil and the sand soil. Water was
added in steps of 25cm3 and sensor value recorded. The value of soil sensor at dry soil was almost
equal for the three soils at 1021, 1022, 1020 for black soil, sand soil and red soil respectively. On
adding 50cm3 the resistance value reduced drastically to the range of 500. On adding more water
the resistance value kept reducing. At around 100cm3 of water the reduction on the soil resistance
61
stated reducing at a much lower rate. This is because at this point the soil is now becoming
saturated with water and thus adding more water has a small effect on the soil resistance. The
sensor was calibrated and three states defined. The states are soggy, moist and dry. When the dry
state was achieved the control unit (micro controller) switched the water pump on via a relay
circuit. The three states were indicated using three different LEDs and an LCD. The LCD also
indicated when the pump was running. The control circuit and the sensor circuit were powered
using a 9V alkaline battery which was connected via a voltage regulator with an output of 5V.
4.4 Discussion
In this design, not all benchmark elements have been fully studied and tested. This was
mostly due to time constraints. However, the following observations were made:
i. The installation of the automated irrigation system is very simple. The layout of the
should be provided to the user as well as a chart of the water needs of common
houseplants and a list of compatible soil types. The pipe network should also be easy to
set up. A tank and a compatible pipe may be included or recommended by the manufacturer.
More elaborate work may be required to connect the valve to the water mains.
ii. Water savings have not been studied for the system as a whole. Nevertheless, the
performance of the geotextile and of the moisture probe has been demonstrated by previous
iii. An experiment showed that it is difficult to maintain a constant soil moisture level with only
human feedback. In the short periods over which this system has been tested, virtually no
human intervention was required. The user must only verify that the system is operational
and that the water tank, if used, is not empty. On the other hand, there is no way to inform
the user of emergencies such as overflow, empty tank, component failure, etc.
62
iv. Further testing should be done in a real home or greenhouse environment to assess the
reliability and durability of the system. These tests should also be prolonged to determine
the significance of the savings in water and labour. Furthermore, all measurements and tests
were done on a very limited collection of plants of a single species. Different plants have
different water requirements and are unequally resistant to deficiencies in the water supply.
v. All the components were selected to achieve some degree of power efficiency. All the
electronic components consume less than 400mW on a constant basis. The probe consumes
a maximum of 41mW, but only for one minute per 5:20-hour duty cycle; in average, it
should require less than a milliwatt. The valve is the element that uses the most power
(8.41W maximum, 26mW average). On average, the whole system should require less than
vi. Regular maintenance of the irrigation system is not required, except to refill the water tank
(if used), to clean the geotextile, pipes and valve, and to replace parts when broken. Most
63
CHAPTER FIVE
5.0 Introduction
The entire system will act as a crop and garden insurance system, as it will protect the crops
by shielding it from untimely rain, hail stones, and temperature, thereby helping the farmers to get
optimum cultivation. Also, it will help to make proper use of water, as the soil moisture level differs
from crops to crops and this will be taken care of by the soil moisture sensor. As the entire system
will be powered by solar energy which will be stored in the rechargeable batteries, one need not
think of the electricity consumption, as life of solar panel which is available these days is 25 years.
5.1 Summary
The basic concept of a soil moisture sensor system is to place a sensor in a representative
part of the lawn and allowing the sensor to “sense” if there is sufficient moisture in the soil for the
grass. If there is sufficient moisture, then the sensor will prevent the sprinkler system from
activating and applying water. However, if it senses that the soil is dry, it allows irrigation to take
place. The following information is to help explain in simple terms, the different types of soil
moisture sensors that are available and how they work. Also included is a short summary report of a
The Microcontroller based irrigation system monitors and controls all the activities of drip
irrigation system efficiently. The moisture of the soil and the temperature of the surroundings will
be measured and water is supplied to the crop accordingly which prevents water clogging. This
system saves water because the water is directly fed to the root and the quality of the crop gets
improved. It also helps in time saving, removal of human error in adjusting available soil moisture
64
5.2 Conclusion
MICROCONTROLLER” has been designed and tested successfully. It has been developed by
integrated features of all the hardware components used. Presence of every module has been
reasoned out and placed carefully, thus contributing to the best working of the unit. Thus, the
Automatic Soil Moisture Sensor Irrigation System Using Microcontroller has been designed and
tested successfully. 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 IC (Microcontroller) which
triggers the Water Pump to turn ON and supply the water to respective plant using the Rotating
Platform/Sprinkler. 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
5.3 Recommendation
ii. An automated irrigation was successfully designed and assembled. It serves to reduce
the consumption of water used, the human monitoring time and the labour associated with
standard methods.
iii. Integrating a technology which can be used, such that whenever the water tank and reservoir
is finished, it trigger the LED and alarm indicating “Empty” regarding the status of the
pump.
65
iv. The system can also be controlled automatically or manually.
v. The system can be integrated with temperature and humidity sensors to monitor the weather
vi. This design uses a timed feedback control to measure the soil moisture and turn on the
vii. Such a system can be manufactured at a relatively low cost using simple
electronic parts. The soil moisture probe is the most expensive component.
viii. It can be installed easily in a home environment and requires little resources.
ix. The design is still in a prototype stage. More tests need to be conducted before the
improvements can be made to make the system more versatile, customizable, and user-
friendly.
66
REFERENCE
A. Khriji et al, and B. Karuppanan, “Remote Sensing and Control for Establishing and
Maintaining Digital Irrigation”, International Journal of Advanced Information
Technology, Vol. 2, No.1, pp.11-25, February 2012.
Christos “Maximizing Water Use Efficiency of Pearl Millet by Water and Drip Irrigation
Management” Natural Resources Dept., Ins. of African Research and Studies, Cairo
Univ., Egypt.., published in the 2nd International Conf. on Water Resources & Arid
Environment (2014).
Farid e-tal Irrigation System Based on Wireless Network”, International Conference on Control and
Automation, ICCA, 2010, pp.2120-2125.
J.S. Awati and V.S. Patil, “Automatic Irrigation Control by Using Wireless Sensor Networks”,
Journal of Exclusive Management Science, Vol. 1, Issue 6, pp. 1-7, June 2012.
M. Yildirim and M. Demirel, “An Automated Drip Irrigation System Based on Soil Electrical
Conductivity”, The Philippine Agricultural Scientist, Vol. 94, No. 4, p.343-349,
December, 2011.
M.A. Mazidi, R.D. McKinlay and D. Causey, PIC “Microcontroller and Embedded Systems: Using
Assembly and C for PIC18”, Pearson Education Inc., Upper Saddle River, New Jersey,
2008.
Mohamed Said Abdall El Marazky, Fawzi Said Mohammad and Hussein Mohamed Al-Ghobari.,
“Evaluation of Soil Moisture Sensors under Intelligent Irrigation Systems for
Economical Crops in Arid Regions”, American Journal of Agricultural and Biological
Sciences 6 (2): 287-300, 2011ISSN 1557-4989.
S. Singh, and N. Sharma, “Research Paper on Drip Irrigation Management Using Wireless
Sensors”, International Journal of Computer Networks and Wireless Communications,
Vol. 2, No. 4, pp.461-464, August 2012.
67
Tahar Boutraa, Abdellah Akhkha, Abdulkhaliq Alshuaibi, Ragheid Atta; “Evaluation of the
effectiveness of an automated irrigation system using wheat crops.” AGRICULTURE
AND BIOLOGY JOURNAL OF NORTH AMERICA; ISSN Print: 2151-7517, ISSN
Online: 2151-7525,doi:10.5251/abjna.2011.2.1.80.88
Rafael Muñoz-Carpena and Michael D. Dukes., “Automatic Irrigation Based on Soil Moisture for
Vegetable Crops” Published in 2nd international conferrance on Irrigation And
Drainage/ May 12-15./ #AE354.
Ashok & K.Ashok,; “ Microcontroller based drip irrigation system”, published in technical paper in
www. Engineers.com on April 30th, 2010.
Xin et al, Herbert Bryan, and Waldemar Klassen., “Automatic soil moisture based drip irrigation
for improving tomato production.” Proc. Fla. State. Hort. Soc. 116:80-85,2013
68
APPENDIX A
Source Code
#include<LiquidCrystal.h>
#include <SoftwareSerial.h>
// LCD CONNECT (RS, E, D4, D5, D6, D7) AND RW, D3-D0 CONECT TO GND
LiquidCrystal lcd(11, 10, 8, 7, 6, 5);
const int PUMP = 13;
const int VALVE = 12;
int alarm = 1;
//ECHO AND TRIGGER PINS
const int reserviorPin= A0;
const int moisturePin= A3;
const int overheadPin = A5;
//INITIAL SETUPS
void setup()
{
pinMode(alarm, OUTPUT);
pinMode(VALVE, OUTPUT); // SET VALVE PIN AS OUTPUT
pinMode(PUMP, OUTPUT); // SET PUMP PIN AS OUTPUT
digitalWrite(alarm, LOW);
digitalWrite(VALVE, LOW);
digitalWrite(PUMP, LOW);
lcd.begin(16, 2); // 16X2 LCD TYPE
lcd.clear(); // CLEAR ALL LCD CONTENT
lcd.setCursor(0,0); // SET CHARACTER FROM COLM_4 AND LINE_1 (COLM_4 TO
COLM_15)
lcd.print("Microcontroller");
lcd.setCursor(0,1); // SET CHARACTER FROM COLM_0 AND LINE_2
69
lcd.print("Irrigation System");
delay(5000);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("By: Adamu Muh'd");
lcd.setCursor(0,1);
lcd.print("PGS/15-16/2579");
delay(5000);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Supervised By:");
lcd.setCursor(0,1);
lcd.print("Engr. Musa Idi");
delay(5000);
}
void loop() {
float moisture = analogRead(moisturePin);
float moistureLevel = (300*moisture)/1024;
float overhead = analogRead(overheadPin);
float overheadLevel = (300*overhead)/1024;
float reservior = analogRead(reserviorPin);
float reserviorLevel = (300*reservior)/1024;
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Moist.=");
lcd.print(moistureLevel,0);
lcd.print("% ");
lcd.setCursor(0,1);
70
lcd.print("Res=");
lcd.print(reserviorLevel,0);
lcd.print("% ");
lcd.print("Tnk=");
lcd.print(overheadLevel,0);
lcd.print("% ");
delay(1000);
//all low
if (moistureLevel <= 20 && overheadLevel >=30){
digitalWrite(VALVE, HIGH);
delay(10); // wait for a second
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Low Moisture");
lcd.setCursor(0,1);
lcd.print("VALVE is ON");
delay(1000);
}
digitalWrite(PUMP, HIGH);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Low Overhead");
71
lcd.setCursor(0,1);
lcd.print("PUMP is ON");
delay(1000);
digitalWrite(PUMP, LOW);
digitalWrite(alarm, HIGH);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Low Reservior");
lcd.setCursor(0,1);
lcd.print("Alarm is ON");
delay(500);
digitalWrite(alarm, LOW);
delay(500);
digitalWrite(PUMP, LOW);
delay(50);
digitalWrite(alarm, LOW);
delay(50);
72
APPENDIX B
73
Side View of the Complete System
74