0% found this document useful (0 votes)
84 views5 pages

Machine Learning For IoT-based Smart Farming

Uploaded by

ChalaTamene
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
84 views5 pages

Machine Learning For IoT-based Smart Farming

Uploaded by

ChalaTamene
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

JOURNAL OF ADVANCED ZOOLOGY

ISSN: 0253-7214
Volume 44 Special Issue-3 Year 2023 Page 1294:1298

Machine learning for IoT-based smart farming


Mr. A.Ramesh Kumar Ms. K.B Archana P.Medhinya
Electronics and Communication Electronics and Communication Electronics and Communication
Engineering (Associate Professor) Engineering (Sr. Assistant Professor) Engineering
VNR Vignana Jyothi Institute of VNR Vignana Jyothi Institute of
Engineering and Technology Engineering and Technology VNR Vignana Jyothi Institute of
Hyderabad, India Hyderabad, India Engineering and Technology
[email protected] [email protected] Hyderabad, India
[email protected]

Article History Abstract— Agriculture balances food requirements for mankind, and the supply of essential raw
RECEIVED DATE : 01/07/2023 materials for many industries is the fundamental occupation in India. Smart farming allows
analyzing the growth of crops and the parameters which influence crop growth and supports
REVISED DATE: 30/09/2023
farmers in their activities, it is more profitable and reduces irrigation wastages. The proposed
ACCEPTANCE DATE : 05/10/2023
model is a smart farming system that analyzes the influence of parameters on crop growth and
predicts the soil condition using a machine learning algorithm. Temperature, Ph, humidity, gas,
and water level are the few most essential parameters to determine the quantity of water required
and to find hazardous gas in any agriculture field. This system comprises temperature, pH,
humidity, smoke detector, and water level sensor, deployed in an agricultural field, sends data
through a microprocessor, developing an IoT device with cloud. In this study, we present a
model that predicts soil series with regard to land type and, in accordance with the prediction,
suggests appropriate crops. For soil land classification and crop prediction application is
developed using KNN algorithms. Three steps are necessary for its implementation: the first is
data collecting using sensors placed in an agricultural field, the second is data cleaning and
storage, and the third is predictive processing utilizing the ML technique. The results obtained
CCLicense through the algorithms are sent to the cloud, which helps in decision-making in advance.

CC-BY-NC-SA 4.0 Keywords—Smart Farming, Precision agriculture, IoT, Machine Learning

.
nowadays the need of using IoT in agriculture applications
I. INTRODUCTION becomes a reality. IoT with the adoption of information
Agriculture uses more than 85% of freshwater resources technology solutions in crop fields with the help of smart
present on this planet and this percentage is gradually agriculture contributes to minimal usage of water, and
reducing because of population growth and an increase in protection of fields from dangerous gases, including
food requirements. Therefore, there is a quick need for an technical agronomic, managerial, and so on. For achieving
increase in crop growth by developing new strategies based water saving, several research studies were conducted on
on science and technology. One of the most important irrigation systems on various crops from basic ones to more
factors for a crop's growth is the soil. Rainfall, temperature, technologically advanced ones. The framework has been
soil type, fertilizers, and pH are all taken into account while proposed based on various techniques such as direct soil
making agricultural decisions. Crop cultivation is greatly water measurements, thermal imaging, crop water stress
influenced by the weather and the nutrients in the soil, index, etc. Precision agriculture is a principle that aims to
which promote crop growth. For a crop to grow, soil is a key optimize irrigation wastage and investments while looking
component. Nutrients found in soil are utilized by plants to for better take into account the unpredictability of the
grow. Various soil kinds are available, with each possessing environmental conditions. Precision agriculture is essential
various characteristics. The type of soil has a significant to meet the challenges of agricultural production as there is
impact on the production of crops. We can increase a sustainable rise in the world’ s population in terms of food
production by selecting the proper crop for the correct sort security, production, and environmental impact and an
of land. This can be accomplished by first studying the soil increase in food production must be achieved for providing
and then grouping it into several soil types. From previous high nutritional quality worldwide. Sustainability in food
decades, the success of theoretical research contribution, production is the ability to meet present and future food

1294
Available online at: https://jazindia.com
Machine learning for IoT-based smart farming

demands while minimizing negative environmental impacts, user interface. The user interface, developed specifically for
conserving natural resources, and ensuring social and the Android smartphone, allows the user to remotely control
economic well-being. It encompasses various aspects, the irrigation system. It provides real-time information about
including agricultural practices, resource management, and the moisture level in the soil and enables the user to manage
food distribution systems. India is indeed a nation renowned the irrigation system by switching it on or off based on the
for its agricultural sector. As the yields continue to increase, displayed data. The authors consider this automated
it becomes crucial to address the water requirements of the irrigation system as feasible and suitable for real-time
agricultural system. Proper irrigation plays a vital role in applications. It provides a convenient way for farmers or
supporting the healthy growth of crops. To ensure users to monitor and control irrigation remotely using their
successful crop growth, it is important to implement an smartphones, improving water efficiency and optimizing
effective irrigation system that provides water to crops at irrigation practices.
appropriate intervals. Timely and adequate irrigation helps In [5], the authors introduce the use of IoT (Internet of
meet the crops’ water needs during different growth stages, Things) for detecting physical data and transmitting it to the
promoting optimal yield and quality. Considering the user. They emphasize methodologies that can be employed
agricultural significance of India, it becomes essential to to address various issues, such as the detection of rodents
focus on water management and irrigation practices. The and the identification of risks of crops. The authors describe
goal of the project is to develop a model that effectively the development of an IoT device using Python scripts,
categorizes soil occurrences and maps the soil type to crop which can send notifications without the need for human
data to produce better predictions with higher accuracy. intervention. The IoT device mentioned in the paper likely
Crop classifications and geographic characteristics play a comprises sensors or detectors that gather physical data
role in soil prediction. In order to predict crops more related to the agricultural environment. This data can
accurately, it also seeks to develop a system that analyses include information on rodent activity, temperature,
real-time soil data. There are two phases to the model: the humidity or other relevant parameters. The Python scripts
training phase and the testing phase. Soil and crop databases developed for the IoT device enable the processing and
are the two utilized datasets. The list of the proper classes is analysis of the collected data. Based on the predefined
obtained after comparing the expected and actual classes. criteria or algorithms, the device can identify and recognize
These systems can help ensure water distribution, reduce rodents and potential risks to crops. When such events or
wastage, provide soil fertility, saves crops from dangerous conditions are detected, the IoT device automatically sends
gases, and enhance the overall productivity of the notifications or alerts to the user or farmer. By leveraging
agricultural sector [7]. IoT technology and Python programming, the system
described in the paper offers a solution for real-time
II. RELATED WORKS monitoring and early detection of agricultural issues. The
In [1], the authors propose an irrigation system that aims to ability to send notifications without human intervention
reduce water wastage and automate the irrigation process for allows for timely response to potential threats or problems,
large agricultural areas. The system determines the water improving the overall efficiency and effectiveness of
requirements of the crops based on the atmospheric agricultural operations.
temperature, humidity, and soil moisture conditions. To In [6], the authors explore the concepts of web services and
achieve this, the system utilizes a machine learning the Internet of Things (IoT) and highlight their potential in
technique. It collects data from various sensors that measure managing vast amounts of data related to the cultivation
the environmental conditions, considers predefined field. The integration of IoT and web services enable the
threshold values, and performs further analysis. It cross- collection, processing, and analysis of agricultural data
checks the obtained outcomes with the weather forecast and efficiently. By leveraging IoT devices and sensors, data
makes a decision regarding whether water should be from various aspects of agriculture, such as soil moisture,
initiated or not. By incorporating machine learning and real- temperature, humidity, and crop growth, can be gathered
time data analysis, this smart irrigation system aims to and transmitted to cloud services. Web services play a
optimize water usage by providing irrigation only when it is crucial role in handling and processing this data, enabling
necessary based on the analyzed conditions. This approach real-time monitoring and analysis. The combination of cloud
can help reduce water wastage and automate the irrigation services and IoT has rapidly advanced and has contributed
process for large agricultural areas. significantly to the development of smart solutions for
In paper [4], the authors discuss the implementation of an various agricultural challenges. These solutions aim to
automated irrigation system using an Android operating address problems faced by farmers, enhance productivity
system smartphone as a remote control. The system utilizes and optimize agricultural operations.
a soil moisture sensor that measures the moisture level in the
soil and sends a voltage signal. The voltage signal is then III. IMPLEMENTATION
analyzed by comparing it to a constant threshold number In supervised machine learning techniques, the model is
that is determined based on different soil compositions. This given a labeled dataset with previously known labels or
analysis helps determine the moisture level in the soil, solutions. Using this labeled data, the model learns and
indicating whether irrigation is required or not. The data discovers correlations between the input features and the
from the soil moisture sensor is transmitted to a Raspberry appropriate output labels.
Pi device through an HC05 module. The Raspberry Pi acts
The model analyses the incoming data and their related
as a central hub for processing and controlling the irrigation
labels in the first phase, known as training, where it
system. The data is then forwarded to a mobile phone as a

1295
Available online at: https://jazindia.com
Machine learning for IoT-based smart farming

discovers underlying patterns and relationships. The model B. Architecture


tweaks its internal parameters or weights based on the  The main components of the smart farming system
observed results to increase its capacity for making precise architecture are water level, temperature, humidity,
predictions. fire detection sensors, and Raspberry Pi.
The quantity and caliber of the training dataset frequently  Raspberry Pi is essential to the system because it
determine how well-supervised machine-learning models houses a web server and stores the datasets.
perform. As the model can learn from a greater variety of
samples and catch complicated patterns, a larger and more  The water level, temperature, humidity, and fire
varied dataset typically yields findings that are more detection sensors are connected to the figure as shown
accurate. below.

The data flow diagram represents the direction of the  These sensors send their collected data to the
Raspberry Pi, where it is stored and processed.
flow of data is shown in the below figure, it provides the
required inputs and corresponding outputs present in the  In order to forecast correct results, the CNN &KNN
system. algorithms are used for the datasets.
 The website's results are updated regularly with
reference to all of the sensors' relevant graphs and
tables.
 For later usage, every bit of information transmitted
from the sensors to the Raspberry Pi is stored in a
cloud database.
 Logging in, registering as a farmer, classifying the
soil, and crop prediction modules are some of the
functional parts of this system. using our website, a
farmer.
 Before choosing a crop, the farmer must first log into
the system, upload a colour image of the soil, and
then wait for the output to show the appropriate crop.
Fig 1: Data flow diagram for smart farming
 It is necessary for the user to log out of the system
A. Algorithm after the successful completion of actions.
 KNN is a straightforward yet powerful machine-
learning method used for both regression and
classification tasks. With the use of a non-
parametric algorithm, predictions are made based
on how closely incoming data points resemble
labeled training samples.
Here is how KNN functions:
 Training: The algorithm memorizes the feature
vectors and matching class labels of the
training samples during the training phase.
 KNN measures the similarity of feature
vectors using a distance metric, such as the
Manhattan distance or the Euclidean distance.
The type of data and the issue at hand
determine which distance measure should be
Fig 2: Hardware Setup
used
 Prediction: KNN looks for the k closest C. Dataset
labeled samples based on the selected
 Apply the KNN algorithm to the soil
similarity measure when a new unlabeled data
classification soil photo. If a photo does not
point is presented. It gives the new data point match any of the photos in the dataset, it is
the majority class label among the k nearest assumed that it is not a soil photo, and the
neighbors. system notifies the farmer to upload a soil
KNN can be used to categorize fresh samples or predict soil photo by comparing soil parameters with the
attributes based on the values of nearby samples. The dataset's existing values.
algorithm can use the similarity of soil samples (based on
their features) to do this.  To determine the pH value for a fresh soil
sample, we first take an image of the soil, and
then we use the soil pH factor formula to
determine the new factor for the fresh image.

1296
Available online at: https://jazindia.com
Machine learning for IoT-based smart farming

 The system's image capture can be thought of represented in table form and graphical form as shown in
as a matrix of pixels linked to different below figures.
combinations of red, green, and blue values. To
determine the single soil pH factor value for
each image, take the average of each sector.

IV. RESULTS
The output shown in the figure contains the values
of pH, temperature, humidity, gas, and water level
at various intervals of time day to day.

Fig: Table showing sensor values.

Fig: Graphs showing sensor values.

Fig 3: LCD showing pH, Water level, Temperature,  After uploading an image we can check the soil
values and the crop classification and crop
Humidity
prediction values with predicted crop data
The sensor values are uploaded to the cloud and are
description as shown in the below figures.

Fig 4: After uploading the image we get to know soil


values.

Fig 5: Shows the crop prediction values.

1297
Available online at: https://jazindia.com
Machine learning for IoT-based smart farming

better yielding using IoT” , IEEE Technological Innovation


in ICT for Agriculture and Rural Development (TIAR), 10-
12 Jul. 2015.
[7] L. García, L. Parra, J. M. Jimenez, J. Lioret and P.
Lorenz , IoT-Based Smart Irrigation Systems: An Overview
on the Recent Trends on Sensors and IoT Systems for
Irrigation in Precision Agriculture, Sensors,Vol.20, No.4,
pp.1042, 2020.
[8] M. C. Vuran, A. Salam, R. Wong, and S. Irmak,
‘ Internet of underground things in precision agriculture:
Architecture and technology aspects’ , Ad Hoc Networks,
vol. 81, pp. 160– 173, 2018.
[9] S. Hwang, Monitoring and Controlling System for an
IoT-Based Smart Home, Int. J. Control Autom., vol. 10, no.
Fig 6: Shows the crop data description. 2, pp. 339– 348, 2017.
[10] M. Chakraborty, L. R. Khot, and R. T. Peters Assessing
v) CONCLUSION suitability of modified center pivot irrigation systems in
The use of a machine learning algorithm to construct an corn production using low altitude aerial imaging
IoT-based smart farming system was proven to be techniques, Information Processing In Agriculture, In press,
economically viable for precision agriculture and low water 2019.
resource utilization. This model's goals are to know the soil [11] Chettri, L.; Bera, R. A Comprehensive Survey on
quality and increase agricultural yield. Using the provided Internet of Things (IoT) Toward 5G Wireless Systems. IEEE
dataset and all detected data from temperature, pH, humidity, Internet Things J. 2020, 7, 16– 32.
water level, and smoke detector sensors, this system is
trained and programmed. The KNN algorithm, a member of [12] V. Rajeshwari and K. Arunesh, “ Analyzing Soil Data
the family of supervised machine learning algorithms, is used using Data Mining Classification techniques,” Vol 9(19),
to process data and produce an output of the soil's general May 2016
health and nutrient level. Prediction also aids in determining [13] Jay Gholap, Anurag Ingole, Jayesh Gohil, Shailesh
how much he can produce in a given soil. This might assist
Gargade, Vahida Attar (2013), “ Soil data analysis using
the farmer in producing a range of crops throughout the year.
classification techniques and soil attribute prediction,” .
If we want to grow a specific crop, we can improve the soil
by incorporating the nutrients the crop needs and convey the
decision to the farmer. Using this decision, the farmer can
decide his farming activities like a waste of water, crop
prediction, and so on.

REFERENCES
[1] Dishay Kissoon, Hinouccha Deerpaul and Avinash
Mungur, “ A Smart Irrigation and Monitoring System” ,
The International Journal of Computer Applications, vol.
163, No. 8, Apr. 2017.
[2] P. Narayut , P. Sasimanee, C.-I. Anupong, P. Phond and
A.Khajonpong, “ A Control System in an Intelligent
Farming by using Arduino Technology” , Student Project
Conference (ICT -ISPC), 2016 Fifth ICT International, 27-
28 May 2016.
[3] K. Benahmed, A. Douli, A. Bouzekri, M. Chabane and
T.Benahmed, “ Smart Irrigation Using Internet of Things” ,
Fourth International Conference on Future Generation
Communication Technology (FGCT), 29-31 Jul. 2015.
[4] A. N. Arvindan and D. Kartheeka, “ Experimental
investigation of remote control via Android smartphone of
Arduino-based automated irrigation system using moisture
sensor” , 3rd International Conference on Electrical Energy
Systems (ICEES),
17-19 Mar. 2016.
[5] T. Baranwal, N. and P. K. Pateriya, “ Development of
IoT based Smart Security and Monitoring Devices for
Agriculture” , 6th International Conference - Cloud System
and Big Data Engineering (Confluence), 14-15 Jan. 2016.
[6] M. K. Gayat ri, J. Jayasakthi and G.S.Anandha Mala,
“ Providing Smart Agriculture Solutions to Farmers for

1298
Available online at: https://jazindia.com

You might also like