Iot D 24 00628
Iot D 24 00628
Iot D 24 00628
Opposed Reviewers:
Powered by Editorial Manager® and ProduXion Manager® from Aries Systems Corporation
Manuscript (without Author Details)
Vishal Kumar Patel1 , Sanjeet Kumar1 , Ved Anand1 , Twisha Talukder1 , and
Deepsubhra Guha Roy2∗
1
Institute of Engineering and Management,University of Engineering and
Management, Kolkata, India
2
IEM Centre of Excellence for Cloud Computing and IoT, Department of
CSE(AIML), Institute of Engineering and Management, University of Engineering
and Management, Kolkata, India
[email protected]*
1 Introduction
The agricultural sector stands at the nexus of global food security and economic
prosperity, yet faces persistent challenges in optimizing resource utilization, en-
hancing productivity, and promoting sustainability. Practicing monocropping,
a widespread agricultural approach, frequently results in soil depletion, dimin-
ished crop productivity and quality, and heightened susceptibility to diseases and
pests. These alterations stem from shifts in soil microbial populations, variations
in nutrient accessibility, and the impacts of allelopathy. Nevertheless, recent re-
search has provided insights into the mechanisms underlying the challenges posed
by monocropping and has identified effective strategies to overcome these obsta-
cles. [17] In response to these and many more challenges, SmartzAgri emerges
as a pioneering initiative at the forefront of agricultural innovation, integrating
Internet of Things (IoT), machine learning (ML), and web development tech-
nologies to revolutionize crop cultivation practices.
One such feature is the integration of cultivation guidance, which not only
provides farmers with comprehensive instructions on how to cultivate the recom-
mended crops effectively but also serves as a valuable learning resource for the
younger generation aspiring to enter farming. This feature equips users with prac-
tical knowledge and best practices, enabling them to maximize crop yield and
quality while minimizing resource wastage and environmental impact. Further-
more, SmartzAgri’s web development component enables seamless integration
with additional IoT features such as smart irrigation systems and environmental
monitoring devices. This holistic approach to precision agriculture ensures that
farmers have access to a comprehensive suite of tools and resources to address
the diverse challenges they face in modern farming practices.
2 Motivation:
The motivation behind the inception of SmartzAgri stems from the pressing
challenges faced by the agricultural sector globally. Despite being the backbone of
food security and economic stability, agriculture encounters numerous obstacles,
including inefficient resource utilization, unpredictable environmental conditions,
and declining soil health.
One of the primary motivations for SmartzAgri is to leverage technology to
overcome these challenges and empower farmers with data-driven solutions for
sustainable crop management. By integrating Internet of Things (IoT) devices,
machine learning algorithms, and web-based platforms, SmartzAgri aims to rev-
olutionize traditional farming practices and enhance productivity, profitability,
and environmental sustainability.
3 Contribution:
4 Literature Survey:
5 Proposed Methodology:
5.1 Data Collection and Preprocessing:
The data employed in this research was sourced from Kaggle, a renowned online
platform for datasets and modified as per our requirement, a prominent plat-
6 V.K Patel et al.
form for data science projects and competitions. This dataset comprises approx-
imately 72,312 instances for training and 18,079 instances for testing of 40 dif-
ferent crops namely Sunflower, Coriander, moong, jute, rapeseed, wheat, potato,
maize, cotton, rice,ladyfinger, onion, sweetpotato, ragi, horse gram, soyabean,
turmeric, jowar, banana, cauliflower, barley,papaya, orange, tomato, brinjal, gar-
lic, cabbage, jackfruit, blackpepper, radish, grapes, blackgram, mango,cucumber,
cardamom, bitter gourd, pineapple, bottle gourd, drumstick, pumpkin, encom-
passing soil samples collected from agricultural fields along with corresponding
crop labels. Soil samples were gathered using IoT-enabled devices equipped with
sensors to measure crucial dimensions such as Nitrogen (N),Phosphorus (P),
Potassium (K), pH, soil-moisture, and temperature [18]. Additionally, weather
data,including rainfall and temperature, were integrated into the dataset to pro-
vide comprehensive environmental insights . Prior to model development, the col-
lected data underwent thorough preprocessing procedures.This involved cleaning
noise, addressing missing values, and normalizing features to ensure consistency
and reliability. Moreover, feature selection techniques were applied to identify
the most pertinent parameters for crop recommendation, enhancing the dataset’s
relevance and efficiency. Data augmentation methods were also employed to en-
rich the dataset’s diversity and representativeness, thus bolstering the models’
robustness. By employing the Anova test, we can assess whether there is a re-
lationship or independence between features, uncover patterns, and derive well-
informed conclusions regarding the significance of correlations present within
the dataset. This statistical test allows us to evaluate the interdependence of
variables, unveil potential connections, and derive meaningful insights regarding
the relationships present in the data.
Title Suppressed Due to Excessive Length 7
X = X1 + X2 + . . . + Xj (1)
Here, Equation(1) represents the overall variable X as the sum of individual
group variables X1, X2, ..., Xj. and
X
SSB = nj (X j + X)2 (2)
j
SSE
M SE = (where N is the total number of observations) (5)
N −k
Additionally Equation (4) & (5) calculates the mean squared variation between
groups and the mean squared variation within groups respectively.
M SB
F = (6)
M SE
it may not be adequate for imbalanced datasets where one class significantly out-
weighs the other.
T rueP ositive + T rueN egative
Accuracy = (8)
T otalP redictions
Recall Recall, often known as sensitivity, assesses the model’s ability to capture
all relevant instances of a positive class. As shown in equation(10) it is calculated
as the ratio of true positive predictions to the sum of true positives and false
negatives. A high recall value signifies that the model effectively identifies most
of the actual positive instances.
T rueP ositive
Recall = (10)
T rueP ositive + F alseN egative
10 V.K Patel et al.
During this stage, a thoughtful process was undertaken to choose machine learn-
ing algorithms capable of effectively handling the intricacies associated with
crop recommendation in agricultural settings. Each selected algorithm brings
distinct advantages and capabilities that enhance the overall efficiency of the
crop recommendation system. Through the integration of multiple algorithms in
an ensemble approach,SmartzAgri can utilize the combined expertise of diverse
models, ensuring precise and dependable crop recommendations customized to
the unique requirements of farmers.Table 2. represents the training dataset uti-
lized for model training. Four specific algorithms were selected based on their
individual strengths and appropriateness for the given task:
Random-Forest Classifier Random Forest was selected for its robustness and
ability to handle large-scale datasets with high dimensionality. As an ensemble
learning method, Random Forest constructs multiple decision trees during train-
ing and aggregates their predictions to produce a more accurate and stable result.
This method proves exceptionally beneficial for crop recommendation endeav-
ors, adept at capturing intricate connections between soil attributes and crop
compatibility, thus minimizing the likelihood of overfitting.The accompanying
Fig.3. illustrates the evaluation measures of the Random Forest model, includ-
ing precision, F1 score, recall, and accuracy which is 93.62%, 93.62%, 93.92%
and 93.92% respectively.
Naive Bayes Classifier Naive Bayes was integrated into the model selection
phase due to its straightforwardness and effectiveness in managing categorical
data. Although it assumes feature independence, Naive Bayes frequently delivers
commendable performance and offers valuable perspectives in crop recommenda-
tion endeavors. Its computational swiftness and minimal training requirements
render it appealing, particularly in scenarios involving extensive datasets and
constrained computational capabilities. The accompanying Fig.6.. illustrates the
evaluation measures of the SVM model, including precision,F1 score, recall, and
accuracy which is 88.44%, 90.19%, 92.92% and 92.92% respectively.
Support Vector Machine Support Vector Machine (SVM) was chosen for its
ability to handle high-dimensional data and nonlinear relationships. By trans-
forming the provided input data into a higher-dimensional feature space and
identifying the optimal hyperplane that separates different classes, SVM can
effectively capture complex decision boundaries and achieve high classification
accuracy. This makes SVM particularly well-suited for crop recommendation
tasks where the relationships between soil parameters and crop suitability may
be nonlinear and intricate. The accompanying Fig.7. illustrates the evaluation
measures of the SVM model, including precision, F1 score, recall, and accuracy
which is 88.52%, 90.27%, 93.00%, and 93.00%.
To evaluate the efficacy of the trained models, various evaluation metrics were
employed, including accuracy, precision, recall, and F1-score. Rigorous cross-
validation techniques were implemented to assess the model’s generalization ca-
pacity and mitigate potential overfitting issues. Comparative analyses were con-
ducted to discern the performance disparities between different algorithms and
ascertain the most effective approach for crop recommendation in agricultural
contexts. Table 3. depicts a comparison of metrics for different classifiers, reveal-
ing that XG Boost achieved the highest performance measure.Fig.8. illustrates
a plot representation of all the models.
The web platform for SmartzAgri was meticulously crafted using a combination
of modern web technologies to ensure scalability, performance, and intuitive user
interaction.Fig.9. displays the cover page of our web application. Fig.10. displays
the data input form of our web application.Fig.11. showcases the result of the
recommended crop.
1. Sensor Nodes: Throughout the field, sensor nodes are deployed to monitor
soil conditions.
2. NRF2401 Wireless Transceiver Module: The NRF2401 wireless transceiver
module serves as the backbone of communication, facilitating wireless links
between sensor nodes and the central hub, ensuring smooth data transmis-
sion.
3. Central Hub: The central hub serves as the gateway for receiving data
from sensor nodes and forwarding it to data analysis platforms.
4. Cloud-based Servers or Local Databases: Soil data collected by the sen-
sor nodes is stored and processed in cloud-based servers or local databases.
These platforms provide scalable storage and computing resources for data
processing.
Fig. 12. Components Involved in the IoT- based Soil Monitoring System
20 V.K Patel et al.
1. Hardware Setup: For Hardware setup follow these steps Start assembling
the circuit by addressing the following circuit diagram. Fig.12.(B). & Fig.13.
We have illustrated the comprehensive circuit diagram and the schematic
representation of the IoT device in Fig.14. & Fig.15. through TinkerCad
platform.
– Mount the Soil NPK Sensor, Temperature Sensor, and Capacitive Soil
Moisture Sensor on the respective sensor nodes.
– Establish connections between the sensors and Arduino Board, and be-
tween the ESP32 WiFi Module and Wireless Transceiver Module(NRF24L01)
for the central gateway.
Title Suppressed Due to Excessive Length 21
– Ensure proper power supply connections and ground connections for all
components to prevent electrical issues.
– Refer to the following connections:
• For Sensor Node: Connect NRF24L01 to Arduino Nano Board as
follows:
∗ VCC of NRF24L01 → Arduino’s input 3.3V
∗ MOSI of NRF24L01 → Arduino’s input D11
∗ CSN of NRF24L01 → Arduino’s input D10
∗ GND of NRF24L01 → Arduino’s input GND
∗ MISO of NRF24L01 → Arduino’s input D12
∗ SCK of NRF24L01 → Arduino’s input D13
∗ CE of NRF24L01 → Arduino’s input D9
• For Central Gateway: Connect NRF24L01 to ESP32 WiFi Module
as follows:
∗ VCC of NRF24L01 → ESP32’s input 3.3V
∗ MOSI of NRF24L01 → ESP32’s input D23
∗ CSN of NRF24L01 → ESP32’s input D5
∗ GND of NRF24L01 → ESP32’s input GND
∗ MISO of NRF24L01 → ESP32 input D19
∗ CE of NRF24L01 → ESP32 input D4
∗ SCK of NRF24L01 → ESP32 input D18
•
2. Software Configuration: Follow the following steps for the Installation and
Configuration of Necessary Software Libraries to Arduino IDE:
(a) Download and install the required software libraries for Arduino and
ESP32 development environments.
(b) Include libraries for NRF24L01 Library, RH24 Library, One Wire Li-
brary, and Dallas Library.
22 V.K Patel et al.
6 Deployment:
Subsequently, the IoT device will test the soil sample, analyze the soil, and
transfer the data to the Web platform where ML models will be available and
are harmoniously incorporated, it will receive the soil data and will analyze on
the integrated Machine Learning model and personalized crop recommendations
in real-time. User feedback and usability testing were conducted iteratively to
gauge the system’s effectiveness and user-friendliness, thereby ensuring optimal
user experience. Continuous monitoring and updates were undertaken to up-
hold the system’s reliability and accuracy, aligning with the dynamic nature of
agricultural environments and practices.
7 Conclusion:
8 Future Scope:
In the coming future, we will strive to advance SmartzAgri in various fields,
including:
9 Acknowledgement:
We would like to express our heartfelt gratitude to the IEM Centre of Excellence
for Cloud Computing and IoT for invaluable support and resources from IEM
Grant in Aid project of Dr. Deepsubhra Guha Roy, which have enabled us to
Title Suppressed Due to Excessive Length 25
conduct this review. We are also deeply thankful to the IEDC-CSE of Institute
of Engineering & Management, Kolkata, for providing us the work space that
made this work possible. ’
10 References:
1. Babber, J.; Malik, P.; Mittal, V.; Purohit, K.C. Analyzing Supervised Learn-
ing Algorithms for Crop Prediction and Soil Quality. In Proceedings of the
6th International Conference on Computing Methodologies and Communi-
cation (ICCMC), Erode, India, 29–31 March 2022; pp. 969–973.
2. Ishak, M.; Rahaman, M.S.; Mahmud, T. FarmEasy: An Intelligent Platform
to Empower Crop Prediction and Crop Marketing. In Proceedings of the 13th
International Conference on Information & Communication Technology and
System (ICTS), Surabaya, Indonesia, 17–20 April 2021; pp. 224–229.
3. Patel, K.; Patel, H.B. A Comparative Analysis of Supervised Machine Learn-
ing Algorithm for Agriculture Crop Prediction. In Proceedings of the Fourth
International Conference on Electrical, Computer and Communication Tech-
nologies (ICECCT), Erode, India, 15–17 September 2022; pp. 1–5.
4. Yamparla, R.; Shaik, H.S.; Guntaka, N.; Marri, P.; Nallamothu, S. Crop
Yield Prediction using Random Forest Algorithm. In Proceedings of the
7th International Conference on Communication and Electronics Systems
(ICCES), Coimbatore, India, 22–24 June 2022; pp. 1538–1543.
5. Chandraprabha, M.; Dhanaraj, R.K. Soil Based Prediction for Crop Yield
using Predictive Analytics. In Proceedings of the 3rd International Confer-
ence on Advances in Computing, Communication Control and Networking
(ICAC3N), Greater Noida, India, 17–18 December 2021; pp. 265–270.
6. Elbasi, E.; Zaki, C.; Topcu, A.E.; Abdelbaki, W.; Zreikat, A.I.; Cina, E.;
Shdefat, A.; Saker, L. Crop Prediction Model Using Machine Learning Al-
gorithms. Appl. Sci. 2023, 13, 9288. https://doi.org/10.3390/app13169288
7. Vijo T Varghese, Kalyan Sasidhar, Rekha P, "A Status Quo of WSN Sys-
tems for Agriculture", International Conference on Advances in Computing,
Communications and Informatics (ICACCI), IEEE, 2015.
8. Memon, R.; Memon, M.; Malioto, N.; Raza, M.O. Identification of growth
stages of crops using mobile phone images and machine learning. In Proceed-
ings of the International Conference on Computing, Electronic and Electrical
Engineering (ICE Cube), Quetta, Pakistan, 26–27 October 2021; pp. 1–6.
9. Aruul Mozhi Varman S, Arvind Ram Baskaran, Aravindh S, Prabhu, "Deep
Learning and IoT for Smart Agriculture Using WSN”, IEEE International
Conference on Computational Intelligence and Computing Research, 2017.
10. R. Ramya, C.Sandhya, R. Shwetha, "Smart farming system using sensors",
IEEE International Conference on Technological Innovations in ICT For
Agriculture and Rural Development, 2017.
11. Giritharan Ravichandran, Koteeshwari R S, "Agricultural crop predictor
and advisor using ANN for smartphones”, IEEE International Conference
on Emerging Trends in Engineering, Technology and Science (ICETETS),
2016.
26 V.K Patel et al.
12. Thomas van Klompenburg, Ayalew Kassahun, Cagatay Catal, Crop yield
prediction using machine learning: A systematic literature review, Comput-
ers and Electronics in Agriculture, Volume 177, 2020, 105709, ISSN 0168-
1699, https://doi.org/10.1016/j.compag.2020.105709.
13. Umair Ayub, Syed Atif Moqurrab, "Predicting crop diseases using data min-
ing approaches: classification", IEEE 1st International Conference on Power,
Energy and Smart Grid (ICPESG), 2018.
14. Rekha P, Maneesha V. Ramesh, Venkata Prasanna Rangan, Nibi K V, "High
yield groundnut agronomy: An IoT based precision farming framework",
IEEE, 2017.
15. P. Kanaga Priya and N. Yuvaraj 2019 J. Phys.: Conf. Ser. 1362 012038
16. Belete, Tegegn & Yadete, Eshetu. (2023). Effect of Mono Cropping on Soil
Health and Fertility Management for Sustainable Agriculture Practices: A.
192-197, 10.11648/j.jps.20231106.13.
17. https://www.kaggle.com/datasets/atharvaingle/crop-recommendation-dataset
18. https://how2electronics.com/iot-based-soil-nutrient-monitoring-with-arduino-
esp32
19. Arduino UNO And NPK Sensor Project - Makerguides.com
20. https://arduino-tutorials.net/tutorial/capacitive-soil-moisture-sensor-arduino
21. Sinha, S. et al. (2023). Deep Learning-Based Identification of Vegetable
Species: System for Specially Abled Persons. In: Bhateja, V., Yang, XS.,
Lin, J.CW., Das, R. (eds) Evolution in Computational Intelligence. FICTA
2022. Smart Innovation, Systems and Technologies, vol 326. Springer, Sin-
gapore, https://doi.org/10.1007/978-981-19-7513-43 6.
Declaration of Interest Statement
Declaration of interests
☐The authors declare that they have no known competing financial interests or personal relationships
that could have appeared to influence the work reported in this paper.
☒The authors declare the following financial interests/personal relationships which may be considered
as potential competing interests:
Deepsubhra Guha Roy reports financial support and administrative support were provided by Institute
of Engineering & Management. Deeppsubhra Guha Roy reports a relationship with Institute of
Engineering & Mangement that includes: employment. If there are other authors, they declare that
they have no known competing financial interests or personal relationships that could have appeared
to influence the work reported in this paper.