You are on page 1of 25

AUTOMATED IRRIGATION SYSTEM

ABSTRACT

This project represents intelligent irrigation, monitoring and control system. It is


suitable for places with water scarcity, areas that receive little rain and any other place
that practices agriculture. Regardless of agriculture being pertinent it is still practiced
manually and practiced only during rainy seasons. In the recent generation, however,
depending almost entirely on rainfall to practice agriculture has proved futile leading to
food insecurity in some areas of our nation. Due to increased population whereby most,
agricultural land has been converted in human settlement hence increased demand for
agricultural produce due to scarcity of agricultural land hence agriculture has mostly
been embraced during rainy seasons. The research brings up a project that ensures
timely irrigation of the farm hence reducing water loss which is usually done manually.
The system has the capability of monitoring the temperature, humidity and soil
moisture content. From the sensor readings the water pump can be turned ON for
successful irrigation. Depending on the information sent to the microcontroller, on the
onset of irrigation and stopping of irrigation, the farmer receives this information
through the WI-FI module. This system puts priority irrigation operation through
pumps for operation at any instance of time and their locations.

i
1 CHAPTER ONE

1.1 Introduction

This chapter encompasses the background of the study, problem statement, the
purpose, objectives, Assumptions, significance, scope, and limitations of the study.

1.2 Background

Agriculture is a very crucial aspect of human beings. Africa has however been
characterized as being the cradle for agriculture. This is because most of the nations in
Africa heavily depend on agriculture to build their economy. Ironically, Africa has not
fully exploited agricultural advantage to its fullest. This is because most African nations
depend on natural rainfall for agriculture. However recently due to issues related to
climate change, rainfall patterns have become unpredictable. This has paved way for
irrigation to dominate the agricultural sector. [1]Irrigation has however been manual
since its inception. Farmers should be present physically to water their crops. This
however is not effective since it leads to wastage when the water level in the farm is still
high in case the farmer is not available, the crops tend to wilt and in adverse scenarios
dry. This research seeks to solve these problems by use of sensors and IoT to ensure
irrigation is carried out automatically and that farmers are notified via their mobile
phones of successful irrigation for documentation. With rapid changes experienced
technologically, Famers are adopting the current revolution in agriculture This is
because of one cannot opt to depend on natural rainfall for food production and
security. This due issues like global warming which has hampered weather and climate
patterns. Hence disrupting the use of natural rainfalls for agriculture. Using irrigation
however has been raised to a new level of standard thus farmers are beginning to
embrace smart irrigation. Farmers opt to use automated systems as much as possible.
This has however not been fully embraced in Africa despite agriculture being such

1
pertinent. This, therefore, necessitates the development of an improved automated
method of irrigation.

1.3 System operation

This system is an internet of things (IOT) based system that collects soil moisture,
humidity and temperature data and channel it to a control system. [2] The system uses
an algorithm to analyses the input from the sensors to determine the action to be taken
by the microcontroller. The system then sends data to the Wi-Fi module which translate
the data to the phone of the farmer once the farm has been irrigated using a module.
Data interpretation and data presentation is done by a preexisting readymade
application that is installed in the user’s phone.
The application is designed and integrated with the micro controller allowing data
transmission to and for allowing full duplex transmission of data. The application
allows wireless, unlimited range of transmission since it apply IOT capabilities.

1.4 Purpose of the study

From the study work I have developed an automatic irrigation system that
collects data from the farm environment and through the control unit carry out
irrigations when necessary. The control unit is embedded on the Arduino board.
The system send data via WIFI module to the farmer for every successful
irrigation and the farm environmental conditions.

1.5 Objectives

I. To design an IOT based irrigation system that collects soil


moisture data, temperature and humidity conditions.
II. To develop an IOT based system that automatically irrigates
farms.
III. To develop an IOT based system that notifies farmers on
farm condition and once irrigation starts and when it
concludes.

1.6 Justification of the study

Developing this system is important to farmers since it will minimize


water wastage, automate tedious irrigation activities [3]This allows farmers to
focus on important issues like marketing. The system is helpful in the
documentation of irrigation patterns.

1.7 Limitation of the study

I. There must be a reservoir where the pump will be submersed into


for the system to work effectively.
II. The devices used in the study may require maintenance and
renewal over time since their accuracy may differ.
III. Once the sensors get eaten up by the soil, the data collected may be
biased.

1.8 Assumptions

The research assumed the following:


I. The microcontroller and sensors use negligible amount of
power
II. during operation.
III. That the microcontroller will always give the right output
signal after data input from sensors is processed.
IV. Farmers will keep documentation of irrigation patterns for
Purpose of system analysis and performance.
V. The sensor will always give the correct data at any instance.
VI. The wiring connection does not generate resistive, capacitive
or inductive errors when signal is sent to the microprocessor.
2 CHAPTER TWO: LITERATURE REVIEW

2.1 INTRODUCTION

This chapter elaborates on the case study of the project. These are general structures of
this study, the techniques used, and the former system that is already created. It
reviews some of the existing

Literature review

2.1.1 Weather based controller


Weather based controller are controlled by predicted weather data to manage
watering schedule. [4]This controller is governed by predicted patterns from
weather forecast to manage irrigation.

2.1.2 Soil moisture sensors-based controller


This system measures the soil humidity content. [5] [6]the sensors probe is
driven into the ground to take parameters. the data taken is in form of resistance
and therefore the program code interprets this in order to give the desirable
output.

2.1.3 Water on demand irrigation:


This system offers no scheduling operation but work on Realtime data to
determine the irrigation process. [7] In this system soil moisture content
determines if irrigation will be done or not and not any other environmental
factor[8]

GSM-based System

In this system, farm parameters are relayed to the user via a sim card
the sim card is used to receive data in form of text message from the
gsm module device [9].
2.1.4 Plant Monitoring System
The system only monitors the moisture, and temperature of the plant.
[11] moisture sensor is used to detect the moisture of the soil and
temperature sensor to measure temperature of the plant surrounding
and at the light sensor for measuring light intensity. [12]

2.1.5 Agriculture Monitoring System


This system uses a mobile device for data manipulation and
presentation. This technology allows remote operation and
control[15]. moisture and temperature sensor parameters are stored in
the cloud. Control is through the mobile application. [16] Mobile
application performs the operation of serving as the user interface.

2.1.6 Bluetooth based irrigation system


This system implements Bluetooth module, which provide Bluetooth
connectivity allowing data transfer from the module to the mobile device that
acts as the user interface. It consists of both Rx and TX for data transfer.[17] the
system has a limited range of about ten meters. this in turn limits the operational
distance of the system.

2.2 Niches in the case study

I. In the systems previously developed, they had soil moisture sensors but the
systems could not automatically carry out irrigation. And those that gave room
for some percentage of irrigation required commands from the user from the
review carried out on the existing systems, farmers did not receive notification of
the irrigation pattern hence eliminating the documentation process.
II. From the review of systems build previously, the systems served different
functions other than soil moisture sensing. This burdened the system with doing
multiple activities. This is sorted out in the new system since it’s solely dedicated
to soil moisture sensing and carrying out irrigation automatically.
III. Some systems e.g., Bluetooth are short distance transmitters
IV. Most system use one way transmission (simplex transmission)
V. The system does not provide real time data transmission
VI. Systems previously reviewed depended on manual turning on and off of water
pumps, hence these systems are prone to water wastage.
VII. The proposed system addresses these niches in the case study
3 CHAPTER THREE:

3.1 METHODOLOGY
3.1.1 INTRODUCTION
This chapter focuses on the development methodology that was used to develop a
smart IoT-based irrigation system.
3.1.2 SYSTEM DEVELOPMENT METHODOLOGY
System development is used to structure, plan and control the process of system
development. The evolutionary prototype methodology [18] provides a foundation for
the system to be built upon. It features rigid and linear development stages with
attainable goals in each stage. Requirement gathering and feasibility study are used for
evolutionary prototype methodology. Changes can easily be integrated into the original
framework without introducing errors and complications The prototype model allow
for feedback analysis enabling more and more improvements.

3.2 why evolutionary prototyping


methodologies:

In evolutionary prototype changes can be easily integrated and feedback can be


analyzed for improvements at later stage. This model allows the user to be in touch
with the established prototype. This increases the chances of producing a system that
meets the user’s requirement. [19]

3.3 Building prototype system


In this stage, I built a prototype to represent the user requirements fully. The users will
then have a feel of the prototyped system. I then note the points that need to be
corrected to meet the user’s needs. And give the user confidence that they will receive a
system according to what they invested in.

3.4 Components used

I. Microcontroller
II. Moisture sensor
III. Temperature sensor
IV. Water pump
V. Relay module

Figure 3.1 micro controller

Figure 2.3 dht11


Figure3.3 pump

Figure 3.4 relay

Figure 3.5 moisture sensor

3.5 Prototype build based on project objectives

I. To design an IOT based irrigation system that collects soil


moisture data, temperature and humidity conditions.
II. To develop an IOT based system that automatically irrigates
farms.
III. To develop an IOT based system that display to the farmers
on farm condition and keep record.
The system uses a Microcontroller Esp32 as the main processor of the collected data.
The processor performs operations in relation to the program coded in the processor
memory. These programs are executed depending on the input signals from the other
peripheral electronic modules. The microcontroller offers several unique features as
compared to other micro controllers
These features include

3.6 Configurability and Customization

ESP32 modules can be easily be configured and customized due to the different
provision on setup and certificates tutorial and simple examples present.

3.7 High Level of Integration

ESP32 is highly-integrated with in-built antenna switches, RF balun, power amplifier,


low-noise receive amplifier, filters, and power management modules.
3.7.1 Robust Design
The system contains two in modules that rely input data from the environment and
channel them into the microcontroller though the input pins

3.8 DHT11
DHT11 is an electronic component that features both temperature and humidity
detection properties. These unique features of integration allow simultaneous mapping
of both parameters.
It uses a capacitive humidity sensor and a thermistor to measure the surrounding air,
and spits out a digital signal on the data.

3.9 Moisture sensor


This component measures the moisture content in the soil. the amount of water in the
soil determines the resistance. Which provide voltage which input in the op amp. The
op amp produces an output voltage according to the resistance which is then
interpreted by the code to generate the desired output.

3.9.1 The Probe


The sensor has a fork-shaped probe with two conductors that are driven into the soil.
The sensor has a module that connects the probe to the Arduino. The module produces
an output voltage according to the resistance of the probe and is made registered at an
Analog Output (AO) pin.

3.9.2 The Module


The module entails op amp that acts as a comparator .it perform data comparison and
generate an output which is sent to the micro controller for processing.

3.10 Calibration
The module has a built-in potentiometer that’s used for ranging the sensitivity of the
module. the potential meter generates the op amp reference voltage.

3.11 Relay module


The relay uses the current supply for opening or closing switch contacts

controlling of a 5v single channel relay module is be done by interfacing any kind of


microcontroller. For that, we use a digital pin which gives an active high & low signal
toward the control pin. Once the relay activates, we can listen to an audible sound that
comes from the module.

3.12 SUBMERSIBLE WATER PUMP DC 3V-5V


Micro Submersible Water Pump DC 3V-5V. The water pump works using water suction
method which drain the water through its inlet and released it through the outlet

3.13 Module’s integration


3.13.1 Interfacing microcontroller with relay
 I attached NodeMCU on Breadboard.
 Connect VCC of Relay with Pin 3.3V of NodeMCU.
 Connect GND of Relay with GND of NodeMCU.
 Connect Pin Signal of Relay with Pin D7 (GPIO 13) of NodeMCU.
 Connect one terminal of motor with Pin NC (Normally Close) of Relay common
to vcc and the other terminal of the motor to ground.

3.13.2 Interfacing microcontroller with dht11


 Pin 1 of the DHT11 goes into +3v of the NodeMCU.
 Pin 2 of the DHT11 goes into Digital Pin D4 of the NodeMCU.
 Pin 4 of the DHT11 goes into Ground Pin (GND) of the NodeMCU.

3.13.3 Interfacing microcontroller with moisture sensor


 Connect the two pins of the moisture sensor to the two pins on the Amplifier
circuit using jumper wires.
 Connect the Vcc from the Amplifier to the 3.3V pin on the NodeMCU.
 Connect the GND pin to the ground (GND) pin on the NodeMCU.
 Connect the Analog pin to the A0 pin on the NodeMCU.

3.13.4 Interfacing relay with water pump


The relay has three terminals

 Normally open
 Normally closed
 Common

Connect the 5 Volts positive supply to the common terminal, connect the normally open
to one terminal of the submersible water pump then connect the other terminal of the
pump to the negative supply of the submersible water pump.

3.14 BLYNK APPLICATION PLATFORM


PREPERATION

3.14.1 Download Blynk app


Blynk app can be found in play store application on android device where it is
downloaded for free.

3.14.2 Install Blynk Library


After downloading click on install option to commence installation process.

3.14.3 Connect hardware

Initialize the Wi-Fi name, authentication token and Wi-Fi password in Arduino ide and
upload.
3.14.4 Create a Blynk account

Create a Blynk account using Blynk.Console or Blynk.App

An account is used to save projects for access tin multiple devices remotely

Auth Token connects the hardware to mobile device. Every new project created will
have its own Auth Token. You’ll get Auth Token automatically on your email after
project creation

3.14.5 Choose your hardware


 Open Arduino IDE
 click on tools
 select boards
 Click on esp8622 boards
 Click on node mcu 1.0 board
 The board is automatically selected and its properties are displayed on the tools
bar.

3.14.5.1.1 Blynk application actions buttons used in the


project process
 Arrange
 Resize
 Delete
 Copy
 Configure
3.14.6 Connecting the node mcu and blynk app with Wi-Fi
connection
 The smartphone connects with Blynk app via Wi-Fi connectivity (or from
smartphone settings) and they will start communicating directly with each other
 Blynk app will ask for the name (SSID) and password of the Wi-Fi network you
would like to connect this device to
 Wi-Fi information (SSID and password) will be sent to the device
 Also, Blynk app will request an Auth Token from the server and then send it to
the device
 After that, device will automatically reboot. The AP mode will be turned off
 Device will use the Wi-Fi credentials you provided to connect to your home or
office Wi-Fi network
 After the successful authentication, the device is added to your account and
ready to use [20]

3.15 SYSTEM IMPLEMENTATION AND TESING

System operation
3.15.1 WIFI connectivity
Wi-Fi information (SSID and password) is sent to the device. Blynk app will request an
Auth Token from the server and then send it to the device. the Your device stores all of
these items in Flash/EEPROM memory.

The device then automatically reboot.

Device uses the Wi-Fi credentials provided to connect to your home or office Wi-Fi
network.

The serial monitor shows the process the micro controller connects to the Wi-Fi
network.
3.16 Module’s operations

The smart irrigation system relies to the DHT11 and moisture sensor modules to
convert the physical environmental quantities into electrical signals that can be
processed by the microcontroller.

Fulfilling objective 1: To design an IOT based irrigation system that collects soil
moisture data, temperature and humidity conditions.

3.17 Moisture sensor operation

This project utilizes the analog output to input data into the microcontroller analog pin
0 which acts an input in default mode of the microcontroller. The pin captures a voltage
of 3.3 v from the analog pin input and converts the voltage into a series of segments
ranging from 0 to 255 segments via analog digital converter in the node mcu
microcontroller. from the Arduino IDE the analog pin is called as an input and
assigned a variable name and a memory location named sensor

The variable name called sensor is assigned values from the analog in put readings. The
analog reading is then divided by 1023 segments to digitize it the multiplied with 100 to
generate the sensor reading in percentage format. The serial print allows the sensor
value be printed in the serial monitor for display.

Blynk.virtualWrite(V2, sensor); this program allows the sensor data to be relayed to the
blynk app via Wi-Fi connectivity to the blynk application for display purpose both on
the graph and the gauges.

3.18 Temperature and humidity operation

The DHT11 module relay the humidity and temperature properties into the node mcu
microcontroller. this is made possible by the Arduino library that has pre-defined
functions that only require function calling into the code.
Blynk.virtualWrite this program allows the sensor data to be relayed to the blynk app
via Wi-Fi connectivity to the blynk application for display purpose both on the graph
and the gauges.

3.19 Relay operation

Fulfilling objective 2: To develop an IOT based system that automatically irrigates


farms.

The water pump is turned on by means of relay operation which is either turned on or
off at any given instance. The name relay on the above program denotes the digital
output pin of the microcontroller. The relay used is activated by active low therefore a
low turns the relay on turning the water pump on allowing irrigation process. At the 45
mark the node mcu micro controller digital writes the relay in logic low that turns the
relay on. on the other hand, at 65 mark a logic high is sent to the relay pin turning off
the relay thus deactivating the relay module thus turning off the water Pump.

3.20 BLYNK APPLICATION HUMAN INTERACTION INTER FACE

Fulfilling objective 3: To develop an IOT based system that display to the farmers on
farm condition and keep record.

Blynk application for esp32 operations

Dashboard

It’s designed to allow clear data presentation and recording.

Widgets used in the project

 Switch
 Gauge
 graphs
BLOCK DIAGRAM OF SYSTEM MODEL

Mobile
device

Micro-
controller
WIFI module
Relay
Water Pump

Humidity sensor

Temperature sensor

Probe/Sensor
Moisture
sensor module

Figure 3.6 block diagram of the system


4 CHAPTER FOUR

RESULTS

4.1 Data input process

The soil moisture sensor collected moisture content variation in the soil then convert it
into digital data from digital pin of soil moisture sensor. The sensor module generates a
low signal when the moisture content in the soil is high and high signal when the
moisture content is low. The micro controller accepts the low input, the algorithm in the
controller outputs a low signal which activates a relay module that turn on a water
pump. The humidity sensor and the temperature sensor generate analog output, the
output variation is dependent on the environmental conditions which is input to the
micro controller. The controller sends data to wi-fi module that connects to a phone via
Wi-Fi connectivity then transmit data to and for.

The data was successfully sent to the mobile device as seen

Generated output results

The graph represents the moisture content of the soil.


The reading indicates the time 5:57pm on April 26, that the moisture content of the soil
as at 70.54%.
The graph represents the temperature graph
The reading indicates the time 9:59PM on April24 that the temperature was at 26.83
degrees Celsius.
The graph represents the humidity graph.
The reading indicates the time on April24 that the humidity was at 66.20%.

4.2 Data derived from the figures

The notifications are being sent to serial monitor depending on the program statement
achieved. Moisture, humidity and temperature are printed successfully in the serial
monitor. The mobile application displays data accurately with minimal delay in data
changes. The mobile application also plot graph without any difficulty showing the
rising and falling of the variables. Data storage is achieved since the graphs can be
accessed in different time intervals. Email data proves that the project not only rely data
via mobile application but also through g mail account.

4.3 Data derived from the graph


The humidity level is in invers operation to the temperature where when one increases
the other decreases and vice versa. The soil moisture content decreases with decrease in
humidity and increase in temperature. The system performed irrigation mostly when
the temperature was high and humidity was low. After irrigation was done its observed
that there was a rapid increase in humidity content Decrease in soil temperature is also
observed immediately after irrigation.

5 CHAPTER FIVE

CONCLUSION
The soil moisture collected moisture content variation in the soil then convert it into
digital data from digital pin of the moisture sensor.

The micro controller input data, the algorithm in the controller output signal which
activated the relay module that turned on the water pump.

Humidity and temperature sensor generated output signal that were graphically
presented on the user interface
The controller sent data via Wi-Fi connectivity then transmit data to the mobile device
for interpretation purposes and presentation.

5.1 Observation

The system generated desired output an intended in the program.

Realtime data streaming data is achieved, data representation both in application


Gmail and serial monitor

Graphical data representation is achieved through the application platform with


textual data achieved through Gmail and serial monitor. Interrelationship between
moisture, humidity and temperature is clearly depicted

5.2 Limitations

The moisture sensor experienced corrosion on the probes due to the voltage difference
between the probes. Water pump flooding leading to short circuits

DHT11 had to be adjusted in relation to moisture sensor in order to give precise data

Data obtained is generated under 240 square centimeters of working environment

Water pump being active even before the micro controller could connect to Wi-Fi
network since there is a delay involved.

5.3 Recommendation

A capacitive moisture sensor to be used in the place of moisture sensor module to


avoid corrosion

Develop a text massage notification feature to allow offline notification as opposed


to the online system

Solar power can be integrated to reduce power consumption and harness the free
sun energy
Develop idle mode to ensure the system is in sleep mode when farm conditions are
optimal and the system to awake when necessary.
27

You might also like