Professional Documents
Culture Documents
SMART AGRICULTURE MONITORING SYSTEM USING IoT
SMART AGRICULTURE MONITORING SYSTEM USING IoT
SMART AGRICULTURE MONITORING SYSTEM USING IoT
SMART AGRICULTURE
MONITORING SYSTEM
USING IoT
IoT-Based Smart Agriculture Monitoring System
BY
ABSTRACT
Abstract to be followed by
Agriculture is done in every country from ages. Agriculture is the science and art of cultivating
plants. Agriculture was the key development in the rise of sedentary human civilization. Agriculture is
done manually from ages. As the world is trending into new technologies and implementations it is a
necessary goal to trend up with agriculture also. IOT plays a very important role in smart agriculture. IOT
sensors are capable of providing information about agriculture fields. we have proposed an IOT and
smart agriculture system using automation. This IOT based Agriculture monitoring system makes use of
wireless sensor networks that collects data from different sensors deployed at various nodes and sends it
through the wireless protocol. This smart agriculture using IOT system is powered by Arduino, it consists
of Temperature sensor, Moisture sensor, water level sensor, DC motor and GPRS module. When the IOT
based agriculture monitoring system starts it checks the water level, humidity and moisture level. It sends
SMS alert on the phone about the levels. Sensors sense the level of water if it goes down, it automatically
starts the water pump. If the temperature goes above the level, fan starts. This all is displayed on the LCD
display module. This all is also seen in IOT where it shows information of Humidity, Moisture and water
level with date and time, based on per minute. Temperature can be set on a particular level, it is based on
the type crops cultivated. If we want to close the water forcefully on IOT there is button given from
where water pump can be forcefully stopped.
S Smart Agriculture System Using IOT
ACKNOWLEDGEMENT
We would like to express our sincere gratitude to our departmental teachers for guiding us
through the extensive research process that became this book. Furthermore, we would like to
thank Mr. Soham Paul for exposing us to this topic and guiding us by theoretical clarification of
the overall project view.
It helped us lot of research and we came to know about a lot of things related to this topic.
Lastly we want to thank our family & friends for their encouragement & belief in us.
S Smart Agriculture System Using IOT
Table Of Contents
Title Page I
Declaration of the Student (Signed by Student) II
Certificate of the Guide (Signed by Guide,HoD,Principal) III
Certificate IV
Abstract (Evaluated & Signed by Guide) V
Acknowledgement VI
List Of Figures VII
List Of Tables VIII
CHAPTER 1 INTRODUCTION
1.1 Introduction 1
1.2 IoT in Agriculture 2
1.3 Structure of IoT n Agriculture 3
1.4 Motivation 5
1.5 Objectives 5
5.1 Algorithm 29
6.1 Conclusion 41
6.2 Advantages/Disadvantages 41
6.3 Applications 42
6.4 Future scope 42
CHAPTER7 REFERENCES
7.1 Referenecs 43
Smart Agriculture System Using IOT
CHAPTER 1
INTRODUCTION
1.1 Introduction :
Low power embedded system- High performance and less battery consumption are the
inverse factors that play an important role in design of electronic system.
Cloud computing- Data collected from devices is stored on reliable storage servers so
here cloud computing comes into action.
Availability of Big Data- As IoT is highly dependent on sensors that are real time. So the
usage of electronic devices is spread throughout every field that is going to trigger a massive
flux of data.
Network connection- For communication, internet connectivity is necessary where each
physical object is assigned by an IP address. A network connection is build between the
devices with the help of these addresses
Technology today has not reached its 100% capability. So the advantages and
disadvantages of this technology are given below-
Advantages of IoT
3. Time-saving
1
Smart Agriculture System Using IOT
Disadvantages of IoT
1. Security
2. Privacy
3. Complexity
Internet of Things has capacity to transform the lives of people in the world in an
efficient manner. The ever growing population would touch more than 3 billions in few years.
So to feed such an immense population, agriculture industry need to embrace IoT. The
demand for more food has to address challenges that include excessive climate conditions,
weather change and different environmental affects that results from farming practices. From
survey of United Nations – Food and Agriculture Organisations, the world wide food
production should be increased by 70% in 2050 for evolving population.Agriculture is the
basis for the human species as it is the main source of food and it plays important role in the
growth of country’s economy. It also gives large ample employment opportunities to the
people. The farmers are still using traditional methods for agriculture, which results in low
yielding of crops and fruits. So the crop yield can be improved by using automatic
machineries. There is need to implement modern science and technology in the agriculture
for increasing the yield. By using IoT, we can expect. the increase in production with low
cost by monitoring the efficiency of the soil, temperature and humidity monitoring, rain fall
monitoring, fertilizers efficiency, monitoring storage capacity of water tanks and also theft
detection in agriculture areas.
2
Smart Agriculture System Using IOT
The destiny of Indian agriculture must be worked with understanding and excessive cease
technologies that can expand production and furthermore regains the attention of farmers in
this industry. So these smart farming techniques would assist farmers to lessen scrap and
enhance capacity. It is basically a high tech and capital intensive system for growing crops in
a sustainable manner for masses. This technology can help farmers to monitor field
conditions from anywhere with the help of sensors and can also irrigate fields with an
automated system. It is the application of Information and Communication Technology into
the field of agriculture.
Basically this system structure consists of 3 layers that are sensor layer, transport layer,
application layer and the functions of these layers are below –
1)Sensor layer- One of the challenge of the sensor layer is to obtain automated and real time
transformations of the figures of actual world agricultural manufacturing into digital
transformation or information which could be processed in virtual world through different or
various means. The data that they collect are-
Sensor information- Humidity, temperature, gas concentrations, pressure etc.
3
Smart Agriculture System Using IOT
Location information
The major challenge of Information layer is to mark diverse kinds of information or data and
gathering the information and marked information in the actual world by means of techniques
of sensing, after which remodels them for processing into digital information. This sensor
layer includes some strategies- RFID tags, cameras, two dimension code labels, sensor
networks.
1) Transport layer- This layer’s task is to acquire and summarize the data of agriculture
acquired from the above layer for processing. It is believed as the nerve centre of IoT. This
layer includes the combination of telecommunication management centre and also internet
network, information centre, smart processing centres.
2) Application layer- The function of this layer is to analyse and process the information
collected for the cultivation of digital awareness of actual world. It is considered as a fusion
of IoT and agricultural market intelligence.
IoT empowers simple gathering and the executives of huge amounts of information which
is gathered from sensors used and with the help of joining of distributed evaluating
administrations such as cloud storage, farming field maps and more information can be
retrieved from any place and everywhere which enables live monitoring and connectivity
which is end to end.
IoT is viewed as an important segment for smart farming because with precise use of
sensors and also the smart gadgets, farmers could expand the output by 72% upto year
2050 as delineated by specialists.
By the use of IoT creations expenses could be diminished to an astounding dimension that
would thus expand productivity and survivability.
By the use of IoT efficiency level would be further expanded as far as utilization of water,
soil, fertilizers, pesticides etc.
Precision farming
Agricultural drones
Livestock monitoring
4
Smart Agriculture System Using IOT
Smart greenhouses
5
Smart Agriculture System Using IOT
1.4 MOTIVATION :
Different kind of problems faced by the farmers motivated us for the recommended
system that are: the Indian farming is on the hitch because of the limited technical know how
of the best and efficient agricultural practices and moreover they are still dependent on
conventional methods of agriculture that leads to lesser productivity of crops. So by using
upcoming technology the productivity of crops can be maximized at minimal cost. This also
reduces burden of taking up of heavy loans on farmers which they have incurred on
themselves in order to sustain their livings or to get good yields of their crops. Apart from
these issues scarcity of resources also adds up in their problem causing hindrance or stopping
framers from cultivating and hence Indian economy is also additionally getting influenced to
large extent as most of the fruitful lands of the nation are being destroyed that forms the vital
part of GDP.So through this framework we are presenting solution for this issue by
introducing an automated and systematic farming strategies that enable farmers to cultivate in
a productive way also with limited resources and greater yield which is assured and efficient.
1.5 OBJECTIVES :
1. To update farmers with the new technology and to avoid manual labour.
2. To reduce wastage of water and enhance productivity of crops by providing them ideal
condition.
3. To meet the difficulties such as severe weather conditions and advancing climate change,
6
Smart Agriculture System Using IOT
7
Smart Agriculture System Using IOT
CHAPTER 2
Literature Survey
Internet Of Things (IoT)is a shared network of objects or things which can interact
with each other provided the internet connection. IoT plays an important role in agriculture
industry which can feed 9.6 billion people on the Earth by 2050. Smart Agriculture helps to
reduce wastage, effective usage of fertilizer and thereby increase the crop yield. In this work,
a system is developed to monitor crop-field using sensors (soil moisture, temperature,
humidity, Light).
8
Smart Agriculture System Using IOT
countries. As the
10
Smart Agriculture System Using IOT
Agriculture is the most important sector for humankind to survive their existence. It
enhances a big concern to manage food for people all over the world. Most of the farmers
follow very traditional methods to cultivate their crops. They used to be present physically on
their farm to monitor crops. Use of technology can make this job easier and time efficient.
Internet of things (IoT) is a technology which can send or receive any data to a server using
the Internet. Using this technology, farmers can monitor the actual condition of the crops
without being present in their field. In this paper, we have proposed a system to monitor the
farming field with the help of IoT technology. This system allows various devices and sensors
to send data over the Internet. It enables farmers to monitor their field remotely from their
home by using a smartphone or a computer. The major problem faced in many agricultural
areas isthat lack of mechanization in agricultural activities. In India agricultural activities is
carried out by manual labor, using conventional tools such as plough, sickle etc. Our Smart
Farming System reduces the manual work and automates the agricultural activities.
The combination of traditional methods with latest technologies as Internet of Things
and Wireless Sensor Networks can lead to agricultural modernization. The Wireless Sensor
Network which collects the data from different types of sensors and send it to the main server
11
Smart Agriculture System Using IOT
using wireless protocol. There are many other factors that affect the productivity to great
extent. Factors include attack of insects and pests which can be controlled by spraying the
proper insecticide and pesticides and also attack of wild animals and birds when the crop
grows up. The crop yield is declining because of unpredictable monsoon rainfalls, water
scarcity and improper water usage.
Using the Internet of Things Technology for supervising agriculture parameters can
greatly enhance the performance, monitoring and maintenance of the plant. With
advancement of technologies the cost of renewable energy equipment is going down globally
encouraging large scale agriculture field. The project is based on implementation of new cost
effective methodology based on IOT to remotely monitoring plant performance evaluation.
Also by this project we will get data which we can use all over world for betterment of
agriculture.
The ever-growing global population would touch around 9.6 billion by 2050. So, to
feed this immense population, the agriculture industry needs to embrace IoT. The demand for
more food has to meet overcoming challenges such as, rising climate change, extreme
weather conditions and environmental impact that results from intensive farming practices.
Agri-Tech greenhouse organization and uses technologies and IoT for providing services. It
builds modern and affordable greenhouses by using IoT sensors that are solar powered. The
greenhouse state and water consumption can supervise with these sensors through sending
SMS alerts to the farmer with an online portal.
Agri-Tech greenhouse organization and uses technologies and IoT for providing
services. It builds modern and affordable greenhouses by using IoT sensors that are solar
powered. The greenhouse state and water consumption can supervise with these sensors
through sending SMS alerts to the farmer with an online portal.
The sensors in the IoT system in the greenhouse provide information on temperature,
pressure, humidity, light levels.
12
Smart Agriculture System Using IOT
CHAPTER 3
In the field section, various sensors are deployed in the field like temperature sensor,
moisture sensor ,sun light sensor and DHT 11 sensor. The data collected from these sensors
are connected to the arduino through ESP8266.
In control section, the received data is verified with the threshold values. If the data
exceeds the threshold value the buzzer is switched ON and the LED starts to blink. This
alarm is sent as a message to the farmer and automatically the power is switched OFF after
sensing. The values are generated in the web page and the farmer gets the detailed description
of the values.
Moisture sensor will sense availability of water in soil. If the water is less or more
than need it will show it on mobile of user .Then if water is less then need then it will get
water by pump.
Sun light sensor will sense the sun intensity if it is observed that intensity is harmful
to the crops then user will get to know and take precaution measures accordingly.
3.2 Specifications:
Sr No.
Component Names Quantity
1 Arduino Uno 1
3 LCD 1
5 Potentiometer 1
6 Resistor 6
13
Smart Agriculture System Using IOT
9 Ribbon wire 2
10 Female header 4
11 Male header 4
12 Voltage regulator 1
15 Toggle Switch 1
17 Fan Regulator 1
18 Water Pump 1
19 LED 1
21 5 volt relay 1
23 Fevi quick 4
29 5 mm AC connector 1 set
14
Smart Agriculture System Using IOT
CHAPETR 4
The basic building blocks of an IoT System are Sensors, Processors and applications.
So the block diagram below is the proposed model of our project which shows the
interconnection of these blocks. The sensors are interfaced with Arduino Uno, data from the
sensor is displayed on the mobile app of the user. Mobile app provides an access to the
continuous data from sensors and accordingly helps farmer to take action to fulfil the
requirements of the soil.
5 volt regulator is used to energize arduino system including the sensors.ESP 8266
module which will provide wifi functionality to system. Arduino uno is the most important
part of the entire system which is used to run the entire system.It works as the brain of the
setup.Small solar cell is used as a light sensor.Relay is used to control the water pump.And
15
Smart Agriculture System Using IOT
LED is also attached to see it’s status.Soil moisture sensor is used to measure the quantity of
water available in the soil.LCD is used print humidity,moisture,motor status and light
intensity.DHT 11 sensor is used to detect weather connection.Water pump is used to supply
water.
16
Smart Agriculture System Using IOT
Digital Pins 0-1/Serial in/Out - TX/RX (dark green) - These pins cannot be used for
digital i/o (digitalRead and digitalWrite) if you are also using serial communication (e.g.
Serial.begin).
17
Smart Agriculture System Using IOT
Toggles External Power and USB Power (place jumper on two pins closest to desired
supply) - SV1 (purple)
USB (used for uploading sketches to the board and for serial communication between
the board and the computer; can be used to power the board) (yellow)
1) Digital Pins
In addition to the specific functions listed below, the digital pins on an Arduino board can be
used for general purpose input and output via the pinMode(), digitalRead(), and digitalWrite()
commands. Each pin has an internal pull-up resistor which can be turned on and off using
digitalWrite () (w/ a value of HIGH or LOW, respectively) when the pin is configured as an
input. The maximum current per pin is 40 mA.
Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data. On
the Arduino Diecimila, these pins are connected to the corresponding pins of the FTDI
USB-to-TTL Serial chip. On the Arduino BT, they are connected to the corresponding
pins of the WT11 Bluetooth module. On the Arduino Mini and LilyPad Arduino, they are
intended for use with an external TTL serial module (e.g. the Mini-USB Adapter).
PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the analogWrite()
function. Onboards with an ATmega8, PWM output is available only on pins 9, 10,
and 11.
BT Reset: 7. (Arduino BT-only) Connected to the reset line of the bluetooth module.
SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI communication,
which,although provided by the underlying hardware, is not currently included in the
Arduino language.
LED: 13. On the Diecimila and LilyPad, there is a built-in LED connected to digital pin
13. Whenthe pin is HIGH value, the LED is on, when the pin is LOW, it's off.
18
Smart Agriculture System Using IOT
2) Analog Pins
In addition to the specific functions listed below, the analog input pins support 10bit analog-
to-digital conversion (ADC) using the analogRead() function. Most of the analog inputs can
also be used as digital pins: analog input 0 as digital pin 14 through analog input 5 as digital
pin 19. Analog inputs 6 and 7 (present on the Mini and BT) cannot be used as digital pins.
I2C: 4 (SDA) and 5 (SCL). Support I2C (TWI) communication using the Wire
library(documentation on the Wiring website).
3) Power Pins
VIN (sometimes labelled "9V"). The input voltage to the Arduino board when it's using
an external power source (as opposed to 5 volts from the USB connection or other
regulated power source). You can supply voltage through this pin, or, if supplying voltage
via the power jack, access it through this pin.
5V. The regulated power supply used to power the microcontroller and other components
on the board. This can come either from VIN via an on-board regulator, or be supplied by
USB or another regulated 5V supply.
GND. Ground pins.
4) Other Pins
AREF. Reference voltage for the analog inputs. Used with analogReference().
Reset. (Diecimila-only) Bring this line LOW to reset the microcontroller. Typically
used to add a reset button to shields which block the one on the board.
5) Microcontroller:
ATmega 328 Microcontroller is used in Arduino Uno board. It is the 28 pins IC.
SRAM (bytes) 2K
EEPROM(bytes) 1K
19
Smart Agriculture System Using IOT
GPIO’s 23
SPI 2
TWI(I2C) 1
USART 1
ADC Channels 8
8-bit Timer/Counter 2
16-bit Timer/Counter 1
20
Smart Agriculture System Using IOT
It is an open sources firmware and development kits to build IoT products. It includes
firmware that run on ESP8266 WiFiSoC and hardware that has an ESP-12 module. The kit
has analog (A0). It also has digital (D0-D8) pins on the board. It even assists serial ports
communications such as SPI, UART, I2C etc.
21
Smart Agriculture System Using IOT
All the calculated data by ATmega328 is further processed by Wi-Fi Module in order
to store on IOT (Internet of Things) Server or Cloud. In order to analyze this data on
daily, weekly and monthly basis we are using popular IOT platform Adafruit.
In this proposed system we have an open source cloud platform application think
speak is used. Which retrieves and stores the data from the sensor or the things connected
to the systems through internet that uses hypertext transfer protocol (HTTP) from the
local network to the cloud? It updates all the data logs received from the sensors, tracking
location applications, and the status application giving to the users and taken from the
users.To use this the user has created an account which contains different channels for
monitoring of different parameters in the system or in the monitoring the parameters in a
remote device. This cloud enables the administrator or the user to visualize the data in
graphical representation. With internet-based monitoring, energy output data is
transferred to a router, making it available through an online interface. The main
advantage of systems like these is that your solar panel output information is readily
available anywhere you can get an internet connection.The node MCU acts as a key
processing element for the proposed system as shown in figure 4 and figure 5 which is
developed by ESP8266 open source community of microcontroller on single board that
can be programmed using the Arduino IDE having a RAM size of 128Kbytes and
program storage capacity of 4 Mega Bytes. It can be powered by a USB cable, having an
operating voltage of 3.3 to 5 volts and an in built Wi-Fi SOC Architecture.
22
Smart Agriculture System Using IOT
The figure gives the description about the different pins of the microcontroller NodeMCU.
There are 17 GPIO pins that are for general purpose input output functions with transmitter
and receiver pins. All the sensors are attached to different analog and digital pins of this
microcontroller to acquire the data.
4.3.2 DHT11 Sensor
This sensor is basically a cost efficient digital humidity & temperature sensor. This
sensor supplies digital output and therefore can be directly connected to data pins of
microcontroller in spite of using ADC. It also consists of eight bit microcontroller to provide
values of temperature & humidity in the form of data that is serial. It has 4 pins they are
VCC, GND, DATA and NC. It operates from 3.3-5 volts power supply. This sensor has
exceptional quality, anti-interference capability, economical performance and fast reaction
benefits. Humidity is calculated by means of measuring the conductivity of liquid substrate
that alters with exchange in humidity and temperature is calculated by the usage of a
thermistor. The function called read() is used to take readings from the sensor which is
included in <DHT.h> library.
23
Smart Agriculture System Using IOT
Parameter Specifications
Input/output voltage 3V / 5V
Humidity Range 20-80 percent
Temperature Range 0-50 deg C
Sampling Rate 1Hz
Response time 50 ms
Sensing Range 20-90%RH
Accuracy +\-5%RH
Temperature Accuracy +\-2% deg C
Moisture sensor has 3 pins – one is for voltage input, second for ground and
third is for analog input. Moisture content of the soil (volume %) is measured by this
sensor. The analog value need to be mapped in the range of 0-100 as moisture
content is evaluated in percentage. The property used by this sensor is electrical
resistance of soil. There are 2 probes in this sensor that permits the current to pass
through the soil. After that it gets the value of resistance to measure the water
content level. This implies that higher the water content higher is the conduction of
electricity which means lesser resistance. If the soil is dry then the conduction in the
soil is poor, this leads to increase in level of resistance. Hence it uses the property
of resistance to
24
Smart Agriculture System Using IOT
measure the moisture in soil. It could be joined in two different ways they are Analog
and Digital mode.
Sensor
Parameter Specifications
A solar cell, or photovoltaic cell, is an electrical device that converts the energy
of light directly into electricity by the photovoltaic effect, which is a physical and chemical
phenomenon. It is a form of photoelectric cell, defined as a device whose electrical
characteristics, such as current, voltage, or resistance, vary when exposed to light. Individual
solar cell devices are often the electrical building blocks of photovoltaic modules, known
colloquially as solar panels.
25
Smart Agriculture System Using IOT
The common single junction silicon solar cell can produce a maximum open-
circuit voltage of approximately 0.5 to 0.6 volts.
Solar cells are described as being photovoltaic, irrespective of whether the source
is sunlight or an artificial light. In addition to producing energy, they can be used as
a photodetector (for example infrared detectors), detecting light or other electromagnetic
radiation near the visible range, or measuring light intensity.
LCD is used for displaying the voltage, currents and power etc.
When LCD is connected to the solar monitoring system then all the parameters are
also shown at the LCD screen. Here we use a 16*2 LCD screen. It has 16 pins for interfacing
to Arduino.
26
Smart Agriculture System Using IOT
4.3.6 Motor
It is a micro submersible pump which works on dc 3-6v with cost efficient and
portable. It is able to take around 120 litres for every hour with extremely low current
utilization. Water level should be higher as if the motor is used without water it can harm the
parts of this device due to overheating. There are many applications such as controlled
fountain water flow, hydroponic systems, controlled garden watering system.
Arduino IDE is an open source programming which is basically used to write &
compile code using a module that is Arduino. This is an official programming software which
makes compiling of code simple so a typical man can understand the learning procedure. This
software is readily available for all operating systems like MAC, windows, Linux. Arduino
Mega, Arduino Uno, Arduino Leonardo and more are range of Arduino modules that are
available. It basically has a text editor which is used for writing code, a text console, a
message area, a toolbar with buttons for some of the common functions. Sketches are called
as the programs that are written using this software. Coding on this software mostly uses
functions of c/c++.
27
Smart Agriculture System Using IOT
The above figure shows the picture of Arduino sketch. The tool bar consists of many
icons. The first icon from the left is to verify, the second one is to upload, the third one is for
opening new project, the fourth one is to open a project and the fifth one is to save the
project. The icon on the extreme right is for opening serial monitor. The white area in the
middle is coding area.
The above figure shows the picture of Arduino sketch. The tool bar consists of many
icons. The first icon from the left is to verify, the second one is to upload, the third one is for
opening new project, the fourth one is to open a project and the fifth one is to save the
project. The icon on the extreme right is for opening serial monitor. The white area in the
middle is coding area.
28
Smart Agriculture System Using IOT
4.5Adafruit:
4.5.1 Adafruit:
Adafruit.io is a cloud service that just means we run it for you and you don't have to
manage it. You can connect to it over the Internet. It's meant primarily for storing and then
retrieving data but it can do a lot more.
29
Smart Agriculture System Using IOT
Fig.4.5.1 Adafruit
Fig.4.5.2 AdafruiT
30
Smart Agriculture System Using IOT
CHAPTER 5
EXPERIMENTAL OBSERVATIONS AND DISCUSSION
5.1 Algorithm :
#include <ArduinoJson.h // this header is used to add all JSON library function in the
programm
#define WLAN_PASS
"00000000" //used to store the password of Wifi
network
WiFiClient client;
31
Smart Agriculture System Using IOT
32
Smart Agriculture System Using IOT
SoftwareSerial s(D4, D3); // this function is esed to specify the serial pin for data
receving void setup()
{
}
33
Smart Agriculture System Using IOT
Serial.println();
void loop()
{
// Part of JSON library
StaticJsonBuffer<1000> jsonBuffer;
JsonObject& deroot =
jsonBuffer.parseObject(s); if (root ==
JsonObject::in
valid()) return;
// delay(0);
35
Smart Agriculture System Using IOT
// this part continously check either the data is sent to sever or not and see the status
on monitor of IDE //
if (! Feed1.publish(MoistureInAbs))
{
else
{
if (! Feed3.publish(Light1))
{
Serial.println(F("Failed")); // print the as it is sentence on serial monitor
}
else
{
if (! Feed2.publish(humidity))
{
else
{
36
Smart Agriculture System Using IOT
if (! Feed4.publish(temperature))
else
{
if (! Feed5.publish(state))
{
else
{
int8_t ret;
// Stop if already
connected. if
(mqtt.connected())
{
37
Smart Agriculture System Using IOT
return;
}
mqtt.disconnect();
delay(5000); // wait 5
seconds retries--;
if (retries == 0)
{
Serial.println("Adafruit Connected!");
}
code of arduino
float MoistureInAbs = 0;
float a, b, c;
// Part of DHT11 Sensor
<SimpleDHT.h> int pinDHT11 = 4;
SimpleDHT11 dht11(pinDHT11);
int humidityTst;
int temperatureTst;
float temperature;
float humidity;
// Part of light
sensor float Light =
0;
float LightInPer =
0; float PerfLight =
0; float LightV = 0;
float r1 = 500.0;
float r2 = 1000.0;
int RelayPin = 3;
int state;
float Light1;
// void set up is used to run anything once at the time of starting and Pin direction assignment
void setup()
{
lcd.begin(16, 2); // this function is used to start the LCD operation for 16x2 lcd
Serial.begin(9600); // used to print the data on serial monitor of arduino IDE
s.begin(9600); // used to set the speed of serial communication (set for 9600 baud
rate)
pinMode(RelayPin, OUTPUT);
39
Smart Agriculture System Using IOT
40
Smart Agriculture System Using IOT
temperature =
(int)temperatureTst;
Serial.print("Sample OK: ");
Serial.print(temperature);
humidity = (int)humidityTst;
41
Smart Agriculture System Using IOT
42
Smart Agriculture System Using IOT
Serial.println(LightV);
*/
if (MoistureInAbs < 20)
{
digitalWrite(RelayPin, HIGH);
state = 1;
}
digitalWrite(RelayPin, LOW);
state = 0;
}
MoistureInAbs = 100;
}
if (state == 1)
{
43
Smart Agriculture System Using IOT
lcd.clear();
lcd.setCursor(7, 1); // used to set the cursor position for
data printing on LCD (column, Row) lcd.print("ON");
}
if (state == 0)
{
lcd.clear();
lcd.setCursor(7, 1); // used to set the cursor position for
data printing on LCD (column, Row) lcd.print("OF");
}
//Part of serial communication//
root["Light1"] = Light1; // used to send the current data to the Node MCU
root["temperature"] = temperature;
root["state"] = state; // used to send watt data to the Node MCU
// this function checks the value of serial data, if it is greater than zero, it keeps the serial
communication on if (s.available() > 0)
root.printTo(s);
}
lcd.setCursor(7, 0); // used to set the cursor position for data printing on
LCD (column, Row)
// used to print the current data and, 0 is used to display no of decimal point of the data
lcd.setCursor(0, 0); // used to set the cursor position for data printing on
LCD (column, Row)
lcd.print("%");
lcd.setCursor(10, 1); // used to set the cursor position for
data printing on LCD (column, Row) lcd.print("T="); // used to
print the data as it is
lcd.setCursor(12, 1); // used to set the cursor position for data printing on LCD
45
Smart Agriculture System Using IOT
(column, Row)
lcd.print(temperature, 0); // used to print the milli watt hour data and, 0 is used to
display no of decimal point of the data lcd.setCursor(15, 1); // used to set
the cursor position for data printing on LCD (column, Row)
lcd.print("c");
delay(11000); // delay is used to hold the data on LCD for 9 seconds
lcd.clear(); // used to clear the data on LCD so that next data should only
present on LCD
46
Smart Agriculture System Using IOT
CHAPTER 6
Conclusion
6.1 Conclusion:
The proposed model explores the use of IoT (Internet of things) in the agriculture
sector. This model aims at increasing the crop yield by helping in predicting better crop
sequence for a particular soil. Thingspeak helps in real time sampling of the soil and hence
the data acquired can be further used for analysing the crop. We have also taken many
readings of the soil moisture, temperature and humidity of the environment for various days
at different times of the day. Data on the cloud also helps the agriculturists in improving the
yield, evaluating the manures, illness in the fields. This system is cost effective and feasible.
It also focuses on optimizing the use of water resources which combats issues like water
scarcity and ensures sustainability. This model focuses on the utilization of IoT in
agriculture and the solutions proposed in this paper will improve farming methods, increase
productivity and lead to effective use of limited resources.
Advantages:
2) There is no need for extra training of that person who is using it.
3) The schematic of Arduino is open source, for the future enhancement of the project board
can be extended to add more hardware
3) It is of low cost.
Disadvantages:
2) When the new users want to connect, first download application software and then
configuration must be done.
47
Smart Agriculture System Using IOT
6.3 Applications:
1) Precision Farming
2) Green Farming
3) Industrial Farming
The future scope of this project could be including variety of soil sensors like pH
sensor, Rain sensor and then collecting and storing the data on cloud server. This would make
the predicting and analysing processes more accurate. It also includes making different data
mining algorithms suitable for data analysis in agriculture
48
Smart Agriculture System Using IOT
CHAPTER 7
REFERENCES
7.1 References :
[3] Anand Nayyar, Er. Vikram Puri, “IoT Based Smart Sensors Agriculture Stick for Live
Temperature and Moisture Monitoring using Arduino, Cloud Computing & Solar
Technology” May 2015.
[4] Chandan Kumar Sahu, Pramitee Behera, “A Low Cost Smart Irrigation Control System”,
IEEE sponsored 2nd International Conference on Electronics and Communication System
(ICECS2015)
[5] Laxmi C. Gavade, A.D Bhoi , “N, P, K Detection and Control for Agriculture Applications
using PIC Controller”, International Research Journal of Engineering and Technology
(IRJET).
Volume: 6 Issue: 4 | April 2017
[6]N. Suma, S.R. Samson, S.Saranya, “IoT Based Smart Agriculture Monitoring System”
International Journal on Recent and Innovation Trends in Computing and Communication
Vol. 5 Issue: 2, pp 177181, India, 2017.
[7] Prof. K. A. Patil And Prof N. R. Kale proposes “A Model For Smart Agriculture Using
IOT” 2016 International Conference on Global Trends in signal Processing, Information
Computing And Communication.
49
Smart Agriculture System Using IOT
[8] Prathibha S R1, Anupama Hongal 2, Jyothi M P3‟ IOT BASED MONITORING
SYSTEM IN SMART AGRICULTURE‟ 2017 International Conference on Recent
Advances in Electronics and Communication Technology
[9]K. A. Patil and N. R. Kale, "A model for smart agriculture using IoT," 2016 International
Conference on Global Trends in Signal Processing, Information Computing and
Communication (ICGTSPICC), Jalgaon, 2016, pp. 543-545.
[10] Apurva C. Pusatkar, Vijay S. Gulhane, “Implementation of Wireless Sensor Network for
Real Time Monitoring of Agriculture”, International Research Journal of Engineering and
Technology (IRJET). Volume: 03 issue: 05 | May-2016
[13] Lutful Karim, Alagan Anpalagan, Nidal Nasser, “Sensor-based M2M Agriculture
Monitoring Systems for Developing Countries: State and Challenges”,Network Protocols and
Algorithms ISSN 1943-3581 2013, Vol. 5, No. 3
[14] Asres Temam Abagissa, Ashutosh Behura, Santosh Kumar Pani, “IoT Based Smart
Agricultural Device Controlling System”, Proceedings of the 2nd International Conference
on Inventive Communication and Computational Technologies (ICICCT 2018) IEEE Xplore
Compliant - Part Number: CFP18BAC-ART; ISBN:978-1-5386-1974-2
[15] Chetan Dwarkani M, Ganesh Ram, “Smart Farming System Using Sensors for
Agricultural Task Automation”,
50
Smart Agriculture System Using IOT
[16] Dr. Sanjay N. Patil, Madhuri B. Jadhav, “Smart Agriculture Monitoring System
Using IOT”,
International Journal of Advanced Research in Computer and Communication Engineering
Vol. 8, Issue 4, April 2019
[19] Ritika Srivastava, Vandana Sharma, Vishal Jaiswal, Sumit Raj, “A RESEARCH PAPER
SMART AGRICULTURE USING IOT”,International Research Journal of Engineering and
Technology (IRJET), Volume: 07 Issue: 07 | July 2020
51
THANK YOU