4 Erigation

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

Bahir Dar Institute of Technology

Faculty of Electrical and computer Engineering


Semester Project on:
GSM Based Automatic Irrigation System Running on Solar Power

Name Id
1. Desalegn Demil…………………………….0500833
2. Mulusew Ayalew …………………………0502087
3. Sileshi Bekele……………………………….0502424
4. Solomon Sinetibeb………………………….0502467

Name of Adviser
Submission Date Mrs. Betelhem Dereje
09/02/2017
Bahir Dar Institute of Technology

Declaration

We, the undersigned, declare that this project proposal is my 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 will be used for the project work will be fully acknowledged.

Name Signature
Desalegn Demil………………………….............................. __________

Mulusew Ayalew …………….............................................. __________

Sileshi Bekele……………………………….......................... __________

Solomon Sinetibeb………………………….......................... __________

Date of submission: __________

This project proposal has been submitted for examination with my approval as a university
advisor.
_________________________________ ____________
Project advisor Signature

Semester Project -2017 Page i


Bahir Dar Institute of Technology

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 supervision, timely suggestions and
inspired guidance offered by our adviser Mrs. Betelhem.D 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.

Semester Project -2017 Page ii


Bahir Dar Institute of Technology

Table of Contents
Declaration ............................................................................................................................................. i
Acknowledgment ..................................................................................................................................ii
List of figure.......................................................................................................................................... v
List of table ........................................................................................................................................... v
List of Acronyms .................................................................................................................................vi
Abstract ...............................................................................................................................................vii
CHAPTER ONE ................................................................................................................................... 1
INTRODUCTION ................................................................................................................................ 1
1.1. Background ................................................................................................................................ 1
1.2. Statement of the problem .......................................................................................................... 2
1.3. Objective of the project ............................................................................................................. 2
1.3.1. General objective: .............................................................................................................. 2
1.3.2. Specific objectives: ............................................................................................................ 2
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 ....................................................................................................... 4
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........................................................................................................................ 9
3.2. Diode ........................................................................................................................................ 10
3.3. Voltage Regulator ................................................................................................................... 11
3.4. Relay ........................................................................................................................................ 11
3.5. Liquid Crystal Display (LCD) ................................................................................................ 13
3.6. Solar/Photovoltaic Power ....................................................................................................... 13
3.7. Arduino .................................................................................................................................... 15

Semester Project -2017 Page iii


Bahir Dar Institute of Technology

3.7.1. Arduino Uno ..................................................................................................................... 16


3.8. Solar Water Pump ................................................................................................................... 17
3.9. GSM module............................................................................................................................ 17
3.10. Transistor ............................................................................................................................... 18
3.11. Resistors ................................................................................................................................. 19
CHAPTER 4 ....................................................................................................................................... 20
SYSTEM DESIGN AND ANALYSIS ............................................................................................. 20
4.1. Over all system block diagram ............................................................................................... 20
4.2. System design .......................................................................................................................... 20
4.2.1. Water pump connection to the Arduino ......................................................................... 20
4.2.2. LED design ....................................................................................................................... 21
3.2.3. Interface with Arduino..................................................................................................... 22
4.3. Software design ....................................................................................................................... 23
4.3.1. Program Pseudo code ...................................................................................................... 23
4.3.2. Program flow chart .......................................................................................................... 24
CHAPTER FIVE ................................................................................................................................ 25
RESULTS AND DISCUSSION ........................................................................................................ 25
CHAPTER SIX ................................................................................................................................... 30
CONCLUSION AND RECOMMENDATION FOR FUTURE WORK ....................................... 30
6.1. Conclusion ............................................................................................................................... 30
6.2. Recommendations ................................................................................................................... 30
Reference ............................................................................................................................................. 31
Appendices .......................................................................................................................................... 32

Semester Project -2017 Page iv


Bahir Dar Institute of Technology

List of figure
Figur3. 1: YL-69 Level Sensor ............................................................................................................ 8
Figur3. 2: YL-69 PCB .......................................................................................................................... 9
Figur3. 3: Float operated voltage potential divider for water level measurement .......................... 10
Figur3. 4: Diode .................................................................................................................................. 10
Figur3. 5: Relay .................................................................................................................................. 11
Figur3. 6: Inside a SPST relay ........................................................................................................... 12
Figur3. 7: Simple relay interfacing .................................................................................................... 12
Figur3. 8: LCD (16X2) ....................................................................................................................... 13
Figur3. 9: sell, module, array ............................................................................................................. 14
Figur3. 10: Amorphous, monocrystalline, polycrystalline............................................................... 15
Figur3. 11: Parts of arduino Uno ....................................................................................................... 16
Figur3. 12: At mega 328 microcontroller pin configuration ............................................................ 17
Figur3. 13: GSM Modem ................................................................................................................... 18
Figur3. 14: Transistor ......................................................................................................................... 19
Figure4. 1: Block diagram representation of overall system ........................................................... 20
Figure4. 2: Relay interfacing of arduino to the 12V DC pump ...................................................... 21
Figure4. 3: LEDs Connection to arduino board ............................................................................... 22
Figure4. 4: LCD connection to arduino board ................................................................................. 23
Figure4. 5: Program flow Diagram.................................................................................................... 24
Figure5. 1: Simulation result at normal water content condition .................................................... 25
Figure5. 2: GSM Simulation result at soil soggy and tanker full condition ................................... 26
Figure5. 3: Simulation result at soil dry and tanker full condition ................................................. 26
Figure5. 4: GSM Simulation result at soil dry and tanker full condition ........................................ 27
Figure5. 5: Simulation result at soil dry and tanker empty condition ............................................. 27
Figure5. 6: GSM Simulation result at soil dry, tanker empty and motor off condition ................. 28

List of table

Table5. 1: motor, soil moisture content, water level of the tanker, and display message
conditions…………………………………………………………………………………..……28
Table5. 2: Sensor values of different soil .......................................................................................... 29

Semester Project -2017 Page v


Bahir Dar Institute of Technology

List of Acronyms
AC ……………………………………Alternating current
ADC ………………………………… Analog to digital converter

AWWS………………………………..Automated Wireless Watering System

BJT ……………………………………Bipolar junction transistor


DC …………………………………….Direct current

GSM …………………………………..Global System for mobile

LCD ……………………………………Liquid Crystal Display


LED …………………………………....Light emitting diode

MC ……………………………………..Microcontroller

NC ………………………………………Normally Closed

NO ……………………………………….Normally Open
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

VSM ………………………………………Virtual system modeling

VWC……………………………………….Volumetric water content

Semester Project -2017 Page vi


Bahir Dar Institute of Technology

Abstract

The target of this project is to develop GSM based automatic solar watering pump in the
irrigational agriculture; where can minimize human work force and as a green or saving energy.
In this project the photovoltaic panels are used to generate electricity which is stored in
rechargeable batteries. The batteries provide power for the operation of the system. The
automatic controlling of the system uses an arduino with appropriate programmed that maintains
the moisture level of the soil. The programmed of the arduino is designed and simulated using
the proteus Software. This 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. A DC solar pump motor is used for
this irrigation purpose.

Semester Project -2017 Page vii


Bahir Dar Institute of Technology

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. Ethiopia is an agricultural country. In Ethiopia due to
uncertainty of rain river water is used to water the fields. Diesel irrigation pumps are used from
many years for this purpose. But farmers are facing lots of problems while operating the
irrigation pumps. The major problems faced by the farmers‟ are.

1. Physical effort and inconvenience


2. Operation cost of diesel
Our project is aims to reduce the physical efforts 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, all through a mobile phone. 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 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.

Semester Project -2017 Page 1


Bahir Dar Institute of Technology

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 to
water 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.

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 adjust sensor parameter


 To selecting motor rating
 To develop the flowchart for controller

Semester Project -2017 Page 2


Bahir Dar Institute of Technology

 To interface GSM module with arduino to gain the status of the switching operation of
motor
 To Construct schematic diagram and simulate the overall system using proteus
professional

1.4. Methodology for the project

Firstly we have searched and investigated a number of literatures related to this problem area and
then valuable datum 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
 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
 Relay
 Transistor
 Voltage regulator
 resistor
 Design of solar battery size and solar pan ale

Semester Project -2017 Page 3


Bahir Dar Institute of Technology

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.

Finally, we take the output of the simulation data and analyze the data 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.

1.6. Scope of the project

The scope of this project entails the design of GSM based automatic irrigation system running on
solar power depending on the soil moisture content. 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.

For the realization of our project simulation, arduino, moister sensors, level sensors, LCD and
relay, pump, resister, transistor and GSM module are involved on the circuit diagram. The output
of this project is demonstrating one way of solving the problem faced by farmers 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

Semester Project -2017 Page 4


Bahir Dar Institute of Technology

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,
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 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.

Semester Project -2017 Page 5


Bahir Dar Institute of Technology

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 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

Semester Project -2017 Page 6


Bahir Dar Institute of Technology

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.

Semester Project -2017 Page 7


Bahir Dar Institute of Technology

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, light or any other physical phenomenon. Examples of sensors include: oxygen sensors,
temperature sensors, infrared sensors, humidly sensors, soil moisture sensors and motion
detection sensors. The output of the sensors is usually charge, current or voltage. Of interest in
this paper is the soil moisture sensor and level 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.

Figur3. 1: YL-69 Level Sensor

Semester Project -2017 Page 8


Bahir Dar Institute of Technology

YL-69 soil moisture sensor has the following specifications:


Vcc power supply 3.3V or 5V
Current 35mA
Signal output voltage 0-4.2V
Digital Outputs 0 or 1
Analog Resistance (Ω)
Panel Dimension 3.0cm by 1.6cm
Probe Dimension 6.0cm by 3.0cm
GND Connected to ground
The sensor comes with a small PCB board fitted with LM393 comparator chip and a digital
potentiometer.

Figur3. 2: YL-69 PCB

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 our projects we select
floating level sensor.

Semester Project -2017 Page 9


Bahir Dar Institute of Technology

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 h. 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].

Figur3. 3: Float operated voltage potential divider for water level measurement

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 the project to

Figur3. 4: Diode

Semester Project -2017 Page 10


Bahir Dar Institute of Technology

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.

Figur3. 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 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:

 SPST – Single Pole Single Throw. This relay configuring has four terminals. Two of the
terminals are coil terminals.

Semester Project -2017 Page 11


Bahir Dar Institute of Technology

 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.

Figur3. 6: Inside a SPST relay

 DPST – Double Pole Single Throw. This relay configuring has six terminals. It is
equivalent to SPST in that it is actuated by a single coil.
A simple example of relay application is where a 9V DC circuit can be used to turn on/off a 230v
AC lamp.

Figur3. 7: Simple relay interfacing

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.

Semester Project -2017 Page 12


Bahir Dar Institute of Technology

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 programed 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.

Figur3. 8: LCD (16X2)


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/Photovoltaic Power

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.

Semester Project -2017 Page 13


Bahir Dar Institute of Technology

Figur3. 9: sell, module, array


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: monocrystalline,
multicrystalline, and amorphous. Single crystal or 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. They are identifiable as
having individual cells shaped like circles or rectangles.

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

Semester Project -2017 Page 14


Bahir Dar Institute of Technology

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.

Figur3. 10: Amorphous, monocrystalline, polycrystalline

3.8. 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.7. 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

Semester Project -2017 Page 15


Bahir Dar Institute of Technology

automation process. For example, reading a humidity sensor and turning on and off of an
automatic irrigation system. There are several types of arduino boards. But, for our projects we
use Arduino Uno.

3.7.1. Arduino Uno

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

Figur3. 11: Parts of arduino Uno


ATmega328 is more preferred due to the following features:
 Have three 8-bit bi-directional I/O ports with internal pull-up resistors
 1K Bytes EEPROM
 32K Bytes of flash memory
 2K Bytes of RAM
 2 instruction words/vector
 channel 10-bit successive approximation ADC
 Programmable Serial USART
 23 Programmable I/O Lines
 Operating Voltage 1.8 - 5.5V

Semester Project -2017 Page 16


Bahir Dar Institute of Technology

Figur3. 12: At mega 328 microcontroller pin configuration

3.8. Solar Water Pump

A DC Motor which operates with +12V by 1Amp power supply for pumping the liquid. It
consists of one inlet and one outlet for maintaining the level in a tank by pumping water. In this
work the motor controlled by an arduino microcontroller line of port 7 through a relay which is
operates with +5V.

3.9. 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

Semester Project -2017 Page 17


Bahir Dar Institute of Technology

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.

Figur3. 13: GSM Modem

3.10. 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

Semester Project -2017 Page 18


Bahir Dar Institute of Technology

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.

Figur3. 14: Transistor


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.11. 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

Semester Project -2017 Page 19


Bahir Dar Institute of Technology

CHAPTER 4

SYSTEM DESIGN AND ANALYSIS

4.1. Over all 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. System design

4.2.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

Semester Project -2017 Page 20


Bahir Dar Institute of Technology

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.

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

4.2.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.

Semester Project -2017 Page 21


Bahir Dar Institute of Technology

Figure4. 3: 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)}


Where as in our case;
V= Vcc (5V) -Voltage drop across LED (selected LEDs has 2.0V)
ILED= LED current (20mA)
VLED = LED Voltage drop (red in colour) (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.

3.2.3. 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.

Semester Project -2017 Page 22


Bahir Dar Institute of Technology

Figure4. 4: LCD connection to arduino board

4.3. 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.3.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 DISPLAY soil condition on LCD

LIGHT moist soil LED

Send SMS text to user

ELSE IF sensor value < minimum set value

Semester Project -2017 Page 23


Bahir Dar Institute of Technology

TURN-OFF pump
DISPLAY soil condition on LCD

LIGHT soggy soil LED

Send SMS text to use

4.3.2. Program flow chart

Figure4. 5: Program flow Diagram

Semester Project -2017 Page 24


Bahir Dar Institute of Technology

CHAPTER FIVE

RESULTS AND DISCUSSION

After have been designed successfully, we have constructed the circuit based on our design in
order to simulate using selected simulation 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 8 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

Semester Project -2017 Page 25


Bahir Dar Institute of Technology

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 10 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

Semester Project -2017 Page 26


Bahir Dar Institute of Technology

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 10 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

Semester Project -2017 Page 27


Bahir Dar Institute of Technology

Figure5. 6: GSM Simulation result at soil dry, tanker empty and motor off condition

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 sensor Pump Motor condition Display


sensor

V<300 D<300 Pump Motor off Soil soggy and water tanker full

300<V<700 D<300 Pump Motor off Moisture soil and water tanker full

V>700 D<300 Pump motor running Soil dry and tanker is full

V<300 300<D<700 Pump Motor off Soil soggy and medium water level

300<V<700 300<D<700 Pump Motor off Moisture soil and medium water level

V>700 300<D<700 Pump motor running Soil dry and medium water level
V<300 D>700 Pump Motor off Soil soggy and empty water tanker

300<V>700 D>700 Pump Motor off Moisture soil and empty water tanker

V>700 D>700 Pump Motor off Soil dry and empty water tanker

Semester Project -2017 Page 28


Bahir Dar Institute of Technology

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
3.2. The soil was measured in equal amount of 250gramms. Water was added in the soils in
steps and the sensor values recorded.

Table5. 2: Sensor values of different soil

Soil water content(cm3 ) Sensor Reading

Loam Sand Read soil


soil soil

0 1021 1022 1020

50 580 546 781

75 360 243 568

100 237 234 295

125 203 184 274

150 191 180 235

175 180 170 220

Semester Project -2017 Page 29


Bahir Dar Institute of Technology

CHAPTER SIX

CONCLUSION AND RECOMMENDATION FOR FUTURE WORK

6.1. Conclusion

The simulation to monitor moisture levels in the soil was implemented. The system used to
switch on/off the watering system/pump according to set soil moisture levels. The control unit of
the simulation was implemented using a microcontroller on arduino platform while the sensing
the soil moisture using (sensor type) and a level of water tank using floating sensor.

Three LEDs and an LCD were used to implement the display of the three soil states i.e. soggy
soil, moist soil and the dry soil states. To switch between the control and the irrigation systems a
relay switching circuit is used. For simulation we use virtual terminal instead of GSM module to
display the soil moisture content and level of the water tanker.

6.2. Recommendations
To improve on the effectiveness and efficiency of the system the following recommendations
can be put into considerations.
 Cost effective techniques to overcome the limitation of requiring a soil specific
calibration should be employed.
 The system can be integrated with temperature and humidity sensors to monitor the
weather conditions in the farm.

Semester Project -2017 Page 30


Bahir Dar Institute of Technology

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, O‟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.
[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.

Semester Project -2017 Page 31


Bahir Dar Institute of Technology

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>
// pins definition
int soggyLEDPin = 8;
int moistsoilLEDPin = 9;
int drysoilLEDPin = 10;
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;
// stores the moisture sensor values
int j = 0;
void setup()
{
// serial initialization
Serial.begin(9600);
// Arduino pins initalization
pinMode(soggyLEDPin, OUTPUT);
pinMode(moistsoilLEDPin,OUTPUT);
pinMode(drysoilLEDPin,OUTPUT);
pinMode(PumpPin,OUTPUT);

Semester Project -2017 Page 32


Bahir Dar Institute of Technology

// set up the LCD's number of columns and rows:


lcd.begin(16, 2);
}
void loop()
{
moistureSensorValue = analogRead(A0); // reads the moisture sensor values
distance=analogRead(A1);//read level sensor
if((moistureSensorValue < 300)&&(distance < 300))
{
//Serial.println("The soil is too Soggy");
// in case of soggy soil:
Serial.println (analogRead(A0));
//LED for Soggy lights up
digitalWrite(drysoilLEDPin,LOW);
digitalWrite(moistsoilLEDPin,LOW);
digitalWrite(PumpPin,LOW);
digitalWrite(soggyLEDPin,HIGH);
// system messages via LCD
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");
//Text you want to send
} // in case of moist soil:
if(((moistureSensorValue < 700)&&(moistureSensorValue > 300))&&(distance < 300))
{
//Serial.println("The soil is too Soggy");
// in case of soggy soil:

Semester Project -2017 Page 33


Bahir Dar Institute of Technology

Serial.println (analogRead(A0));
//LED for Soggy lights up
digitalWrite(drysoilLEDPin,LOW);
digitalWrite(moistsoilLEDPin,HIGH);
digitalWrite(PumpPin,LOW);
digitalWrite(soggyLEDPin,LOW);
// system messages via LCD
lcd.clear();
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");
//Text you want to send
}
// in case of moist soil
if((moistureSensorValue > 700)&&(distance < 300))
{
//Serial.println("Moisture Content is OK");
Serial.println (analogRead(A0));
//LED for moist lights up
digitalWrite(drysoilLEDPin,HIGH);
digitalWrite(moistsoilLEDPin,LOW);
digitalWrite(soggyLEDPin,LOW);
digitalWrite(PumpPin,HIGH);
// system messages via LCD
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Soil Dry!");
lcd.setCursor(1,1);
lcd.print("Tanker Full");

Semester Project -2017 Page 34


Bahir Dar Institute of Technology

Serial.println("New Message From Arduino:Soil Dry and Tanker Full");


//Text you want to send
}
//in case of dry soil:
if((moistureSensorValue < 300)&&((distance > 300)&&(distance < 700)))
{
//Serial.println("The Soil too dry");
Serial.println (analogRead(A0));
//LED for DRY lights up
digitalWrite(drysoilLEDPin,LOW);
digitalWrite(moistsoilLEDPin,LOW);
digitalWrite(soggyLEDPin,HIGH);
digitalWrite(PumpPin,LOW);
// system messages via LCD
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 Midum Water Tanker");
//Text you want to send
}
if(((moistureSensorValue > 300)&&(moistureSensorValue < 700))&&((distance >
300)&&(distance < 700)))
{
//Serial.println("The Soil too dry");
Serial.println (analogRead(A0));
//LED for DRY lights up
digitalWrite(drysoilLEDPin,LOW);
digitalWrite(moistsoilLEDPin,HIGH);
digitalWrite(soggyLEDPin,LOW);

Semester Project -2017 Page 35


Bahir Dar Institute of Technology

digitalWrite(PumpPin,LOW);
// system messages via LCD
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Moisture Ok!");
lcd.setCursor(1,1);
lcd.print("Midium Tanker");
Serial.println("New Message From Arduino: Moisture Ok and Midum Water Tanker");
//Text you want to send }
if((moistureSensorValue > 700)&&((distance > 300)&&(distance < 700)))
{
//Serial.println("The Soil too dry");
Serial.println (analogRead(A0));
//LED for DRY lights up
digitalWrite(drysoilLEDPin,HIGH);
digitalWrite(moistsoilLEDPin,LOW);
digitalWrite(soggyLEDPin,LOW);
digitalWrite(PumpPin,HIGH);
// system messages via LCD
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 and Midum Water Tanker");
//Text you want to send
}
if((moistureSensorValue < 300)&&(distance > 700))
{
//Serial.println("The soil is too Soggy");
// in case of soggy soil:

Semester Project -2017 Page 36


Bahir Dar Institute of Technology

Serial.println (analogRead(A0));
//LED for Soggy lights up
digitalWrite(drysoilLEDPin,LOW);
digitalWrite(moistsoilLEDPin,LOW);
digitalWrite(PumpPin,LOW);
digitalWrite(soggyLEDPin,HIGH);
// system messages via LCD
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 Full");
//Text you want to send
}
// in case of moist soil:
if(((moistureSensorValue > 300)&&(moistureSensorValue < 700))&&(distance > 700))
{
//Serial.println("The soil is too Soggy");
// in case of soggy soil:
Serial.println (analogRead(A0));
//LED for Soggy lights up
digitalWrite(drysoilLEDPin,LOW);
digitalWrite(moistsoilLEDPin,HIGH);
digitalWrite(PumpPin,LOW);
digitalWrite(soggyLEDPin,LOW);
// system messages via LCD
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Moistur Ok");
lcd.setCursor(1,1);

Semester Project -2017 Page 37


Bahir Dar Institute of Technology

lcd.print("Empty Tanker ");


Serial.println("New Message From Arduino: Moisture Ok and Empty Tanker ");
//Text you want to send
}
// in case of moist soil:
else if((moistureSensorValue > 700)&&(distance > 700))
{
//Serial.println("The Soil too dry");
Serial.println (analogRead(A1));
//LED for DRY lights up
digitalWrite(drysoilLEDPin,HIGH);
digitalWrite(moistsoilLEDPin,LOW);
digitalWrite(soggyLEDPin,LOW);
digitalWrite(PumpPin,LOW);
// system messages via LCD
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 ,Motor Stop & Empty Water Tanker");
//Text you want to send
}
delay(1000);
}

Semester Project -2017 Page 38

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy