You are on page 1of 5

2020 International Conference on Electrical and Electronics Engineering (ICE3-2020)

AI and IoT Based Monitoring System for


Increasing the Yield in Crop Production
Sarthak Srivastava
Richa Singh Rajan Mishra
Department of Computer Science
Department of Electronics and Department of Electronics and
Engineering
Communication Engineering Communication Engineering
Madan Mohan Malaviya University of
Madan Mohan Malaviya University of Madan Mohan Malaviya University of
Technology
Technology Technology
Gorakhpur,India
Gorakhpur, India Gorakhpur, India
sarthak.srivastava14apr@gmail.com
richa.999singh@gmail.com rajanmishra1231@gmail.com

Abstract— Artificial Intelligence (AI) and Internet of things and strict management is needed for agro parameters like
(IoT) based monitoring systems are in great demand and gives humidity, temperature of the environment as well as of soil
a precise extraction and analysis of data. In this paper, the and light intensity, etc.
research is performed on a marigold plant to detect the most
suitable conditions for plant growth. The philosophy behinds Cor Verdouw et al. [2] developed a framework which
this work is to reduce the risks in agriculture and to promote comprised a systematic set of architectural viewpoints and
smart farming practices. The effect of physical conditions like directions. These viewpoints are then used to design IoT
humidity, temperature, soil temperature and moisture and based systems in agriculture and food domain but it requires
light intensity on the plant growth, is monitored using IoT more viewpoints for structuring of IoT based system in agri-
based monitoring system. The data responsible for the plant food domain. M. A. Zamora-Izquierdo et.al., [3] proposed a
growth is obtained using different sensors units like DHT11,
LDR, DS18B20, Soil Moisture sensors, Noir camera, single-
resilient system for greenhouse using IoT platform,
board microcontrollers and Application Programming comprised with Cyber-Physical System, Edge Computing
Interfaces (APIs). The variation of plant growth rate w.r.t. the and Cloud Computing tiers. They did experiment on two
intensity of sunlight was observed within the range of 1000 lx- cycles of tomato crop for the validation of the model. It was
1200 lx, category-2 (best). The further analysis of the extracted found that 30% of saving in irrigation operation and up to
parameters is done using different Machine Learning (ML) 80% in some macronutrients. N. Ahmed et al. [4] proposed
algorithms. Logistic Regression, Gradient Boosting Classifier a network structure for tracking and controlling agriculture
and Linear Support Vector Classifier (SVC) algorithms are practices in rural areas. The key concern of this system was
found best for analysis of physical parameters responsible for to reduce the end to end delay. Antonis Tzounis et al. [5]
the marigold plant growth.
defined the 3-layer system i.e., the Perception layer,
Keywords— Machine Learning, Internet of Things, Smart Network layer and Application layer in IoT. They also
farming, Agriculture, Artificial Intelligence, OpenCV, Python, explained the applications and hardware and software
Thingspeak. challenges in IoT. Mohanraj et al. [6] proposed an e-
agricultural application, consisted of knowledge base and
I. INTRODUCTION monitoring modules. They framed the algorithm to estimate
Agriculture is the main source of our food and a majority the water need of the plant. A comparative study was done
of people in India are dependent on agriculture as their between various systems available in the market but the
prime source of income. According to the United Nations approach lacks in monitoring various other parameters that
Food and Agricultural Organization, almost 800 million effect the agriculture. Anna Chlingaryan et al. [7] explained
people are chronically hungry and 2 billion suffer the various ML techniques to predict the crop yield and
micronutrient deficiencies. Further, another report from the nitrogen content in a plant in precision agriculture method.
State of Food Security and Nutrition in the World 2019 Further, it reviewed various techniques which were used in
showed, 194.4 million people are undernourished in India. It production estimation as well as reported optimal nitrogen
is high time where the agriculture sector needs to be management for plant. But there is no discussion about the
digitized and smart. Robert J. Mc Queen et al. (1995) [1], other micro and macronutrients of soil or fertilizer.
predicted the abilities of automatic process which could the The major issues for the failure of crop production and
combination of various systems. These systems could be low yield is lack of nutrients and suitable environmental
applied in the farming sector for the welfare of humankind. conditions. Thus, the foremost motivation of this work is to
This era of 21st century focusses on automatic technologies provide an agricultural research solution. For this the ML
like Internet of Things (IoT), Machine Learning (ML), and algorithms is applied on the data generated by the technique
Data Science (DS). However, the application of these of the Internet of Things. Here, we first create a data-set
technologies in the agriculture domain is challenging. with the help of the Internet of things and the data collected
Because of regular variations in physical and chemical is stored on the cloud. The data has features that consist of
conditions of the surrounding, increasing the yield in the physical properties of surrounding like soil humidity, soil
production of the crop is a real-time challenge and a temperature and intensity of light. The target variable for
problem needed to be solved. Hence, continuous monitoring our dataset is the rate of increase in height and width

978-1-7281-5846-4/20/$31.00 ©2020 IEEE

301
Authorized licensed use limited to: MANIPAL INSTITUTE OF TECHNOLOGY. Downloaded on November 03,2023 at 19:11:37 UTC from IEEE Xplore. Restrictions apply.
respectively which is the growth rate of the plant. After this Light dependent resistor is used to measure the light
the supervised machine learning algorithm are applied on intensity of the surrounding [9]. Light intensity tells about
the data which will give the best conditions for the plant for how much energy absorbed by the plant. Light is a
maximum growth. The manuscript is organized into five significant source for plant growth, as it is responsible for
different sections. Section I contains the introduction about the process of photosynthesis. The intensity of light can be
the techniques. Section II proposes the architecture of the measured in lux (lx) and foot-candle (fd) but these units do
plant monitoring system followed by methodology use to not provide the number of photons. For the measurement of
extract the features in section III. Further, section IV photons, Photosynthetic Photon Flux Density (PPFD) is
contains the detailed discussion about the results followed utilized. PPFD gives information about the number of
by conclusion and outcomes in section V. photons absorbed by the plant surface (for performing
photosynthesis process) per square meter per second [20]. In
II. PROPOSED ARCHITECTURE
our experiment, we measured the light in terms of lux at
The below block diagram gives an overview of the system different instances of time in a day. This obtained value then
architect. Here, marigold sapling is taken as a target plant converted to measure the true intensity of the light. It is
for continuous monitoring of various physical parameters, measured in µmolm-2s-1 as shown in Table I [21].
through various sensors. These sensors are uniquely TABLE I. LUX TO PPFD CONVERSION
designed for measuring the targeted parameters i.e., Light Source Calibration
humidity and temperature of the environment, soil moisture, Factor
soil temperature, and light intensity. Sunlight 0.0185
Cool White Fluorescent Lamps 0.0135
Mogul Base High-Pressure Sodium Lamps 0.0122
Dual-Ended High-Pressure Sodium 0.0130
(DEHPS):ePapillion 1000 W
Metal Halide 0.0141
Ceramic Metal Halide (CMH942):Standard 4200 K 0.0154
color tempetaure
Ceramic Metal Halide(CMH930-Agro) 0.0170
3100 K colour temperature, spectrum shifted to red
wavelengths
*Multiply the Lux by the conversion factor to get PPFD .For example ,
full sunlight is 108,000 Lux or 2000 µmol m-2s-1( 108,000 x 0.0185)
Fig.1. Block diagram of AI and IoT based monitoring system.

As per the discussions, for measuring intensity, a voltage


Arduino Integrated Development Environment (IDE) is divider circuit is designed. Here, LDR is connected to 5 V
used to write the embedded C codes in Arduino Module, supply via a 10K ohm resistor. The relationship between the
compile and executes them. Arduino IDE is mainly used to resistance of LDR and lux [22] is shown below equation 1,
give guidelines to Arduino [25]. Thingspeak platform is
used to store and publish results online. It is an open-source lux= (1.25x 107) x R-1.4059 (1)
IoT service application and API to store and get back data Where, R is the resistor of LDR
from various objects by using different HTTP and MQTT
protocols [26]. NodeMCU is an IoT open-source platform Further, to measure the temperature of the soil a digital
that refers to the firmware, which is built on this thermometer DS18B20 is used. The probe of the
development kit. It can work as an entire operating system thermometer is inserted inside the soil for measuring the
using the Wi-Fi module of the NodeMCU. It uses the temperature. The unique characteristic of DS18B20 is direct
MQTT/HTTP protocol to send the data on the cloud. to the digital temperature sensor [23]. The upper layer of
Arduino Uno is a single-board microcontroller developed by earth 'Soil' is indispensable for plant life, support and
Arduino.cc, based on Microchip ATmega328P [27]. It has a nutrients, and water supply. It collects the heat during the
bootloader that allows uploading new codes without any day time and releases heat during the night [24].
external hardware.
The soil moisture sensor is used for measuring the III. METHODOLOGY
volumetric content of water in the soil [8]. It is a parameter
A. Capturing the plant’s height and width
that determines the required amount of irrigation for the
growth of the plant. This sensor module built around the To capture plants' height and width we used the concept of
LM393 comparator and consists of a variable resistor called image processing and with the help of open CV library. The
'potentiometer' for adjusting the sensitivity. DHT11 sensor extracted height and width of the plant is stored in form of
module senses the relative humidity and temperature of the CSV file. Meanwhile, all the environmental parameters are
environment. Resistive type component is used to measure collected and stored in the cloud by using IoT. These values
humidity, and the negative temperature coefficient type also extracted from a cloud in CSV form.
component is used to measure the temperature of the
environment [19]. The percentage of water vapor present in
the air is termed as Relative Humidity(RH) [9] which is an
important parameter for a healthy plant growth.

Authorized licensed use limited to: MANIPAL INSTITUTE OF TECHNOLOGY. Downloaded on November 03,2023 at 19:11:37 UTC from IEEE Xplore. Restrictions apply.
302
B. Preparing the Dataset obtained data from the first microcontroller, it sends the
We have got the target variable data that was the plant’s data, using the HTTP protocol, to the cloud for storing and
height and width and then we found the rate of plant growth monitoring. Meanwhile, image of the plant has been
by using the formula in equation 2, captured through the camera as shown in Fig.2.

∂x
Height/Width Growth Rate = (2)
∂t
Where, ∂x changes in height or width. And ∂t is the
difference in time during which the properties are measured.

C. Data Analysis and Cleaning


We analyzed and visualized the data and how valuable our
features were and estimated a few predictions after features
selection. Further, some of the extracted data was used for
training the algorithm.

D. Applying Algorithms Fig. 2. Capturing the plant’s height and width.


After having the trained data, we applied supervised
machine learning algorithms over it. The following
algorithms were used to train our model.

a) Gaussian Naïve Bayes


This classifier uses the concept of Bayes’ Theorem which
assumes that every input value is independent of each other.
b) Linear Support Vector Classifier
This model is essentially representing various classes in a
multidimensional space hyperplane.
c) Decision Tree
A decision tree is a classifier with feature marked internal
(a)
nodes. Each node marked with possible output and leads to
a lower-ranked decision node on various input features.
d) Random Forest
This algorithm is used for classification as well as
regression predictions. It creates different decision trees on
data and gives predictions from them. Finally, provides the
best solution to the problem for which it is employed.
e) Gradient Boosting Classifier
It uses the boosting method to produces the ensemble
predication model of weak prediction models like a decision
tree.
f) Logistic Regression (b)
For predictive analysis in classification problems, this
algorithm is employed. It is based on the concept of
probability.
g) Stochastic Gradient Descent
Here, few samples are randomly selected instead of the
whole data and calculating the derivative from each trained
sample.
IV. RESULTS AND DISCUSSION

All the sensors have been deployed in the field and scripted
using C++ in Arduino IDE. Jason script is used to maintain
the serial communication between Arduino Uno and (c)
Esp8266 Wi-Fi module. As soon as this Wi-Fi module

303
Authorized licensed use limited to: MANIPAL INSTITUTE OF TECHNOLOGY. Downloaded on November 03,2023 at 19:11:37 UTC from IEEE Xplore. Restrictions apply.
TABLE II. ACCURACY OF DIFFERENT CLASSIFICATION ALGORITHMS

Algorithms Accuracy (%)


Logistic Regression 83.33

Linear Support Vector Classifier 83.33

Gradient Boosting Classifier 83.33

Gaussian Naïve Bayes 66.67

Decision Tree 66.67

Random Forest 66.67

Stochastic Gradient Descent 66.67


(d)

The graph in Fig.4 showed the variation of plant growth


rate with respect to the intensity of light. We have classified
the growth rate of the plant into three categories i.e., 0, 1,
and 2. Category-2 is the best condition i.e., 1000-1200 lx
(observed from the graph) whereas category-0 is worst as
growth is less. Category-1 is an optimal condition.
Similarly, other parameters for best growth rate listed in
Table III.
TABLE III. FAVORABLE CONDITIONS FOR PLANT GROWTH
Parameters Suitable Conditions
(Observed Values)

Humidity of 58% to 78%


(e) environment
Fig. 3 Monitoring of different agricultural parameters on cloud: (a)
Humidity, (b) Temperature of environment, (c) Soil moisture, (d) Soil Temperature of 20 0c to 35 0c
temperature, (e) Light intensity. Environment

Soil Moisture 45% to 59%

Soil Temperature 19 0c to 32 0c

Light Intensity 1000 lx to 1200 lx

V. CONCLUSION
We have found the best favourable conditions for the
marigold plant by data visualization and later on, this trained
model can be used to detect the rate of growth of marigold
plant just supplying it the environmental physical
conditions. Further, Logistic Regression, Linear SVC and
Gradient Boosting Classifier found to be the best fit
algorithms with 83.33% accuracy. This technique has a
great scope in the field of artificial farming. Not only we can
detect the best favourable conditions for particular crops like
Fig. 4. The graph between growth rate v/s light intensity. millet, chillies, tea, coffee etc., but also we could prepare a
The image processing has done in python using the OpenCV dataset using IoT which could tell us the best suitable plant
library. Fig.3 (a to d) showed the real-time values of various for a particular soil and climatic condition.
agricultural parameters in the form of the graph during the REFERENCES
entire day. Here, some specific time instances have been
picked as, 06:00:00, 09:00:00, 12:00:00, 15:00:00, 18:00:00, [1] R. J. McQueen, S. R. Garner, C. G. Nevill-Manning, I. H. Witten,
21:00:00 and 00:00:00 from vast dataset(more than 3,000) “Applying machine learning to agricultural data,” Computers and
Electronics in Agriculture, vol. 12, pp. 275-293, 1995.
obtained from cloud. All the obtained values have been
[2] C. Verdouw, H. Sundmaeker, B. Tekinerdogan, D. Conzon, and T.
stored in the CSV file to maintain the database. We applied Montanaro, “Architecture framework of IoT-based food and farm
machine learning algorithms to our dataset. The accuracy systems: A multiple case study,” Computers and Electronics in
obtained in different algorithms as shown in Table II. Agriculture, vol. 165, pp. 104939, 2019.

Authorized licensed use limited to: MANIPAL INSTITUTE OF TECHNOLOGY. Downloaded on November 03,2023 at 19:11:37 UTC from IEEE Xplore. Restrictions apply.
304
[3] M. A. Zamora-Izquierdo, J. Santa, J. A. Martínez, V. Martínez, and [14] S. R. Prathibha, A. Hongal, and M. P. Jyothi, “IOT Based Monitoring
A. F. Skarmeta, “Smart farming IoT platform based on edge and System in Smart Agriculture,” International Conference on Recent
cloud computing,” Biosystem Engineering, vol. 177, pp. 4–17, 2019. Advances in Electronics and Communication Technology
[4] N. Ahmed, D. De, and I. Hussain, “Internet of Things (IoT) for smart (ICRAECT), Bangalore, India, 16-17 March 2017, pp. 81–84.
precision agriculture and farming in rural areas,” IEEE Internet [15] G.Meena Kumari, Dr.V.Vidya Devi, “Real-Time automation and
Things Journal, vol. 5, no. 6, pp. 4890–4899, 2018. monitoring system for modernized agriculture,” IJRRASE, vol 3
[5] Tzounis, N. Katsoulas, T. Bartzanas, and C. Kittas, “Internet of no.1.pp 7-12, March 2013.
Things in agriculture, recent advances and future challenges,” [16] C. Yoon, M. Huh, S. Kang, J. Park, and C. Lee, “Implement smart
Biosystem. Engineering, vol. 164, pp. 31–48, 2017. farm with IoT technology,” 20th International Conference on
[6] Mohanraj I,Kritika Ashokumar, Naren J, “ Field Monitoring and Advanced Communication Technology (ICACT), Chuncheon-si
Automation using IoT in Agriculture Domain,” 6th International Gangwon-do, Korea (South), Korea (South), 11-14 Feb. 2018, pp.
Conference on Advances In Computing & Communication, Cochin, 749–752.
India, 6-8 Sept. 2016, pp. 931-939. [17] M. Nagakannan, C. J. Inbaraj, K. M. Kannan, and S. Ramkumar, “ A
[7] A. Chlingaryan, S. Sukkarieh, and B. Whelan, “Machine learning recent review on iot based techniques and applications,” 2nd
approaches for crop yield prediction and nitrogen status estimation in International Conference on I-SMAC (IoT in Social, Mobile,
precision agriculture: A review,” Computer Electronic Agriculture, Analytics and Cloud) 2nd International Conference on, Palladam,
vol. 151 , pp. 61–69, 2018. India, 30-31 Aug. 2018, pp. 70–75.
[8] R. K. Kodali and A. Sahu, “An IoT based soil moisture monitoring on [18] Konstantinos G.Liakos,Patrizia Busato,Dimitrious Moshou,Simon
Losant platform,” 2nd International Conference on Contemporary Pearson and Dionysis Bochtis, “Machine learning in agriculture : A
Computing and Informatics (IC3I), Noida, India, 14-17 Dec. 2016. revie,” ,Sensors , vol. 18, no. 8, p.2674, August 2018.
[9] P. Rajalakshmi and S. D. Mahalakshmi, “IOT based crop-field [19] mouser.com/datasheet/2/758/DHT11-Technical-Data-Sheet-
monitoring and irrigation automation,” 10th International Conference Translated-Version-1143054.pdf
on Intelligent Systems and Control (ISCO), Coimbatore, India, 7-8 [20] cropsreview.com/light-intensity.html
Jan.2016, pp. 1-6. [21] apogeeinstruments.com/conversion-ppfd-to-lux/
[10] M. R. M. Kassim, I. Mat, and A. N. Harun, “Wireless Sensor [22] allaboutcircuits.com/projects/design-a-luxmeter-using-a-light-
Network in precision agriculture application,” International dependent-resistor/(lux)
Conference on Computer, Information and Telecommunication
Systems (CITS), Jeju, South Korea, 7-9 July 2014, pp. 1–5. [23] datasheets.maximintegrated.com/en/ds/DS18B20.pdf
[24] precisionagricultu.re/soil-temperature-and-its-importance/
[11] S. Heble, A. Kumar, K. V. V. D. Prasad, S. Samirana, P. Rajalakshmi,
and U. B. Desai, “A low power IoT network for smart agriculture,” in [25] en.wikipedia.org/wiki/Arduino_IDE
2018 IEEE 4th World Forum on Internet of Things (WF-IoT), [26] en.wikipedia.org/wiki/ThingSpeak
Singapore, Singapore 5-8 Feb. 2018, pp. 609–614. [27] en.wikipedia.org/wiki/Arduino_Uno
[12] Nikesh Gondchawar, Prof .D.R.S.Kawitkar, “ IoT based smart [28] The World Bank : India :Issues and Priorities for Agriculture.
agriculture,” IJARCCE, Vol 5, Issue 6, June 2016.
[29] Food and Nutrition Security Analysis, India,2019.
[13] S. Pallavi, J. D. Mallapur, and K. Y. Bendigeri, “Remote sensing and
controlling of greenhouse agriculture parameters based on IoT,” in [30] United Nations Food and Agriculture Report 2019.
2017 International Conference on Big Data, IoT and Data Science
(BID), Pune, India 20-22 Feb. 2017, pp. 44–48.

Authorized licensed use limited to: MANIPAL INSTITUTE OF TECHNOLOGY. Downloaded on November 03,2023 at 19:11:37 UTC from IEEE Xplore. Restrictions apply.
305

You might also like