Springer Nature LaTeX Template 1 (1)
Springer Nature LaTeX Template 1 (1)
Abstract
India is an agricultural country. The agriculture sector is facing Numerous chal-
lenges such as water scarcity, climate change, and low productivity due to
outdated farming practices. Therefore, there is a dire need to introduce modern
technology into the agriculture sector to enhance its productivity and efficiency.
This project presents an IOT Based Smart Agriculture Monitoring System aimed
at increasing agricultural productiv ity by automating and optimizing crop man-
agement. The system uses various sensors to monitor environmental conditions
in real time. The data collected are processed by a microcontroller and wirelessly
transmitted to a web application that provides farmers with visualized infor-
mation about their crops. The system is designed to be affordable and easy to
use, allowing farmers to monitor their crops remotely and take the neces sary
actions to optimize their growth. By providing farmers with real-time data on
their crops, the system can help them make informed decisions about the use of
water and fertilizers, pest control, and harvest times. This, in turn, can lead to
increased crop yields, reduced costs, and improved profitability. The project also
has future implica tions, including the integration of machine learning and arti-
ficial intelligence technologies to further optimize crop management. With the
increasing demand for food production and the need to address the challenges of
climate change and food security, this project. serves as a promising solution for
sustainable agriculture.
1
1 Introduction
The fast-growing world population can be expected around 10 billion in the year
2060 as per the survey. However, the demand for food grain increases abruptly these
years due to population. Unfortunately, the food grain is indirectly proportional to
growth in population. Food production should be improved for this reason in coming
years globally[1].The IoT has also recently given a strong impression of the agriculture
sector with a wide range of sensors used for various smart agriculture targets. The IoT
applications are increased exceedingly year by year. control of IoT devices for smart
agriculture. Different sensors in the agriculture sector play a significant role in IoT
technologies[2]. Connecting multiple interconnected devices, such as several sensors,
drivers and smart objects, to mobile devices through the use of the Internet[3].The
sharing of information with intelligent control and decision-making services consists
of IoT services due to the many cloudbased remote data acquisition. Such capabilities
can provide efficient production to the smart agriculture industry. The conventional
approach of agriculture is to enhance modernized cultivation with the exploration of
the IoT region of interest in the agricultural field[4].IoT development has given heaps
of advantages in all sectors over the last decade. The IoT is a key element for the
integration of scalable software, hardware, cost-effective process, self-sustainable, and
smart decision for smart farming. Scheduling including all activities such as irrigation,
plant growth, identification of disease by its leaf, and production management in
the smart agriculture sector[5].In the overall situation, the cost is very reasonable
for all farming solutions with IoTbased smart agriculture. Researchers introduced
several integrated advanced technologies to increase productivity in the agricultural
sector[6].Therefore, in order to achieve the target progressively, many new innovations
can be combined with traditional farming. With multiple sensors and described in
green nature, the IoT can smartly build agriculture[7].
2
decision-making processes for irrigation and crop management. The goal is to reduce
resource wastage, improve crop yield, and provide farmers with actionable insights,
thereby promoting precision agriculture and contributing to a more productive and
environmentally friendly agricultural process.
2 LITERATURE REVIEW
The newer scenario of decreasing water tables, drying up of rivers and tanks, unpre-
dictable environment present an urgent need of proper utilization of water. To cope up
with this use of temperature and moisture sensor at suitable locations for monitoring
of crops is implemented in.[8]
An algorithm developed with threshold values of temperature and soil moisture can
be programmed into a microcontroller-based gateway to control water quantity. The
system can be powered by photovoltaic panels and can have a duplex communication
link based on a cellularInternet interface that allows data inspection and irrigation
scheduling to be programmed through a web page.[9]
The technological development in Wireless Sensor Networks made it possible to use
in monitoring and control of greenhouse parameter in precision agriculture. After the
research in the agricultural field, researchers found that the yield of agriculture is
decreasing day by day. However, use of technology in the field of agriculture plays
important role in increasing the production as well as in reducing the extra man
power efforts. Some of the research attempts are done for betterment of farmers
which provides the systems that use technologies helpful for increasing the agricultural
yield.[10]
A remote sensing and control irrigation system using distributed wireless sensor net-
work aiming for variable rate irrigation, real time in field sensing, controlling of a
site specific precision linear move irrigation system to maximize the productivity with
minimal use of water was developed by Y. Kim . The system described details about
the design and instrumentation of variable rate irrigation, wireless sensor network and
real time in field sensing and control by using appropriate software. The whole sys-
tem was developed using five in field sensor stations which collects the data and send
3
it to the base station using global positioning system (GPS) where necessary action
was taken for controlling irrigation according to the database available with the sys-
tem. The system provides a promising low cost wireless solution as well as remote
controlling for precision irrigation.[11]
In the studies related to wireless sensor network, researchers measured soil related
parameters such as temperature and humidity. Sensors were placed below the soil
which communicates with relay nodes by the use of effective communication protocol
providing very low duty cycle and hence increasing the life time of soil monitoring sys-
tem. The system was developed using microcontroller, universal asynchronous receiver
transmitter (UART) interface and sensors while the transmission was done by hourly
sampling and buffering the data, transmit it and then checking the status messages.
The drawbacks of the system were its cost and deployment of sensor under the soil
which causes attenuation of radio frequency (RF) signals.[12]
3 SYSTEM OVERVIEW
The paper consist of four sections; node1, node2, node3 and PC or mobile app to
control system(Shown in Figure 1). In the present system, every node is integration
with different sensors and devices and they are interconnected to one central server via
wireless communication modules. The server sends and receives information from user
end using internet connectivity. There are two modes of operation of the system; auto
mode and manual mode. In auto mode system takes its own decisions and controls the
installed devices whereas in manual mode user can control the operations of system
using android app or PC commands.
4 PROPOSED SOLUTION
4.1 System Architecture
The circuit diagram (Shown in Figure 2) represents an integrated smart soil monitoring
system designed around an Arduino Uno microcontroller, interfacing with multiple
sensors and display modules to assess and communicate soil conditions. Central to the
setup is the Arduino Uno, which acts as the main processing unit. It receives data
inputs from various sensors and sends outputs to the display modules. Connected to
the Arduino is a 16x2 LCD display with an I2C driver and a 0.96-inch OLED display.
Both of these display units are used for visualizing sensor data in real-time. The I2C
driver simplifies the connection of the LCD by reducing the number of data lines
4
required, using only the SDA and SCL lines for communication, which are linked to
the A4 and A5 pins of the Arduino, respectively. Similarly, the OLED display also
communicates via I2C, connected to the same pins, thus sharing the I2C bus. The
soil moisture sensor is connected to the analog pin A0 of the Arduino and powered
through the 5V and GND pins. This sensor detects the volumetric water content in the
soil and sends an analog signal to the Arduino, which can be processed to determine
soil dryness or wetness. Alongside this sensor is a more advanced soil NPK sensor,
which measures the levels of Nitrogen (N), Phosphorus (P), and Potassium (K) in
the soil, critical for assessing soil fertility. This sensor is powered by an external 12V
power supply and is interfaced through a serial communication protocol via an RS485
module. The RS485 module, which facilitates robust long-distance data transmission,
connects to the Arduino’s digital pins (D10 and D11 in this diagram) and shares power
and ground lines with the external sensor. This communication setup ensures accurate
data transmission between the NPK sensor and the Arduino.
A breadboard is employed for distributing power and simplifying interconnections,
especially for the 5V and GND lines which are shared across various modules. Red
wires typically denote power (5V or 12V), while black lines are used for ground con-
nections, and yellow or blue wires represent data or signal lines. The inclusion of both
an OLED and LCD display allows for simultaneous multi-format output, possibly
enabling basic readings on the LCD and more detailed graphical output on the OLED.
The OLED’s compact size makes it suitable for integrating into smaller form-factor
devices or for dual-display scenarios where space is limited.
The system is likely designed for agricultural or environmental monitoring appli-
cations, where constant soil parameter readings are essential. By combining both
moisture and nutrient sensors, it provides a comprehensive understanding of soil
health. The Arduino processes the sensor data and then displays it on the two differ-
ent screens for easy reading by users. This approach facilitates both local monitoring
and could be extended to include wireless data transmission for remote monitoring
in advanced implementations. The overall design reflects an efficient and modular
5
approach to smart agriculture, enabling real-time soil condition assessments with the
potential for further integration into automated irrigation or nutrient delivery systems.
This table 1 lists the hardware and software components used in a system. It includes
sensors (like gas, temperature, humidity, and moisture) for environmental data col-
lection, and components like Arduino UNO and LCD display for control and output.
Power supply is used for energy, while software tools (like Arduino IDE, HTML/CSS,
6
Node.js, Express.js, MongoDB, Python, and Google Colab) are used for programming,
backend processing, data storage, and machine learning integration.
7
Algorithm 1 Read Serial Data and Send to Frontend via WebSocket
1: Import required modules:
2: Load express to serve frontend files.
3: Load http to create a server.
4: Load serialport to communicate with hardware.
5: Load @serialport/parser-readline to parse incoming serial data.
6: Load socket.io for real-time communication.
7: Initialize Express and HTTP Server:
8: Create an Express app instance.
9: Create an HTTP server using the Express app.
10: Attach socket.io to the HTTP server.
11: Serve static frontend files:
12: Use express.static("public") to serve frontend content.
13: Configure Serial Port:
14: Open serial port (e.g., “COM3”) with a baud rate of 9600.
15: Create a line parser using Readline and pipe it to the serial port.
16: Process incoming serial data:
17: On receiving a line of data from the serial port:
18: Split the line by commas.
19: Convert each split value to a number.
20: Assume values are: moisture, nitrogen, phosphorus, potassium.
21: Emit these values to all connected clients via socket.io.
22: Start the server:
23: Listen on port 3000.
24: Log the URL to the console.
This algorithm (Algorithm 2) explains how to display sensor data on a webpage and
suggest suitable crops based on real-time values using WebSocket communication. It
begins by establishing a connection to the backend server using socket.io, which enables
the frontend to receive continuous data updates without refreshing the page. Next, it
accesses specific HTML elements on the page—such as moistureSpan, nitrogenSpan,
phosphorusSpan, potassiumSpan, and suggestedCrop—by their unique IDs so they
can be dynamically updated. Once the WebSocket connection is active, the frontend
listens for sensorData events from the backend. When data is received, it extracts four
key parameters: moisture, nitrogen (N), phosphorus (P), and potassium (K). These
values are then used to update the text content of their corresponding HTML elements
on the webpage, providing a live view of the current soil conditions. The algorithm
also includes a function called suggestCrop() that evaluates the sensor data against
predefined thresholds to recommend a suitable crop. Based on different ranges of
moisture and nutrient levels, it suggests crops such as Rice, Wheat, Maize, or Millet.
If none of the conditions are met, it alerts the user that the crop could not be detected
and advises checking the sensors. Finally, the result of this evaluation is displayed in
the suggestedCrop HTML element, offering the user a real-time crop recommendation.
8
Algorithm 2 Display Sensor Data and Suggest Crop
1: Initialize WebSocket Connection
2: Connect to the backend server using socket.io
10: Update UI
11: Set the textContent of each HTML element with the respective values
5 DATA COLLECTION
The provided data sheet (shown in table 2) shows soil health parameters collected
from different locations along the Ganges area in Hooghly, West Bengal. For each
location, the soil moisture percentage, along with Nitrogen (N), Phosphorus (P), and
Potassium (K) values, have been recorded using IoT sensors.
9
SL.NO Date Data Location Soil Moisture N P K
1 01/11/2024 Bandel 82.00 90 42 43
2 10/11/2024 Hooghly 80.31 85 58 41
3 15/11/2024 Chinsurah 82.32 60 55 44
4 15/12/2024 Chandannagar 80.15 74 35 40
5 20/12/2024 Mankundu 81.60 78 42 42
6 01/01/2025 Bhadreswar 83.37 69 37 42
7 10/01/2025 Baidyabati 82.63 69 55 38
8 15/01/2025 Shrirampur 82.89 94 53 40
9 20/01/2025 Rishra 83.53 89 54 38
10 30/01/2025 Bally 83.03 68 58 38
Table 2 Soil Moisture and NPK values at different locations along the Ganges
area in Hooghly.
he table (shown in table 3) compares the performance of three machine learning models
— KNN, SVM, and Logistic Regression — based on Accuracy, Precision, and Error
Ratio. Among them, the KNN (K-Nearest Neighbors) model performs the best. It
achieves the highest accuracy (0.97) and a high precision (0.98) while maintaining a
very low error ratio (0.02). Although SVM shows perfect precision (1.00), its overall
accuracy (0.91) and higher error ratio (0.08) make it less reliable compared to KNN.
Logistic Regression also performs well with 0.96 accuracy and 0.96 precision, but
it slightly lags behind KNN. Therefore, KNN is considered the best algorithm here
because it offers a balanced combination of high accuracy, high precision, and minimal
error.
10
Fig. 4 Accuracy Comparison Graph
7 CONCLUSION
In conclusion, the Smart Agriculture System developed in this project demonstrates
the potential of integrating IoT technologies into modern farming practices. By using
sensors to monitor soil moisture, temperature, humidity, and other environmental
11
parameters, the system enables real-time data collection and automated control of
irrigation processes. This not only helps conserve vital resources like water but also
ensures timely actions to improve crop health and yield. The inclusion of components
such as microcontrollers, relays, and wireless communication modules allows for effi-
cient and scalable implementation. The system provides farmers with valuable insights
through sensor feedback and display interfaces, contributing to data-driven decision-
making. Overall, this project promotes the shift toward precision agriculture, aiming
for higher productivity, cost-effectiveness, and sustainability in the agricultural sector.
Future enhancements may include cloud integration, mobile app control, and advanced
analytics for even smarter farming solutions.
References
[1] Nisha, G., Megala, J.: Wireless sensor network based automated irrigation
and crop field monitoring system. In: 2014 Sixth International Conference on
Advanced Computing (IcoAC), pp. 189–194 (2014). IEEE
[2] Padyal, A., Shitole, S., Tilekar, S., Raut, P.: Automated water irrigation system
using arduino uno and raspberry pi with android interface. International Research
Journal of Engineering and Technology (IRJET) 5(1), 768–770 (2018)
[3] DrashtiDivani, P., Sunil, K.: Automated plant watering system. In: 2016 Interna-
tional Conference on Computation (2016)
[4] Zhang, L., Dabipi, I.K., Brown Jr, W.L.: Internet of things applications for
agriculture. Internet of things A to Z: technologies and applications, 507–528
(2018)
[5] Sisinni, E., Saifullah, A., Han, S., Jennehag, U., Gidlund, M.: Industrial internet of
things: Challenges, opportunities, and directions. IEEE transactions on industrial
informatics 14(11), 4724–4734 (2018)
[6] Lin, J., Yu, W., Zhang, N., Yang, X., Zhang, H., Zhao, W.: A survey on inter-
net of things: Architecture, enabling technologies, security and privacy, and
applications. IEEE internet of things journal 4(5), 1125–1142 (2017)
[7] Shi, X., An, X., Zhao, Q., Liu, H., Xia, L., Sun, X., Guo, Y.: State-of-the-art
internet of things in protected agriculture. Sensors 19(8), 1833 (2019)
[8] Nandurkar, S., Thool, V., Thool, R.C.: Design and development of precision
agriculture system using wireless sensor network. In: 2014 First International Con-
ference on Automation, Control, Energy and Systems (ACES), pp. 1–6 (2014).
IEEE
[9] Gutiérrez, J., Villa-Medina, J.F., Nieto-Garibay, A., Porta-Gándara, M.Á.: Auto-
mated irrigation system using a wireless sensor network and gprs module. IEEE
transactions on instrumentation and measurement 63(1), 166–176 (2013)
12
[10] Devi, D.V.V., Kumari, G.M.: Real-time automation and monitoring system for
modernized agriculture. International Journal of Review and Research in Applied
Sciences and Engineering (IJRRASE) Vol3 1, 7–12 (2013)
[11] Kim, Y., Evans, R.G., Iversen, W.M.: Remote sensing and control of an irriga-
tion system using a distributed wireless sensor network. IEEE transactions on
instrumentation and measurement 57(7), 1379–1387 (2008)
[12] Wang, Q., Terzis, A., Szalay, A.: A novel soil measuring wireless sensor net-
work. In: 2010 IEEE Instrumentation & Measurement Technology Conference
Proceedings, pp. 412–415 (2010). IEEE
13