Download as pdf or txt
Download as pdf or txt
You are on page 1of 68

AN IOT APPROACH FOR AGRICULTURE

MANAGEMENT BASED ON CONTROLLING AND


MONITORING SYSTEM

A PROJECT REPORT

Submitted by

ABISHA A
AKHILA S ANIL
ASWATHY S
NISHA A

In partial fulfillment for the award of the degree

of

BACHELOR OF ENGINEERING

in

ELECTRONICS AND COMMUNICATION ENGINEERING

SIVAJI COLLEGE OF ENGINEERING AND TECHNOLOGY, MANIVILA

ANNA UNIVERSITY::CHENNAI 600 025

APRIL 2020
ANNA UNIVERSITY::CHENNAI 600 025

BONAFIDE CERTIFICATE

Certified that this project report “AN IOT APPROACH FOR AGRICULTURE

MANAGEMENT BASED ON CONTROLLING AND MONITORING

SYSTEM” is the bonafide work of “ABISHA A (962116106002), AKHILA S

ANIL (962116106003), ASWATHY S (962116106005) and NISHA A

(962116106008)” who carried out the project work under my supervision.

SIGNATURE SIGNATURE

Mr. KIRAN W, M.E. (Ph.D.) Ms. SAJINI S, M.E.

HEAD OF THE DEPARTMENT SUPERVISOR

Department of Electronics and Department of Electronics and

Communication Engineering Communication Engineering

Sivaji College of Engineering Sivaji College of Engineering

and Technology, Manivila and Technology, Manivila

Submitted for B.E. Degree Project Work (EC6811) viva-voce examination held at
Sivaji College of Engineering and Technology, Manivila on ________.

INTERNAL EXAMINER EXTERNAL EXAMINER


ii

ACKNOWLEDGEMENT

The honor be to the Lord Almighty, source of all knowledge for gracious
presence and blessings, that enabled us to complete this project in due time.

We express our sincere gratitude and profuse thanks to our honorable


Chairman, Dr. Sivaji Jaganathan, for giving us the chance to do our project in this
esteemed organization.

We owe a deep sense of gratitude to our respected Principal, Dr. T. R.


Sethuraman, M.E., Ph.D. forgiving us the encouragement and required facilities for
the successful completion of the project work within time.

Words can never express our gratitude to fullest extent when it comes to
thanking Mr. Kiran W, M. E. (Ph. D.), Head of the Department, for his valuable
guidance, suggestions and encouragement in all aspects to complete this project
successfully.

It is our privileges to express our sincere thanks to our Project guide Ms.
Sajini S, M. E., for her valuable suggestions and guidance in preparation of the
report.

With great enthusiasm we express our heartiest thanks to all our


department faculty & technical staff members for providing necessary information
and their sustained interest throughout the completion of our project.
iii

க்கம்

ஈரப் பதம் , ெவப் பநிைல மற் ம் மண்ணின் ஈரப் பதம்

வசா களால் அ யப் படலாம் மற் ம் வசாய

நிலங் க க் ேநர யாகச் ெசல் லாமல் அவற் ைறக்

கட் ப்ப த்தலாம் . தாவர வளர்ச் ையப் பா க் ம் பல் ேவ

அள க்கைளக் கண்காணிக்க ம் , IoT இைணப் டன்

ஒ ங் ைணந்த நீ ர்ப்பாசன ைறையக் கட் ப்ப த்த ம்

வயர்ெலஸ் ெசன்சார்கைளப் பயன்ப த் ம் ஒ அைமப்ைப

நாங் கள் ன்ெமா ேறாம் . ன்ெமா யப் பட்ட அைமப் ல் ,

உணரப் பட்ட தகவல் கைள ேச க்க ம் மற் ம் எ ர்கால

பயன்பாட் ற் பயன்ப த்தலாம் . மண்ணின் ஈரப் பதத் ன்

அ ப் பைட ல் எரிச்சல் வழங் கப்ப ற . இந்த அைமப்

MATLAB ஐப் பயன்ப த் ேநாய் அைடயாளத்ைத ம்

வழங் ற . ச பத் ய ெதா ல் ட்பத்ைதப்

பயன்ப த் தல் மற் ம் ைறந்த ைல, ெசயல் பட

எளிதான அைமப் வசா க க் அ கக் யதாக

அைம ற .
iv

ABSTRACT

Agriculture, the backbone of Indian economy, contributes to the

overall economic growth of the country. Advancements in the technologies are

higher especially for IoT and wireless sensors, these can be integrated well with

our traditional farming practices to yield more result and enhance its quality.

Environment parameters like humidity, temperature and soil moisture can be

known by the farmers and can control them without going directly to the

agricultural land. We propose a system which uses wireless sensors for monitoring

various parameters that affect the plant growth and for controlling the irrigation

system which is integrated with IoT connectivity. In the proposed system, sensed

information can be saved and can be used for future use with the help of webpage

service. The irritation is provided based on the soil moisture level. This system also

provides disease identification using MATLAB. This system put forward various

features such as environment monitoring, disease identification and irrigation

provision. Use of latest technology and low cost, easy to operate system make it

accessible for farmers. Thus making agriculture a way even smarter.


v

TABLE OF CONTENTS

CHAPTER NO. TITLE PAGE NO.

ABSTRACT iv

LIST OF TABLES vii

LIST OF FIGURES viii

LIST OF ABBREVIATIONS x

1 INTRODUCTION 1

1.1 GENERAL 1

1.2 OBJECTIVE 1

1.3 EXISTING SYSTEM 2

2 LITERATURE REVIEW 3

3 PROPOSED SYSTEM 13

3.1 BLOCK DIAGRAM 14

3.2 COMPONENT DETAILS 15

3.2.1 Hardware 15

3.2.1.1 Arduino UNO board 15

3.2.1.2 DHT11 17

3.2.1.3 Soil moisture sensor 19


vi

3.2.1.4 Soil pH meter 22

3.2.1.5 Relay 23

3.2.1.6 Node MCU 26

3.2.2 Software 28

3.2.2.1 Arduino IDE 28

3.2.2.2 MATLAB 29

3.3 WORKING MODULES 29

3.3.1 Module 1 29

3.3.2 Module 2 31

3.4 CIRCUIT DIAGRAM 33

3.5 ALGORITHM 33

3.6 FLOWCHART 34

3.7 ADVANTAGES OF PROPOSED SYSTEM 34

4 RESULTS AND DISCUSSION 36

4.1 CONCLUSION 40

4.2 FUTURE ENCHANCEMENTS 40

APPENDIX 41

REFERENCES 54
vii

LIST OF TABLES

TABLE NO. TABLE NAME PAGE NO.

3.1 Pin identification and configuration of 16

Arduino UNO

3.2 Pin identification and configuration of 19

DHT11

3.3 Pin identification and configuration of 21

Soil moisture sensor

3.4 Pin identification and configuration of 23

Soil pH meter

3.5 Pin identification and configuration of 25

Relay

3.6 Pin identification and configuration of 28

Node MCU
viii

LIST OF FIGURES

FIGURE NO. FIGURE NAME PAGE NO.

3.1 Block diagram 14

3.2 Pin diagram of Arduino UNO 16

3.3 Pin diagram of DHT11 18

3.4 DHT11 with Arduino UNO 18

3.5 Pin diagram of Soil moisture sensor 20

3.6 Soil moisture sensor with Arduino UNO 21

3.7 Pin diagram of Soil pH meter 22

3.8 Pin diagram of Relay 24

3.9 Relay with Arduino UNO 25

3.10 Pin diagram of Node MCU 27

3.11 Node MCU with Arduino UNO 27

3.12 Symbol of Arduino UNO 28

3.13 Symbol of MATLAB 29

3.14 Circuit diagram 33

3.15 Flowchart 34

3.16 IoT based controlling and monitoring system 36


ix

FIGURE NO. FIGURE NAME PAGE NO.

3.17 Monitoring the data via webpage 37

3.18 Controlling the relays via webpage 37

3.19 Input test image, Preprocessed image and 38

Segmented image of diseased leaves

3.20 Disease monitoring through webpage 39


x

LIST OF ABBREVIATIONS

ABBREVIATIONS EXPANSION

IoT Internet of Things

Wi-Fi Wireless Fidelity

PWM Pulse Width Modulation

NTC Negative Temperature Coefficient

LED Light Emitting Diode

GPIO General Purpose Input Output

MCU Microcontroller Unit

OTA Over the Air

SMS Short Message Service

SoC System on Chip

I2C Inter-Integrated circuit

USB Universal Serial Bus

SRAM Static Random Access Memory

DDS Disease Detection System

MDL Machine Description Language


1

CHAPTER 1

INTRODUCTION

1.1 GENERAL
Smart agriculture is a combination of Big data, Cloud, IoT which
does tracking, automating, monitoring and analyzing. Trend of urbanization
lead to high food demand and decreasing farmland lead to production of
food in smaller area with few labors. Digitization of agriculture made that
easier by services such as connectivity network, data acquisition, Cloud-
based intelligent information analysis and user interfacing. Combination of
advanced and traditional methods enables to produce food of high quality
and quantity. Smart agriculture forms a network called Farm Area Network
(fan).
Recent sensing and communication technologies are like ‘eye in
the field’. This system provides real time monitoring, disease forecasting by
leaf analysis, automatic controlling, Cloud storage, Wi-Fi connection to
farm. It can cope with climate change effects by use of humidity,
temperature sensor and environmental pollution, salinization, acidification,
drought by use of pH and soil moisture sensor.

1.2 OBJECTIVE
The main objective of this project is to monitor the
environmental conditions, controlling irrigation and identifying the plant
diseases at its early stage even without directly going to farmland.
2

1.3 EXISTING SYSTEM

In smart agriculture, the structure is basically built by WSNs


architecture and IoT technique. The environmental parameters are sensed by
wireless sensors like temperature, humidity, soil moisture sensors on the
farmland. These are controlled by Raspberry Pie, Arduino or ARM 7
microcontrollers. For some systems, these sensed values can be viewed
through ThingSpeak. For others, the sensed values are collected and stored
in the Cloud for future use. They used GSM or Wi-Fi module for
connectivity. By analyzing these stored values, we can take necessary
precautions to avoid any changes in the optimum condition for the growth of
each plant. These systems are based on live monitoring and data
visualization.
The soil moisture values helps to provide the adequate
irrigation. These can be controlled automatically by the users without going
to farmland, with the help of webpage or ThingSpeak. The SMS
notifications are also provided to the farmers to know about the status of the
farm and it even tells about any animal intrusion into the farms.
Soil has different attributes like soil moisture, temperature,
humidity, pH, electrical conductivity. Current system works only on one or
two parameters at one time. Even though some of these systems have leaf
sensors, we can only know about growth of plants from them. But there are
no systems, in which the disease affecting can be identified. Most of the
existing systems are of high cost, have wired connection and have difficulty
in maintenance.
3

CHAPTER 2
LITERATURE REVIEW

Remote Sensing and Controlling of Greenhouse Agriculture Parameters


based on IoT

The paper proposed a remote sensing of agriculture parameters


and control system to the greenhouse agriculture. The plan is to control CO2,
soil moisture, temperature and light, based on soil moisture the controlling
action is accomplished for the greenhouse windows or doors based on crops
once a quarter complete round the year. The objective is to increase the yield
and to provide organic farming. The result shows the remote control of CO2,
soil moisture, temperature, and light for the greenhouse.
At night time plants require a lot more water with CO2 for
photosynthesis process. In IoT kit the soil moisture sensor gives a negative
value it means the full of water is covered by the plants, at that time the
greenhouse windows or doors will be closed automatically with the help of
DC motor. This system is designed to remotely monitor the greenhouse
parameters and this information can be collected by farms with the help of a
Cloud account and internet connection. This is also a controlling action
taken automatically that is greenhouse windows or doors roll off based on
the soil moisture levels. Thus, the system will help the farmers to avoid
physical visit to the field and increase the yield with the maintenance of
parameters.
4

Application of Non-Orthogonal Multiple Access in Wireless Sensor


Networks for Smart Agriculture

WSNs are used to collect the interest data in the farm field and
send the obtained data to the servers via wireless communication. Since the
WSNs usually operate in the unlicensed spectrum, the available resource
elements (REs) are scarce especially when a large number of sensor nodes
are deployed in the farm field. To accommodate more sensor nodes and
prolong the lifetime of the WSNs in agriculture, relay-aided non-orthogonal
multiple access is introduced into the uplink transmission stage of the direct
transmission from the sender nodes to the sink node.
It introduced relay aided NOMA into the uplink transmission in
WSNs in agriculture. For periodic and busty short -range uplink
transmission, NOMA technique is able to accommodate more sensor nodes
with the same number of the REs. A mixed transmission scheme including
both uplink and downlink transmission has been proposed for WSNs in
agriculture, in which OMA is applied in downlink transmission and relay-
aided MONA scheme is employed in uplink transmission. Numerical
simulation results have shown that WSNs with relay-aided NOMA achieves
lower outage probability, higher sum data rate, reduce the power
consumption and prolong the lifetime of the networks, which shows that
NOMA technique can be competitive candidate in both uplink and downlink
transmission for WSNs in agriculture.
5

Automation in Agriculture and IoT

In this paper, they proposed a system which is willing to


automate the rectification process of any error occurring at any node of the
existing automation system by extending the workflow which helps stand
alone system to thrive without any human intervention. It implements
workflows that tend to increase the level of automation in the system.
They showcase the current developments and future scope in
agricultural technologies through IoT and automation. A large-scale
agricultural system requires a lot of maintenance, knowledge, and
supervision. In this paper it is aimed to automate the Maintenance, Control
of Insecticides and Pesticides, Water Management and Crop Monitoring. It
tries to resolve problem using IoT and automation which can manage most
of the agricultural work and the farmers can strategize which crops to grow
according to the market.
Electronic components used are Arduino UNO, 16x2 liquid
crystal display (LCD), pH sensor, DHT11, Soil moisture sensor, GSM
module connecting the device to another GSM device enabling IoT
connectivity and remote monitoring. They perform automation of soil care
and fertilizer deficiency detection. All the processes and operations are
notified by the farmers and Service Team with the help of GSM module.
6

IoT Based Intelligent Agriculture Field Monitoring System

The smart farming can be adopted which offer high precision


crop control, collection of useful data and automated farming technique.
This system presents an intelligent agriculture field monitoring system
which monitors soil humidity and temperature. After processing the sensed
data it takes necessary action based on these values without human
intervention. Here temperature and moisture of the soil are measured and
these sensed values are store in ThingSpeak Cloud for future data analysis.
The purpose of this is to propose a smart farming method based on Internet
of Things (IoT) to deal with the adverse situations.
Different layers of smart farming system include sensor layer,
middleware, communication layer, cloud and application layer Arduino
UNO board is used as microcontroller and different sensors are attached
with it. LM35 was used as a temperature sensor and VL95 is used as soil
moisture sensor. Stepper motor, fan are also connected to the board through
6 pin relay to control high voltage device. Here, the pump and fan works
based on the threshold value set for soil moisture and temperature
respectively. In the absence of human being in the agricultural field, this
system provides continuous field monitoring and triggers the appropriate
events according to the requirement. It reduces the human effort and cost of
farming to a certain extent.
7

Internet of Things (IOT) for Precision Agriculture Application

To implement precision agriculture the benefits of IoT has been


utilized in the proposed paper. Precision agriculture is basically a concept
which insists to provide right amount of resources at and for exact duration
of time. These resources can be any things such as water, light, pesticides
etc.
The fundamental idea is to sense all the required parameter from
the agriculture field and take required decision to control the actuator. These
agriculture parameters are soil moisture, temperature and relative humidity
around plant, light intensity. Based on the reading sensed by the sensor
suitable action is taken that is, irrigation value is actual based on soil
moisture readings, valve for fogger (for spraying water droplets) is actuated
based on the Relative Humidity (RH) readings etc.
This paper proposed the development of the sensor node
capable of measuring all these parameter and creating the actuation signal
for all the actuator. On top of that sensor nodes are also capable of sending
this data to Cloud. An Android application is also developed inorder to
access all these agricultural parameter and are visualized in the of graphical
representation charts. It proposes the application of Cloud based IoT in the
agriculture domain.
8

IoT Based Smart Agriculture System

The paper aims at making use of evolving technology that is, IoT
and smart agriculture using automation. Monitoring environmental
conditions is the major factor to improve yield of the efficient crops. The
feature of this system is to monitor temperature, humidity, moisture and
even the movement of animals which may destroy the crops in agricultural
field through sensors using Arduino board and in case of any discrepancy
send a SMS notification as well as notification on the application developed
for the same to the farmer’s Smartphone using Wi-Fi or 3G or 4G.
The system has a duplex communication link based on a
Cellular – Internet interface that allows for data inspection and irrigation
scheduling to be programmed through an Android application. Because of its
energy autonomy and low cost, the system has the potential to be useful in
water limited geographically isolated areas.
Threshold values for climatic conditions like humidity,
temperature, moisture can be fixed based on the environmental conditions of
that particular region. They generates irrigation schedule based on the sensed
real time data from field and data from the weather repository.
9

Modeling and SimuLink of Smart Agriculture Using IoT Framework

A model tuning scheme is a test and control for smart agriculture


using IoT framework. It provides support for three Agro-foods such as fruit,
vegetable, and organic delivery using the IoT. The system can monitor the
environment via personal computer (PC) and mobile phone. Once they have
implemented the Fuzzy Logic Controller (FLC) and resolving the modeling
and the SimuLink in the system. Overall, the IoT framework developed will
monitor to check all conditions and performance results as well as help the
farmers to ease their work.
DHT11 and LM35 detect current temperature after that an
analog-to-digital system converts analog value to the FLC. The conditions
are designed relating input and output, including three triangular
membership functions 3*3 fuzzy logic rule matrix. According to the
membership function is converted into FLC triangular input and output, by
applying the rule of the fuzzy algorithm.
The FLC and MATLAB SIMULINK technique are provided to
set the temperature of smart agriculture and humidity related around 32.5oc
and 58.5% respectively and soil moisture by comparing with indoor and
outdoor. The indoor soil moisture is to fix lower than outdoor soil moisture
that is, 17% and 24% respectively.
10

Plant Disease Detection Using Image Processing

Segmentation and feature extraction algorithm are used in the


plant disease detection. Identification of the plant diseases is the key to
preventing the losses in the yield and quantity of the agricultural product.
Disease detection involves the steps like image acquisition, image pre-
processing, image segmentation, feature extraction and classification. This
paper makes use K-mean clustering, Color co-occurrence method, ANN
method and Otsu threshold algorithm.
This paper discusses the methods used for the detection of plant
diseases using their leaves images. Image segmentation is done using
boundary and spot detection algorithm, K-mean clustering, Otsu threshold
algorithm.
Feature extraction is provided by color co-occurrence method,
leaf color extraction using H and B components. The classification is done
by using ANN method, back propagation and testing of query images. This
system helps to accurately identify and classify various plants by using
image processing techniques.
11

Smart Agriculture – Using IoT in Field monitoring and Automation for


Soil Moisture using Naive Bayes Prediction

A data – driven methodology is used on improving soil moisture


using collection and data modeling systems. MicaZ mote and VH400 soil
moisture sensor are used to monitor the soil moisture. A soil moisture
prediction framework is developed based on Naive Bayes prediction.
The framework predicts soil moisture based on the soil and
weather attributes that are collected by sensor nodes. It is observed as there
are low error rates (10%) and high correlations (90%) between predicted and
actual values, and the predicted results remain matching over a period of
time (one crop duration).
In the collection phase, soil moisture, weather and other
meteorological data is gathered using wireless sensor nodes. The prediction
phase is used to predict soil moisture and weather days ahead. Naïve Bayes
prediction is applied on data from collection phase. A machine learning
algorithm is applied to generate a prediction framework. Soil moisture input
may be either data from soil moisture retrieval techniques or previous
predicted values. If drought condition stays more than n days, then the
model will predict the future based on past data assumption.
12

Implement Smart Farm with IoT Technology

Smart farm system using low power Bluetooth and Low Power
Wide Area Networks (LPWAN) communication modules including the
wired communication network used in the existing farm was constructed. In
addition, the system implements the monitoring and control functions using
the MQ Telemetry Transport (MQTT) communication method, which is a
IoT dedicated protocol, thereby enhancing the possibility of development of
agricultural IoT.
This system solves the power problem and space limitation of
wired system. By applying a solution of selecting the most received words
for each word by cutting the message to word size, reduced the bit loss that
occur in wireless communication.
Environmental data are collected through the sensors on the
node. The gateways responsible for each communication network are
connected to the Internet and relay the communication between the server
and the nodes. The communication module supports Ipv6 address system
and Bluetooth communication. RS485 is used as wired serial communication
module. Thus implementing a hybrid wired or wireless system with node –
server – database and external control system.
13

CHAPTER 3
PROPOSED SYSTEM

The rapid emergence of the Internet-of-Things (IoT) based


technologies redesigned almost every industry including “Smart
Agriculture” which moved the industry from statistical to quantitative
approaches, making the agricultural industry data-centered, precise and
smarter than ever. Our aim is to develop a system in which we can monitor
environmental parameters and identifying plant diseases without directly
going to farmland.
On previous works, they normally work on one or two
parameters at a time. But in this system, many wireless sensors are used.
Even though there are devices to detect diseases are affecting but there are
not many ways to identify them in current systems. Our system proposes
identification of diseases by analyzing the leaves of the plants even in its
earlier stages before the external symptoms appears.
Here, the architecture of the system is simple than earlier. All
the sensors are connected to form a network and its measurements are stored
in the webpage and network connection is provided by Wi-Fi module. It
offers predictive analysis of future state of environment, crops by use of
stored data. In this system, there is concern about available water as users
are the one controls it.
14

3.1 BLOCK DIAGRAM

Fig 3.1 Block diagram

The above figure shows the block diagram of smart agriculture:


monitoring and controlling system based on IoT. This system is equipped
with four parameter sensors namely temperature sensor, humidity sensor, pH
sensor and soil moisture sensor. The Microcontroller board used is Arduino
UNO board. It uses relay as switch to ON or OFF a pump, used for
irrigation. The Wi-Fi module connectivity is provided by ESP 8266. UART
is used for serial communication of data.
15

3.2 COMPONENT DETAILS

3.2.1 Hardware

3.2.1.1 Arduino UNO board

Arduino UNO is an open source Microcontroller board based on microchip


ATmega328p developed by Arduino.cc .They have 14 digital I/O pins including 6
PWM output pins and 6 analog I/O pins. Arduino UNO is programmable with
Arduino IDE. They are powered by USB connection from computer or 9V battery
or adapter. The communication is through STK500 protocol. They have a 16MHz
crystal oscillator, serial communication, voltage regulator and 10 bit ADC. They
doesn’t use FTDI USB-to-serial driver chip but use ATmega8U2 programmed as
USB-to-serial converter.

Features of Arduino UNO

 Microcontroller : ATmega328p
 Operating voltage : 5V
 Input voltage : 7-12V (recommended), 6-20V (limits)
 DC current per I/O pin : 40mA
 DC current for 3.3V : 50mA
 Storage : Flash (32KB), EEPROM (1KB)
 Memory : SRAM (2KB)
 Clock speed : 16MHz
16

Fig 3.2 Pin diagram of Arduino UNO

Table 3.1 Pin identification and configuration of Arduino UNO

Sl. Pin name Description


No.

1 Power pins Vin: Provide voltage to Microcontroller board when


external power source is used.

5V: Regulated power supply to power Microcontroller


and other components.

GND : To provide ground connection


17

2 Analog pins(A0 Provide analog input in range 0 to 5V


to A5)

3 Digital pins (D0 Used for input or output digital data


to D13)

4 Serial 0 (RX), 1 Receive or transmit the serial data


(TX)

3.2.1.2 DHT11

The DHT11 is a basic, ultra low-cost digital temperature and humidity


sensor. DHT11 is pre-calibrated with resistive sense technology coupled with NTC
thermistor. For calculating relative humidity the electrical resistances between
electrodes are measured. For higher relative humidity, the resistance between
electrodes decreases and vice versa. For measuring temperature, NTC thermistor is
used. For this, resistance value decreases with increase in temperature and vice
versa. Both these values are analog and are converted to digital by 8 bit IC and
send to Microcontroller using single data line.

Features of DHT11

 Output : serial data


 Operating voltage : 3 to 5V
 Resolution : 16 bit
 Power supply : 3.3 to 5.5V
 Supply current : measuring 0.3mA, standby 60uA
 Temperature range : 0 to 50oc
18

 Humidity range : 20 to 90%


 Accuracy : +/-1o c and +/-1%
 1Hz sampling rate
 High reliability, long term stability, low power consumption

Fig 3.3 Pin diagram of DHT11

Fig 3.4 DHT11 with Arduino


19

Table 3.2 Pin identification and configuration of DHT11

Sl. Pin Description Writing to


No. Name Arduino UNO

1 VCC Power supply 3.3 to 5.5V 5V

2 DATA Outputs of both temperature and humidity A digital I/O pin


through Serial data

3 GND Connected to the ground of the circuit GND

3.2.1.3 Soil moisture sensor

The pork shaped probe with two exposed conductors, act as a variable
resistor whose resistance varies according to the water content in the soil. Two
probes allow current to pass through soil, gets resistance value to measure
moisture. This resistance is inversely proportional to the soil moisture. The more
water in the soil, means better conductivity and will result in a lower resistance.
The less water in the soil means poor conductivity and will result in a higher
resistance.

The sensor also contains a control board that connects the probe to the
Arduino. The module produces an output voltage according to the resistance of the
probe and is made available at an analog output (A0) pin. The signal is fed to
LM393 high precision comparator to digitize it and is made available at an digital
output (D0) pin. We can set threshold by using a potentiometer, so that when the
moisture level exceeds the threshold value, the module will output LOW otherwise
20

HIGH. The Power LED will light up when the module is powered. The Status LED
will light up when the digital output goes low.

Features of soil moisture sensor

 Operating voltage : 3.3 to 5V


 Output voltage : 0 to 4.2V
 Input current : 35mA
 Dual output mode : Analog, Digital
 Optimum range : 500 to 750 g/m3
 Required current : 20mA
 Working temperature : 10 to 30oc
 Have Nickel or Platinum plating

Fig 3.5 Pin diagram of soil moisture sensor


21

Fig 3.6 Soil moisture sensor with Arduino

Table 3.3 Pin identification and configuration of Soil moisture sensor


Sl. Pin name Description Writing to Arduino
No. UNO
A0(analog Gives analog signal between supply A analog input
1
output) value to 0V (A1)
D0 (digital Gives digital output of internal A digital pin
2
output) comparator circuit
VCC Supplies power for sensor 5V
3
GND To provide ground connection GND
4
22

3.2.1.4 Soil pH meter


pH meter is a device used for potentiometrically measuring pH
which is either concentration or activity of hydrogen ions. It usually has two
pH electrodes. It is used to measure pH of liquids, through special probes are
sometimes used to measure pH of semi-solid substances. They measure
acidicity and alkalinity of solutions. The range measured by pH meter lies
between 0 to 14. The sensor will get readings from the soil and will track the
health of the soil.
Range: Acidic < 7 < basic
When pH value is below 6, then the solution will be too acidic
and above 7.5, it will be too basic. The two electrodes are dipped into the
soil and the voltage difference between the electrodes is converted into pH
reading. When the value is beyond the level, the LED will start blinking.

Features of Soil pH meter


 No battery
 Optimum pH range : 5.5 to 7.0
 Resolution : +/- 0.001
 Accuracy : +/- 0.002
 Simple, convenient to use
 High quality and accurate

Fig 3.7 Pin diagram of Soil pH meter


23

Table 3.4 Pin identification and configuration of Soil pH meter

Sl. No. Pin name Description Writing to Arduino UNO

1 5V Supplies power for sensor 5V

2 GND Provide ground connection GND

3 TX Used to transmit serial data RX

4 RX Used to receive serial data TX

5 D5 to D7 Provide digital output A digital pin

3.2.1.5 Relay

Relays are electrically operated switch. They use electromagnet to close


or open contact in a circuit, nowadays solid-state relays made of semiconductors
are also used. Relays are used where they need to control a circuit by an
independent low power signal. They used for the controlling purpose and has a low
power signal. Relays use electromagnet to mechanically operate a switch. When
current is switched off, the contact opens again and switching the circuit off and
when current is switched on, the contact closes and switching the circuit on.

In relay, circuit powering coil is completely separated from circuit


switched on by the relays. Relays are used where a safe low voltage circuit controls
a high voltage circuit. Relays are also used where it is necessary to control a circuit
by separate low power signal, or where several circuits must be controlled by one
signal.
24

Relay consists of set of input terminals for a single or multiple control


signals and a set of operating contact terminals. They have any number of contacts
in multiple contact forms such as make contact and break contact.

Inside the relay is 120-240V switch that is connected to an electromagnet.


When the relay receives a HIGH signal at the signal pin, the electromagnet
becomes charged and moves the contacts of switch open or closed.

Features of Relay

 Switching capacity available by 10A


 Has indication LED for relay status
 Selection of plastic material for high temperature and better performance
 Operating voltage : 5V

Fig 3.8 Pin diagram of Relay


25

Fig 3.9 Relay with Arduino UNO

Table 3.5 Pin identification and configuration of Relay

SI. Pin Description Writing to Arduino


No. name UNO

1 IN Carries the trigger signal from Arduino that A digital I/O pin
activates the relay

2 G1 Provide ground connection GND

3 G2 Provide ground connection GND

4 +V Supplies power 5V
26

3.2.1.6 Node MCU

Node MCU is a IoT platform, Arduino compatible Wi-Fi board.


They have a firmware runs on ESP8266 Wi-Fi SoC and hardware based on ESP-12
module and later ESP32 is formed after 32 bit MCU was added. The firmware uses
Lua scripting language. Node MCU follows communication protocols such as
Ipv6, TCP, UDP, HTTP and FTB. It consists of 4MB ROM of flash storage. It has
combined features of Wi-Fi access point and station plus microcontroller. It uses
BRT (Bias Resistor Transistor). They are easier into flash mode. They have micro
USB connection and support OTA wireless uploading. They are made for fast IoT
prototyping.

Features of Node MCU

 Operating voltage : 3.3V


 17 GPIO pins
 1 analog pin
 11 x I/O digital pins
 1 x ADC pin
 10 bit ADC
 Operating current : 80 mA
 Uses latest firmware version
 Frequency range : 2.4 to 2.5 GHz
 All pins have interrupt / PWM / I2C / one wire supported (except for D0)
 4 Mbps communication speed
 Good stability
27

Fig 3.10 Pin diagram of Node MCU

Fig 3.11 Node MCU with Arduino UNO


28

Table 3.6 Pin identification and configuration of Node MCU

Sl. No. Pin name Description Writing to Arduino UNO

1 TX Used to transmit serial data RXD (D0)

2 RX Used to receive serial data TXD (D1)

3 GND Provide ground connection GND

3.2.2 Software

3.2.2.1 Arduino IDE

Arduino IDE (Integrated development environment) is software written


in functions from C and C++. It is a cross platform application (available in
Operating System such as Windows, Mac OS and Linux). We are able to write and
upload program to Arduino board. Arduino IDE has a word processor for creating
code, message zone, substance console, toolbar. They have extension in .ino . The
editor has features for cutting or staying and for looking or supplanting content.
The message zone gives the input.

Fig 3.12 Symbol of Arduino IDE


29

3.2.2.2 MATLAB

MATLAB (Matrix laboratory) is a multi paradigm numerical


computing environment and proprietary programming language developed by
MathWorks. MATLAB allows matrix manipulation, plotting of functions and data,
implementation of algorithms, creation of user interfaces and interfacing with
program written in other languages. It is used for simulation of VLSI design, image
processing and signal processing.

Fig 3.13 Symbol of MATLAB

3.3 WORKING MODULES

This system has two sections:-


1) Module 1 :- Monitoring and controlling
2) Module 2 :- Disease identification using MATLAB

3.3.1 Module 1

The sensors measure necessary environmental parameters. The


WSNs used are temperature, humidity, pH and soil moisture sensors. The
temperature and humidity sensor are for analyzing the temperature and
atmospheric humidity around us. So they are placed in such a way that they are in
30

proper contact with the atmosphere. The pH and soil moisture sensor are used for
monitoring pH and moisture content of the soil and are placed in contact with soil.

Water content in the soil is important factor because for the plants
excess of water can produce a fungal infection at the same time, plants with less
water becomes dry or sometimes they may get damaged. Soil moisture changes
with temperature, soil type and electrical conductivity. Soil pH readings can help
us find the efficiency or deficiency of pesticide or fertilizers thus avoiding
unnecessary usage of fertilizers.

Sensors provide these values are input to controller and send it to


server by using Wi-Fi from ESP8266 and save it in webpage. Farmers receive
information on web platform in detail. We can view data on our webpage of user
server on various date and time.

A threshold value is set for soil moisture. When the measured


value varies from the threshold range, then the pump is switched ON. When the
measured value is within the threshold range, then the pump is switched OFF. We
can also provide irrigation by ON/OFF switch available in our webpage. With this
type of system, we can water out plants only when needed and avoid over-watering
or under-watering.

In this project, we are monitoring various environmental


parameters using Internet of Things. In this monitoring system based on IoT, the
real-time parameters are sent to browser using Internet connectivity. These can be
viewed by user from anywhere in the world.

There is a major difference between SMS based system and IoT


based system. In IoT based system, the data can be seen by many users. The reason
31

behind this is that the data needs to be monitored by visiting a website or URL.
Whereas, in GSM based system, the parameters are sent using GSM via SMS.

3.3.2 Module 2

An efficient and novel DDS is proposed to detect the diseases in


leaves and extract the features for classification. The proposed system consists of
five phases: image acquisition, image preprocessing, image segmentation, feature
extraction, analysis, and classification.

1. Image Acquisition

In this phase, images of the diseased leaves are captured or


obtained. Once the image is captured, it undergoes pre-processing.

2. Image Pre-Processing
The acquired image is pre-processed to enhance the quality of
the image for efficient segmentation. In the pre-processing phase, the image is
resized and the contrast of the image is enhanced. The RGB to HSI (Hue
Saturation Intensity) transformation is carried out on the enhanced image as it can
be easily segmented from the HSI transformed image rather than the RGB image.

3. Image Segmentation
Image segmentation is the third step in our proposed method.
The segmented images are clustered into different sectors using k-mean clustering
algorithm. Before clustering the images, the RGB color model is transformed into
Lab color model.
K-means Clustering Algorithm:-
a) Load the input images.
32

b) Commute the RGB image into HSI color space.


d) Clustering the variant colors is done using k-mean method.
e) The Euclidean distance between two objects is find out.
f) Each pixel is labeled under clusters based on its estimated variant cluster-
centers.

4. Feature Extraction
In the proposed DDS feature extraction is carried out based on
the texture analysis. The gray level co-occurrence matrix (GLCM) is used to obtain
the statistical texture features. Contrast, energy, homogeneity, entropy and
correlation are some of the texture based features extracted from the segmented
image.

5. Classification of Disease
The features based on texture are analyzed and the classification
is carried out using the SVM classifier. SVM is commonly used for classification
process and belongs to the group of supervised learning. Supervised learning
makes use of the training dataset to predict the testing dataset. SVM yields high
accuracy when used with texture features. SVM makes use of the linear kernel
function to classify the healthy leaves and diseased leaves.
From the database, the images of leaves are taken, converted
to MDL file and are analyzed using MATLAB software by use of image
processing. Thus the output whether leaves are affected with a disease is found.
Here the disease name and its percentage of affected area are also shown. The
disease is shown via webpage for monitoring purpose.
33

3.4 CIRCUIT DIAGRAM

Fig 3.14 Circuit diagram

3.5 ALGORITHM

The working of the “An IoT approach for agriculture management based
on controlling and monitoring system” can be explained with the following steps:

1. START
2. Detect the environmental parameters
3. Check the conditions
34

4. If soil moisture level changes, ON the motor according to it.


5. Upload the information to the particular webpage by using IoT
6. STOP

3.6 FLOWCHART

Fig 3.15 Flowchart

3.7 ADVANTAGES OF PROPOSED SYSTEM

1. As all the data are continuously saved on the webpage, the new
agriculture methods have become data centered, precise and a
smarter method.
35

2. Cost of the system is much less than previous one.


3. The good quality components have brought precise monitoring
capability and improved their overall performance. Thus reducing
the inefficiencies.
4. The system is easy to implement due to their simplified structure
and reduction in its weight.
5. As current system uses WSNs and IoT, we can produce more good
quality agricultural products from less land with few human powers.
36

CHAPTER 4

RESULTS AND DISCUSSION

Monitoring and Controlling

Fig 3.16 IoT based controlling and management system

Whenever the system is ON the sensors measure their specified


parameter and sends them to Node MCU and shows it in the webpage as in the Fig
3.17. When the soil moisture is less than 800 ranges then the relay 1 gets switched
ON and gets OFF when it reaches moderate range automatically. Similarly, when
the temperature is high the relay gets ON automatically. We can also control the
relays using webpage via ON/OFF button. Thus we have two web pages- one for
controlling as shown in Fig 3.17 and other for monitoring which shows the values
of temperature, humidity, moisture and pH.
37

Fig 3.17 Monitoring the data via web page


pag

Fig 3.18 Controlling the relays via webpage


38

Disease identification using MATLAB

Fig 3.19 Input test image, Preprocessed image and Segmented image of the
diseased pomegranate leaves

The proposed disease detection and classification system is


simulated using MATLAB environment in Windows 10 PC. For simulation,
diseased leaves of the pomegranate plant are considered. The diseases such as
Anthracnose, Alternaria Alternata and Cercospora leaf spot in pomegranate leaves
are considered for demonstration. In the image acquisition phase, the test images
are taken as input and pre-processed by resizing the image. To enhance the quality
of the image, contrast enhancement technique is adopted. After enhancing the
quality, the image is transformed from RGB to HSI color space. The image is
segmented using the k means clustering. After segmentation, the texture based
features such as contrast, energy, homogeneity, entropy and correlation are
computed. GLCM matrix for H image is used to analyze the texture based features.
39

SVM classifier is used which has the database with trained images for
classification.

Fig 3.20 Disease monitoring through webpage

After the classification, the disease is identified and the percentage


of area affected by them are shown in the comment window of MATLAB. At the
same these data are saved in webpage via Wi-Fi along with data and time as shown
in the Fig 3.20.
40

4.1 CONCLUSION

In this paper, we have proposed the system to provide an effective


way of farming. This system brought the advantage of the WSNs and IoT together
to form a diligent method for monitoring. The disease identification and storage of
past environmental parameters helps farmers to prepare well for the future. This
system definitely improves the yield of the crops and increases the overall income
of the farmer.

4.2 FUTURE ENHANCEMENTS

As a part of future works, we can include a flap cover which work


based on the temperature and humidity values and use buzzer for intrusion
detection. We can make use of automatic sprayer and can extend the technology
even to drones, and UAVs and can use remote sensing satellites data, based on
which we can analyze the weather forecast. IoT based automated traps can be used
to characterize the insect types and capture them.
41

APPENDIX

Program for Arduino UNO

#include<dht.h>
dht DHT;
#define DHT11_PIN 2
int soilpin(A0);
int d[5];
String link_dat;
int relay1=9;
int relay2=8;
int i=0;
void setup (){
Serial.begin(9600); }
void loop(){
int soilvalue=analogRead(soilpin);
int chk = DHT.read11(DHT11_PIN);
int temp =DHT.temperature;
int hum =DHT.humidity;
if(DHT.temperature>30&&DHT.temperature<40){
digitalWrite(relay2,LOW); }
else{
digitalWrite(relay2,HIGH);}
if(soilvalue>500&&soilvalue<800){
digitalWrite(relay1,LOW);}
else{
digitalWrite(relay1,HIGH);}
42

if (Serial.available()>0){
for(i=0;i<5;i++) {
d[i]=Serial.parseInt(); }}
link_dat =String(temp)+','+String (hum)+','+String(soilvalue)+','+String(d[0]);
delay(1000);
Serial.println( link_dat);}

Program for Node MCU

#include "ESP8266WiFi.h"
const char* ssid = "iotdata" ;
const char* password = "123456789";
const char* host = "www.iotwebdata.com";
String line="";
int l1 = 16;
int l2 = 5;
int Sensor_1_value;
int Sensor_2_value;
int Sensor_3_value;
int Sensor_4_value;
void setup(){
pinMode(16, OUTPUT);
pinMode(5, OUTPUT);
digitalWrite(16,HIGH);
digitalWrite(5, HIGH);
Serial.begin(9600);
Serial.println();
Serial.print("Connecting to ");
43

Serial.println(ssid);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED){
delay(500);
Serial.print("."); }
Serial.println("");
Serial.println("WiFi connected");
Serial.println("IP address: ");
Serial.println(WiFi.localIP()); }
void loop(){
readbutton();
if (Serial.available()>1) {
String message=Serial.readString();
int v=message.length();
int cindex=message.indexOf(',');
String svalue=message.substring(0,cindex);
Sensor_1_value=svalue.toInt();
Serial.println(Sensor_1_value);
message=message.substring(cindex+1,v);
cindex=message.indexOf(',');
svalue=message.substring(0,cindex);
Sensor_2_value=svalue.toInt();
Serial.println(Sensor_2_value);
message=message.substring(cindex+1,v);
cindex=message.indexOf(',');
svalue=message.substring(0,cindex);
Sensor_3_value=svalue.toInt();
44

Serial.println(Sensor_3_value);
svalue=message.substring(cindex+1,v);
Sensor_4_value=svalue.toInt();
Serial.println(Sensor_4_value);
message=" ,";
delay(3000);
post(); }}
void post() {
Serial.print("connecting to ");
Serial.println(host);
WiFiClient client;
const int httpPort = 80; if (!client.connect(host, httpPort)) {
Serial.println("connection failed");
return; }
String url = "/upload.php?id=nt1lrihe";
url +="&data1=";
url += String(Sensor_1_value);
url +="&data2=";
url += String(Sensor_2_value);
url +="&data3=";
url += String(Sensor_3_value);
url +="&data4=";
url += String(Sensor_4_value);
Serial.print("Requesting URL: ");
Serial.println(url);
client.print(String("GET ") + url + " HTTP/1.1\r\n" + "Host: " + host + "\r\n" +
"Connection: close\r\n\r\n");
45

unsigned long timeout = millis();


while (client.available() == 0) {
if (millis() - timeout > 5000) {
Serial.println(">>> Client Timeout !");
client.stop();
return; }}
while(client.available()) {
String line = client.readStringUntil('\n');
Serial.println(line);
Serial.println();
delay(500); }}
void readbutton() {
// Serial.print("connecting to ");
//Serial.println(host);
WiFiClient client;
const int httpPort = 80;
if (!client.connect(host, httpPort)) {
Serial.println("connection failed");
return; }
String url = "/buttons.php?id=1fmd3mtz"; // prepare GET string
//Serial.print("Requesting URL: ");
//Serial.println(url);
client.print(String("GET ") + url + " HTTP/1.1\r\n" +
"Host: " + host + "\r\n" + "Connection: close\r\n\r\n");
unsigned long timeout = millis();
while (client.available() == 0){
if (millis() - timeout > 5000) {
46

Serial.println(">>> Client Timeout !");


client.stop();
return; }}
while(client.available()){
line = client.readStringUntil('\n'); }
if(line.substring(0,1) == "1"){
Serial.println("Load1 ON");
digitalWrite(16,LOW); }
else if(line.substring(0,1) == "0"){
Serial.println("Load 1 OFF");
digitalWrite(16,HIGH); }
if(line.substring(1,2) == "1"){
Serial.println("Load2 ON");
digitalWrite(5, LOW);}
else if(line.substring(1,2) == "0"){
Serial.println("Load 2 OFF");
digitalWrite(5, HIGH); }}

Program for image processing

% Project Title: Pomegranate Leaf Disease Detection


clc
close all
clear all
[filename, pathname] = uigetfile({'*.*';'*.bmp';'*.jpg';'*.gif'}, 'Pick a Leaf Image
File');
I = imread([pathname,filename]);
I = imresize(I,[256,256]);
47

%figure, imshow(I); title('Query Leaf Image');


% Enhance Contrast
I = imadjust(I,stretchlim(I));
figure, imshow(I);title('Contrast Enhanced');
% Otsu Segmentation
I_Otsu = im2bw(I,graythresh(I));
% Conversion to HIS
I_HIS = rgb2hsi(I);
%% Extract Features
% Function call to evaluate features
%[feat_disease seg_img] = EvaluateFeatures(I)
% Color Image Segmentation
% Use of K Means clustering for segmentation
% Convert Image from RGB Color Space to L*a*b* Color Space
% The L*a*b* space consists of a luminosity layer 'L*', chromaticity-layer 'a*' and
'b*'.
% All of the color information is in the 'a*' and 'b*' layers.
cform = makecform('srgb2lab');
% Apply the colorform
lab_he = applycform(I,cform);
% Classify the colors in a*b* colorspace using K means clustering.
% Since the image has 3 colors create 3 clusters.
% Measure the distance using Euclidean Distance Metric.
ab = double(lab_he(:,:,2:3));
nrows = size(ab,1);
ncols = size(ab,2);
ab = reshape(ab,nrows*ncols,2);
48

nColors = 3;
[cluster_idx cluster_center] = kmeans(ab,nColors,'distance','sqEuclidean', ...
'Replicates',3);
%[cluster_idxcluster_center]=kmeans(ab,nColors,'distance','sqEuclidean','Replicat
es',3);
% Label every pixel in tha image using results from K means
pixel_labels = reshape(cluster_idx,nrows,ncols);
%figure,imshow(pixel_labels,[]), title('Image Labeled by Cluster Index');
% Create a blank cell array to store the results of clustering
segmented_images = cell(1,3);
% Create RGB label using pixel_labels
rgb_label = repmat(pixel_labels,[1,1,3]);
for k = 1:nColors
colors = I;
colors(rgb_label ~= k) = 0;
segmented_images{k} = colors;
end
figure,subplot(3,1,1);imshow(segmented_images{1});title('Cluster1');
subplot(3,1,2);imshow(segmented_images{2});title('Cluster 2');
subplot(3,1,3);imshow(segmented_images{3});title('Cluster 3');
set(gcf, 'Position', get(0,'Screensize'));
% Feature Extraction
x = inputdlg('Enter the cluster no. containing the ROI only:');
i = str2double(x);
% Extract the features from the segmented image
seg_img = segmented_images{i};
% Convert to grayscale if image is RGB
49

if ndims(seg_img) == 3
img = rgb2gray(seg_img);
end
%figure, imshow(img); title('Gray Scale Image');
% Evaluate the disease affected area
black = im2bw(seg_img,graythresh(seg_img));
%figure, imshow(black);title('Black & White Image');
m = size(seg_img,1);
n = size(seg_img,2);
zero_image = zeros(m,n);
%G = imoverlay(zero_image,seg_img,[1 0 0]);
cc = bwconncomp(seg_img,6);
diseasedata = regionprops(cc,'basic');
A1 = diseasedata.Area;
sprintf('Area of the disease affected region is : %g%',A1);
I_black = im2bw(I,graythresh(I));
kk = bwconncomp(I,6);
leafdata = regionprops(kk,'basic');
A2 = leafdata.Area;
sprintf(' Total leaf area is : %g%',A2);
%Affected_Area = 1-(A1/A2);
Affected_Area = (A1/A2);
if Affected_Area < 0.1
Affected_Area = Affected_Area+0.15;
end
sprintf('Affected Area is: %g%%',(Affected_Area*100))
% Create the Gray Level Cooccurance Matrices (GLCMs)
50

glcms = graycomatrix(img);
% Derive Statistics from GLCM
stats = graycoprops(glcms,'Contrast Correlation Energy Homogeneity');
Contrast = stats.Contrast;
Correlation = stats.Correlation;
Energy = stats.Energy;
Homogeneity = stats.Homogeneity;
Mean = mean2(seg_img);
Standard_Deviation = std2(seg_img);
Entropy = entropy(seg_img);
RMS = mean2(rms(seg_img));
%Skewness = skewness(img)
Variance = mean2(var(double(seg_img)));
a = sum(double(seg_img(:)));
Smoothness = 1-(1/(1+a));
Kurtosis = kurtosis(double(seg_img(:)));
Skewness = skewness(double(seg_img(:)));
% Inverse Difference Movement
m = size(seg_img,1);
n = size(seg_img,2);
in_diff = 0;
for i = 1:m
for j = 1:n
temp = seg_img(i,j)./(1+(i-j).^2);
in_diff = in_diff+temp;
end
end
51

IDM = double(in_diff);
feat_disease=[Contrast,Correlation,Energy,Homogeneity,Mean,Standard_Deviatio
n, Entropy, RMS, Variance, Smoothness, Kurtosis, Skewness, IDM];
%%
% Load All The Features
load('Training_Data.mat')
% Put the test features into variable 'test'
test = feat_disease;
result = multisvm(Train_Feat,Train_Label,test);
%disp(result);
% Visualize Results
if result == 0
helpdlg(' Alternaria Alternata ');
disp(' Alternaria Alternata ');
data=strcat('http://www.iotwebdata.com/upload.php?id=nt1lrihe&data1=&data2=
&data3=&data4=&data5=','Alternaria_Alternata');
res=urlread(data);
elseif result == 1
helpdlg(' Anthracnose ');
disp('Anthracnose');
data=strcat('http://www.iotwebdata.com/upload.php?id=nt1lrihe&data1=&data2=
&data3=&data4=&data5=','Anthracnos');
res=urlread(data);
elseif result == 2
helpdlg(' Bacterial Blight ');
disp(' Bacterial Blight ');
52

data=strcat('http://www.iotwebdata.com/upload.php?id=nt1lrihe&data1=&data2=
&data3=&data4=&data5=','Bacterial_Blight');
res=urlread(data);
elseif result == 3
helpdlg(' Cercospora Leaf Spot ');
disp('Cercospora Leaf Spot');
data=strcat('http://www.iotwebdata.com/upload.php?id=nt1lrihe&data1=&data2=
&data3=&data4=&data5=','Cercospora_Leaf_Spot');
res=urlread(data);
elseif result == 4
helpdlg(' Healthy Leaf ');
disp('Healthy Leaf ');
data=strcat('http://www.iotwebdata.com/upload.php?id=nt1lrihe&data1=&data2=
&data3=&data4=&data5=','Healthy_Leaf');
res=urlread(data);
end
%% Evaluate Accuracy
load('Accuracy_Data.mat')
Accuracy_Percent= zeros(200,1);
for i = 1:500
data = Train_Feat;
%groups = ismember(Train_Label,1);
groups = ismember(Train_Label,0);
[train,test] = crossvalind('HoldOut',groups);
cp = classperf(groups);
svmStruct =
svmtrain(data(train,:),groups(train),'showplot',false,'kernel_function','linear');
53

classes = svmclassify(svmStruct,data(test,:),'showplot',false);
classperf(cp,classes,test);
Accuracy = cp.CorrectRate;
Accuracy_Percent(i) = Accuracy.*100;
end
Max_Accuracy = max(Accuracy_Percent);
sprintf('Accuracy of Linear Kernel with 500 iterations is: %g%%',Max_Accuracy)
54

REFERENCES

1. Anand Nayyar, Vikram Pari, “Smart Farming: IoT Based Smart


Sensors Agriculture Stick for Live Temperature and Moisture
Monitoring using Arduino, Cloud Computing & Solar Technology”.
2. Ashifuddin Mondal, Zeenat Rehena (2018), “IoT Based Intelligent
Agriculture Field Monitoring System”, 8th Int. Conf. on Cloud
Computing, Data Science & Eng.
3. Chiyurl Yoon, Miyoung Huh, Shin-Gak Kang, Juyoung Park,
Changkyu Lee (2018), “Implement Smart Conf. on Advanced
Commun. Technology (ICACT).
4. Kajal N Dhawale, Dr. Narendra Bawane(2019), “IoT Based Smart
Agriculture System”, Int. Conf. on Innovations in Eng. Technology,
Science & Management (ICI-ETSM) Vol.9, Issue 5.
5. Manishkumar Dholu, Mrs. Ghodinde K A (2018), “Internet of Things
(IoT) for Precision Agriculture Application”, Int. Conf. on Trends in
Electronics and Informatics (ICOEI).
6. Manoj Kumar M, Rambabu P, Srinadhu U, Satish T (2017), “Smart
Agriculture-Using IoT in Field monitoring and Automation for Soil
Moisture Using Naive Bayes Prediction”, Int. J. of Advanced
Information Science and Technology (IJAIST), Vol.6, No.3.
7. Manoj Venkata Sai M, Subba Rao K, Vamsi Krishna N, Vasantha
Lakshmi M (2018), “IoT Based Smart Agriculture”, Iconic Research
and Eng. J. (IRE Journals), Vol. 1,Issue 8.
55

8. Muthunoori Naresh, Munaswamy P (2019), “Smart Agriculture


System using IoT Technology”, Int. J. of Recent Technology and
Engineering (IJRTE), Vol.7, Issue 5.
9. Nikesh Gondchawar, Prof. Dr. Kawitar R S (2016), “IoT based Smart
Agriculture”, Int. J. of Advanced Research in Computer and
Commun. Eng., Vol.5, Issue 6.
10. Pallavi S, Jayashree D Mallapur, Kirankumar Y Bendigeri (2017),
“Remote Sensing and Controlling of Greenhouse Agriculture
Parameters based on IoT”, Int. Conf. on Big Data, IoT and Data
Science (BID).
11. Rajakumar G, Saroja Sankari M, Shunmuga Priya D, Uma Maheswari
(2018), Asian Journal of Applied Science and Technology (AJAST),
Vol.2, Issue 2.
12. Rajalakshmi R, Atshayakiruthika M, Muthumari K, Muthupriya R
(2019), Int. J. of Eng. Research & Technology (IJERT), Vol.7, Issue
1.
13. Sachin D Khirade, Patil A B (2015), “Plant Disease Detection Using
Image Processing”, Int. Conf. on Computing Commun. Control and
Automation.
14. Shruti, Dr. Rekha Patil (2016), “An Approach for Agricultural Field
Monitoring and Control using IoT”, Int. Research J. of Eng. And
Technology (IRJET), Vol.3, Issue 9.
15. Snehal S Bansod, Radhika V Hande, Payal H ale, Shubhang R
Jibhkate, Prof. Aushu Chaudhary, Prakash Mohod, “Smart
Agriculture Monitoring System Based on IoT”, Int. J. of Eng. and
Creative Science, Vol.2, No.8.
56

16. Soumil Heble, Ajay Kumar, Durga Prasad K V V, Soumya Samirana,


Rajalakshmi P, Desai U B, Indian Institute of Technology-Hyderabad.
17. Srilakshmi A, Jayasheela Rakkini, K R Sekar, Manikandan R (2018),
“A Comparative Study On Internet of Things (IoT) and its
Applications in Smart Agriculture”, Pharmacogn J.,Vol.10, Issue 2.
18. Suma N, Sandra Rhea Samson, Saranya S, Shanmuga Priya G,
Subhashri R (2017), “IoT Based Smart Agriculture Monitoring
System”, Int. J. on Recent and Innovation Trends in Computing and
Commun., Vol.5, Issue 2.
19. Sushanth G, Sujatha G 92018), “IoT Based Smart Agriculture
System”, IEEE 2018.
20. Tana Krongthong, Benchalak Muangmeesri (2019), “Modeling and
SimuLink of Smart Agriculture Using IoT Framework”, 1st Int. Conf.
on Cybernetics and Intelligent System (ICORIS).
21. Tigist Hilemariam Senbetu, Kishore Kumar K, Karpura Dheepan G M
(2019), “IoT Based Irrigation Remote Real-Time Monitoring and
Controlling Systems”, Int. J. of Innovative Technology and Exploring
Eng. (IJITEE), Vol.8, Issue 7.
22. Vaishali Puranik, Sharmila, Ankit Ranjan, Anamika Kumari (2019),
“Automation in Agriculture and IoT”, 2019 IEEE.
23. Vineela T, Naga Harini J, Kiranmai C H, Harshitha G, Adi Lakshmi B
(2018), “IoT Based Agriculture Monitoring and Smart Irrigation
System Using Raspberry Pi”, Int. Research J. of Eng. and Technology
(IRJET), Vol.5, Issue 1.
24. Yuvaraju M, Priyanga K J (2018), “An IoT Based Automatic
Agricultural Monitoring and Irrigation System”, Int. J. of Scientific
57

research in Computer Science, Eng. and Information Technology,


Vol.4, Issue 5.
25. Zeng Hu, Longqiu Xu, Liang Cao, Shuangyin Liu, Zhijie Luo, Jing
Wang, Xiangli Li, Lu Wang (2019), “Application of Non-Orthogonal
Multiple Access in Wireless Sensor Networks for Smart Agriculture”,
Vol.7, IEEE 2019.

You might also like