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

Bahir Dar University

Bahir Dar Institute of Technology


Faculty of Electrical and computer Engineering
Final Thesis
On:
Design and Implementation of GSM Based Automatic Irrigation System
Running on Solar Power
By:
1. Desalegn Demil………………………….….0500833
2. Mulusew Ayalew……………………………0502087
3. Sileshi Bekele……………………………….0502424
4. Solomon Sinetibeb……………………….….0502467

Advisor: Mrs.Betelhem Dereje


A final Thesis submitted to the Faculty of Electrical and Computer Engineering at Bahir
Dar Institute of Technology, Bahir Dar University, in partial fulfillment of the
requirements for BSc degree in Electrical Engineering (Power and control stream).

June, 2017
Bahir Dar, Ethiopia
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

DECLARATION

We, the undersigned, declare that this thesis‟s is our original work, and this project work
has not been presented for a project in this or any other universities, and all sources of
materials that used for this project work are fully acknowledged.
Name Signature
Desalegn Demil………………………….............................__________
Mulusew Ayalew ……………...........................................__________
Sileshi Bekele………………………………....................... __________
Solomon Sinetibeb………………………….......................__________
Date of submission: __________
This thesis has been submitted for examination with our approval as a university advisor.
Project advisor Signature
Betelhem Dereje ____________

Bahir Dar University 2017G.C


i
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

ACKNOWLEDGMENT

Starting from blessing the lord, we would like to express our deep gratitude and
appreciation to all those guys gone multiply our effort to complete this project. We place
on record and warmly acknowledge the continuous encouragement, invaluable
supervoloision, timely suggestions and inspired guidance offered by our adviser Mrs.
Betelhem Dereje for the successful completion of this project.

Last but not the least we express our sincere thanks to our entire department staff who has
patiently extended all sorts of help for accomplishing this undertaking.

Finally, we must acknowledge with due respect the constant supports and patience of our
parents.

Bahir Dar University 2017G.C


ii
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

Table of Contents
DECLARATION .......................................................................................................................i

ACKNOWLEDGMENT ......................................................................................................... ii

LIST OF FIGURES ................................................................................................................ vi

LIST OF TABLES ................................................................................................................ vii

LIST OF ACRONYMS ....................................................................................................... viii

ABSTRACT............................................................................................................................ ix

CHAPTER ONE .......................................................................................................................1

INTRODUCTION ....................................................................................................................1

1.1. Background....................................................................................................................1

1.2. Statement of the Problem .............................................................................................2

1.3. Objective of the Project ................................................................................................3

1.3.1. General Objective: .................................................................................................3

1.3.2. Specific Objectives: ...............................................................................................3

1.4. Methodology for the Project.........................................................................................3

1.5. Significance of the Project............................................................................................4

1.6. Scope of the Project ......................................................................................................4

1.7. Organization of the Project ...........................................................................................5

CHAPTER TWO ......................................................................................................................6

LITERATURE REVIEW ........................................................................................................6

CHAPTER THREE ..................................................................................................................8

SYSTEM COMPONENTS AND OPERATION ...................................................................8

3.1. Sensors ...........................................................................................................................8

3.1.1. Soil Moisture Sensors ............................................................................................8

3.1.2. Level Sensor .........................................................................................................10

Bahir Dar University 2017G.C


iii
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

3.1.3. Humidity Sensor ..................................................................................................11

3.2. Diode ............................................................................................................................11

3.3. Voltage Regulator .......................................................................................................12

3.4. Relay ............................................................................................................................12

3.5. Liquid Crystal Display (LCD)....................................................................................13

3.6. Solar PV Panel ............................................................................................................14

3.7. Solar Battery ................................................................................................................16

3.8. Arduino ........................................................................................................................16

3.8.1. Arduino Mega 2560 .............................................................................................17

3.9. Pump Motor .................................................................................................................18

3.10. GSM Module .............................................................................................................19

3.11. Transistor ...................................................................................................................20

3.12. Resistors.....................................................................................................................21

CHAPTER FOURE ................................................................................................................22

SYSTEM DESIGN AND ANALYSIS .................................................................................22

4.1 Overall System Block Diagram...................................................................................22

4.2 Types of Irrigation .......................................................................................................22

4.2.1 Ditch Irrigation......................................................................................................22

4.2.2 Terrace Irrigation ..................................................................................................22

4.2.3 Sprinkler irrigation................................................................................................23

4.2.4 Drip Irrigation .......................................................................................................23

4.3. System design ..............................................................................................................29

4.3.1. Water pump connection to the Arduino .............................................................29

4.3.2. LED design...........................................................................................................30

4.3.3. LCD Interface with Arduino ...............................................................................31

Bahir Dar University 2017G.C


iv
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

4.3.4. Solar power design ..............................................................................................32

4.2.5. Software Design ...................................................................................................34

CHAPTER FIVE ....................................................................................................................36

RESULTS AND DISCUSSION............................................................................................36

CHAPTER SIX.......................................................................................................................43

CONCLUSION AND RECOMMENDATION FOR FUTURE WORK ...........................43

6.1. Conclusion ...................................................................................................................43

6.2. Recommendations .......................................................................................................43

REFERENCE .........................................................................................................................44

APPENDICES ........................................................................................................................46

Bahir Dar University 2017G.C


v
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

LIST OF FIGURES

Figure.3. 1: YL-69 soil moisture sensor .................................................................................8


Figure.3. 2: Float operated voltage potential divider for water level measurement..........10
Figure.3. 3: DHT11 Humidity sensor....................................................................................11
Figure.3. 4: Diode ...................................................................................................................12
Figure.3. 5: Relay ...................................................................................................................12
Figure.3. 6: Single Pole Double Throw Relay ......................................................................13
Figure.3. 7: Liquid Crystal Display (LCD)...........................................................................14
Figure.3. 8: Cell, arrays, and modules ..................................................................................14
Figure.3. 9: Solar PV Panel ...................................................................................................16
Figure.3. 10: Arduino Mega 2560 .........................................................................................17
Figure.3. 11: Pump Motor ......................................................................................................19
Figure.3. 12: GSM Module ....................................................................................................20
Figure.3. 13: Transistor (PNP)...............................................................................................20
Figure4. 1: Block diagram representation of overall system ...............................................22
Figure4. 2: Schematic Drip System .......................................................................................25
Figure4. 3: Layout of the drip irrigation system ...................................................................26
Figure4. 4: Relay interfacing of arduino to the 12V DC pump ...........................................30
Figure4. 5: LEDs Connection to arduino board ...................................................................30
Figure4. 6: LCD connection to arduino board ......................................................................31
Figure4. 7: Program Flow Chart ............................................................................................35
Figure5. 1: Simulation result at normal water content condition ........................................36
Figure5. 2: GSM Simulation result at soil soggy and tanker full condition ......................37
Figure5. 3: Simulation result at soil dry and tanker full condition......................................37
Figure5. 4: GSM Simulation result at soil dry and tanker full condition ..........................38
Figure5. 5: Simulation result at soil dry and tanker empty condition .................................38
Figure5. 6: GSM Simulation result at soil dry, tanker empty and motor off condition .....39
Figure5. 7: Simulation result at soil dry, tanker empty and high humidity condition .......39
Figure5. 8: Final hardware assembly ....................................................................................42

Bahir Dar University 2017G.C


vi
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

LIST OF TABLES

Table3. 1: YL-69 soil moisture sensor specification..............................................................9


Table3. 2: Sensor values for different soil ..............................................................................9
Table4. 1: Discharge of Each Line ........................................................................................27
Table4. 2: Selection of Pipe Diameters .................................................................................28
Table4. 3: Yearly average of monthly solar radiation for Bahir Dar solar radiation .........32
Table4. 4: Daily energy for the equipment we used.............................................................32
Table4. 5: PV module specification ......................................................................................33
Table4. 6: Solar battery specification ....................................................................................34

Bahir Dar University 2017G.C


vii
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

LIST OF ACRONYMS

AC ……………………………………Alternating current
ADC ………………………………… Analog to digital converter
AWWS………………………………..Automated Wireless Watering System
BJT ……………………………………Bipolar junction transistor
D……………………………………….Distance
DC …………………………………….Direct current
GDP……………………………………Growth domestic product
GSM …………………………………..Global System for mobile
H……………………………………….Humidity
LCD ……………………………………Liquid Crystal Display
LED …………………………………....Light emitting diode
MC ……………………………………..Microcontroller
NC ………………………………………Normally Closed
NO ……………………………………….Normally Open
NTC………………………………………Negative temperature coefficient
PEROM ………………………………….Programmable and erasable read only memory
PV………………………………………..photo voltaic
RAM ……………………………………..Random access memory
RX ………………………………………..Receiver
SMS ………………………………………Short message service
TX ………………………………………..Transmitter
UART ………………………………........Universal Asynchronous Receiver/Transmitter
V…………………………………….……voltage
VSM ……………………………………..Virtual system modeling
VWC………………………………………Volumetric water content

Bahir Dar University 2017G.C


viii
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

ABSTRACT

This project deals about GSM based automatic solar water pump in the irrigational
agriculture. Previously for many years Ethiopian farmers uses much human efforts for
irrigation. Today Ethiopian farmer‟s uses Diesel irrigation pumps for this purpose. But
farmers are facing lots of problems while operating the irrigation pumps. The major
problems faced by the farmers are physical effort and inconvenience, operation cost of
diesel and takes long time.

To reduce those problems GSM based automatic irrigation system running on solar
power is implemented. This will increase yields, improve crop quality, and most
importantly reduce operation cost and working time fore farmers.

The project focuses on detecting the moisture level of the soil using moisture level
sensor. While the moisture level is below the required, automatically the Arduino will
command the GSM and send sms to the owner to announce the field condition and also
the Arduino gives high output to the relay coil of the pump motor. The level sensor
integrated to Arduino in order to prevents the dry running of the motor and humidity
sensor also integrated with Arduino in order prevents soil soggy. A DC solar pump motor
is used for this irrigation purpose.

In General, this system reduces the cost required for lobar, fuel and waste of time
required for irrigation and increases quality of productivity our country and improving
the GDP of it.

Bahir Dar University 2017G.C


ix
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

CHAPTER ONE

INTRODUCTION

Irrigation can be defined as human manipulation of the hydrologic cycle to improve


seasonal crop production and quality throughout the year. Now days, water shortage is
becoming one of the biggest problem in the world. Many different methods are developed
for conservation of water. We need water in each and every field. In our day to day life
also water is essential. Water is considered to be basic need of human. Water is needed
for everyone human beings, animals, plants, etc. Agriculture is one of the fields where
water is required in tremendous quantity.

1.1. Background
Irrigation is the artificial application of water to plants for their growth and maturity.
Irrigation water is supplied to supplement the water available from rainfall and the
contribution of soil moisture from ground water. Major part of our expenditure is spent
on agriculture alone and in spite of that we not getting required output. Previously for
many years Ethiopian farmers uses much human efforts for irrigation. Today Ethiopian
farmer‟s uses Diesel irrigation pumps are for this purpose. But farmers are facing lots of
problems while operating the irrigation pumps. The major problems faced by the farmers
are;
 Physical effort and inconvenience
 Operation cost of diesel
 Also long time
For the future Our project is aims to reduce the physical efforts faced by the farmers as it
allows the farmers to remotely check to see that there is diesel, water level inside the tank
or gorge, flow rate of water and to automatically turn the pump on and off, and announce
the field condition thought a mobile phone to the user. Goal of the project is to develop
irrigation system by continuously monitoring the availability of electricity to operate the
pump, water level in the reservoir through which the pump drags water, pressure of the
water flowing out of pump. Whenever the failure in the system occurs such as pump
stops watering due to cutting down of electricity or there is lack of water inside the

Bahir Dar University 2017G.C


1
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

reservoir or pump drags water with low pressure, then the controller automatically sends
an alert message to the authorized person by using GSM module. After the person
receives a message he can take action on the water pump according to his requirement.

1.2. Statement of the Problem

Irrigation of plants usually a very time consuming activity; to be done in reasonable short
time a lots of human labor should be involved. Traditionally, all the steps of the
irrigational activities are executed by human labor. Using technologies the number of
worker or the time required for irrigation is reduced. Water has been used excessively for
irrigation, traditionally. The plant/crop is watered beyond its needs, which result massive
wastage of the limited water resource. It also limits the farm to be cultivated using the
available water resource.

For rural areas far from the electric grid, the customary means of pumping irrigation
water are diesel or petrol pumps. These have the double drawback of requiring much and
expensive maintenance and depending on a regular supply of fuel, so that they cannot be
operated unattended. Especially in remote areas of developing countries with inadequate
spare parts and maintenance structures, diesel and petrol pumps are often inoperable for
several days. The resultant lack of water can seriously damage crops, reducing yields and
income. Hence using, conventional pumping system possess an economic risk to farmers.
Moreover, the noise and exhaust from such pumps impact on the environment. The
pollution of ground water and soil by diesel fuel and lubricants is no rare occurrence.
Solar photovoltaic (PV) systems can be an attractive complementary energy source
deployed alongside diesel pumps in areas with plenty of sunshine and where the cost to
run power lines is high.

This project aims at automating irrigation systems using GSM based automatic irrigation
system running on solar power to improve on water management. This will increase
yields, improve crop quality, and most importantly conserve water thus saving money.

Bahir Dar University 2017G.C


2
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

1.3. Objective of the Project

1.3.1. General Objective:

To “Design and implement GSM based automatic irrigation system running on solar
power”

1.3.2. Specific Objectives:

 To design driver circuit


 To selecting motor rating
 To design moisture, humidity and level sensing circuit
 To adjust the above sensors parameter
 To study different types of type of irrigation system
 To analyse moisture contents for different types of soil
 To develop the flowchart for controller
 Construct schematic diagram and simulate the overall system using proteus
professional
 To implement the system in prototype

1.4. Methodology for the Project

Firstly a number of literatures related to this problem area were investigated and then
valuable data had been gathered and analyzed there.
Then after we made a block diagram to represent the „GSM Based Automatic Irrigation
System Running on Solar Power’ based up on the way we analyzed and figure out to do it
like.
Arduino selection criteria are:
 Availability of Arduino
 Easy to reset and program using for our specific purpose
 Input/output voltage specification
 Cheap price
Moisture and level sensors selection criteria
 Availability of sensors
 Cheap price
Bahir Dar University 2017G.C
3
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

 Input/output characteristics
 Easy to use
As soon as we know the input/output voltage and current characteristics of all devices
from the mathematical modeling, selection of the other remaining materials will be done
based on their specifications calculated before. Those devices are:
 LED diode
 Transistor
 Resistor
 Design of solar battery size and solar pan ale
The project will be achieved through the use of world national instrument software
(Proteus professional in our case) the overall circuit diagram will make up and run to
check the result. The procedure we follow will looks like as follows:
 Designing the general skeleton diagram of the system.
 Examine external and internal factors that will affect the whole system operation
and analyze components specification.
 Select the required components for the system based on the result of the above
analysis.
 Design the circuit diagram of the system using the selected components.
 Constructing the circuit on the simulation software and simulate it.
 Implement the prototype of the project
Finally, the output of the simulation data and the output result of prototype are analyzed
with respect to achieving the objective of the project.

1.5. Significance of the Project

This will increase yields of crop, improve crop quality, and most importantly conserve
water thus saving money. Also it saves the time of farmers that wastes for irrigation and
labor forces required for irrigation also reduced. Additionally it saves the money that
wastes for the fuel.

1.6. Scope of the Project

The scope of this project entails the design and implementation of GSM based automatic
irrigation system running on solar power depending on the soil moisture content.
Bahir Dar University 2017G.C
4
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

Moisture sensor will be the input of the arduino microcontroller and a solar water pump
will be the output of the arduino. A level sensor as the input of arduino is used for the
protection of the motor. Also humidity sensors used for preventing soil soggy.

For the realization of our project simulation, arduino, moister sensors, level sensors,
LCD, relay, pump motor, resister, humidity sensors, transistor and GSM module are
involved on the circuit diagram. The output of this project is demonstrating one way of
solving the farmers‟ problem in irrigation system.

1.7. Organization of the Project

This project document consists of six chapters followed by references and appendix. The
first chapter is an introduction part that contains background of the area which assures
that a number of works are required in this area, contribution of the project and the scope
of the project. The statement of problem and objective of our project, design and
implementation of GSM based automatic irrigation system running on solar power have
been explained in this chapter.

Chapter two contains a review of different literature like books, journals, websites; etc.
related to GSM based automatic irrigation system running on solar power problem and
operation.

A number of system component and their operation have been introduced in chapter
three. This system component includes solar panel, resister, LED diode, voltage
regulator, relay, transistor, humidity sensor, level sensor, moisture sensor, Arduino
platform, liquid crystal display, and GSM module.

The fourth chapter consists of the design and analysis of different circuits.

The fifth chapter explains simulation results of the project. It includes the interpretation
and discussion of GSM based automatic control the irrigation system.
Finally the last chapter concludes what has been done and recommends certain remaining
works to be included by future workers in the related area.

Bahir Dar University 2017G.C


5
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

CHAPTER TWO

LITERATURE REVIEW

Veena Divya, k, AyushAkhouri [1] “A Real time implementation of a GSM based


Automated Irrigation Control System using drip Irrigation Methology”deal on GSM
based irrigation control system, which could give the facilities of maintaining uniform
environmental conditions. for this, a software stack called android is used for mobile
devices that include an operating system, middleware and key applications.

Ventkata Naga Rohit Gunturi (2013) builds a controller based automatic plant irrigation
system. The main aim of the project was to provide automatic irrigation to the plants with
a system that operates with less manpower. This in turn helps to save funds and water.
The user programmed the 8051 microcontroller as giving the interrupt signal to the
sprinkler, and this was used to control the entire system. Temperature sensor and
humidity sensor were connected to internal ports of the microcontroller via a comparator,
and whenever there is a change in temperature and humidity of the surroundings these
sensors senses the change in temperature and humidity and gives an interrupt signal to the
micro-controller and thus the sprinkler is activated. [2]

S.Harishankar, R.Satish etal, [7], proposed the solar energy from solar panels is utilized
to pump water automatically from bore well directly into a ground level storage tank.
Apart from the conventional techniques, the system makes efficient use of renewable
energy.

M. Guerbaoui, a.ed-dahhak [3]” GSM based automated drip irrigation system” we they
proposed a system contribution to the development of greenhouse production in
Morocco. The proposed solution involves the development of an integrated system for
automate the drip fertilizing irrigation in green house. The solution adopted involves a
data acquisition card controlled by PC. The irrigation is provided by a hydraulic circuit
based on an electric pump. Water needs are evaluated by measuring soil water status by
soil humidity sensor.

Chetana A.Kestikar, Rutuja M.Bhavsar [8], builds Automated Wireless Watering System
(AWWS) the system is facilitated by providing PC control and mobile control for

Bahir Dar University 2017G.C


6
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

monitoring and controlling watering activity. Also the wiring mess is reduced. The
system is divided into two parts, one is PC side and the other is the hardware components
on the site/field. The GUI interface is developed on NET programming language.
Programming is used to send message to GSM modem on site through PC and vice versa.
Two modes of operation are there manual and automatic. In manual mode system will
work as traditional watering system. The user decides when to start and stop watering. In
automatic mode, once the system is started, the user need not pay attention to stopping of
the system. The watering will be decided according to moisture levels. . The user can
initiate the system by sending message to the microcontroller via the GSM modem
through the program. This message being received by the microcontroller will initiate
moisture sensors, water level indicator. Again the power supply used to run the whole
system is conventional and thus less economical.

Basava Sidramappa Dhanne, Sachin Kedare, and etal, [9], proposed Modern Solar
Powered Irrigation System by Using ARM the design methodology of automated
irrigation system in this paper includes the components, solar panel, arm processor,
sensors, dc motors, relay, and battery. The main stress is laid on generating power supply
by harnessing solar energy and reducing power consumption for irrigation purpose. The
dc current is generated by using solar panel. This dc power is stored in a battery so as to
operate the pump even during the night time. The farmer sends a text message via mobile
phone so as to check the level of water storage tank and condition of moisture in filed. If
task is complete then GSM module sends the message, “watering is complete” to the
user. If the task is not complete then GSM module sends the message, ”watering not
completed, lagging resources” also the state of charge of battery is sensed by charge
sensor and send to ARM processor. The good thing about this work is that it also gives
information about watering resources i.e. whether resources are lagging or not.

Bahir Dar University 2017G.C


7
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

CHAPTER THREE

SYSTEM COMPONENTS AND OPERATION

3.1. Sensors

A sensor is a device that detects and measures a physical quantity from the environment
and converts it into an electronic signal. The physical quantity could be moisture,
temperature, motion and light or any other physical phenomenon. Examples of sensors
include: oxygen sensors, temperature sensors, infrared sensors, humidly sensors, level
sensors, soil moisture sensors and motion detection sensors. The output of the sensors is
usually current or voltage signal. This project requires soil moisture sensor, level sensor
and humidity sensor.

3.1.1. Soil Moisture Sensors

A soil moisture sensor is a device that measures the volumetric water content (VWC) of
soil. There are different types of moisture sensors. But for our projects we select YL-69
Moisture Sensor

YL-69 Moisture Sensor; this is an Electrical resistance Sensor. The sensor is made up of
two electrodes. This soil moisture sensor reads the moisture content around it. A current
is passed across the electrodes through the soil and the resistance to the current in the soil
determines the soil moisture. If the soil has more water resistance will be low and thus
more current will pass through. On the other hand when the soil moisture is low the
sensor module outputs a high level of resistance. This sensor has both digital and
analogue outputs. Digital output is simple to use but is not as accurate as the analogue
output.

Figure.3. 1: YL-69 soil moisture sensor

Bahir Dar University 2017G.C


8
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

Table3. 1: YL-69 soil moisture sensor 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

The calibrations of moisture sensor depend on Volumetric Water Content of soil. 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 below. The soil was
measured in equal amount of 250gramms. Water was added in the soils in steps and the
sensor values recorded.
Table3. 2: Sensor values for different soil

Bahir Dar University 2017G.C


9
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

3.1.2. Level Sensor

Level sensors detect the level of substances that flow, in the form of liquids, slurries and
powders. Such substances that flow to become essentially level in their containers (or
other physical boundaries) due to gravity. The substance that measured can be inside a
container or can be in its natural form (e.g. a river or a lake). The level measurement that
can be either continuous or point values. The continuous level sensors can measure level
within a specified range and determine the exact amount of substance in a particular
place, while the point-level sensors indicate whether the substance is above or below
sensing point. Latter detect levels that are excessively high or low. There are different
types of level sensors. But for this project the floating level sensor is selected. When
liquid level rises in the tank, the float which is generally a hollow ball is raised. Its arm
causes the wiper to move over the potential divider whose output terminals are connected
to a voltmeter. As a float rises, the potential divider included in the output circuit gives an
increased output voltage. Therefore, the output voltage V is proportional to the liquid
level. The output of the potential divider terminal is taken in to the arduino
microcontroller. It is accurate, simple installation, critical altering & easy to setup [16].

Figure.3. 2: Float operated voltage potential divider for water level measurement
Bahir Dar University 2017G.C
10
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

3.1.3. Humidity Sensor

DHT11 Temperature & Humidity Sensor highlights a temperature & stickiness sensor
complex with a calibrated digital signal input. This sensor incorporates a resistive-sort
moistness estimation segment and a NTC temperature estimation part, and associate with
a high- execution 8-bit microcontroller, offering fabulous quality, quick reaction, hostile
to obstruction capacity and expense adequacy.

Figure.3. 3: DHT11 Humidity sensor


Each DHT11 component will be entirely balanced in the lab that will be to a great degree
exact on dampness adjustment. The adjustment coefficients are put away as projects in
the OTP memory, which are utilized by the sensor's inner sign distinguishing
methodology. The single-wire serial interface makes framework reconciliation brisk and
simple. Its little size, low power utilization and up-to-20 meter signal transmission
settling on it the best decision for different applications, including those most requesting
ones. The part is 3-pin single line pin bundle. It is advantageous to associate and unique
bundles can be given in response to popular demand. Technical specification
Measurement Range 20-90% RH 0-50℃ Humidity Accuracy ± 5% RH Temperature
Accuracy ± 2℃

3.2. Diode

A diode plays an important role in the system circuit project. It allows the battery voltage
to flow into the circuit only in one direction (called the diode's forward bias direction)
and also block any back electromotive force that may damage the driver transistors. The
diode is a two-terminal electronic component with a nonlinear current–voltage
characteristic. This unidirectional behavior of diode is called rectification and it is used in
this project to protect the back emf of motor.
Bahir Dar University 2017G.C
11
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

Figure.3. 4: Diode

3.3. Voltage Regulator


A voltage regulator is designed to automatically maintain a constant voltage level. If the
output voltage is too low (perhaps due to input voltage reducing or load current
increasing), the regulation element is commanded, up to a point, to produce a higher
output voltage by dropping less of the input voltage (for linear series regulators and buck
switching regulators), or to draw input current for longer Periods (boost-type switching
regulators); if the output voltage is too high, the regulation element will normally be
commanded to produce a lower voltage.

3.4. Relay

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.

Figure.3. 5: Relay
Coil Relay: 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

Bahir Dar University 2017G.C


12
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

most common configuration. DPDT means that the relay separately controls two switches
that work together. Both switches have a normally NO and NC contacts. Other
commonly used configurations are:
Single Pole Single Throw (SPST): This relay configuring has four terminals. Two of the
terminals are coil terminals.
SPDT – Single Pole Double Throw. This configuring has five terminals. One of the
terminals is a common terminal which connects to either of the two others.

Figure.3. 6: Single Pole Double Throw Relay


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 damaging the circuit.

3.5. Liquid Crystal Display (LCD)

Liquid Crystal Display (LCD) screen is an electronic display module. An LCD has a
wide range of applications in electronics. The most basic and commonly used LCD in
circuits is the 16x2 display. LCDs are commonly preferred in display because they are
cheap, easy to program and can display a wide range of characters and animations. A
16x2 LCD have two display lines each capable of displaying 16 characters. This LCD has
Command and Data registers. The command register stores command instructions given
to the LCD while the Data register stores the data to be displayed by the LCD.

Bahir Dar University 2017G.C


13
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

Figure.3. 7: Liquid Crystal Display (LCD)


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

3.6. Solar PV Panel


Solar or photovoltaic (PV) cells are made of semiconducting materials that can convert
sunlight directly into electricity. When sunlight strikes the cells, it dislodges and liberates
electrons within the material which then move to produce a direct electrical current
(DC).This is done without any moving parts.

Figure.3. 8: cell, arrays, and modules


The diagram shows how individual cells make up a module. An array consists of sets of
modules.

PV cells are combined to make modules that are encased in glass or clear plastic.
Modules can be aggregated together to make an array that is sized to the specific
application. Most commercial PV cells are made from silicon, and come in three general
types those are monocrystalline, multicrystalline, and amorphous. Single crystal or

Bahir Dar University 2017G.C


14
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

monocrystalline cells are made using silicon wafers cut from a single, cylindrical crystal
of silicon. This type of PV cell is the most efficient, with approximately 15% efficiency
(defined as the fraction of the sun‟s energy that is converted to electrical power), but is
also one of the most expensive to produce.

Multicrystalline or polycrystalline silicon cells are made by casting molten silicon into
ingots, which crystallize into a solid block of inter grown crystals. The size of the crystals
is determined mostly by the rate at which the ingot is cooled, with larger grains made by
slower cooling. Cells are then cut from the ingot. Multicrystalline cells are less expensive
to produce than monocrystalline ones, due to the simpler manufacturing process and
lower purity requirements for the starting material. However, they are slightly less
efficient, with average efficiencies of around 12%.

Amorphous silicon PV cells are made from a thin layer of non-crystalline silicon placed
on a rigid or flexible substrate. They are relatively easy to manufacture and are less
expensive than monocrystalline and polycrystalline PV, but are less efficient with
efficiencies of around 6%. Their low cost makes them the best choice where high
efficiency and space are not important.

Photovoltaic modules have been around for more than 50 years and have been mass-
produced since 1979. Due to improvements in manufacturing technology and economies
of scale, the cost of PV has fallen by 90% since the early 1970s. PV modules are now
readily available in a wide range of sizes from several well established companies. The
reliability of PV is such that 20- to 25-year power warranties are typical, with life
expectancies beyond 30 years.

Bahir Dar University 2017G.C


15
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

Figure.3. 9: Solar PV Panel

3.7. Solar Battery

Batteries chemically store electrical energy in renewable energy systems.


Fundamental concepts to be taken for the selection of appropriate solar batteries are:
 Nominal capacity
 State of charge
 Charge or discharge regime
 Efficiency
 Life time
 In addition; dimensions, weight, inner resistance, capacity under different
discharging rate, capacity under different temperature rate, capacity under
different store time, maximum charging current and limiting charging voltage to
be considered.

3.8. Arduino

Arduino is an open-source electronics design platform. The Arduino board is specially


designed for programming and prototyping with Atmel microcontrollers. An arduino
interacts with physical world via sensors. Using arduino, electric equipment can be
designed to respond to change in physical elements like temperature, humidity, heat or
even light. This is the automation process. For example, reading a humidity sensor and
Bahir Dar University 2017G.C
16
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

turning on and off of an automatic irrigation system. There are several types of arduino
boards. But, for our projects we use Arduino Mega 2560.

3.8.1. Arduino Mega 2560

The Arduino Mega 2560 is a microcontroller board based on the ATmega2560 . It has 54
digital input/output pins (of which 14 can be used as PWM outputs), 16 analog inputs, 4
UARTs (hardware serial ports), a 16 MHz crystal oscillator, a USB connection, a power
jack, an ICSP header, and a reset button. It contains everything needed to support the
microcontroller; simply connect it to a computer with a USB cable or power it with a AC-
to-DC adapter or battery to get started.

Figure.3. 10: Arduino Mega 2560


ATmega2560 is more preferred due to the following features:
 Have three 8-bit bi-directional I/O ports with internal pull-up resistors
 4K Bytes EEPROM
 256K Bytes of flash memory
 8K Bytes of RAM
 2 instruction words/vector
 channel 10-bit successive approximation ADC
 Programmable Serial USART
 54 Digital I/O Lines (of which 14 provide PWM output)
 16 Analog input pins

Bahir Dar University 2017G.C


17
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

 40mA DC current per I/O pins


 50mA DC current for 3.3V pins
 Operating voltage 5V
 16 MHz clock speed
The power pins of Arduino Mega 2560 are as follows:
VIN: The input voltage to the Arduino board when it's using an external power source.
5V: The regulated power supply used to power the microcontroller and other components
on the board. This can come either from VIN via an on-board regulator, or be supplied by
USB or another regulated 5V supply.
3.3V: A 3.3 volt supply generated by the on-board regulator. Maximum current draw is
50 mA.
GND: Ground pins.
LED: There is a built-in LED connected to digital pin 13. When the pin is HIGH value,
the LED is on, when the pin is LOW, it's off.
AREF: Reference voltage for the analog inputs.
Reset: Bring this line LOW to reset the microcontroller.
Digital pins: Each of the 54 digital pins on the Mega can be used as an input or output,
using pin Mode (), digital Write (), and digital Read () functions. They operate at 5 volts.
Each pin can provide or receive a maximum of 40 mA.
Analog inputs pins: The Mega2560 has 16 analog inputs, each of which provides 10 bits
of resolution (i.e. 1024 different values). By default they measure from ground to 5 volts.

3.9. Pump Motor

This project uses 12V DC Pump Motors rated at a horsepower of 2 HP and speeds up to
5,000RPM. It consists of one inlet and one outlet for maintaining the level in a tank by
pumping water. In this project the motor is controlled by an arduino microcontroller line
of port 7 through a relay which is operates with +12V.

Bahir Dar University 2017G.C


18
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

Figure.3. 11: Pump Motor

3.10. GSM Module

A GSM modem is a device which can be either a mobile phone or a modem device which
can be used to make a computer or any other processor communicate over a network. A
GSM modem requires a SIM card to be operated and operates over a network range
subscribed by the network operator. It can be connected to a computer through serial,
USB or Bluetooth connection.

A GSM modem can also be a standard GSM mobile phone with the appropriate cable and
software driver to connect to a serial port or USB port on your computer. GSM modem is
usually preferable to a GSM mobile phone. The GSM modem has wide range of
applications in

Transaction terminals, supply chain management, security applications, weather stations


and GPRS mode remote data logging.

Here the RX and TX pins are used for the serial communication with the microcontroller.
There are various AT commands to check the signal strength and connection and SIM
status etc. Here the Hyper Terminal is used to initially interface with the computer to
check the module. It also has an antenna to receive the GSM signal from the user‟s
phone. The basic AT commands are loaded into the program of microcontroller for it to
interface with the GSM module. The figure given below shows a GSM module. It has a
communication that can be programmed using AT commands. The signal names for the
GSM modem communication port include the following; audio input and output pins (for
connecting external hands free audio devices), mute control pin, flash programming
signal pins, external power pins, and receiver and transmitter pins.
Bahir Dar University 2017G.C
19
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

Figure.3. 12: GSM Module

3.11. Transistor

A transistor is a negative-positive-negative (NPN) or positive–negative-positive junction


semiconductor device that is used for many purposes. Together with other electronic
components, such as resistors, coils, and capacitors, it can be used as the active
component for switches and amplifiers. Like all other NPN transistors, this type has an
emitter terminal, a base or control terminal, and a collector terminal. In a typical
configuration, the current flowing from the base to the emitter controls the collector
current. A short vertical line, which is the base, can indicate the transistor schematic for
an NPN transistor, and the emitter, which is a diagonal line connecting to the base, is an
arrowhead pointing away from the base.

Figure.3. 13: Transistor (PNP)

Bahir Dar University 2017G.C


20
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

The output of arduino cannot be connected directly to the relay since the controller pins
does not have the capability to withstand the current. So we will introduce an interfacing
driver circuit.

3.12. Resistors

A resistor is a linear component that implements electrical resistance as a circuit element.


It is used to bias the switching transistor that energizes the relay. It also used to limit the
amount of current flowing. The current through a resistor is in direct proportion to the
voltage across the resistor's terminals. Thus, the ratio of the voltage applied across a
resistor's terminals to the intensity of current through the resistor is called resistance

Bahir Dar University 2017G.C


21
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

CHAPTER FOURE

SYSTEM DESIGN AND ANALYSIS

4.1 Overall System Block Diagram

Before we start designing each parts of the system, a block diagram representing this
GSM based automatic irrigation controller running on solar power has been made based
up on the way we analyzed and figure out to do it like. The block diagram of overall
system is shown in figure [4.1] below

Figure4. 1: Block diagram representation of overall system

4.2 Types of Irrigation

4.2.1 Ditch Irrigation

This is one of the earliest irrigation methods to be used. Ditches/trenches are dug out and
crops are planted along the ditches in rows.

4.2.2 Terrace Irrigation

The land is shaped into steps. Crops are planted on the flat areas. Water flows down the
steps watering each of the flat areas. This method is both time and labor intensive in
building the terraces.

Bahir Dar University 2017G.C


22
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

4.2.3 Sprinkler irrigation

This method uses overhead sprinklers. Each sprinkler irrigates a given area. During
installation care should be taken to avoid over or under watering some areas. If poorly
installed a lot of water is wasted via runoff.

4.2.4 Drip Irrigation

In this irrigation system:


 Water is applied directly to the crop i e. entire field is not wetted. Water is
conserved
 Weeds are controlled because only the places getting water can grow
weeds.
 There is a low pressure system.
 There is a slow rate of water application somewhat matching the
consumptive use.
 There is reduced evaporation, only potential transpiration is considered.
 There is no need for a drainage system

Information required for the proposed areas are:


Soil Properties: Texture and structure, moisture equilibrium points, water holding
capacity, agricultural potential, land classification, kinds of crops that the soil can
support.

Water Sources: water source availability, hydrologic data of the area, water quantity,
water quality and possible engineering works are necessary to obtain water.
Weather data: Temperature, relative humidity, sunshine hours and rainfall. Information
about crops grown in the area: Check preference by people, market potential, and
adaptability to area, water demand, growth schedules and planting periods.

Topography (e.g. slopes): This helps to determine the layout of the irrigation system and
method of irrigation water application suited for the area.
History of People and Irrigation in the area: Check past exposure of people to irrigation
and land tenure and level of possible re-settlement or otherwise.

Bahir Dar University 2017G.C


23
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

4.2.4 .1 Design of Drip Irrigation System

The general principles of design, the design procedure and system layout of drip system
is that the spacing of emitters is much less than that of sprinklers and that water must be
filtered and treated to prevent blockage of emitters.
 Not all areas are irrigated. In design, therefore, the area irrigated is only the
accounted area
 The irrigation interval is advisable to be daily as the application rate is small.
 Emitter spacing is not a function of wind
Emitter discharge may be described by:
q=khx
where:
q is the emitter discharge.
K is constant for each emitter.
h is pressure head at which the emitter operates and x is the exponent characterized by the
flow regime.
Sizing of drip laterals:
 The diameter of the lateral should be selected so that the difference in discharge
between emitters operating simultaneously will not exceed 10 %.
 This allowable variation is same as for sprinkler irrigation laterals already
discussed.
 To stay within this 10 % variation in flow, the head difference between emitters
should not exceed 10 to 15 % of the average operating head for long-path or 20
% for turbulent flow emitters.
 The maximum difference in pressure is the head loss between the control point at
the inlet and the pressure at the emitter farthest from the inlet.
 The inlet is usually at the manifold where the pressure is regulated.
 The manifold is a line to which the drip laterals are connected.
 For minimum cost, on a level area 55 % of the allowable head loss should be
allocated to the lateral and 45 % to the manifold.
 The Friction Loss for Mains and Sub-mains can be computed by DarcyWeisbach
equation.
Bahir Dar University 2017G.C
24
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

 F should be used to compute head loss for laterals and manifolds with multiple
outlets, by multiplying a suitable F factor.
 For minimum cost, on a level area 55 % of the allowable head loss should
be allocated to the lateral and 45 % to the manifold.
 The Friction Loss for Mains and Sub-mains can be computed from Darcy
Weisbach equation for smooth pipes in trickle systems when combined with
the Blasius equation for friction factor.
 The equation is:
Hf = K L Q 1.75 D – 4.75………………………………………….(4.1)
Where: Hf is the friction loss in m;
K is constant = 7.89 x 105 for S.I. units for water at 20 ° C;
L is the pipe length in m;
Q is the total pipe flow in l/s; and D is the internal diameter of pipe in mm.

Figure4. 2: Schematic Drip System

Design a drip Irrigation System for a fully matured orchard with the layout below .
We Assume that:
The field topography: level
 Maximum time for irrigation: 12 hours per day
 Allowable pressure variation in the emitters: 15%,
 Water source: Well
 Maximum suction lift at the well = 10m
Bahir Dar University 2017G.C
25
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

 Peak ET rate: 7mm/day


 the matured orchard shades 70% of the area;
 Drip irrigation efficiency is 80%.
 Sections 1 and 2 are to be irrigated at the same time and alternated with sections
3 and 4.
 Each tree is to be supplied by 4 emitters.
 Efficiency of pump=70%
 Efficiency of motor=70%
 Assuming that the half lateral contains 12 tree

Figure4. 3: Layout of the drip irrigation system

Bahir Dar University 2017G.C


26
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

1st we calculate ETt


ETt = ET x P/85……………………………………………. (4.2)
where: ETt is the average evaporation rate for crops
ET is the conventional evaporation rate for crops = 7 mm/day
P is the percentage of total areas shaded by the crop = 70%
Using equation (4.2) ETt = 7 mm/day x 70/85 = 5.8 mm/day.
2nd we determine the discharge for each tree
Assuming that tree spacing is 4m x 7m
Discharge for each tree with a spacing of 4 m x 7 m
qt = 4 m x 7 m x 5.8 x 10-3 m/day = 0.162 m3/day
qt = 0.00675 m3/hr (24 hr. day)
For 12 hour working day the discharge is
Discharge required (qt) = 0.00675 x 24/12 = 0.0135 m3/hr = 0.00375 L/s
With an application efficiency of 80%, the required discharge per tree
is: 0.00375/0.8 = 0.0047 L/s
3rdThe discharge per emitter, with 4 emitters per tree is then
= 0.0047/4 = 0.00118 L/s = 0.0012 L/s
4th Discharge of Each Line
Table4. 1: Discharge of Each Line

Line No. of trees No. of emitters Required Discharge(L/S)


Half Lateral 12 48 0.0576
Half main fold 168 672 0.8060
Sub main, A to 336 1344 1.6130
section 1
Main, A to pump 672 2688 3.2260

From manufacturer‟s catalogue, select emitter. Say a medium long-path emitter with
average discharge of 0.0012 L/s, k= 0.000073 and x= 0.63 is selected. Substituting in
equation q=k*hx, the average operating pressure of the emitter can be found by first
transforming the characteristic equation into logarithmic form and solving for h:
log q=logk +xlogh………………………………………….(4.3)
Logh= (logq-logk)/x=8.9m
Bahir Dar University 2017G.C
27
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

Ha is then found as 8.9 m. This is the average operating head.


5th Total allowable pressure loss:-of 15 % of Ha in both the Lateral and Manifold =8.9
x 0.15 =1.3 of which, 0.55 x 1.3 = 0.7 m is allowed for Lateral and 0.45 x 1.3 = 0.6 is
allowed for the main fold.
6th Compute the friction loss in each of the lines by Darcy-Weisbach equation by
selecting a diameter to keep the loss within the allowable limits of 0.7 m and 0.6 m,
already determined.

7th Compute the Friction Loss in each of the Lines using equation (4.1).
Selection of Pipe Diameters:

Table4. 2: Selection of Pipe Diameters

Line Q Pipe Diameter Pipe Diameter L(m) Hf‟(m)


OD(mm) ID(mm)
Half Lateral 0.0576 16 12.70 46 0.51
Half Main fold 0.8060 32 31.75 45.5 0.68
Sub-main, A to 1.6130 50 44.45 243 6.59
section 1
Main, A to 3.2260 55 50.80 60 2.90
pump

8th Pressure Head at Manifold Inlet and at inlet of lateral


The pressure head at inlet of lateral:
HL = Ha + 0.75hfL ± 0.5HzL………………………………….. (4.4)
Where,
Ha = the operating pressure head of emitter
hfL = friction head loss in lateral
HzL = elevation head difference along the lateral
The pressure head at inlet of manifold:
Hm = HL + 0.75hfm ± 0.5Hzm………………………………… (4.5)
Where,
hfm = friction head loss in manifold
Hzm = elevation head difference along manifold

Bahir Dar University 2017G.C


28
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

Therefore, using the eq (4.4) HL= 8.9 + 0.75x 0.51 = 9.28 m.


And, from eq (4.5) Hm = 9.28+0.75x0.68 = 9.79 m.
9th finally determine the Size of pump:
Total Head for Pump = Manifold Pressure = 9.79 m + Pressure loss at sub-main = 6.59 m
+Pressure loss at Main = 2.90 m + suction lift = 10 m + Net Positive Suction head for
pump = 3 m (assumed) + pressure head loss at control head = 3m = 35.28 m
i.e. The pump must deliver 2.03 L/s at a head of about 36 m.
Hp = (Qs x H)/(75xEpxEm) = (2.03x37.28)/(75x0.7x0.7) = 1.95 hp or we can
approximate to the highest power 2hp.

4.3. System design

4.3.1. Water pump connection to the Arduino

To implement the final bit of the automated irrigation system an electric motor (12V DC)
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 5V DC. To interface the control units with
the motor a 5V DC relay was used as the isolation unit. The microcontroller was
connected to the relay via an NPN transistor .To protect the transistor; while turning it on,
a resistor was used. The resistor limits the current flowing through the transistor. Ohms
law was utilized to determine the size (in ohms) of the protection resistor to be interfaced
with the transistor. From Ohms law
Rmin = (5 – 0.7) V / 40mA = 107.5𝛺

To achieve current limitation a resistance value higher than the calculated Rmin was
selected. A resistor of 470𝛺 was selected and thus the current through the transistor was
limited to:

4.3V / 470𝛺 =9.12 mA


To protect the microcontroller from back emf during switching a diode was connected
across the relay. The connection diagram is as shown below.

Bahir Dar University 2017G.C


29
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

Figure4. 4: Relay interfacing of arduino to the 12V DC pump

4.3.2. LED design

To indicate the three states of the soil three LEDs were used. The three LEDs lit up
depending on the soil moisture content. When the soil was dry LED connected to arduino
digital pin 10 was lit. For moist soil (required condition) LED connected to arduino
digital pin 9 lit up and for soggy soil LED connected to arduino digital pin 8 lit up. The
three LEDs were connected to the microcontroller as shown below.

Figure4. 5: LEDs Connection to arduino board

Ohms law was utilized to determine the size (in ohms) of the protection resistor to be
interfaced with the LEDs. From Ohms law
Voltage (V) = {Current (I)}*{Resistance(R)} …………………. (4.6)
Where as in our case;

Bahir Dar University 2017G.C


30
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

V= Vcc (5V) -Voltage drop across LED (selected LEDs has 2.0V)
ILED= LED current (20mA)
VLED = LED Voltage drop (2V)
R= minimum required resistance value
Therefore, Rmin = {(5-2) V}/ {20mA} =150 Ω
To achieve current limitation a resistance value higher than the calculated Rmin was
selected. A 220Ω resistor was used and thus only 13.6mA current was allowed to pass
through each of the three LEDs.

4.3.3. LCD Interface with Arduino

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. 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 GND (ground). The figure below shows the LCD
microcontroller interface.

Figure4. 6: LCD connection to arduino board

Bahir Dar University 2017G.C


31
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

4.3.4. Solar power design

4.3.4.1. Solar PV system sizing

Different size of PV modules will produce different amount of power. To find out the
sizing of PV module, the total peak watt produced needs. The peak watt (WP) depends on
the size of PV module and climate of site location.
Average Daily Solar Radiations: To provide long-term average monthly solar radiation
data, an average of monthly solar radiation is calculated for each year over a period of
typically 5 years.
The first step to design PV system is collect the data
Table4. 3: Yearly average of monthly solar radiation for Bahir Dar solar radiation

Month J F M A M J J A S O N D Annual
2011 9.2 10.5 8.0 9.4 8.2 7.1 5.2 4.3 6.1 9.1 9.3 9.9 8.1
2012 8.9 10.1 9.2 9.8 8.2 5.6 4.5 4.0 5.9 9.5 8.6 9.9 7.9
2013 9.7 9.8 9.3 7.9 8.6 6.6 4.2 2.9 6.8 8.3 9.7 9.9 8.0
2014 9.8 9.7 9.1 9.9 77 6.9 4.9 4.7 6.0 8.6 9.7 9.7 7.9
2015 9.6 10.0 9.8 9.9 84 6.8 7.1 5.6 6.7 8.8 9.4 8.3
2016 9.7 10.1 9.1 9.1 7.1 74 4.5 4.6 6.4 8.7 7.7

The second step to the design PV system is to estimate the load


Taking the sample of loads for the materials used in our prototype
Table4. 4: Daily energy for the equipment we used
Electrical Appliance Power(w) No. Required Hour/Day Energy consumed(wh/d)
DC pump motor 152 1 6 780
LED lamp 6 3 7 126
DH11 sensor 3.5 1 24 84
Level sensor 5.83 1 24 140
Soil moisture sensor 6.167 1 24 148
Arduino 2 1 24 48
Others 20 1 2 40
Total 173.5 1366

Bahir Dar University 2017G.C


32
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

The 3rd Calculate the total load:


Therefore, total energy needed = energy consumed per day *1.25= 1. 7075kwh/ day
Taking power factor of 0.7

Then the total PV panels energy needed= = =2.

277kwh/ day
The4th Determine the size of PV panel.

Peak watt of PV panel= = = 295. 7Wp

Therefore, the available size of PV panel in the market is 300w.


Table4. 5: PV module specification

Module type YL300P-35B


Rated maximum power 300W
Rated voltage 35.8V
Rated current 8.37A
Maximum rated fuse 15A
Open circuit voltage 45.2V
Short circuit current 8.86A

This is a monocrystalline type panel, since monocrystalline panels have:


 Higher efficiency rates
 Made out of the highest grade silicon
 It is space efficient compared to polycrystalline of the same rate
 It has long life span

4.3.4. 2.Determine the battery size

The size of inverter= … (4.7)

But total power requirement is given by power rating multiplied by the required quantity.
Total power requirement = (152×1+6×3+3.5×1+5.833×1+6.167×1+2×1+20×1) =
185.497. Using equation (4.7) the size of inverter is

= = = 217.7Ah

Bahir Dar University 2017G.C


33
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

But the available battery size in the market is 12v, 260Ah, for 3 hours‟ autonomy
Table4. 6: solar battery specification

Size of battery 260Ah


Battery bank voltage 12V
Battery backup hour 3hr
Depth of discharge of battery 60%
Battery efficiency 85%

4.3.4.3 Determine the solar charger controller

Solar charge controller = short circuit current×1.3……………. (4.8)


But from the PV specification the short circuit current is 8.86A.
From eq (4.8) solar charge controller = 8.86A×1.3 = 11.518A
So the solar charge controller should be rated 10A at 12/24 V

4.2.5. Software Design

To be able to interpret the different states of the soil as prompted by the soil sensor the
microcontroller was programmed. The arduino integrated development environment
(IDE) was used. The idea is based on C++ and thus can be extended using C++ libraries.
Arduino programs (sketches) are cross platform, Simple, clear and at the same time
flexible for advanced programmers. The project sketch is attached at the appendices
page.

4.2.5.1. Program Pseudo code

READ sensor value


COMPARE sensor value with set threshold
IF sensor value > maximum set value
TURN-ON pump
DISPLAY soil condition on LCD
LIGHT dry soil LED
Send SMS text to user
ELSE IF sensor value < maximum set value > minimum set value
TURN-OFF pump
Bahir Dar University 2017G.C
34
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

DISPLAY soil condition on LCD


LIGHT moist soil LED
Send SMS text to user
ELSE IF sensor value < minimum set value
TURN-OFF pump
DISPLAY soil condition on LCD
LIGHT soggy soil LED
Send SMS text to use

4.2.5.2. Program flow chart

Figure4. 7: Program Flow Chart

Bahir Dar University 2017G.C


35
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

CHAPTER FIVE

RESULTS AND DISCUSSION

After have been designed successfully, the circuit were constructed based on our design
in order to simulate using selected simulation proteus software, which is based on the
process of modeling a real phenomenon with a set of mathematical formulas. It is,
essentially, a program that allows the user to observe an operation through simulation
without actually performing that operation. Proteus 8 professional assisted by Arduino
IDE have been used to simulate the whole work. Then, the simulation is compiled and the
result has been observed at different soil moisture and water level.

Case 1:-When the water content of the soil is high and the water tanker is full. The
microcontroller checks the availability of water in the soil and receives in terms of
voltage from soil moisture sensor and at the same time it checks the water level of the
tanker and gives high output through Arduino pin 6 that makes the soggy soil LED high.
This indicates the normal water content of the soil.

Figure5. 1: Simulation result at normal water content condition

Bahir Dar University 2017G.C


36
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

Figure5. 2: GSM Simulation result at soil soggy and tanker full condition
Case 2: when the soil is dry and water tanker is full. In this case the microcontroller gives
high output through Arduino pin 9 that makes the dry soil LED high and Arduino pin 7
that makes the relays connected to a pump will be energized through the transistor and
then water pump becomes ON. At this condition the pump motor starts irrigate the farm
field.

Figure5. 3: Simulation result at soil dry and tanker full condition

Bahir Dar University 2017G.C


37
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

Figure5. 4: GSM Simulation result at soil dry and tanker full condition

Case 3: when the soil is dry and water tanker is empty. In this case the microcontroller
gives high output through Arduino pin 9 that makes the dry soil LED high and low output
through Arduino pin 7 that makes water pump off. At this condition the water tanker is
empty and even if the soil dries pump motor is off to avoid dry running of the motor.

Figure5. 5: Simulation result at soil dry and tanker empty condition

Bahir Dar University 2017G.C


38
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

Figure5. 6: GSM Simulation result at soil dry, tanker empty and motor off condition
Case 4: when the soil is dry the atmospheric humidity is high and water tanker is full. In
this case the microcontroller gives high output through Arduino pin 9 that makes the dry
soil LED high and low output through Arduino pin 7 that makes water pump off. At this
condition the water tanker is full and the soil is dry even if this condition is fulfilling the
humidity sensor makes pump motor off to avoid over watering of the filed. Because high
atmospheric humidity may due to high cloud density, that seem like to rainy.

Figure5. 7: Simulation result at soil dry, tanker empty and high humidity condition
Bahir Dar University 2017G.C
39
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

The overall system results showing different conditions including the motor condition,
soil moisture content, water level of the tanker, and display message have been discussed
as shown in the table 5.1.

Table5. 1: motor, soil moisture content, water level of the tanker, and display message
conditions

Soil moisture Level Humidity Pump Display


sensor sensor Sensor Motor condition
V<300 D<300 H<300 Pump Motor off Soil soggy, less humidity and
water tanker full
300<V<700 D<300 H<300 Pump Motor off Moisture soil, less humidity and
water tanker full
V>700 D<300 H<300 Pump motor running Soil dry, less humidity and tanker
is full
V<300 300<D<700 H<300 Pump Motor off Soil soggy, less humidity and
medium water level
V<300 D<300 300<H<700 Pump Motor off Soil soggy, medium humidity and
less water level
V<300 300<D<700 300<H<700 Pump Motor off Soil soggy, medium humidity and
medium water level
V>700 300<D<700 300<H<700 Pump motor running Soil dry, medium humidity and
medium water level
300<V>700 D<300 300<H<700 Pump Motor off Moisture soil, medium humidity
and water tanker full
300<V<700 D>700 300<H<700 Pump Motor off Moisture soil, medium humidity
and empty water tanker
300<V<700 300<D<700 300<H<700 Pump Motor off Moisture soil, medium water level
and medium humidity
300<V<700 D<300 H>700 Pump Motor off Moisture soil ,water tanker full
and high humidity
V<300 D>700 H<300 Pump Motor off Soil soggy, empty water tanker
and less humidity
300<V<700 300<D<700 H<300 Pump Motor off Moisture soil, medium water level

Bahir Dar University 2017G.C


40
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

and less humidity


300<V<700 300<D<700 H>700 Pump Motor off Moisture soil , medium water level
and high humidity
V>700 D>700 H>700 Pump Motor off Soil dry, empty water tanker and
high humidity
300<V<700 D>700 H>700V Pump Motor off Moisture soil, empty water tanker
and high humidity
V<300 D>700 H>700 Pump Motor off Soil soggy, empty water tanker
and high humidity
V>700 300<D<700 H>700 Pump Motor off Soil dry, medium water level and
high humidity
V>700 D<300 H>700 Pump Motor off Soil dry , water tanker full and
high humidity
V>700 D>700 300<H<700 Pump Motor off Soil dry, empty water tanker and
medium humidity
V>700 D>700 H<300 Pump Motor off Soil dry , empty water tanker and
less humidity

Using the design and simulation data, the prototype has been implemented successfully.
After constructing, troubleshooting, and assembling the overall hardware components,
the correct functioning has been observed by using the above conditions listed on the
table. That is at low water content of the soil motor becomes on whereas either the water
Tanker is empty or the atmospheric air is high motor becomes automatically off. Besides
each conditions of the system displays on LCD and LED. The final hardware assembly is
as shown in the figure 5.8.

Bahir Dar University 2017G.C


41
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

Figure5. 8: final hardware assembly

Bahir Dar University 2017G.C


42
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

CHAPTER SIX

CONCLUSION AND RECOMMENDATION FOR FUTURE WORK

6.1. Conclusion

As shown in the work including simulation and prototype of the system, GSM based
automatic irrigation system, the motor pumps the water depending up on the filed
conditioned, LCD displays the field conditions, the led shows light about the filed
condition and the controller send message to the user through GSM module.

Once the system is going to be implemented, the cost required for lobar, fuel and waste of
time required for irrigation can be reduced. This increases quality of productivity in our
country and improving the GDP of it.

6.2. Recommendations

This project can pump water automatically depending up on the filed condition and the
controller sends message about the condition of the system but at the faulty condition
even if the controller sends message to the user the pump stops working. This causes
wastage of time for the user in order to find where is the problem as well as it reduce the
productivity. Thus we want to recommend that the project can be controlled by using the
SCAD system in order to detect the position of fault condition.

Finally, we want to recommend for future work to integrate the SCDA system with GSM
module and hydraulic valve control in order to improve effectiveness of the system.

Bahir Dar University 2017G.C


43
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

REFERENCE

[1].Veena Divyak, Ayush Akhouri, “A Real time implementation of a GSM based


Automated Irrigation Control System using drip Irrigation Methology” (Volume 4, Issue
5, May 2013).
[2].Venkata Naga Rohit Gunturi (2013), “Micro Controller Based Automatic Plant
Irrigation System”, International Journal of Advancements in Research & Technology,
Vol. Is ISSN 22-77.
[3].M. Guerbaoui, Y.Dahhak, “pc-based automated drip irrigation system” (Vol. 5 No.01
January 2013).
[4].C.Mansour, H.Melhem, “Impact the automatic control of closed circuits Raingun
irrigation system on yellow corn growth and yield” (International Journal of Advanced
Research (2013), Volume 1, Issue 10, 33-42).
[5].Rojiha, C. (2013), “Sensor Network Based Automatic Control System for Oil
Pumping Unit Management”, International Journal of Scientific and Research
Publications, Vol. 3, Iss.3. Pp. 14
[6].Massimo Banzi, Getting started with Arduino, Second Edition, Reilly Media, Inc,
2011.
[7].Chetana A.Kestikar, Rutuja M.Bhavsar, “Automated Wireless Watering System”,
International Journal of Applied Information Systems, Volume 2, Number 3, February
2012.
[8].Chetana A.Kestikar, Rutuja M.Bhavsar, “Automated Wireless Watering System”,
International Journal of Applied Information Systems, Volume 2, Number 3, February
2012.
[9].Basava Sidramappa Dhanne, Sachin Kedare, Shiva Sidramappa Dhanne, “Modern
Solar Powered Irrigation System by Using ARM”, International Journal of Research in
Engineering and Technology, Volume 3, Issue 3, May 2014.
[10].Francis Z. Karina and Alex Wambua Mwaniki, irrigation agriculture in Kenya,
Nairobi, Kenya, 2011.
[11].Allan Trevennor, Practical AVR Microcontrollers, New York, USA, Springer
Science + Business Media, 2012.

Bahir Dar University 2017G.C


44
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

[12].Clemmens, A.J. “Feedback Control for Surface Irrigation Management”, ASAE


Publication 04 -90, 1990.
[13].W. C. Dunn, “Introduction to Instrumentation Sensors, and Process Control”, British
Library Cataloguing, 2005.
[14]. Atul Kulkarni, R.N. Karekar and R.C.Aiyer, Liquid level sensor, Review of
Scientific Instruments, Volume 76, Issue 10, October.

Bahir Dar University 2017G.C


45
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

APPENDICES

Proteus- is a virtual system modeling (VSM) that combines circuit simulation, animated
components and microprocessor models to simulate the complete microcontroller based
design.

Arduino compiler: name of code compiler software. Arduino Code for the
Implementation of GSM based automatic irrigation control running on solar power.

// include the LCD library code:


#include <LiquidCrystal.h>
#include<dht.h>
Dht;
#define DHT11_PIN 8
// pins definition
Int soggyLEDPin = 6;
Int moistSoilPin = 22;
Int drysoilLEDPin = 9;
Int PumpPin = 7;
Int distance;
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
// variables
int moistureSensorValue = 0;
// int moist = 0;
void setup()
{
Serial.begin(9600); // serial initialization
pinMode(soggyLEDPin, OUTPUT); // Arduino pins initalization
pinMode(drysoilLEDPin,OUTPUT);
pinMode(moistSoilPin, OUTPUT);
pinMode(PumpPin,OUTPUT);
lcd.begin(16, 2);

Bahir Dar University 2017G.C


46
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

}
void loop()
{
moistureSensorValue = analogRead(A0); // reads the moisture sensor values
Level = analogRead(A1); // reads the moisture sensor values
int chk = DHT.read11(DHT11_PIN);
Serial.print("Humidity=");
Serial.println(DHT.humidity);
Serial.print("Level=");
Serial.println(distance);
Serial.print("Moisture=");
Serial.println (analogRead(A0));
if((moistureSensorValue < 300)&&(distance < 30)&&(DHT.humidity < 30))
{
digitalWrite(drysoilLEDPin,LOW);
digitalWrite(PumpPin,LOW);
digitalWrite(soggyLEDPin,HIGH);
digitalWrite(moistSoilPin, LOW);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Soil Soggy");
lcd.setCursor(1,1);
lcd.print("Tanker Full");
Serial.println("New Message From Arduino: Soil Soggy and Tanker Full");
}
if(((moistureSensorValue > 300)&&(moistureSensorValue < 700))&&(distance <
30)&&(DHT.humidity < 30))
{
digitalWrite(drysoilLEDPin,LOW);
digitalWrite(PumpPin,LOW);
digitalWrite(soggyLEDPin,LOW);

Bahir Dar University 2017G.C


47
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

digitalWrite(moistSoilPin, HIGH);
lcd.clear(); // system messages via LCD
lcd.setCursor(0,0);
lcd.print("Moisture Ok");
lcd.setCursor(1,1);
lcd.print("Tanker Full");
Serial.println("New Message From Arduino: Moisture Ok and Tanker Full");
}
if((moistureSensorValue > 700)&&(distance < 30)&&(DHT.humidity < 30))
{
digitalWrite(drysoilLEDPin,HIGH);
digitalWrite(soggyLEDPin,LOW);
digitalWrite(PumpPin,HIGH);
digitalWrite(moistSoilPin, LOW);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Soil Dry!");
lcd.setCursor(1,1);
lcd.print("Tanker Full");
Serial.println("New Message From Arduino:Soil Dry ,Tanker Full and Pump running");
}
if((moistureSensorValue < 300)&&((distance > 30)&&(distance <
70))&&(DHT.humidity < 30))
{
digitalWrite(drysoilLEDPin,LOW);
digitalWrite(soggyLEDPin,HIGH);
digitalWrite(moistSoilPin, LOW);
digitalWrite(PumpPin,LOW);
lcd.clear(); // system messages via LCD
lcd.setCursor(0,0);
lcd.print("Soil soggy!");

Bahir Dar University 2017G.C


48
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

lcd.setCursor(1,1);
lcd.print("Midium Tanker");
Serial.println("New Message From Arduino: Soil Soggy and Midum Water Tanker");
}
if((moistureSensorValue < 300)&&(distance > 70)&&(DHT.humidity < 30))
{
digitalWrite(drysoilLEDPin,LOW);
digitalWrite(soggyLEDPin,HIGH);
digitalWrite(PumpPin,LOW);
digitalWrite(moistSoilPin, LOW);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Moisture Ok!");
lcd.setCursor(1,1);
lcd.print(" Empty Tanker");
Serial.println("New Message From Arduino: Moisture Ok and Midum Water Tanker");
}
if((moistureSensorValue < 300)&&(distance < 30)&&((DHT.humidity >
30)&&(DHT.humidity < 70)))
{
digitalWrite(drysoilLEDPin,LOW);
digitalWrite(soggyLEDPin,HIGH);
digitalWrite(PumpPin,LOW);
digitalWrite(moistSoilPin, LOW);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Soil soggy!");
lcd.setCursor(1,1);
lcd.print("Tanker Full");
Serial.println("New Message From Arduino: Soil Dry, Midum Water Tanker and Pump
running");

Bahir Dar University 2017G.C


49
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

}
if((moistureSensorValue < 300)&&(distance < 30)&&(DHT.humidity > 70))
{
digitalWrite(drysoilLEDPin,LOW);
digitalWrite(PumpPin,LOW);
digitalWrite(soggyLEDPin,HIGH);
digitalWrite(moistSoilPin, LOW);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Soil Soggy");
lcd.setCursor(1,1);
lcd.print("Tanker Full ");
Serial.println("New Message From Arduino: Soil Soggy and Empty Full");
}
if(((moistureSensorValue > 300)&&(moistureSensorValue < 700))&&((distance >
30)&&distance < 70)&&((DHT.humidity > 30)&&(DHT.humidity < 70)))
{
digitalWrite(drysoilLEDPin,LOW);
digitalWrite(PumpPin,LOW);
digitalWrite(soggyLEDPin,LOW);
digitalWrite(moistSoilPin, HIGH);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Moistur Ok");
lcd.setCursor(1,1);
lcd.print("Midium Tanker ");
Serial.println("New Message From Arduino: Moisture Ok and Empty Tanker ");
}
if((moistureSensorValue < 300)&&((distance > 30)&&distance <
70)&&((DHT.humidity > 30)&&(DHT.humidity < 70)))
{

Bahir Dar University 2017G.C


50
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

digitalWrite(drysoilLEDPin,LOW);
digitalWrite(PumpPin,LOW);
digitalWrite(soggyLEDPin,HIGH);
digitalWrite(moistSoilPin, LOW);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Soil Soggy");
lcd.setCursor(1,1);
lcd.print("Midium Tanker ");
Serial.println("New Message From Arduino: Soil Soggy and Empty Full");
}
if((moistureSensorValue > 700)&&((distance > 30)&&(distance <
70))&&((DHT.humidity > 30)&&(DHT.humidity < 70)))
{
digitalWrite(drysoilLEDPin,HIGH);
digitalWrite(PumpPin,HIGH);
digitalWrite(soggyLEDPin,LOW);
digitalWrite(moistSoilPin, LOW);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Soil Dry");
lcd.setCursor(1,1);
lcd.print("Midium Tanker");
Serial.println("New Message From Arduino: Soil Dry, Midium Tanker ,pump runinng");
}
if(((moistureSensorValue > 300)&&(moistureSensorValue < 700))&&(distance <
30)&&((DHT.humidity > 30)&&(DHT.humidity < 70)))
{
digitalWrite(drysoilLEDPin,LOW);
digitalWrite(PumpPin,LOW);
digitalWrite(soggyLEDPin,LOW);

Bahir Dar University 2017G.C


51
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

digitalWrite(moistSoilPin, HIGH);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Moist Soil");
lcd.setCursor(1,1);
lcd.print("Tanker Full ");
Serial.println("New Message From Arduino: Moist Soil and Tanker Full");
}
if(((moistureSensorValue > 300)&&(moistureSensorValue < 700))&&(distance
>70)&&((DHT.humidity > 30)&&(DHT.humidity < 70)))
{
digitalWrite(drysoilLEDPin,LOW);
digitalWrite(PumpPin,LOW);
digitalWrite(soggyLEDPin,LOW);
digitalWrite(moistSoilPin, HIGH);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Moist Soil");
lcd.setCursor(1,1);
lcd.print("Empty Tanker ");
Serial.println("New Message From Arduino: Moist Soil and Empty tanker");
}
if(((moistureSensorValue > 300)&&(moistureSensorValue < 700))&&((distance >
30)&&(distance < 70))&&(DHT.humidity < 30))
{
digitalWrite(drysoilLEDPin,LOW);
digitalWrite(PumpPin,LOW);
digitalWrite(soggyLEDPin,LOW);
digitalWrite(moistSoilPin, HIGH);
lcd.clear();
lcd.setCursor(0,0);

Bahir Dar University 2017G.C


52
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

lcd.print("Moist Soil");
lcd.setCursor(1,1);
lcd.print("Midium Tanker ");
Serial.println("New Message From Arduino: Moist Soil and Midium Tanker");
}
if(((moistureSensorValue > 300)&&(moistureSensorValue < 700))&&((distance >
30)&&(distance < 70))&&(DHT.humidity > 70))
{
digitalWrite(drysoilLEDPin,LOW);
digitalWrite(PumpPin,LOW);
digitalWrite(soggyLEDPin,LOW);
digitalWrite(moistSoilPin, HIGH);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Moist Soil");
lcd.setCursor(1,1);
lcd.print("Midium Tanker ");
Serial.println("New Message From Arduino: moist Soil and Midium Tanker");
}
if((moistureSensorValue > 700)&&(distance > 70)&&(DHT.humidity > 70))
{
digitalWrite(drysoilLEDPin,HIGH);
digitalWrite(PumpPin,LOW);
digitalWrite(soggyLEDPin,LOW);
digitalWrite(moistSoilPin, LOW);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("SoilDry&HighHumid");
lcd.setCursor(1,1);
lcd.print("Empty Tanker ");
Serial.println("New Message From Arduino: Soil Dry and Empty Tanker");

Bahir Dar University 2017G.C


53
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

}
if(((moistureSensorValue > 300)&&(moistureSensorValue < 700))&&(distance >
70)&&(DHT.humidity > 70))
{
digitalWrite(drysoilLEDPin,LOW);
digitalWrite(PumpPin,LOW);
digitalWrite(soggyLEDPin,LOW);
digitalWrite(moistSoilPin, HIGH);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Moist Soil");
lcd.setCursor(1,1);
lcd.print("Empty Tanker ");
Serial.println("New Message From Arduino: Moist Soil and Empty Tanker");
}
if((moistureSensorValue < 300)&&(distance > 70)&&(DHT.humidity > 70))
{
digitalWrite(drysoilLEDPin,LOW);
digitalWrite(PumpPin,LOW);
digitalWrite(soggyLEDPin,HIGH);
digitalWrite(moistSoilPin, LOW);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Soil Soggy");
lcd.setCursor(1,1);
lcd.print("Empty Tanker ");
Serial.println("New Message From Arduino: Soil Soggy and Empty Tanker");
}
if((moistureSensorValue > 700)&&((distance > 30)&&(distance <
70))&&(DHT.humidity > 70))
{

Bahir Dar University 2017G.C


54
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

digitalWrite(drysoilLEDPin,HIGH);
digitalWrite(PumpPin,LOW);
digitalWrite(soggyLEDPin,LOW);
digitalWrite(moistSoilPin, LOW);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Soi,Dry&HighHumid");
lcd.setCursor(1,1);
lcd.print("Midium Tanker ");
Serial.println("New Message From Arduino: Soil Dry and Midium Tanker");
}
if((moistureSensorValue > 700)&&(distance < 30)&&(DHT.humidity > 70))
{
digitalWrite(drysoilLEDPin,HIGH);
digitalWrite(PumpPin,LOW);
digitalWrite(soggyLEDPin,LOW);
digitalWrite(moistSoilPin, LOW);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("SoilDry&HighHumi");
lcd.setCursor(1,1);
lcd.print("Tanker Full ");
Serial.println("New Message From Arduino: Soil Dry and Tnker Full");
}
if((moistureSensorValue > 700)&&(distance > 70)&&((DHT.humidity >
30)&&(DHT.humidity < 70)))
{
digitalWrite(drysoilLEDPin,HIGH);
digitalWrite(PumpPin,LOW);
digitalWrite(soggyLEDPin,LOW);
digitalWrite(moistSoilPin, LOW);

Bahir Dar University 2017G.C


55
Design and Implementation of GSM Based Automatic Irrigation System Running on Solar Power

lcd.clear();
lcd.setCursor(0,0);
lcd.print("Soil Dry");
lcd.setCursor(1,1);
lcd.print("Empty Tanker ");
Serial.println("New Message From Arduino: Soil Dry and Empty Tanker");
}
else if((moistureSensorValue > 700)&&(distance > 70)&&(DHT.humidity < 30))
{
digitalWrite(drysoilLEDPin,HIGH);
digitalWrite(PumpPin,LOW);
digitalWrite(soggyLEDPin,LOW);
digitalWrite(moistSoilPin, LOW);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Soil Dry");
lcd.setCursor(1,1);
lcd.print("Empty Tanker ");
Serial.println("New Message From Arduino: Soil Dry and Empty Tanker");
}
delay(1);
}

Bahir Dar University 2017G.C


56

You might also like