Ijraset Journal For Research in Applied Science and Engineering Technology
Authors: Prof. Vijay Gaikwad, Harshita Chhangani, Ganesh Damre, Rohan Deshmukh, SuvarnaLaxmi Lambture, Aniket Pagare
DOI Link: https://doi.org/10.22214/ijraset.2023.56042
Certificate: View Certificate
Crop recommendation systems are becoming increasingly popular in agriculture due to their ability to optimize crop yield and improve efficiency. These systems rely on various factors such as soil quality, temperature, soil moisture, humidity, and pH to recommend suitable crops to grow in a particular area. The proposed project aims to develop a crop recommendation system that utilizes soil quality tests, temperature, soil moisture, humidity, and pH to recommend suitable crops to farmers. The system will use machine learning algorithms to analyze the data collected from the soil quality tests and environmental sensors to provide recommendations.
I. INTRODUCTION
This project aims to predict the type of crop that is suitable
for a given set of environmental conditions such as temperature, humidity, pH, and moisture. The project uses a KNN classifier algorithm trained on a dataset containing information about different crops and their corresponding optimal environmental conditions. The user provides the input values through a text file, and the program outputs the predicted crop type based on the provided input values. In case of invalid or insufficient data in the input file, appropriate error messages are displayed. Additionally, the program asks the user if they want to continue after the prediction, and if the user agrees, they can provide another input file and receive a new prediction. Overall, this project provides a useful tool for farmers to determine the most suitable crops to grow in their specific environmental conditions.
II. LITERATURE REVIEW
Below are some papers reviewed for this project
The paper titled [1] "Crop Recommendation System" describes a crop recommendation system developed by a team of researchers from Sri Lanka Institute of Information Technology. The system utilizes data on soil quality, weather conditions, and crop characteristics to provide recommendations on suitable crops for farmers. The paper provides a detailed overview of the system's architecture, data collection, and analysis techniques, as well as the machine learning algorithms used for crop recommendation. The system was tested on real-world data from a farm in Sri Lanka, and the results showed that it was able to provide accurate and relevant recommendations.
Overall, the paper presents an interesting and promising approach to crop recommendation using machine learning and data analysis techniques.
The paper titled [2] "Recommendation System for Crop Identification and Pest Control Technique in Agriculture" presents a crop recommendation system that uses image processing techniques and machine learning algorithms to identify crops and recommend appropriate pest control techniques. The system is designed to collect images of crops and analyze them using computer vision algorithms to identify the crop and detect any pest infestations. The system then provides recommendations for appropriate pest control techniques based on the type of crop and the severity of the infestation. The paper provides a detailed description of the system's architecture and algorithms, as well as the results of testing on real-world data. The results showed that the system was able to accurately identify crops and recommend appropriate pest control techniques. Overall, the paper presents an interesting and innovative approach to crop recommendation and pest control using computer vision and machine learning techniques.
The paper titled [3]"IoT based Soil Testing" proposes a cost-effective and portable solution for soil analysis using IoT and affordable sensors. The authors highlight the importance of soil analysis for effective cultivation and mention the traditional methods of soil testing which are time-consuming and expensive. The paper discusses the use of various sensors for testing parameters like pH, moisture, humidity, and temperature and focuses on the analysis of these parameters.
The authors propose the use of Raspberry Pi for uploading sensor readings to the cloud and sending suitable crop lists to the user's mobile via SMS. The paper concludes with the suggestion of collecting feedback from users to validate the predictions. Overall, the paper offers a promising solution for soil testing and analysis using IoT technology.
The paper titled [4] "Crop Recommendation System Using Machine Learning" proposes a machine learning-based approach to help farmers predict the right crop to cultivate based on parameters such as district, rainfall, temperature, and area. The paper highlights the challenges faced by farmers while using traditional farming methods and the need for precision farming in today's technologically advanced world. The authors have used different machine learning models such as Ridge Regression and Classifier to achieve better accuracy in predicting the crop yield. The proposed system aims to provide valuable insights to farmers and assist them in making informed decisions. This paper presents a practical and innovative approach to crop recommendation using machine learning, which can significantly benefit farmers in India.
The paper titled [5] "A Machine Learning-based Approach for Crop Yield Prediction and Fertilizer Recommendation" focus predicting crop yield and recommending fertilizer. The authors emphasize the importance of predicting crop yield and recommending the appropriate fertilizer for better crop management, yield optimization, and economic gain.
The authors discuss the limitations of traditional approaches and highlight the need for a more data-driven and precise approach using machine learning algorithms. They also review the literature on machine learning techniques for crop yield prediction and fertilizer recommendation, emphasizing the use of decision tree and random forest algorithms in previous studies.
The authors then describe their proposed system, which integrates data from various sources, including soil type, climate data, and crop-specific parameters. They explain how the machine learning models were trained using these data sources to predict crop yield and recommend the most suitable fertilizer for a particular crop.
III. METHODOLOGY
The methodology for the crop recommendation system using soil quality test involves several steps. The first step is to place sensors such as temperature and humidity sensors, pH sensors, and soil moisture sensors into the soil. These sensors will gather data about the soil quality, including temperature, humidity, pH levels, and moisture content.
Table 3.1 Sensor data range
Sensor |
Range |
Ph sensor |
0 to 14 |
Soil moisture |
0 to 100 |
DHT11 Sensor (Temperature) |
0 to 50°C |
DHT11 Sensor (Humidity) |
20 to 90% RH |
The data collected by the sensors is then stored in a text file using an application like CoolTerm. This data will be used as input to the crop recommendation system. Next, the code reads the crop dataset, which contains the data for various crops along with their corresponding input parameters.
The dataset is used to train the KNN model, which will predict the best crop for the given soil quality data. The user isprompted to enter the name of the input file containing the sensor data. The code checks if the file exists and reads the data from the file. It checks the validity of the data by verifying that it contains the correct number of fields, and converts the values to the appropriatedata type.
The code then prepares the data for the KNN algorithm by splitting the dataset into input and output variables (X and y). The KNN model is trained on the dataset, and the predict method is used to predict the best crop for the given input data.
The predicted crop is displayed to the user, along with a message about the soil moisture level. The user is then prompted to continue with more input data.
The KNN algorithm utilized in the above code is a classification method that operates on the principle of similarity. It identifies the K nearest data points to a given input and assigns a class label to the input based on the majority class of the K nearest neighbors. K is a hyperparameter that can be adjusted to enhance the accuracy of the algorithm.
The formula used in the KNN algorithm is:
The KNN algorithm is used in this project to predict the recommended crop based on user input values of temperature, humidity, and pH levels. To start, the crop dataset is read from a CSV file and divided into input and output variables, X and y. Then, the KNeighborsClassifier function from the scikit-learn library is utilized to train the KNN model with 5 neighbors. Following that, the algorithm predicts the crop by taking in user input values of temperature, humidity, and pH levels, and then finding the nearest neighbors based on the previously trained model. Finally, the algorithm displays the predicted crop to the user.
A. Advantages
B. Disadvantages
IV. CIRCUIT DIAGRAM
The Arduino Uno serves as the main control unit, responsible for gathering data from the sensors and processing it. The sensors are connected to the Arduino Uno through specific pins. The pH sensor's data pin is connected to analog pin A1, while the DHT11 sensor's data pin is connected to digital pin 2. Additionally, the soil moisture sensor's data pin is connected to analog pin A0. To power the sensors and the Arduino Uno, their respective VCC (power) and GND (ground) pins are connected to a breadboard, which facilitates the power distribution. The soil moisture sensor measures the moisture content in the soil, providing information about soil hydration levels. This data is crucial for determining when to water plants or for monitoring soil conditions in various applications. The DHT11 sensor measures both temperature and humidity. It provides real-time readings of the ambient temperature and relative humidity, which are essential for monitoring environmental conditions, such as in greenhouses, weather stations, or home automation systems.
The pH sensor is responsible for measuring the acidity or alkalinity of a solution. By connecting it to the Arduino Uno, you can monitor the pH levels of liquids, such as water or nutrient solutions in hydroponic systems. This data is crucial for maintaining optimal pH levels for plant growth or for monitoring water quality.
V. REAL CIRCUIT
VII. FUTURE SCOPE
In future work, we plan to explore the potential of using machine learning algorithms to predict crop yield based on soil quality and environmental factors. Additionally, we aim to investigate the impact of the project on the productivity and profitability of farms, as well as its potential to address issues related to food security and sustainability.
This project aimed to provide farmers with a cost-effective solution to determine the suitable crop for their soil based on moisture, temperature, humidity, and pH values. The implementation of the K-nearest neighbor algorithm made it possible to classify the crops and recommend the most appropriate one to the farmers. The project also provided a user-friendly interface for farmers to input their soil data and get the recommendations quickly. Overall, the project has achieved its objectives, and it has the potential to contribute to the agricultural sector by helping farmers to make informed decisions about crop selection. However, the system could be improved by incorporating additional features such as recommending fertilizers based on soil quality and disease prediction. This project has proven to be a valuable tool for farmers, and it has the potential for further improvements and advancements. The implementation of this project could contribute to the agricultural sector by helping farmers to increase their crop yield and improve their economic conditions.
[1] Pradeepa Bandara,Thilini Weerasooriya, Ruchirawya T.H, W.J.M Nanayakkara,Dimantha M.A.C Pabasora M.G.P’s \"Crop Recommendation System\", IJCA vol. 175, no. 22, oct. 2020, doi: 10.5120/ijca2020920723 [2] Avinash Kumar, Sobhangi Sarkar and Chittaranjan Pradhan\'s \"Recommendation System for Crop Identification and Pest Control Technique in Agriculture\" 2019 International Conference on Communication and Signal Processing (ICCSP) doi: 10.1109/ICCSP.2019.8698099 [3] Hridesh Shah,Dhruv Shah,Jeet Shah,Akshat Shah,Karan Shah And Krupal Vora’s \"IOT based Soil Testing\" IJAR doi: 10.21474/IJAR01/8083 [4] Sarika Gambhir,Manish Sharma,Khushboo Agarwal,Keshav Kumar,Lakshya Kumar,Mayank Chaudhary’s \"Crop Recommendation System Using Machine Learning\" IJRASET vol. 11 feb. 2023 doi: 10.22214/ijraset.2023.49097 [5] Jeevaganesh R,Harish D,Priya B’s \"A Machine Learning-based Approach for Crop Yield Prediction and Fertilizer Recommendation\" IEEE apr. 2022 doi: 10.1109/ICOEI53556.2022.9777230 [6] Abdullah Na,William Isaac,Shashank Varshney,Ekram Khan’s \"An IoT based system for remote monitoring of soil characteristics\" InCITe oct. 2016 doi: 10.1109/INCITE.2016.7857638 [7] Lia Kamelia,Yuga Setya Nugraha,Mufid Ridlo Effendi,Tedi Priatna’s \"The IoT-Based Monitoring Systems for Humidity and Soil Acidity Using Wireless Communication\" IEEE ICWT Jul. 2019 doi: 10.1109/ICWT47785.2019.8978243 [8] Md. Delwar Hossain,Mohammod Abul Kashem,Shabnom Mustary’s \"IoT Based Smart Soil Fertilizer Monitoring And ML Based Crop Recommendation System\" IEEE ICCE feb. 2023 doi: 10.1109/ECCE57851.2023.10100744 [9] R. Reshma,V. Sathiyavathi;T. Sindhu,K. Selvakumar,L. SaiRamesh’s \"IoT based Classification Techniques for Soil Content Analysis and Crop Yield Prediction\" I-SMAC IEEE oct. 2020 doi: 10.1109/I-SMAC49090.2020.9243600 [10] R. Kavitha,M. Kavitha,R. Srinivasan’s \"Crop Recommendation in Precision Agriculture using Supervised Learning Algorithms\" INCET may. 2019 doi: 10.1109/INCET54531.2022.9824155 [11] Prema T. Akkasaligar,Sunanda Biradar,Manjula C. Gudgeri and Sana Mohammadi A Mulla’s \"Soil Mineral Prediction of Crops Using Machine Learning\" ICICICT aug. 2022 doi: 10.1109/ICICICT54557.2022.9917584 [12] Anuraj Singh,Amit Kumar Bhamboo’s \"Crop Recommendation and Disease Detection Using Deep Neural Networks\" CICT IEEE nov. 2022 doi: 10.1109/CICT56698.2022.9997839 [13] Daneshwari Modi,Ashok V.Sutagundar,Vijayalaxmi Yalavigi and Anupama Aravatagimath’s \"Crop Recommendation Using Machine Learning Algorithm\" ISCON 2021 doi: 10.1109/ISCON52037.2021.9702392
Copyright © 2023 Prof. Vijay Gaikwad, Harshita Chhangani, Ganesh Damre, Rohan Deshmukh, SuvarnaLaxmi Lambture, Aniket Pagare. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
Paper Id : IJRASET56042
Publish Date : 2023-10-07
ISSN : 2321-9653
Publisher Name : IJRASET
DOI Link : Click Here