=Paper= {{Paper |id=Vol-3058/paper14 |storemode=property |title=Iot Based Smart Irrigation System By Using ESP32 And Adafruit IO |pdfUrl=https://ceur-ws.org/Vol-3058/Paper-031.pdf |volume=Vol-3058 |authors=Shiva Shankar J,Dr. S. Palanivel,Dr. S. China Venkateswarlu }} ==Iot Based Smart Irrigation System By Using ESP32 And Adafruit IO== https://ceur-ws.org/Vol-3058/Paper-031.pdf
IoT based Smart Irrigation System by using ESP32 and Adafruit
IO
Shiva Shankar J1, S. Palanivel2 and S. China Venkateswarlu3
1,2
     Annamalai University, Annamalai Nagar, 608002, India
3
    Institute of Aeronautical Engineering, Hyderabad, 500043, India


                 Abstract
                 In India, agriculture has a prominent role and most of the farmers are using the
                 traditional methods in farming. Due to the latest advancements in the
                 technology, the agriculture sector is progressing to witness a drastic change in
                 the near future. The Internet of Things (IoT) is one particular technological area
                 which can help the farming community in numerous ways. The IoT can be
                 utilized at various stages in agriculture starting from ploughing the field to
                 selling the final agricultural produce in the market. This paper proposes a low
                 cost method of smart irrigation by using ESP 32 microcontroller and Adafruit
                 IO.

                 Keywords 1
                 Agriculture, ESP32, Adafruit IO, MQTT, Feeds, Dashboards.


1. Introduction
    The agriculture sector is witnessing a drastic change throughout the world in recent times due to
the advancements in the technology. The technologies like Internet of Things (IoT), Artificial
Intelligence, Machine Learning, Big Data, etc., are providing many technological solutions for the
agriculture sector. This paper is primarily focused on the implementation of “Internet of Things based
smart irrigation system by using ESP32 and Adafruit IO”. “The Internet of Things is the network of
internet-connected devices which sends and receives data without manual intervention”. As compared
to the traditional methods, the implementation of IoT technology can bring many developments in the
agricultural domain. The usage of IoT technology can simplify the tasks involved in the agriculture.
The IoT along with Artificial Intelligence, Machine Learning, Big Data can bring tremendous changes
by providing many simplified solutions in the agricultural domain.


2. Proposed methodology
   The proposed model as shown in Figure 1 is built by using ESP32 microcontroller, light dependent
resistor, thermistor, soil moisture sensor, DC water pump and Adafruit IO cloud platform.
   ESP32 microcontroller is released by Espressif Systems. It is a new variant microcontroller after
the ESP8266 with advanced features. It is a series of low priced, low-power system on chip
microcontroller with features of inbuilt Wi-Fi and Bluetooth in dual-mode. It is programmed by using
Arduino Integrated Development Environment.


International Conference on Emerging Technologies: AI, IoT, and CPS for Science & Technology Applications, September 06–07, 2021,
NITTTR Chandigarh, India
EMAIL: shivashankar.jss@gmail.com (A. 1); s_palanivel@yahoo.com (A. 2); prof.cvsonagiri@gmail.com (A. 3)
ORCID: 0000-0002-5641-9869 (A. 1); 0000-0001-6967-8811 (A. 2); 0000-0001-7157-7833 (A. 3)
              ©2021 Copyright for this paper by its authors.
              Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0).
              CEUR Workshop Proceedings (CEUR-WS.org)
Figure 1: Block diagram of the proposed methodology


    The light sensor used in this proposed architecture is a “Light Dependent Resistor”, popularly
called as LDR. The working principle of LDR is based on photo conductivity. It’s resistance
decreases whenever the light falls on it and the resistance increases in the dark.
    The temperature sensor is an electronic component which measures the temperature of its
surroundings. There are mainly four types of temperature sensors; thermocouples, thermistors,
resistive temperature detectors (RTD) and thermostats. “NTC (Negative Temperature Coefficient)
Thermistor” is employed in this proposed architecture. Basically, NTC is a type of Thermistor that
reacts directly to even a few temperature changes. It presents a great resistance at low temperatures.
As the temperature increases, the resistance starts to drop immediately. They work in the range of -50
to 250oC.
    The “soil moisture sensor” is a sensor that is used to find out the water content in the soil. It
contains two leads which are to be inserted into the soil to measure the water content in the soil. The
moisture content in the soil is feed as input to the ESP32 microcontroller which inturn takes the
appropriate action as per the programmed values for auto irrigation.
    The “water pump” used is a DC mini submersible centrifugal pump. A motor is used for powering
the impeller which is basically designed for rotating and pushing the water outside. The motor is
enclosed closely to the body of water pump in a sealed waterproof structure. It operates on 3-6V
power supply and is available at a low price and small size. It pumps upto the capacity of 120 liters
per hour and consumes a very low current of 220mA.
    Adafruit IO is a cloud platform designed to display, respond and interact with the projects data. It
acts as a MQTT broker. It supports MQTT protocol; “Message Queue Telemetry Transport protocol
(MQTT) is basically a light weighted protocol used for device communication”. Using the MQTT
library, users will be able to publish to the feeds as well as subscribe to the feeds; and at the same time
they can send the data to the feeds or receive the data from the feeds.
    The functionality of Adafruit MQTT Broker is shown if Figure 2. The real time values sensed by
LDR, thermistor and soil moisture sensor will be published as per the pre-programmed time intervals
to the Adafruit MQTT broker. The MQTT broker publishes these values to the subscribed clients
which are basically any subscribed devices like smart phones or computers. The subscribed clients
can monitor the values published by the broker. The DC water pump is pre-programmed to auto-
irrigate the field as per the given limits of the soil moisture given at the source code and it can also be
controlled from Adafruit IO through an ON/OFF switch mechanism provided in the dashboard.
   Figure 2: Functionality of MQTT broker




3. Experimental results

   The experimental set-up is done on a breadboard by connecting the ESP32 to the computer and
local Wi-Fi network.

Table 1
Tabular data of real time sensed data in Adafruit IO feeds

        Date and Time                 Light       Soil Moisture   Temperature in           Motor
                                                                       o           Motor
                                   Percentage      Percentage            C                 Status

   2021/05/29 8:21:56PM                 56            64.28           38.13          0       0
   2021/05/29 8:21:36PM                 54             60.5           38.16          0       0
   2021/05/29 8:21:15PM                 54            64.43           39.65          0       0
   2021/05/29 8:20:55PM                 54             64.5           39.81          0       0
   2021/05/29 8:20:33PM                 54            64.58           40.04          0       0
   2021/05/29 8:20:13PM                 54            65.23           40.45          0       0
   2021/05/29 8:19:52PM                 54            64.58           40.92          0       0
   2021/05/29 8:19:32PM                 54            64.77           40.92         0        0
   2021/05/29 8:19:11PM                 54            64.45           40.99         0        0
   The accurate results as per the prevailing environmental conditions related to light intensity, soil
moisture percentage and temperature are published in the individual feeds of Adafruit IO as shown in
the summary of Table 1. The feeds data is displayed in the dashboards of Adafruit IO and at the same
time, the dashboards data can also be monitored by using the subscribed smartphones or computers
from any location through Adafruit MQTT. The Motor turns ON and OFF automatically as per the
pre-programmed threshold value based on soil moisture percentage in the source code. Similarly, the
motor can also be controlled from the Adafruit IO dashboard by using the subscribed smart phone or a
computer. The results obtained are satisfactory as per the prevailing environmental conditions at the
time of experiment.
   “IoT based Smart Irrigation System by using ESP32 and Adafruit IO” is more advantageous as
compared to other developed systems as it can be implemented at low cost. This system can further be
implemented by integrating with Raspberry Pi and can be deployed to monitor larger cultivativable
areas.


4. Acknowledgements

    The support of Dr. S. Palanivel, Associate Professor, Dept. of EIE, Annamalai University,
Chidambaram, Tamil Nadu and Dr. S. China Venkateswarlu, Professor, Dept. of ECE, Institute of
Aeronautical Engineering, Hyderabad, Telangana is highly appreciated in carrying out this research
work. Special thanks to Ms. J. Keerthi Meghana for the hardware support provided in execution of
this research work.


5. References
    There are various methods proposed by authors in the area of smart irrigation by using IoT. Each
method is based on different hardware and software platforms. [1] This paper proposed the smart
irrigation system based on Arduino UNO and a GSM module. [2] The authors proposed the model by
using Arduino UNO, ESP8266 along with Thingspeak cloud. [3] Authors presented a detailed survey
of the articles from 2015 to 2020 in the field of agricultural IoT. [4] The authors proposed an
agricultural monitoring system based on Arduino UNO and ESP8266 for auto irrigation and intrusion
detection. [5] The authors illustrated a low cost intelligent module for smart irrigation based on IoT
with MQTT and HTTP. [6] Smart agriculture by using IoT is implemented using Arduino Uno,
motion sensor and an android application. [7] The authors presented a model by machine learning
along with open source technologies by using Raspberry Pi and Arduino UNO. [8] This paper
proposed a low priced smart irrigation system. ESP8266 along with an ultrasonic sensor are used to
detect the water level in the tank. The results are monitored in a mobile application by MQTT. [9]
This paper proposed a model for smart irrigation along with nutrient detection and disease analysis by
using Raspberry Pi and MATLAB. [10] Smart irrigation monitoring and controlling by using IOT is
proposed by employing the ATMEGA 328 microcontroller and an android application. [11] A mobile
controlled smart irrigation by using Rasperry Pi has been proposed and is implemented by bluetooth
technology to control the system by using android application in smart phone.

[1] Karpagam, J., et al. "Smart irrigation system using IoT." 2020 6th International Conference on
    Advanced Computing and Communication Systems (ICACCS). IEEE, 2020.
[2] Anitha, A., Nithya Sampath, and M. Asha Jerlin. "Smart Irrigation system using Internet of
    Things." 2020 International Conference on Emerging Trends in Information Technology and
    Engineering (ic-ETITE). IEEE, 2020.
[3] Kour, Vippon Preet, and Sakshi Arora. "Recent Developments of the Internet of Things in
    Agriculture: A Survey." IEEE Access 8 (2020): 129924-129957.
[4] Suryaswetha, V. P., et al. "Agricultural Field Monitoring using IoT." 2019 5th International
    Conference on Advanced Computing & Communication Systems (ICACCS). IEEE, 2019.
[5] Suryaswetha, V. P., et al. "Agricultural Field Monitoring using IoT." 2019 5th International
     Conference on Advanced Computing & Communication Systems (ICACCS). IEEE, 2019.
[6] Sushanth, G., and S. Sujatha. "IOT based smart agriculture system." 2018 International
     Conference on Wireless Communications, Signal Processing and Networking (WiSPNET).
     IEEE, 2018.
[7] Goap, Amarendra, et al. "An IoT based smart irrigation management system using Machine
     learning and open source technologies." Computers and electronics in agriculture 155 (2018): 41-
     49.
[8] Pernapati, Kiranmai. "IoT based low cost smart irrigation system." 2018 Second International
     Conference on Inventive Communication and Computational Technologies (ICICCT). IEEE,
     2018.
[9] Rau, Amogh Jayaraj, et al. "IoT based smart irrigation system and nutrient detection with disease
     analysis." 2017 IEEE Region 10 Symposium (TENSYMP). IEEE, 2017.
[10] Saraf, Shweta B., and Dhanashri H. Gawali. "IoT based smart irrigation monitoring and
     controlling system." 2017 2nd IEEE International Conference on Recent Trends in Electronics,
     Information & Communication Technology (RTEICT). IEEE, 2017.
[11] Vaishali, S., et al. "Mobile integrated smart irrigation management and monitoring system using
     IOT." 2017 international conference on communication and signal processing (ICCSP). IEEE,
     2017.