IoT_Based_Smart_Agriculture_System_Using_ESP32
IoT_Based_Smart_Agriculture_System_Using_ESP32
Abstract—In India, Agriculture is their primary source of financial position while enabling particular items to be known
earnings for the majority of individuals. It is important to or implemented remotely [2].
the nation’s economy. Therefore, automation needs to be used The advanced IoT is used in major kinds of electronic
in agriculture to solve the issues. The Traditional agricultural
methods need manual labour. Agriculture is regarded as the back systems, such as smart grids, smart houses, mobile and smart
bone of human civilization and plays major roles in survival of city categories, when it is systematically enlarged with sensors
people in India. The global IoT market would provide tremen- and activators.
dous opportunities in the development of irrigation, agriculture Many experts suggests that soil fertility affects the kind of
applications and soil monitoring. Crops are continuously sensed product they produced. Also they have not considered water
and monitored using the Internet of Things (IoT) and sensors to
provide farmers with information about the crop growth, which level and weather conditions. This conditions whether it is true
increases the crop productivity and ensures that the products are or false, directly affect the crop. The last phase of harvest,
delivered to end users at the proper location and time. Therefore which the farmer is dependent on would determine the profit
in order to lessen manual work IoT-based smart agriculture [2].
techniques are good. As per the required crop yield the moisture Usage of IoTs provides a connection between human and
level in the soil would be different in order to achieve proper
micro nutrients to crop, moisture sensor play as important role. physical devices [3]–[5]. Agriculture has grown from man and
It is an essential parameter in agriculture. Current research work animal power to usage of tractors and chemicals. In today’s
have used various sensors like temperature and humidity sensor, era, moving to smart agriculture using IoTs and sensor [6].
soil moisture, rain sensor, sun light sensor, pH sensor and tank There are more than 27500 scientist and 1 lac supporting staff
water level. actively working in agriculture research for development and
Index Terms—ESP32 (Wi-Fi module), Soil moisture sensor,
Temperature Sensor, Humidity Sensor, IoT, Relay, Rain sensor, growth [7]. Smart agriculture can provide adequate water for
Sun light Sensor, pH sensor and Ultrasonic sensor. crops. Insufficient or excessive watering to plants can decrease
crop production [8]. The Indian agriculture contributes 18 %
I. I NTRODUCTION of countries GDP which is highest share of national income.
With the aid of roads, electricity, and irrigation, agricultural
The majority of Indians’ revenue comes from the agricul- infrastructure has advanced significantly since 1980’s [9], [10].
ture, which significantly contributes to the country’s economy.
The agricultural industry has not seen any significant growth II. P ROBLEM I NVOLVED
in terms of crops during the last decade. Food prices grow • The global population is projected to 10 billion by 2050
continuously due to decrease in production rates. A number and needs to increase in food production accordingly [6],
of things can contribute to this such as waste water, infertile [9].
soil, improper fertilizer use, crop diseases, or climatic shifts. • Traditional agriculture required manual intervention [2].
Making beneficial changes in agriculture is must. The IoT • Uncertainty in climate
combined with wireless sensor network gives the solution • Continues monitoring of crops
to such issues. Internet of things (IoT) is an approach of • Global warming affects temperature and rain fall [11].
connecting anything to the internet [1]. It connects objects
or things (like cars, homes, electronic devices, etc.) that were III. LITERATURE S URVEY
earlier not connected with one another. The primary objective Literature suggests several growths in the era of industrial
of the IoT is to ensure that the correct data is delivered to the revolution using AI, machine learning [12], wireless sensor
right individuals at the right time. Due to the unexpected and networks (WSN) [13] and integration of internet of things
irregular nature of monsoon irrigation is an essential element [1], [3]. Internet of things have played crucial role in food
in agriculture. The uncontrollable climate destroy the land production, soil moisture monitoring, and fertilizer optimiza-
as well as dreams and expectation of farmer. The Internet tion techniques [3]. The automated farm system implementing
of Things acknowledges greater power, accuracy as well as IoTis described in this research. An efficient method for
TABLE I.
C OMPARISON OF LITERATURE PAPER
Fig. 1. Block Diagram Of Structure
Ref. No. previous literature
[6] ARM processor, Soil moisture sensor, 1) Data collection from the sensor: The Arduino Uno is
LM35 ,SSpH sensor
[8] ARM7 processor,Soil moisture sensor,LM35 used to connect with sensors such as DHT11 temperature and
[11] PIC microcontroller 16F877A,Soil moisture sensor humidity sensor, soil moisture sensor, ultrasonic sensor, Rain
LM35,GSM Module,PIR sensor sensor, sun light sensor and pH sensor.
[13] Arduino Mega 2560, ESP 8266,Solar Plate
Temperature Sensor-DS18B20, Soil Moisture Sensor 2) Wireless data transmission: Using wireless commu-
[18] ESP32 NodeMCU, soil moisture sensor nication (ESP32’s WIFI module), the web server receives
DHT11, PIR sensor, ESP32 camera information collected from the sensors.
Current Work ESP32 wroom 32 processor, Soil moisture sensor
DTH11, Sunlight sensor, Rain sensor, pH sensor
3) Data processing and Decision making: The purpose
HC-SR04 Ultrasonic Sensor, Blynk cloud of data processing is to compare the threshold values that
have previously been established with information gathered
Smart Agriculture concept provides a comprehensive an- from various sensors that had collected it. The motor will
swer to the issues with the irrigation as well as field work. automatically switch ON if the tank’s water level falls below
The use of such system in the field will absolutely help to a certain level and the opposite happens. The cultivator would
increase the crop output and production as a whole [16]. A activate the motor using a mobile device’s app.
structure is created utilising sensors and irrigation system. This 4) Mobile Application: Field monitoring and control have
information is supplied to server to make further decision [17]. become possible anywhere due to the mobile application.
As per the ideal range, temperature and moisture levels would
be adjusted [18]. V. M ETHODOLOGY
Using program that gives an individual a web interface, the The Sensors, Processors and Applications are the funda-
user would remotely monitor and operate the system. A link mental building components of an IoT. Therefore, the block
between environment work and yield for standard work has diagram above is the suggested framework for the project
been discovered by experts after the analysis of information and explains how these blocks are connected. The micro-
gathered [19]. Its supporting technologies, protocols, appli- controller and sensors are connected and the user’s mobile
cations and the most current studies are addressing various application displays information from the sensors. A mobile
IoT-related issues. As students and professionals are interested application give users access to real-time sensor information
in learning more about IoT technologies including protocols, that subsequently supports farmers for meeting there require-
this should serve as an excellent base for the understanding ments. The user’s mobile application receives information
of fundamental structure and functions of the various IoT collected by various sensors. This Internet of Things based
components and protocols [20]. IoTs can be used to improve farm surveillance network uses a wireless network to gather
yield efficiently, agriculture production, pest control monitor- information from various sensors placed at various nodes
ing, smart irrigation, soil monitoring and nutrient monitoring as well as transmit it via wireless protocol. This intelligent
[11]. Table I. shows the comparison of literature paper with agricultural system is operated by the ESP32 microcontroller
current work. and includes motor, DC fan, temperature sensor, moisture
Authorized licensed use limited to: VTU Consortium. Downloaded on October 24,2024 at 06:53:37 UTC from IEEE Xplore. Restrictions apply.
sensor, DHT11, ultrasonic sensor, rain sensor, sun light sensor
and pH sensor. The water level, humidity and moisture level
are all checked when the IoT based farm monitoring system
first turns on. When the water level falls, sensors detect it
and the water pump is immediately started. All of these
information can be seen on the mobile application, which
also displays the humidity, moisture, temperature and tank
water level. Depending on the sort of crops that are grown, Fig. 3. Temperature and Humidity Sensor
the temperature can be controlled at a given level. Thus,
an automated agriculture system helps farmers to save time,
money and electricity. 3) HC-SR04 Ultrasonic Sensor: The HC-SR04 distance
detector is frequently used with both microcontroller as well
VI. H ARDWARE U SED
as microprocessor technologies With various systems such as
1) Soil Moisture Sensor: The quantity of moisture in the the Raspberry Pi, ARM, Arduino, and others. Through its Vcc
soil is measured by a sensor that detects soil moisture. The and Ground pins, the sensor receives power from a controlled
sensor would produce output in both analog as well as digital +5V source. Since the sensor uses less than 15mA of current,
format. The digital output has a constant limit, while the it has been powered directly via its within 5V connections.
analog output can be adjusted. The concept of open and short Since both the Trigger and the Echo pins are connected to
circuit principle is used. Dry soil acts as an open circuit the input/output pins on the microcontroller. In response, the
because it prevents electricity from passing through them. The transmitting device emits a 40Hz ultrasonic wave, whereas the
output is seen as having reached its highest point as a result. receiving device waits for the sound wave to come back. The
Because electricity will flow from one terminal to the other Echo pin goes higher for a specified amount of duration, which
whenever the soil is wet, the entire system has been determined is equal to the amount of time it required for the wave to come
to have become short and the result is going to be zero. LED back to the detector, which is whenever the wave returns after
result is used to display result [2]. being reflected by an object. The MCU/MPU measures how
Soil Moisture Sensor is shown in Fig. 2. much the wave stays higher, while the Echo pin indicates how
long it takes for the wave to return to the Sensor.
HC-SR04 Ultrasonic Sensor is shown in Fig. 4.
2) DHT11- Temperature and Humidity Sensor: A popular Fig. 4. HC-SR04 Ultrasonic Sensor
temperature and humidity sensor is the DHT11. The tempera-
ture and humidity readings from the sensor are produced as a 4) Microcontroller ESP32: The ESP32 belongs to a class
serial data by an 8-bit microcontroller and a specialised NTC of on-chip microcontrollers with low power and cheap cost.
for temperature measurement. It is simple to integrate with It comes equipped with built-in with two mode Bluetooth and
different microcontrollers because the sensor is already factory Wi-Fi. This is specifically designed for better adaptability,
calibrated. The sensor has an accuracy of ±1◦ C and ±1 % durability and dependability within a wide range of purposes.
and evaluate the temperature range of 0 to 50 ◦ C as well as Since the ESP32 has a USB port, it is said to be a plug-and-
humidity levels between 20 % and 90 %. Consequently this play device, meaning all farmer have to do is put in the cable to
sensor can be the best option for farmers [8]. turn it on and start programming it like one would an Arduino
DHT11- Temperature and Humidity Sensor is shown in Fig. development board. Although the Arduino IDE is user-friendly
3. and may be used by beginners, the ESP-IDF is the native
environment for programming ESP32. The programming of
this board may be done using the Arduino IDE. However, one
must install a few drivers and libraries to make it compatible
with the Arduino IDE and ready to use, just as we do with
other Arduino boards [8].
Microcontroller ESP32 is shown in Fig. 5.
Authorized licensed use limited to: VTU Consortium. Downloaded on October 24,2024 at 06:53:37 UTC from IEEE Xplore. Restrictions apply.
7) Rain Sensor: The module for rain detection is straight-
forward and simple to operate. When it rains, the module acts
as an indicator and measures the amount of rain. In other
words, this rain module can measure things that a humidity
monitor cannot. The full module includes a connecting wire, a
control board, and a rain board. A range of weather conditions
would be tracked with the rain sensor, that can also produce
Fig. 5. ESP32 Microcontroller
fixed output signals and analog output [22].
Rain Sensor is shown in Fig. 8.
VII. I MPLEMENTATION
It is significant that the ESP 32-WROOM-32 processor is
capable of accessing every component that is connected to the
development package. This makes it important. The effective
generic 32-bit MCU, 2.4 GHz Wi-Fi and Bluetooth 5 (LE)
Fig. 6. Sun Light Sensor module focuses on a wide range of applications from low-
power sensor systems to particularly demanding tasks, like
6) pH Sensor: One of the most essential elements of voice encoding, music streaming, and MP3 decoding. It also
gardening that is easy to neglect is the pH of the soil. A features a rich set of components and provides acceleration
plant’s capacity to absorb nutrients and the availability of those for neural network computing and signal processing demands.
nutrients are both influenced by the pH. One can quickly A small submersible water pump with a hose, a one-way 5
examine the health of the plants with the Three-Way Soil volt relay to turn on and off the water pump and soil moisture
Metre For Moisture, Light Intensity, and pH Testing Metre. as the primary sensor for gathering moisture data which makes
The pH scale has a range of 0 to 14, 0 is acidic number, 7 is up the entire system.
a neutral and 14 is basic [21]. Every minute, the integrated development package will
pH Sensor is shown in Fig. 7. provide the server or framework with an updated estimate
of the quantity of heat. According to the structures, the
DHT11 temperature and humidity sensors adjust the speaker
to exact temperatures for supporters (estimated in Kelvin) and
Fahrenheit or Celsius.
To produce the ideal temperature sensor, the two rivals are
sent to the manufacturing line. When all sensors are in started
mode. The temperature and humidity sensor would gather
real time information. If water level of the tank drops below
the threshold while the air temperature rises above it, or the
other way around, the motor would automatically turn on. The
temperature measurements in degrees Celsius (0 to 50 °C) and
the humidity value in percentage of relative humidity (20 to
Fig. 7. pH Sensor
90 % RH) are provided by the DHT11 sensor.
Fig. 9 shows the flow chart.
Authorized licensed use limited to: VTU Consortium. Downloaded on October 24,2024 at 06:53:37 UTC from IEEE Xplore. Restrictions apply.
VIII. R ESULTS AND D ISCUSSION
The benefits and key characteristics of the structure are
analysed in this part based on the image and screenshot
of the suggested working model that was provided in part
IV. The presence of this structure and its implementation in
fields are absolutely essential. The accurate performance is
provided by the system and the sensors. Every sensor on the
board has an interaction with the hardware. The hardware
components include the microcontroller, a water pump, tem-
perature, humidity sensors, DHT11, ultrasonic sensor, the soil
moisture sensor,rain sensor, sun light sensor and pH sensor
are interfaced.
1) Moisture Sensor Testing:
We had tested Moisture sensor by dipping in glass
containing soil. When the soil had no water content then
Moisture level was zero. As we put more and more water
inside soil, the Moisture level was increased upto 90 %.
2) Temperature and Humidity Sensor Testing-DHT11:
This sensor was tested for room temperature and humid-
ity. It showed correct reading.
3) pH Sensor Testing:
The pH sensor is tested on sea soil and black soil. The
pH of sea soil is low (6.2) as compared to black soil
(7.5).
4) Sunlight Sensor Testing:
Torch was held on sunlight sensor. As the distance be-
tween torch and sensor decreased, the reading of sunlight
sensor showed higher value due to more intensity of
light.
5) Ultrasonic Sensor Testing: This sensor is kept horizon-
Fig. 9. Flow Chart
tally on water tank, If tank level is full, then sensor
shows full. Depending on water level in tank the results
are shown.
6) Rain Sensor: Few droplets of water are kept on rain
sensor, that shows rain is on in Mobile Application.
IoT role allow features to be changed inside a framework.
Table. II shows the Numerical result obtained.
It is appropriate for many monitoring and control systems
because of its affordability, simplicity, precision, and stability.
TABLE II.
Measurement of the water level at the water system is done N UMERICAL RESULT
using the water level indicator. The same scale and centimeters
Sr No. All type of sensor Experiment taken
are used for water sensing level. An engine would automati-
Water is present Water is absent
cally shut down in certain circumstances when the water level 1 Soil moisture sensor 68 % 50 %
reaches a specified point. With IoT, a building would have 2 Temperature 30 ◦ C 33 ◦ C and above
these statistics fully recreated. Sun light sensors measure the 3 Humidity 89 % 75 %
4 Sun light Sensor No Yes
amount of sunlight, if it is discovered that the intensity is 5 Rain Sensor Yes No
harmful to crops, the user will be notified so they would take 6 Water tank Level 100 % 80 %
the necessary safety measures. The module that regulates the 7 Pump Off On
raindrop sensor is linked to the control module for the rain 8 pH Sensor 5.6 7.2
board module.
Through the mobile application, the database receives the
In order to gather and share information, the Internet of information gathered from these sensors. The program is used
Things will function as an Internet operation that is linked in the control part to start the system.
to systems, sensors, actuators, architecture, brute force equip- If water level of the tank drops below the threshold while
ment, navigation and unique gadgets. Due to numerous current the air temperature rises above it, or the other way around,
developments, these things come with sensitive data that is the motor would automatically turn on. A manual switch is
later withheld across other devices [2]. present in the field when the system is in manual mode to
Authorized licensed use limited to: VTU Consortium. Downloaded on October 24,2024 at 06:53:37 UTC from IEEE Xplore. Restrictions apply.
ensure that the supply of water would be manually shut off
in the event of a system failure. This would be beneficial for
cultivation of crops. Hardware Image is shown in Fig. 10, live
setup of project and Mobile application result are shown in
Fig. 11 and Fig.12
IX. C ONCLUSION
In this study, an IoT-based automated agriculture mechanism
has been described. A system that successfully controls the
agriculture industry is created using the Internet of Things
and cloud computing. All environmental characteristics are
sensed by this system, which then transmits the data to the
user through the cloud. It delivers exact data because of lot
of sensors. The motor will turn on or off in accordance with
the accurate tank level as determined by using the ultrasonic
Fig. 11. live setup of project sensor, which is going to help in extremely efficient water use
and further reduce total costs. This asset enables the farmer to
further develop his or her agriculture. It results in increased
crop output, a longer production process, greater quality and
less need for protective chemicals. Many countries are trying
to use IoT to increase in production yield.
R EFERENCES
[1] N. Victor, P. K. R. Maddikunta, D. R. K. Mary, R. Murugan, R. Chengo-
den, T. R. Gadekallu, N. Rakesh, Y. Zhu, and J. Paek, “Remote sensing
for agriculture in the era of industry 5.0–a survey,” IEEE Journal of
Selected Topics in Applied Earth Observations and Remote Sensing,
2024.
[2] A. Jain and A. Kumar, “Smart agriculture monitoring system using iot,”
International Journal for Research in Applied Science and Engineering
Technology, vol. 8, no. 7, pp. 366–372, 2020.
[3] M. N. Mowla, N. Mowla, A. S. Shah, K. Rabie, and T. Shongwe,
“Internet of things and wireless sensor networks for smart agriculture
applications-a survey,” IEEE Access, 2023.
Authorized licensed use limited to: VTU Consortium. Downloaded on October 24,2024 at 06:53:37 UTC from IEEE Xplore. Restrictions apply.
[4] N. Ananthi, J. Divya, M. Divya, and V. Janani, “Iot based smart soil
monitoring system for agricultural production,” in 2017 IEEE Technolog-
ical Innovations in ICT for Agriculture and Rural Development (TIAR).
IEEE, 2017, pp. 209–214.
[5] V. Lohchab, M. Kumar, G. Suryan, V. Gautam, and R. K. Das, “A review
of iot based smart farm monitoring,” in 2018 Second International Con-
ference on Inventive Communication and Computational Technologies
(ICICCT). IEEE, 2018, pp. 1620–1625.
[6] A. A. AlZubi and K. Galyna, “Artificial intelligence and internet of
things for sustainable farming and smart agriculture,” IEEE Access,
2023.
[7] A. Borthakur, “Agricultural research in india: an exploratory study,”
International journal of social science & interdisciplinary research
ISSN: 2277-3630 Impact factor: 7.429, vol. 11, no. 01, pp. 291–295,
2022.
[8] A. F. Suhaimi, N. Yaakob, S. A. Saad, K. A. Sidek, M. E. Elshaikh, A. K.
Dafhalla, O. B. Lynn, and M. Almashor, “Iot based smart agriculture
monitoring, automation and intrusion detection system,” in Journal of
Physics: Conference Series, vol. 1962, no. 1. IOP Publishing, 2021, p.
012016.
[9] R. R. Ashrit and S. Joshi, “Farmer’s understanding and adoption of
agricultural practices in southern part of india,” Discover Agriculture,
vol. 2, no. 1, p. 5, 2024.
[10] S. Sirohi and S. Mittal, “Agricultural infrastructure in india: Current
situation, challenges and potential for expansion,” Food for Policy:
Reforming Agriculture, p. 131, 2008.
[11] M. J. G. Priyadharshini, B. Hariharasudhan, R. Neelakandan, R. Arvind
et al., “Review on iot based smart agriculture monitoring sys-
tem,” IJRAR-International Journal of Research and Analytical Reviews
(IJRAR), vol. 9, no. 2, pp. 38–43, 2022.
[12] S. I. Hassan, M. M. Alam, U. Illahi, M. A. Al Ghamdi, S. H. Almotiri,
and M. M. Su’ud, “A systematic review on monitoring and advanced
control strategies in smart agriculture,” Ieee Access, vol. 9, pp. 32 517–
32 548, 2021.
[13] M. Ayaz, M. Ammad-Uddin, Z. Sharif, A. Mansour, and E.-H. M. Ag-
goune, “Internet-of-things (iot)-based smart agriculture: Toward making
the fields talk,” IEEE access, vol. 7, pp. 129 551–129 583, 2019.
[14] A. T. Abagissa, A. Behura, and S. K. Pani, “Iot based smart agricultural
device controlling system,” in 2018 Second International Conference on
Inventive Communication and Computational Technologies (ICICCT).
IEEE, 2018, pp. 26–30.
[15] S. Prathibha, A. Hongal, and M. Jyothi, “Iot based monitoring system in
smart agriculture,” in 2017 international conference on recent advances
in electronics and communication technology (ICRAECT). IEEE, 2017,
pp. 81–84.
[16] N. Suma, S. R. Samson, S. Saranya, G. Shanmugapriya, and R. Sub-
hashri, “Iot based smart agriculture monitoring system,” International
Journal on Recent and Innovation Trends in computing and communi-
cation, vol. 5, no. 2, pp. 177–181, 2017.
[17] K. Patil and N. Kale, “A model for smart agriculture using iot,” in
2016 international conference on global trends in signal processing,
information computing and communication (ICGTSPICC). IEEE, 2016,
pp. 543–545.
[18] E. V. P. Anand Nayyar, “Iot based smart sensors agriculture stick for live
temperature and moisture monitoring using arduino, cloud computing &
solar technology,” May 2015, 2015.
[19] C. K. Sahu and P. Behera, “A low cost smart irrigation control system,”
in 2015 2nd International conference on electronics and communication
systems (ICECS). IEEE, 2015, pp. 1146–1152.
[20] A. Al-Fuqaha, M. Guizani, M. Mohammadi, M. Aledhari, and
M. Ayyash, “Internet of things: A survey on enabling technologies,
protocols, and applications,” IEEE communications surveys & tutorials,
vol. 17, no. 4, pp. 2347–2376, 2015.
[21] https://www.electronicscomp.com/3-way-soil-meter-for-moisture,
-light-intensity-and-ph-testing-meter.
[22] https://www.datasheethub.com/rain-drops-detection-sensor-module/.
Authorized licensed use limited to: VTU Consortium. Downloaded on October 24,2024 at 06:53:37 UTC from IEEE Xplore. Restrictions apply.