Authors: Rajdeep Chatterjee, Oindrila Das, Ridam Kundu, Soumik Podder
Certificate: View Certificate
This paper presents Machine Learning Inspired Smart Agriculture System with Crop Prediction that will assist farmers in getting Live Data (Temperature, Soil Moisture, level of Nitrogen, Phosphorous and Potassium present in the soil, Alkalinity and Acidity in the soil etc. ) for efficient environment monitoring which will enable them to increase their overall yield and quality of products. The Machine Learning Inspired Smart Agriculture System with Crop Prediction is proposed where Machine Learning Technology is hybridized with different Sensors and a Wi-Fi module that will yield live data feed using online software Localhost and PHPmyadmin. The product being proposed is tested on Live Agriculture Fields giving high accuracy over 98% in data feeds
After the green revolution, there has been an increasing trend in the use of machines in farm operations. This has led to the mechanization of Indian agriculture. Punjab, Haryana, Uttar Pradesh, River valleys of Andhra and Tamil Nadu are major agriculturally mechanized areas of India. Agriculture plays a vital role in the Indian economy. Over 70% of the rural households depend on agriculture. Soil quality measurement is essential to enhance the productivity. This project aims to design a system which is capable of tracking the soil resource level and monitoring pH values with quality parameters. We aim to predict the soil fertility and the plantation scenario accordingly by using Machine Learning on large scale real time IoT database. Internet of Things (IoT) technology has brought revolution to each and every field of common man’s life by making everything smart and intelligent. IoT refers to a network of things which make a self-configuring network. The development of Intelligent Smart Farming IoT based devices is day by day turning the face of agriculture production by not only enhancing it but also making it cost-effective and reducing wastage. In the present work, Machine Learning Inspired Smart Agriculture System with Crop Prediction is developed that will assist farmers in getting Live Data (Temperature, Soil Moisture, level of Nitrogen, Phosphorous and Potassium present in the soil, Alkalinity and Acidity in the soil etc.) for efficient environment monitoring. This type of approach will enable them to increase their overall yield and quality of products. This system will be mixed with different Sensors and a Wi-Fi module that will produce live data feed using online software Localhost and PHPmyadmin. The product being proposed is tested on Live Agriculture Fields giving high accuracy over 98% in data feeds. For this purpose, it is aimed to design and develop an approach for soil quality prediction using IoT and Machine Learning approach. The IoT technology will be introduced to generate different soil parameters from different testing in order to know missing utilities present in the soil. It is also aimed to design and develop crop prediction possibility according to current soil quality and to study the effect of soil manure on soil properties such as salinity, pH, organic matter content and microbial and enzyme activity.
The entire project is segmented into two parts viz. 1. Sensing of different parameters of the agricultural land, 2. Prediction of crop production from the land.
III. BLOCK DIAGRAM OF THE SYSTEM
The block diagram depicts the theme of the project where the sensing parameters from different sensors are fed to Node MCU Smart sensing starts from the firmware parts of the project such as network access point, gateway, rules engine and API backbone. The data will be then used for machine learning based prediction technology.
A. Hardware Components
a. pH Sensor: A pH sensor is one of the most essential tools that typically used for water measurements. This type of sensor is able to measure the amount of alkalinity and acidity in water and in other solution.
b. DHT Sensor: DHT is a temperature and humidity sensor. The DHT sensors are made of 2 parts, a capacitive humidity sensor and a thermistor. There is also a very basic chip inside that does some analog to digital conversion and spits out a digital signal with the temperature and humidity. DHT11 temperature range is from 0? to 50? with ±2? accuracy. This type of humidity sensor has the humidity range from 20 to 80% with 5% accuracy. DHT22 is the more expensive version which has better specifications such as the temperature measuring range is from -40? to +125? with ±0.5? accuracy. This type of sensor has better humidity measuring range, from 0 to 100% with 2-5% accuracy
c. NPK Sensor: The soil NPK sensor is suitable for detecting the content of Nitrogen, Phosphorous and Potassium in the soil. It helps in determining the fertility of the soil thereby facilitating the systematic assessment of the soil condition.
2. Node MCU: NodeMCU is an open-source platform based on ESP8266 which can connect objects and let data transfer using the Wi-Fi protocol. In addition, by providing some of the most important features of microcontrollers such as GPIO, PWM, ADC, and etc, it can solve many of the project's needs alone. We use it as the microcontroller of our project.
B. Firmware Components
V. CIRCUIT DIAGRAM
Firstly, a USB is added to Node MCU, and the dc power supply of 3V is connected to the circuit. Three different sensors are employed for smart monitoring the parameters of irrigation system and therefore they are connected to Node MCU. Input DC power is distributed to all of the three sensors with common point (GND). The D3 (GPIO0) port of Node MCU is connected to DHT sensor, D4 (GPIO2) port is attached to pH sensor. The other ports such as D5, D6, D7 are connected to NPK sensor module (Nitrogen, Phosphorous, Potassium). NPK sensor has 2 parts, i.e- NPK sensor (to be buried under soil) and 3 port NPK sensor module. 9-24 volts power is supplied to the underground NPK sensor. (Fig. 2)
VI. PREDICTION METHODOLOGY
In order to predict the crop production of the agriculture system, machine learning algorithm is employed. Machine learning is defined as a subset of artificial intelligence that is mainly concerned with the development of algorithms which allow a computer to learn from the data and past experiences on their own. There are three types of machine learning algorithm such as 1. Supervised learning 2. Unsupervised learning and 3. Reinforcement learning. In our present work, supervised learning is implemented. In supervised learning, machines are trained using well "labelled" training data, and on basis of that data, machines predict the output. The labelled data means some input data is already tagged with the correct output. In supervised learning, the training data provided to the machines work as the supervisor that teaches the machines to predict the output correctly. It applies the same concept as a student learns in the supervision of the teacher. Supervised learning is a process of providing input data as well as correct output data to the machine learning model. The aim of a supervised learning algorithm is to find a mapping function to map the input variable(x) with the output variable(y).
In this learning system, models are trained using labelled dataset, where the model learns about each type of data. Once the training process is completed, the model is tested on the basis of test data (a subset of the training set), and then it predicts the output. (Figure 3)
A. Crop Recommendation
Datasets Used: For Crop Recommendation module the dataset used are Crop recommender.csv, soil.csv, scientific_names.csv. All these datasets were obtained from Kaggle website. The Crop recommendation was used for training model since it contains attributes such as temperature, humidity, average rainfall, soil pH, nitrogen requirement ratio, potassium requirement ratio and phosphorous requirement ratio essential for predicting a crop. The datasets such as Soil names and Crop names are used after prediction to obtain the soil type and scientific name of the predicted crops.
Steps involved in Crop Recommendation module are as follows
For crop recommendation dataset the attributes are free of missing values. Once identifying that there are no missing values, the data type of the attributes is identified followed by listing the unique values in the dependent variable, i.e., Label attribute.
3. Step 3: Data Visualization
VII. RESULT AND DISCUSSION
Using original dataset, the PC was connected to a server using localhost, hence the Records are generated after connecting to the Node MCU USB port.
After generating the data in localhost, all those data were stored in the online MySQL database management software. This logistic regression based machine learning algorithm provides better accuracy and high efficiency in fetching the live data of Temperature, Soil Moisture, Alkalinity and Acidity present in the soil, Level of Nitrogen, Phosphorous and Potassium present in the soil and pH. Thus it will assist farmers in increasing the agriculture yield and take efficient care of food production as the system will always provide helping hand to farmers for getting accurate live feed of environmental temperature and soil moisture with more than 99% accurate results.
VIII. SCOPE OF THE PROJECT
This model will serve the purpose of agriculture and help the farmers to be independent.
By using this setup farmers will be able to do the direct business without the help of third party.
The present work will assist farmers in increasing the agriculture yield and take efficient care of food production.
Thus the present work will give better accuracy in crop prediction depending on the soil parameters, humidity etc with high accuracy. Hence the work will definitely assist farmers in increasing agricultural production and provide food safety. Additionally farmers will be able to do the direct business without intervention of third party.
 A. Goap, D. Sharma, A.K. Shukla, C. Rama Krishna, “An IoT based smart irrigation management system using Machine learning and open source technologies”, Computers and Electronics in Agriculture, vol. 155, pp. 41-49, December 2018.  G. Singh; D. Sharma; A. Goap; S. Sehgal; A K Shukla; S. Kumar, “Machine Learning based soil moisture prediction for Internet of Things based Smart Irrigation System”, 2019 5th International Conference on Signal Processing, Computing and Control (ISPCC), DOI: https://doi.org/10.1109/ISPCC48220.2019.8988313, 2020  Prakash Kanade, Jai Prakash Prasad, “Arduino Based Machine Learning and IoT Smart Irrigation System”, International Journal of Soft Computing and Engineering (IJSCE), vol. 10, pp. 1-5, 2021.  R.Togneri, D. Felipe dos Santos, G. Camponogara, H. Nagano, G. Custódio, R. Prati, S. Fernandes, C. Kamienski, “Soil moisture forecast for smart irrigation: The primetime for machine learning”, vol. 207, pp. 117653, November 2022  R. Togneri, C. Kamienski, R. Dantas, R. Prati, A. Toscano, J.-P. Soininen,T. Salmon, “Advancing IoT-Based Smart Irrigation”, IEEE Internet of Things Magazine, DOI: https://doi.org/10.1109/IOTM.0001.1900046, 2019.  YounessTace, MohamedTabaa, SanaaElfilaliC, herkaouiLeghris, Hassna Bensag, EricRenault, “Smart irrigation system based on IoT and machine learning”, Energy Reports, vol. 8, pp. 1025-1036, November 2022.  Anneketh Vij, Vijendra Singh, Abhishek Jain, Shivam Bajaj, Aashima Bassi, Aarushi Sharma, “IoT and Machine Learning Approaches for Automation of Farm Irrigation System”, Procedia Computer Science, vol. 167, pp.1250-1257, 2020.
Copyright © 2023 Rajdeep Chatterjee, Oindrila Das, Ridam Kundu, Soumik Podder. 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.