Paper 18526
Paper 18526
IJARSCT
International Journal of Advanced Research in Science, Communication and Technology (IJARSCT)
International Open-Access, Double-Blind, Peer-Reviewed, Refereed, Multidisciplinary Online Journal
Impact Factor: 7.53 Volume 4, Issue 6, May 2024
Abstract: Agriculture is an essential need for human life and IOT serves like the better platform for the
smart agriculture. Agricultural issues have always hampered the country's development. Smart farming,
which entails modernizing the conventional farming methods, is the only solution to this challenge. As a
result, the goal of this project is to make agriculture smarter through the use of automation and IoT
technology.
Keywords: Agriculture.
I. INTRODUCTION
Agriculture is an essential need for human life and IOT serves like the better platform for the smart agriculture.
Agricultural issues have always hampered the country's development. Smart farming, which entails modernizing the
conventional farming methods, is the only solution to this challenge. As a result, the goal of this project is to make
agriculture smarter through the use of automation and IoT technology.
The use and adoption of IoT solutions for agriculture it's constantly growing. With India being a land of versatile soils,
the Indian economy is majorly based in agriculture while agricultural productivity it's dependant upon the type of soil.
However, the major problem with the Indian farmers it's insufficient knowledge about the soil. Each soil type has
different characteristics like there are various nutritions present in the soil. The deficiency about the nutritions in soil
decreases the crop productivity. So, there's a need for soil analysis. Alarming situation about farmers' suicide has led the
idea to put efforts in the design and development of a sophisticated soil testing and fertilizer recommendation system.
In Automated farming, we aim to reduce human errors and human efforts by monitoring the soil quality using soil
sensor via webserver.
The key feature about our system it's to determine suitable crops and the fertilizers for the current state of soil by
calculating the pH and moisture content in soil. Our system it will be used for soil analysis in order to increase crop
yield. Based upon soil analysis report, fertilizers it will be recommended to the user. Fertilizers will be recommended
using nutrient status table which is stored in the database. By comparing values about nutrients with table, classification
it will be done and accordingly fertilizers it will be recommended to the user. Our system it will help farmers for better
yield about crops which in turn maximizes the profit. This increases the financial status about the farmers!
only help farmers in choosing the right crop to grow in the next season but also bridge the gap between technology and
the agriculture sector.
[8] R. Garg, P. Jain, and R. K. Jain
In this paper, the authors review the use of machine learning algorithms for crop yield prediction. They discuss the
challenges associated with crop yield prediction, such as climate variability, limited data availability, and the need for
accurate crop phenotyping. The authors then provide a detailed analysis of various machine learning algorithms that
have been used for crop yield prediction, including decision trees, support vector machines, artificial neural networks,
and random [Link] paper also includes a discussion on the various data sources that can be used for crop yield
prediction, such as remote sensing, weather data, soil data, and historical crop yield data. The authors conclude that
machine learning algorithms can be effective tools for crop yield prediction, and that the integration of multiple data
sources can improve the accuracy of the predictions. They suggest that further research is needed to develop models
that can be easily applied by farmers and other stakeholders in the agricultural sector.
[9] S. Kumar, M. R. Gupta, and M. S. Bhatia
The article provides a comprehensive review of the different machine learning algorithms used for crop yield
prediction. The authors discuss the challenges involved in crop yield prediction and how machine learning can help
overcome these challenges. They also provide an overview of the various datasets used for crop yield prediction and the
performance metrics used to evaluate the accuracy of the models. The article highlights the advantages and limitations
of various machine learning algorithms such as Support Vector Machines (SVM), Random Forest, Artificial Neural
Networks (ANN), and Decision Trees. The authors provide a detailed analysis of each algorithm, including their
strengths and weaknesses. They also discuss the pre-processing techniques used to prepare the data for machine
learning, such as feature selection, normalization, and data augmentation.
[10] M. Kamble, D. Kumar, and P. Kumar
The authors reviewed various studies and research papers on the topic of crop yield prediction using machine learning
techniques. The review highlighted the different machine learning algorithms that have been used in the past, including
decision tree, random forest, support vector machines, and artificial neural networks. The study also discusses the
challenges and limitations of applying machine learning techniques for crop yield prediction. The authors noted that the
accuracy of the prediction is affected by various factors, such as the quality and quantity of input data, selection of
relevant features, and choice of machine learning algorithm. They also highlighted the need for further research to
address these challenges and to develop more accurate and robust models for crop yield prediction. Overall, the study
provides a comprehensive overview of the current state of research on crop yield prediction using machine learning
techniques. The authors’ analysis and insights into the various approaches and challenges of the field can serve as a
useful resource for researchers and practitioners in the agriculture domain.
3.2 Objective
To develop a soil-based fertilizer recommendation system that utilizes moisture and NPK sensors with Node
MCU ESP8266 integration.
To provide farmers with real-time data on soil moisture levels and nutrient content, along with tailored
fertilizer recommendations based on agronomic principles.
To evaluate the feasibility and effectiveness of the developed system in optimizing agricultural practices and
enhancing crop productivity.
Copyright to IJARSCT DOI: 10.48175/IJARSCT-18526 192
[Link]
ISSN (Online) 2581-9429
IJARSCT
International Journal of Advanced Research in Science, Communication and Technology (IJARSCT)
International Open-Access, Double-Blind, Peer-Reviewed, Refereed, Multidisciplinary Online Journal
Impact Factor: 7.53 Volume 4, Issue 6, May 2024
Working:
The soil moisture sensor operates in a straightforward manner. The fork-shaped probe with two exposed conductors
acts as a variable resistor (similar to a potentiometer) whose resistance varies with the soil’s moisture content. This
resistance varies inversely with soil moisture:
The more water in the soil, the better the conductivity and the lower the resistance.
The less water in the soil, the lower the conductivity and thus the higher the resistance. The sensor produces an
output voltage according to the resistance, which by measuring we can determine the soil moisture level. A
typical soil moisture sensor consists of two parts.
1. The Probe
The sensor includes a fork-shaped probe with two exposed conductors that is inserted into the soil or wherever the
moisture content is to be measured. As previously stated, it acts as a variable resistor, with resistance varying according
to soil moisture.
2. The Module
In addition, the sensor includes an electronic module that connects the probe to the Arduino. The module generates an
output voltage based on the resistance of the probe, which is available at an Analog Output (AO) pin. The same signal
is fed to an LM393 High Precision Comparator, which digitizes it and makes it available at a Digital Output (DO) pin.
3.5 Software
3.5.1 Arduino IDE
The arduino software (IDE) is an open source software, which is used to programme the Arduino boards, and is an
integrated development environment, developed by [Link]. Allow to write and upload code to arduino boards. And
it consiste of many libraries and a set of examples of mini [Link] software (IDE) is compatible with different
operating systems (Windows, Linux, Mac OS X), and supports the programming languages (C/C++).The Arduino
software is easy to use for beginners, or advanced users. It uses to get started with electronics programming and
robotics, and build interactive prototypes.
You can tell your board what to do by sending a set of instructions to the microcontroller on the board.
To do so you use the Arduino programming language (based on Wiring), and the Arduino Software (IDE), based on
Processing
Inexpensive: Arduino boards are relatively inexpensive compared to other microcontroller platforms.
Cross-platform: The Arduino Software (IDE) runs on Windows, Macintosh OSX, and Linux operating systems. Most
microcontroller systems are limited to Windows.
Simple, clear programming environment: The Arduino Software (IDE) is easy-to-use for beginners, yet flexible enough
for advanced users to take advantage of as well
Open source and extensible hardware: The plans of the Arduino boards are published under a Creative Commons
license, so experienced circuit designers can make their own version of the module, extending it and improving it.
Open source and extensible software: The Arduino software is published as open source tool and the language can be
expanded through C++ libraries.
3.5.2 ThingSpeak
ThingSpeak is an IoT analytics platform service that allows you to aggregate, visualize, and analyze live data streams in
the cloud. You can send data to ThingSpeak from your devices, create instant visualization of live data, and send alerts.
Send sensor data privately to the cloud. Analyze and visualize your data with MATLAB. Trigger a reaction.
The ThingSpeak server extracts the data and display it on a grape that we made in our account. ThingSpeak
an IOT (internet of things) platform/server that store sensors, actuators data in a cloud and lets you analyze the data in
graphical and tabular form.
IV. METHADOLOGY
This crop recommendation system revolves around the concept of machine learning and IoT. The steps involved for
developing this system are:
[1] Data Collection: Gather a comprehensive dataset encompassing soil parameters (nitrogen, potassium, phosphorous,
pH levels, humidity and temperature) from geographical locations, incorporating historical records and real-time data.
The dataset should consist of the required parameters along with the corresponding crops suitable for cultivation.
[2]Data Pre-Processing:We will check for the irregularities in data like missing values, outliers, and inconsistencies
within the collected dataset which might have cause problems in system training. Extract relevant features, possibly
transforming or scaling data to enhance model performance.
[3]Model Development: Implement and train machine learning models (e.g., decision trees, random forests, gradient
boosting) to correlate soil and environmental data with recommended crops. Optimize model parameters using
techniques like cross-validation to improve predictive accuracy.
[4] System Integration: Establish a system to collect live soil data through IoT sensors, ensuring seamless data
transmission to the recommendation system. Develop algorithms to process incoming data in real-time and send this
data to the machine learning model we developed for the crop recommendations.
[5] User Interface and Deployment: Create a user-friendly interface for farmers to access the system and receive
personalized crop recommendations. Implement the system in a scalable and accessible manner.
[6]Evaluation and Refinement: Create a user-friendly interface for farmers to access the system and receive
personalized crop recommendations. Implement the system in a scalable and accessible manner.
Model Selection and Training: Select a suitable machine learning algorithm based on data size, complexity, and desired
outcome. Common choices include: Decision Trees – Easy to interpret and implement, good for smaller datasets.
Support Vector Machines (SVMs) – Effective for high dimensional data. K-Nearest Neighbours (KNN) – Efficient for
smaller datasets. Train the model on the prepared dataset, splitting it into training and testing sets for evaluation. Fine-
tune hyperparameters of the model to optimize its performance.
Model Evaluation and Improvement: Evaluate the model's accuracy using metrics like precision. Analyse model errors
and identify areas for improvement. This may involve collecting additional data, refining feature selection, or trying
different algorithms.
V. IMPLEMENTATION
Fig 5.1 Represents the steps involved in development of the proposed system and they are described below
The proposed system is consisting of two important parts, first one is development and training of machine learning
model and second one is creating an IoT system which is capable of recording required soil parameters directly from
soil and finally integration of both.
[A] Data Collection: The data collection is the most important part as the training of the model and produced result will
be based on this dataset only, so, we have to select the dataset which consist of required parameters and accurate
recommendations, we can refer to several free websites like kaggle for the datasets.
Copyright to IJARSCT DOI: 10.48175/IJARSCT-18526 200
[Link]
ISSN (Online) 2581-9429
IJARSCT
International Journal of Advanced Research in Science, Communication and Technology (IJARSCT)
International Open-Access, Double-Blind, Peer-Reviewed, Refereed, Multidisciplinary Online Journal
Impact Factor: 7.53 Volume 4, Issue 6, May 2024
[B] Data Pre-processing:Data pre-processing is a crucial step as collected dataset may involve a lot of irregularities like
missing data, noisy data and outliers, which can cause problems during the training of the model. So, it is better to
arrange the data in a format which is suitable for analysis and training. The methods which are used for data
preprocessing are data cleaning, data transformation, normalization, data reduction etc.
[C] Feature Engineering: Feature engineering is a way of creating & extracting new features and utilise them in order to
improve the performance of the machine learning model. It is an essential step and generally that features are taken into
consideration which affects the recommendation.
[D] Machine Learning Algorithm: Machine learning algorithms are computational model that enables computers to
learn patterns and make decisions or predictions without being explicitly programmed. The dataset is split into two
parts, training and testing dataset. According to a standard rule, 80% of dataset is used for training while 20% will be
used for testing and validation. There are different machine learning algorithms which are useful for the
recommendation system but we have to choose the algorithm with high accuracy.
The algorithms with higher accuracies are described below
Random Forest Algorithm: Random forest is an ensemble algorithm which is based on the concept of decision trees.
But, instead of one decision tree, multiple decision trees are deployed in the backend which produces individual results
and the final result is decided on the basis of majority voting. The random forest also has higher accuracy and is faster
as compared to gradient boosting.
VI. RESULT
This chapter deals with results and discussions. The following figures show the sensor deployment into the sample soil
mix interfaced with ESP8266 Node MCU/Arduino UNO to record the sensor output. Further, the sensor output (Soil
moisture and N P K Values) is to be compared with the existing database and the prediction of the CROP must be done.
Connections:
Pin A0 of the moisture sensor module connects to pin A0 on the ESP8266
The GND pin on the moisture sensor module connects to a GND pin on the ESP8266
The VCC pin on the moisture sensor module connects to a 3v3 pin on the ESP8266
Nitrogen(N), Phosphorus(P), and Potassium(K) values of various soil samples are obtained. Which are very essential
nutrients for plant growth.
Fig 6.2.1NPK sensor with Arduino Fig 6.2.2 Display of NPK Values
NPK Sensor:
The connections for the NPK sensor may vary depending on the specific model you're using. Typically, these sensors
provide analog or digital output for each nutrient (N, P, K).
VCC: Connect to 3.3V or 5V pin of the ESP8266 (check the voltage requirement of your sensor).
GND: Connect to GND pin of the ESP8266.
Analog/Digital Output for Nitrogen (N): Connect to any available analog or digital input pin of the ESP8266.
Analog/Digital Output for Phosphorus (P): Connect to any available analog or digital input pin of the ESP8266.
Analog/Digital Output for Potassium (K): Connect to any available analog or digital input pin of the ESP8266.
VII. CONCLUSION
In conclusion, the fusion of IoT and machine learning on platforms like Kaggle offers a potent solution for soil-based
fertilizer recommendation. By harnessing real-time data from sensors and leveraging advanced algorithms, this
approach optimizes crop yields, minimizes resource wastage, and fosters sustainable agricultural practices.
By using sensors to gather real-time data from fields and clever computer algorithms to analyze it, farmers can grow
crops more efficiently. This means getting bigger harvests while using fewer resources and being kinder to the
environment. Though there are challenges, like keeping data safe and making sure everyone can use this technology,
Copyright to IJARSCT DOI: 10.48175/IJARSCT-18526 205
[Link]
ISSN (Online) 2581-9429
IJARSCT
International Journal of Advanced Research in Science, Communication and Technology (IJARSCT)
International Open-Access, Double-Blind, Peer-Reviewed, Refereed, Multidisciplinary Online Journal
Impact Factor: 7.53 Volume 4, Issue 6, May 2024
the benefits for farmers are clear: healthier crops and more sustainable farming. Working together, we can make
farming smarter and better for everyone.
This approach offers several significant benefits for farmers and the environment. Firstly, it helps farmers optimize crop
yields by ensuring that plants receive the nutrients they need at the right time and in the right amounts. This leads to
healthier crops, bigger harvests, and increased profitability for farmers.
Secondly, by using resources more efficiently, such as reducing the overuse of fertilizers, this approach promotes
sustainability and environmental conservation. By minimizing nutrient runoff and soil erosion, it helps protect water
sources and ecosystems, contributing to long-term soil health and biodiversity.
Despite its potential, implementing IoT-based fertilizer recommendation systems also presents challenges. These
include concerns about data privacy and security, ensuring the reliability and accuracy of sensor data, and providing
access to technology for all farmers, regardless of their resources or location.
However, by addressing these challenges and fostering collaboration between stakeholders, including farmers,
researchers, technology developers, and policymakers, we can unlock the full potential of IoT and machine learning in
agriculture. Together, we can create a more resilient, efficient, and sustainable farming system that meets the needs of
both current and future generations.
Additionally, this approach promotes cost-effectiveness by reducing the need for excessive fertilization and labour,
while also empowering farmers with actionable insights to adapt to changing environmental conditions. It also opens
doors for innovation, encouraging the development of new technologies and solutions to address pressing agricultural
challenges in a rapidly evolving world.
In conclusion, the integration of IoT and machine learning for soil-based fertilizer recommendation represents a
promising approach to improving agricultural productivity, sustainability, and resilience. By harnessing the power of
data and technology, we can create a future where farming is not only more efficient and profitable but also more
environmentally friendly and equitable for all stakeholders involved.
REFERENCES
[1] K Bodake, R Ghate, H Doshi, P Jadhav, B Tarle, MVP Journal of Engineering Sciences, 2018,[Link]
[2] A. Sarwar, V. Singh, V. Sharma, Analysis of soil and prediction of crop yield (Rice) using Machine Learning
approach. Int. J. Adv. Res. Computer Sci. 8 (2017)
Copyright to IJARSCT DOI: 10.48175/IJARSCT-18526 206
[Link]
ISSN (Online) 2581-9429
IJARSCT
International Journal of Advanced Research in Science, Communication and Technology (IJARSCT)
International Open-Access, Double-Blind, Peer-Reviewed, Refereed, Multidisciplinary Online Journal
Impact Factor: 7.53 Volume 4, Issue 6, May 2024
[3] R.K. Rajak, A. Pawar, M. Pendke, P. Shinde, S. Rathod, A. Devare, Crop recommendation system to maximize crop
yield using machine learning technique. Int. Res. J. Eng. Technol. (IRJET) (2017)
[4][Link], S. Kanaga Suba Raja, S.R. Ronak, S. Rengarajen, P. Ravindran, Design and implementation of
fertilizer recommendation system for farmers. Test Eng. Manage. 83, 8840–8849 (2020)
[5] Z. Ren, X. Lu, Design of fertilization recommendation knowledge base and application, in 2012 First International
Conference on Agro-Geoinformatics (Geoinformatics)
[6]Gondchawar N, Kawitkar RS. IoT Based Smart Agriculture. International Journal of Advanced Research in
Computer and Communication Engineering (IJARCCE). 2016 Jun
[7] Aruvansh Nigam, Saksham Garg, Archit Agrawal “Crop Yield Prediction usingML Algorithms”, International
Journal of Engineering Research & Technology (IJERT),2019.
[8] R. Garg, P. Jain, and R. K. Jain, “Crop yield prediction using machine learningalgorithms: A review,” Journal of
Agricultural Science and Technology, vol. 21, no. 3, pp501-516, 2019.
[9] S. Kumar, M. R. Gupta, and M. S. Bhatia, “Crop yield prediction using machinelearning algorithms: A
comprehensive review,” International Journal of ComputerApplications, vol. 179, no. 6, pp. 1-6, 2018.
[10] M. Kamble, D. Kumar, and P. Kumar, “A review on crop yield prediction usingmachine learning techniques,”
International Journal of Advanced Research in Computer Science and Software Engineering, vol. 7, no. 4, pp. 260-267,
2017.