Content uploaded by Ramalakshmi Ramar
Author content
All content in this area was uploaded by Ramalakshmi Ramar on Jan 11, 2019
Content may be subject to copyright.
An Automated Irrigation System for Smart Agriculture Using the
Internet of Things
V. Ramachandran, R. Ramalakshmi, and Seshadhri Srinivasan
Abstract— Water is a vital and scarce resource in agriculture
and its optimal management is emerging as a key challenge.
This paper presents an automated irrigation system to reduce
water utilization in agriculture by combining the Internet of
Things (IoT), cloud computing and optimization tools. The
automated irrigation system deploys low cost sensors to sense
variables of interest such as soil moisture, pH, soil type, and
weather conditions. The data is stored in Thingspeak cloud
service for monitoring and data-storage. The field data is
transmitted to the cloud using Wi-Fi modem and using GSM
cellular networks. Then an optimization model is used to
compute the optimal irrigation rate which are automated using
a solenoid valve controlled using an ARM controller (WEMOS
D1). The variables of interest are stored in the cloud and
offered as a service to the farmers. The proposed approach
is demonstrated on a pilot scale agricultural facility and our
results demonstrate the reduction in water utilization, increase
in data-availability, and visualization.
I. INTRODUCTION
Sustaining agricultural productivity, guaranteeing food-
security, and enhancing economic growth in the face of
climate variability, diminishing labour force, and changing
soil conditions requires innovation in agriculture. In India,
agriculture contributes 18% of the country’s Gross Domestic
Product (GDP) and employs more than 50% of the popu-
lation [1]. Notwithstanding these contributions, the sector is
under stress and the recent economic survey of the Indian
government has pointed out the need to extract “more crop
per drop” which indicates exploiting technology and good
practices to enhance productivity per drop of water. While
this is largely dependent on the irrigation system, recent
developments in technology are being touted as solutions [2].
The real-time environmental parameters such as temperature,
soil moisture, humidity, evapotranspiration, cropping cycles,
and others influence the crop lifecycle. Resource utilization
can be optimized by real-time monitoring of these parameters
and taking corrective actions based on sensed information.
In this backdrop, the Internet of Things (IoT) with has
emerged as an enabler of agriculture automation [3], [4],
[5]. The IoT uses recent advances in sensing, networking,
and computing technologies to enable novel applications
and services. The use of IoT for crop monitoring has been
studied in [6]-[9]. Fusing crop statistical information and
This research is funded by the DST through the Initiative to Promote
Habitat Energy Efficiency Project title: Energy Savings Through IoT and
Nonlinear Model Predictive Controller (TMD/CERI/BEE/2016/088)
V. Ramachandran and R. Ramalakshmi are with the Dept. of Computer
Science and Engineering, Kalasalingam Academy of Research and Educa-
tion, India 626126 e-mail: (v.ramachndran@klu.ac.in,rama@ klu.ac.in)
Seshadhri Srinivasan is with Berkeley Education Alliance for Research
in Singapore e-mail: (seshadhri@ieee.org)
agricultural environmental information was studied in [10].
However, control functionalities were not studied in these
investigation. The investigations in [11] and [12] proposed
a framework with limited control functions. The role of IoT
for controlling the water consumption in irrigation has been
studied by many scientists as well. A simple irrigation system
was studied in [13]. An advanced system was proposed
in [14] that aims to transform traditional farming to modern
one. The investigation in [15] proposed using wireless sensor
networks for managing irrigation in agricultural farms. The
framework proposed allowed user to interact with the data
and consult in a comfortable way. An IoT based smart farm
irrigation system was proposed in [16] wherein Zigbee was
used for communication between sensor nodes and base
station. While data was collected and processed in these
investigation, combining cloud computing with IoT was not
fully explored. This provides additional opportunities due to
the service delivery models of the cloud.
Recently significant efforts have been devoted to combine
IoT and cloud computing [17], [19], [20] showed that the IoT
benefits can be enhanced by combining it with cloud comput-
ing. The role of cloud-based IoT scheme for precision agri-
culture was studied in [18]. However, the final control aspect
has not been considered. Similarly, optimization models for
irrigation have been studied in [21] without discussions on
monitoring and control. A review of the literature reveals that
existing approaches on using IoT are restricted to monitoring
and data-aggregation. Final control including optimization
of resources has not been studied in the literature to our
best knowledge. In this paper, we combine the IoT sensing
and networking capability with cloud interfaces, use the data
to study the optimal irrigation rates, and finally implement
the computed flow rates by commanding a solenoid valve.
Consequently, a comprehensive solution including sensing,
networking, control, and optimization is proposed. Such a
methodology has not been proposed for agricultural irrigation
purposes to our best knowledge. The main contributions of
the paper are:
1) A smart irrigation system that uses IoT and cloud-
connectivity to aggregate and store information, an
optimization model to compute the optimal irriga-
tion parameters, and final control implemented using
solenoid valves.
2) Design aspects of IoT hardware, software, and their
integration along with networking as well as cloud
connectivity are discussed.
3) Demonstrate the control methodology and hardware
2018 15th International Conference on
Control, Automation, Robotics and Vision (ICARCV)
Singapore, November 18-21, 2018
978-1-5386-9582-1/18/$31.00 ©2018 IEEE 210
using experiments/simulations.
The rest of the paper is organized as follows. Section II
presents the system architecture and design which describes
the various components of the system. The optimization
model for irrigation control is presented in Section III.
Results and observations are presented in Section IV. Con-
clusions are drawn from the obtained results and analysis in
Section V.
II. SYS TEM ARCHITECTURE AND DESIGN
Fig. 1: IoT Architecture of the Smart Irrigation System
The IoT architecture used for implementing the precision
irrigation system is shown in Fig. 1. The components of
the architecture are listed in Tab. I. The components are
selected based on cost-reliability analysis. While the low-cost
sensors lead to reliability issues, they perform reasonably
well for the application considered. In this work low cost
soil moisture and flow sensors are used. The sensors send the
data to the WEMOS D1 controller and the controller controls
the flow using sensed information. The controller controls
the solenoid valve through which the field is irrigated. The
controller also controls the DC motor on/off state since the
motor has to be on only when any one of the valve is
in open state. The controller is connected to the internet
through the GSM GPRS module. The internet connectivity
is provided through GSM as broadband is not feasible in
many rural agricultural areas, whereas more than 70% of the
land in India is feasible with GSM based cellular network.
The information retrieved from the field is used to control
the irrigation system, and it is also stored in the cloud
(Thingspeak) for further analysis. Remote monitoring of
the field was provided through web interface and mobile
interface. The farm is split into several sectors as depicted
in Fig. 2, the water flows through different valves for
each sector which are deployed with a set of sensors for
monitoring and a solenoid valve as an actuator.
The sectors are sort of control regimes for which the
water can be irrigated. This helps organizing the irrigation
and monitoring to meet the needs of the individual sec-
tors, thereby better management can be achieved. Having
Device Specifications
WEMOS D1 Controller ESP-8266EX
Soil Moisture Sensor YL69
Solenoid Valve 1/2 Inch, 12V
Gardening sprinkler 4-hole female
Drip irrigation hose 4 mm, 2 meter (length)
Water Flow Sensor YF-201
Humidity & Temperature sensor DHT 11
pH sensor pH meter probe (0-10)
TABLE I: Components of the Architecture
Fig. 2: Organization of Agriculture Land as Sectors
described the architecture, we provide a succinct description
of the different components used in the hardware.
1) WEMOS D1 Controller: The D1 is an ESP8266 (Wi-
Fi) based controller which is compatible with the Arduino
IDE. The functions are same as the Arduino Uno controller,
whereas the WEMOS has the ESP8266 module by default
on the board hence reducing the complexity of interfacing
an ESP8266 with Arduino Uno. ADCs(Analog to Digital
convertors) were used to interface multiple analog sensors
to the controller.
2) Solenoid Valve: The traditional valves are replaced
with solenoid valves to control the flow. The valve is oper-
ated either in ON/OFF mode and a pulse-width modulation
approach is used to control the flow, i.e., the amount of flow
is proportional to the time-period for which the valve remains
in ON state over a given time period. A 24 V relay is used
to turn ON/OFF the solenoid valve.
3) Soil Moisture Sensor: In our design, YL69 series soil
moisture sensor or probe measures the volumetric water
content in the soil. Determining soil moisture is considered
as an important task in agriculture to assist farmers manage
the irrigation systems more effectively. Compared to other
low cost sensor such as gypsum block sensors, these probes
tender a rapid response time. Due to this reason the sensor
is chosen and used in the proposed design. Placing the soil
moisture sensor in the right place is very important, since
a sector’s irrigation is controlled by the value of the soil
moisture sensor deployed for that sector. The soil moisture
sensor works between 3.3V and 5V power supply. The output
value of the sensor is between 0 ohms to 1000 ohms. Based
211
Soil Type Resistance value range
Dry 0- 300 Ω
Humid 300-700 Ω
Wet 700-100 Ω
TABLE II: Resistance range of Soil Moisture Sensor
on the sensor reading the soil can be classified into Dry,
Humid and wet. The soil moisture sensor used is connected
to the analog pin of the controller through wire. The sensor
range for determining the soil type is shown in Tab. II.
4) Flow Sensor: In this system flow sensor (YF-201) is
used to measure the amount of water utilized in the process of
irrigation. The amount of water utilized has to be measured
in the experimental setup for the traditional and automated
irrigation methods so that comparison can be easily carried
out. The water flow sensor is aligned in parallel with the
water line, and a pinwheel inside the sensor is used for
measuring the water irrigated through it. The water flow is
measured in litres/second.
5) Data Transmission: Transferring the collected infor-
mation from the farm to the Internet is a major issue as
internet connectivity through broadband to agricultural area
is still an infeasible solution in more than 50% of the
agricultural lands across India. In this work the data is
transmitted using the GPRS internet connectivity available
through the cellular network providers. The cellular network
covers majority of the agricultural lands in India and with
the emergence of 3G and 4G technology it is possible to
transmit data quickly. Instead of using a GPRS module along
with the controller, we have used a Wi-Fi hotspot device for
data transmission from the controller to the internet as the
transmission speed is high when using hot spot as compared
with a GSM GPRS module of the controller. The use of
WEMOS controller has reduced the complexity in interfacing
an ESP8266 when compared to Arduino. The GSM module
is used to send messages from the controller regarding the
status of the field.
Fig. 3: ThingSpeak Web Interface
Time stamp Entry Id Soil Moisture Flow in
in ω`
s
2018-03-26 10:38:51 UTC 94 310.00 6.12
2018-03-26 10:39:12 UTC 95 316.00 6.21
2018-03-26 10:39:33 UTC 96 330.00 6.29
2018-03-26 10:39:54 UTC 97 345.00 6.39
2018-03-26 10:40:15 UTC 98 368.00 6.51
2018-03-26 10:40:36 UTC 99 382.00 6.62
TABLE III: Sample Data Stored in Thingspeak
A. Cloud-based Remote Monitoring
The Irrigation system is initiated based on the soil moisture
sensor value. The field is irrigated automatically using the
solenoid valve or sprinkler. The solenoid valve and the
sprinkler were connected to the controller using relay switch.
The data from the controller is transmitted to the Thingspeak
cloud, and the data can be viewed using Thingspeak website.
The user interface is a simple monitoring interface which
shows the readings from the sensor, the solenoid valve status
and the amount of water used. The screen shot of the
ThingSpeak web interface is shown in Fig. 4 and the snippet
of the data displayed is shown in Table III.
Similarly the PH value of the soil, Humidity and temper-
ature were also stored in cloud. Thingspeak cloud service is
an easy to access service and has inbuilt lab view functions.
Fig. 4 shows the Thingspeak Cloud Service Interface for a
smart phone wherein the data are represented in charts. The
data feeds can be stored in the Thingspeak along with the
timestamp for further analysis and for providing real-time
data visualization.
Fig. 4: ThingSpeak Interface for Smart Phone
III. OPTIMIZATION MODEL
Computing the minimum irrigation rates based on sensed
information is a decision making problem requiring help
of optimization tools. Therefore, we model the optimal
irrigation problem as an optimization problem. We define
the following:
Definition 1: The difference between the planting and har-
vesting time is denoted as the irrigation period.
212
Definition 2: Maximal rainfall over the irrigation period
denoted by Rmax is the upper bound on the rainfall during
the period.
Our objective is to minimize the irrigation of the water
over a 24 hour horizon which is given by I=Pt=Q∆t
where Qdenotes the flow and ∆unit time step used in the
analysis. In addition, we aim to exploit the use of rain water,
and soil moisture content. The objective is modelled as:
J=w1(t)St+w2rt+w3(t)Q(t)∆ (1)
∀t∈ {t+ ∆, t + 2∆, . . . , t +T∆}
where w1, w2and w3are weighing factors, Stsoil moisture
content at time t, and the weights are selected depending on
the crop or soil conditions.
Limits on the rainfall rare given by
Rmin ≤rt≤Rmax ∀t∈ {t+ ∆, t + 2∆, . . . , t +T∆}
(2)
where Rmax and Rmin denote the maximum and minimum
values of the rainfall during the period. The upper limit on
the irrigation is given by
t+T∆
X
t=t+∆
Q(t)∆ ≤I(3)
Following [21], the irrigation at time periods is limited by
Q(t)≥(et−rt−St+dt)
∆(4)
Q(t)≤W Rmax(t)−rt−St+dt
∆
where etis the threshold on water use, dtwater drained, and
W Rmax maximum water reserve, respectively. In addition,
the evapotranspiration rate is constrained by
EP (t)≤rt+St+Q(t)∆ −dt∀t(5)
In addition, the rainfall, soil moisture, flow-rate, and drain
are all positive real-values and this is expressed as
rt, St, dt, Q(t)≥0(6)
The optimization model for reducing the irrigation is given
by:
M:
min
Q(t)w1(t)St+w2(t)rt+w3(t)Q(t)∆
s.t.
Rmin ≤rt≤Rmax,
t+T∆
X
t=t+∆
Q(t)∆ ≤I
Q(t)≥(et−rt−St+dt)
∆
Q(t)≤W Rmax(t)−rt−St+dt
∆
EP (t)≤rt+St+Qi(t)∆ −dt
Qmin ≤Q(t)≤Qmax
rt, St, dt, Q(t)≥0,
w1+w2+w3= 1
∀t∈ {t+ ∆, t + 2∆, . . . , t +T∆}
The optimization model Mis a linear programming problem
and can be solved with open source solvers such as Gnu
Linear Programming Kit on single-board computers such as
BeagleBone Black. However, in our analysis, the problem
was solved in a computer using MATLAB’s linprog routine.
IV. RES ULTS
A. Real-time Experiments
In our experiments, a pilot having four land sectors each
2×2square feet were taken to test the method. One
sector was irrigated using traditional method in which the
water flow was controlled manually, and the other three
(Automated Irrigation, Drip Irrigation, Sprinkler Irrigation)
were irrigated with the automated method using sensors and
actuators (solenoid valve, sprinkler, and Drip). The spinach
named Amaranthus tricolor seeds was sown in even quantity
and grown in the entire four land sector. Water flow sensor,
soil moisture sensor, soil PH sensor, was installed in all the
sectors. Weather sensors like humidity, temperature Sensor
and rain sensor were deployed in common for all the four
sectors. The actuators were connected to the controller using
wired connection. The input to the sprinkler was given using
a low pressure water pipe as the land sector taken for
irrigation is small. The irrigation was done based on the
moisture sensor value. Different moisture values are set for
different crops, in the experimental set up the value was
set to less than 300 ohms to 950 ohms, if the value drops
below 300 ohms then the solenoid valves were opened and
the field is irrigated and if the value was greater than 950
ohms then the solenoid valves were closed. For drip irrigation
automation, the solenoid valves were used to supply water
to the drip irrigation tube. In the sprinkler irrigation system
sprinkler is supplied with a low pressure water input as the
experimental prototype is for demonstration purpose. The
soil moisture metric used to automate the irrigation makes
sure that the land is not dry at any point of time. The data
213
is uploaded to the things speak cloud using write API key.
The experiments were conducted for a period of 3 weeks. To
test the effectiveness of the optimization approach, we first
propose a moisture based control as shown in Fig. 5.
Fig. 5: Moisture-based Control
The following two scenarios were compared:
•Flow control based on moisture level with valve control,
sprinkler control, and drip irrigation;
•Flow control using optimization approach with valve
irrigation, sprinkler control, and drip irrigation;
In the optimization model, the change in irrigation conditions
correlate to change in the limits of the flow-rates Q(t).
B. Results with Heuristic Control
The flows for a period of 3 weeks were used to study
the effectiveness of the flow-based control. The results of
all three automated irrigation methods were compared with
conventional method. In Drip irrigation method the system
is highly efficient saving around 24%, compared to 20%
in sprinkler and 16% in Solenoid valve based automated
irrigation. In this experimental prototype, deficient watering
condition was eliminated as the water resources were suffi-
cient throughout the experiment. Water deficit might occur
when the system is implemented in the real agricultural field
due to water scarcity. The data is stored in cloud with ease
using the API funtions in thingspeak. The flow control over
for a period of six days with flow-based control is shown
in Fig. 6 shows that the drip irrigation the flow is relatively
lower than other irrigation systems.
C. Simulation Results with Optimization Based Control
The flows for a period of 1 week with optimization based
control was used to study the effectiveness of optimization
based control for the three irrigation schemes. In drip irriga-
tion method the method provided 31.2% over conventional
123456
0
5
10
15
days
Irrigation in ltrs/day
Automated
Manual
Fig. 6: Automated versus Manual Control with sprinkler
system for flow-based control
method and an increase in 7% savings over flow-based con-
trol. Similarly, in sprinkler irrigation, the savings were 26%
and 22% in solenoid valve based control. Our simulations
shows that optimization based control outperforms the flow-
based control in terms of water savings.
123456
0
5
10
15
days
Irrigation in ltrs/day
Automated
Manual
Fig. 7: Automated versus Manual Control with Sprinkler
System for optimization-based control
D. Observations
•It was observed that the pH value of the soil decreases
with an increase in moisture levels.
•The IoT and cloud-connectivity enhanced the data-
aggregation and visualization capability significantly.
•Combining IoT, cloud-connectivity, and optimization
models will help enhance water efficiency of the agri-
culture systems.
•The irrigation system was automated by connecting
solenoid values which helped increase the agility of the
control.
V. CONCLUSIONS
This investigation presented an automated irrigation sys-
tem to reduce water utilization in agriculture by combining
214
Internet of Things (IoT), cloud computing, and optimization.
The automated irrigation system is realized by deploying
low-cost sensors to sense variables of interest such as pH,
temperature, humidity, soil type and weather conditions. The
data is stored in Thingspeak cloud service for monitoring
and storage. Then an optimization model for reducing the
water usage was proposed and constraints modelling the
physical conditions were included. The optimal flow rate was
determined solving the optimization model and it was shown
that the flow rate can be automated using solenoid valves.
The optimization-based control was compared with flow-
based control and our results demonstrated that optimization
models help in reducing the water consumption. Improving
the optimization models and enhancing the IoT prototype are
future course of this investigation.
REFERENCES
[1] Govt. of India, “Indian economic survey”, 2018. http://mofapp.
nic.in:8080/economicsurvey/
[2] Sharma, D., Bhondekar, A. P., Ojha, A., Shukla, A. K., & Ghanshyam,
C. (2016). A Technical Assessment of IOT for Indian Agriculture
Sector. In 47th Mid-Term Symposium on Modern Information and
Communication Technologies for Digital India, Chandigarh.
[3] Chaudhary, R., Pandey, J. R., Pandey, P., & Chaudhary, P. (2015).
Case study of Internet of Things in area of Agriculture,‘AGCO’s Fuse
Technology’s’‘Connected Farm Services’. In Green Computing and
Internet of Things (ICGCIoT), 2015 International Conference on (pp.
148-153). IEEE.
[4] Verma, N. K., & Usman, A. (2016). Internet of Things (IoT): A relief
for Indian farmers. In Global Humanitarian Technology Conference
(GHTC), 2016 (pp. 831-835). IEEE.
[5] Bekiroglu, K., Srinivasan, S., Png, E., Su, R., Poolla, K., and Lagoa, C.
(2017, December). An Internet of Things compliant model identification
methodology for smart buildings. In Decision and Control (CDC), 2017
IEEE 56th Annual Conference on (pp. 4440-4445). IEEE.
[6] Ryu, M., Yun, J., Miao, T., Ahn, I. Y., Choi, S. C., & Kim, J. (2015).
Design and implementation of a connected farm for smart farming
system. In Sensors, 2015 IEEE (pp. 1-4). IEEE.
[7] Kalathas, J., Bandekas, D. V., Kosmidis, A., & Kanakaris, V. (2016).
Seedbed based on IoT: A Case Study. Journal of Engineering Science
& Technology Review, 9(2).
[8] Wenting, H., Zhiping, X., Yang, Z., Pei, C., Xiangwei, C., & Ooi, S.
K. (2014). Real-time remote monitoring system for crop water require-
ment information. International Journal of Agricultural and Biological
Engineering, 7(6), 37-46.
[9] Baranwal, T., & Pateriya, P. K. (2016). Development of IoT based smart
security and monitoring devices for agriculture. In Cloud System and
Big Data Engineering (Confluence), 2016 6th International Conference
(pp. 597-602). IEEE.
[10] Lee, M., Hwang, J., & Yoe, H. (2013). Agricultural production system
based on IoT. In Computational Science and Engineering (CSE), 2013
IEEE 16th International Conference on (pp. 833-837). IEEE.
[11] Deksnys, V., et al. ”Remote agriculture automation using wireless
link and iot gateway infrastructure.” Database and Expert Systems
Applications (DEXA), 2015 26th International Workshop on. IEEE,
2015.
[12] Dan, L. I. U., Xin, C., Chongwei, H., & Liangliang, J. (2015).
Intelligent agriculture greenhouse environment monitoring system based
on IOT technology. In Intelligent Transportation, Big Data and Smart
City (ICITBS), 2015 International Conference on (pp. 487-490). IEEE.
[13] Harun, A. N., Kassim, M. R. M., Mat, I., & Ramli, S. S. (2015, May).
Precision irrigation using wireless sensor network. In Smart Sensors and
Application (ICSSA), 2015 International Conference on (pp. 71-75).
IEEE.
[14] Hari Ram, V. V., Vishal, H., Dhanalakshmi, S., & Vidya, P. M.
(2015, July). Regulation of water in agriculture field using Internet Of
Things. In Technological Innovation in ICT for Agriculture and Rural
Development (TIAR), 2015 IEEE (pp. 112-115). IEEE.
[15] Navarro-Hell´
ın, H., Torres-S´
anchez, R., Soto-Valles, F., Albaladejo-
P´
erez, C., L´
opez-Riquelme, J. A., & Domingo-Miguel, R. (2015). A
wireless sensors architecture for efficient irrigation water management.
Agricultural Water Management, 151, 64-74.
[16] Saraf, Shweta B., and Dhanashri H. Gawali. ”IoT based smart irriga-
tion monitoring and controlling system.” In Recent Trends in Electron-
ics, Information & Communication Technology (RTEICT), 2017 2nd
IEEE International Conference on, pp. 815-819. IEEE, 2017.
[17] TongKe, F. (2013). Smart agriculture based on cloud computing and
IOT. Journal of Convergence Information Technology, 8(2).
[18] Khattab, Ahmed, Ahmed Abdelgawad, and Kumar Yelmarthi. ”Design
and implementation of a cloud-based IoT scheme for precision agricul-
ture.” Microelectronics (ICM), 2016 28th International Conference on.
IEEE, 2016.
[19] Patil, V. C., Al-Gaadi, K. A., Biradar, D. P., & Rangaswamy, M.
(2012). Internet of things (Iot) and cloud computing for agriculture: An
overview. Proceedings of Agro-Informatics and Precision Agriculture
(AIPA 2012), India, 292-296.
[20] Channe, H., Kothari, S., & Kadam, D. (2015). Multidisciplinary model
for smart agriculture using internet-of-things (IoT), sensors, cloud-
computing, mobile-computing & big-data analysis. Int. J. Computer
Technology & Applications, 6(3), 374-382.
[21] Difallah, W., Benahmed, K., Draoui, B., & Bounaama, F. (2017). Lin-
ear optimization model for efficient use of irrigation water. International
Journal of Agronomy, 2017.
215