You are on page 1of 40

IoT Based Smart Agriculture System Page |1

1. INTRODUCTION

1.1 Introduction

Farming is backbone of economy, and it is the fundamental method for occupation. The large population
of world depends on farming. Around 70% of Indian population depends on cultivation. Most of the
cultivation cannot be productive only by physical activities so have to be handled by innovative
technologies. Therefore, we use IoT innovation to address the critical part of farming.

In this modern world, most of the farmers lack of proper knowledge regarding farming and
agriculture making it more erratic. Most part of farming and agricultural related activities are based on
prediction and forecasting. When it fails, the farmers must bear huge losses, and some end up committing
suicide. Since we are aware of the benefit of quality of soil, air, and irrigation in the growth of crops
such parameters like temperature and moisture cannot be neglected.

Internet of Things (IoT) is the interconnection or network of physical devices that is interrelated
computing devices, digital and mechanical machines, people or animals, objects that can sense,
accumulate, and transfer data over web without any human involvement. It is a progressed examination
and mechanized frameworks which uses detecting, organizing, enormous information and man-made
consciousness innovation to convey total framework for an administration. Basically, IoT is about
extending the power of internet beyond smart phones and computers.

IoT has changed today’s world. Smart cities, smart car, smart homes everything around us can
be turned into a smart device with the help of IoT. It also has applications in agriculture, business sectors,
healthcare, transport, and logistics.

Department of ECE, BEC, Bagalkot


IoT Based Smart Agriculture System Page |2

1.2 IoT in Agriculture


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 billion in few years. So, to feed
such an immense population, agriculture industry needs to embrace IoT. The demand for more
food must address challenges that include excessive climate conditions, weather change and
different environmental affects that results from farming practices. Figure 1 shows scenario of
IOT in smart farming which involves smart sensing and monitoring, smart analysis and planning,
smart control.

Figure 1 Smart farming

The destiny of Indian agriculture must be worked with understanding and excessive
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. 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 in the field of agriculture.

Department of ECE, BEC, Bagalkot


IoT Based Smart Agriculture System Page |3

1.3 Benefits of IoT in Agriculture


• 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 the smart gadgets, farmers could expand the output by 72% up to year 2050
as delineated by specialists.
• Using IoT creations expenses could be diminished to an astounding dimension that would
thus expand productivity and survivability.
• Using IoT efficiency level would be further expanded as far as utilization of water, soil,
fertilizers, pesticides etc.

Applications of IoT in Agriculture:


• Precision farming

• Agricultural drones

• Livestock monitoring

• Smart greenhouses

Department of ECE, BEC, Bagalkot


IoT Based Smart Agriculture System Page |4

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 knowledge how 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 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 of proposed work


➢ Irrigation based on soil moisture level.
➢ Sensing of temperature and humidity.
➢ Automatic yield covering.
➢ Smoke and spoilage detection in storage case.

Department of ECE, BEC, Bagalkot


IoT Based Smart Agriculture System Page |5

2.LITERATURE SURVEY
➢ G. Sushanth et.al [1] has proposed a smart agriculture system using sensors, microcontroller
within an IoT system. The aim of the implementation is to demonstrate the smart and intelligent
capabilities of the microcontroller to allow the decisions to be taken on watering the plants based
on the continuous monitoring of the environmental conditions in the field. It also aims at a
predefined irrigation schedule as per the farmers convenience, uploaded into the application
developed for the same. The implementation is a photovoltaic powered automated irrigation
system that consists of a distributed wireless network of soil moisture and temperature sensors
deployed in plant root zones. These sensors continuously monitor the parameters and send it to
the Arduino board for further processing which acts as an IOT gateway. This gateway has been
given the wireless capability by installing a Wi-Fi module which will be updating the data to the
cloud. The IOT gateway also has the GSM capability through the module connected. The receiver
unit also has a duplex communication link based on a cellular-Internet interface, using general
packet radio service (GPRS) protocol, which is a packet-oriented mobile data service used in 2G
and 4G cellular global system for mobile communications (GSM). The data being uploaded to
the cloud allows the user to continuously view the parameters from the comforts of his/her home
or wherever on the go. The system has the capacity to adapt based on the user input which the
farmer can input through the smart agriculture application. The farmer can select a profile based
on the season and the crop for irrigation and schedule and plan the water resource utilization
sensibly. The volumetric water content in the soil is a primary factor which gives a suggestion
that the water is required for the crops. In the absence of this system the farmer has to manually
inspect these for all the crops by inspecting the soil in the fields which is tedious, time consuming
and straining. This can be taken care by the intelligent system which informs the user whenever
the water content goes below the threshold set by the farmer himself. Intrusion of animals
especially cows, monkeys, dogs etc to the fields is a very common issue and one of the factors
for disruption or disturbance to the yield. This requires one person to continuously guard the
fields at all the times which will not be accurate and the productivity of one person is wasted.
This can be overcome by this system which has a motion sensor to detect the presence of any
animal in the fields and send notifications to the farmer in their presence. The distance range for
which the farmer needs to detect the animals can be allowed to set by the farmer himself in the
application in the beginning.

Department of ECE, BEC, Bagalkot


IoT Based Smart Agriculture System Page |6

➢ Mrs.T.Vineela et.al [2] presented system in which that information must be collected from
different sensors and live monitoring should be done but in this research paper the stress is laid
on getting things automated. In this paper the writers aim at increasing the crop yield by using
different technologies. It also presents a cost efficient WSN for getting information from
humidity sensor, soil moisture sensor and temperature sensors. It suggests an automated system
for better crop production. And suggested a methodology that does sensing of data smartly and
proposes a smart irrigation system. In the proposed model various sensors are interfaced with
raspberry pi hence making an efficient wireless sensor network.

➢ Chandan Kumar Sahu et.al [3] has proposed a model where the flow and direction of
water is supervised and controlled. This is done with the help of DHTT11 and soil moisture
sensor. It also includes a way to select the direction of water and this information is also sent to
the phone and Gmail account of the farmer. It enables the farmer to switch on and off the motor
with a single click. The proposed model makes the traditional irrigation system more effective
and sustainable. And suggests an efficient energy and network model which is also cost effective.

➢ Dr. Sanjay N. Patil et.al [4] have analysed collected data for finding correlation between
environment work and yield for standard work. They are concentrated on crop monitoring,
information of temperature and rainfall is collected as initial spatial data and analysed to reduce
the crop losses and to improve the crop production.
An IOT Based Crop-field monitoring an irrigation automation system explains to monitor
a crop field. A system is developed by using sensors and according to the decision from a server
based on sensed data. By using wireless transmission, the sensed data forwarded to web server
database. The user can monitor and control the system remotely with the help of application
which provides a web interface to user.
IOT Based Smart Agriculture Monitoring System develops various features like GPS
based remote controlled monitoring, soil moisture and temperature sensing, intruders scaring,
security, leaf wetness and proper irrigation facilities.

Department of ECE, BEC, Bagalkot


IoT Based Smart Agriculture System Page |7

➢ Nikesh Gondchawar et.al [5] has presented paper consists of four sections; node1, node2,
node3 and PC or mobile app to control system. In the present system, every node is integration
with different sensors and devices, and they are interconnected to one central server via wireless
communication modules. The server sends and receives information from user end using internet
connectivity. There are two modes of operation of the system: auto mode and manual mode. The
auto mode system takes its own decisions and controls the installed devices whereas in manual
mode user can control the operations of system using android app or PC commands.
Node 1: Node1 is GPS based mobile robot which can be controlled remotely using
computer as well as it can be programmed to navigate autonomously within the boundary of field
using the co-ordinates given by GPS module. Node 1, the remote-controlled robot has various
sensors and devices like camera, obstacle sensor, siren, cutter, sprayer and using them it will
perform tasks like, Keeping vigilance, Bird and animal scaring, Weeding, and Spraying
Node 2: Node2 will be the warehouse. It consists of motion detector, light sensor,
humidity sensor, temperature sensor, room heater, cooling fan altogether interfaced with AVR
microcontroller. Motion detector will detect the motion in the room when security mode will be
ON and on detection of motion, it will send the alert signal to user via Raspberry pi and thus
providing theft detection. Node 2 Temperature sensor and Humidity sensor senses the
temperature and humidity respectively and if the value crosses the threshold, then room heater
or cooling fan will be switched ON/OFF automatically providing temperature and humidity
maintenance. Node2 will also controls water pump depending upon the soil moisture data sent
by node3.
Node 3: Node3 is a smart irrigation node with features like Smart control of water pump
based on real time field data i.e., automatically turning on/off the pump after attaining the
required soil moisture level in auto mode, Switching water pump on/off remotely via mobile or
computer in manual mode, and continuous monitoring of soil moisture.

Department of ECE, BEC, Bagalkot


IoT Based Smart Agriculture System Page |8

2.1 Summary of literature survey


S Paper Title Outcomes
l
.
N
o
.
1 “IoT based • Animal detection.
. smart • Photovoltaic powered smart
Agriculture irrigation.
System”. • Monitoring of environmental
G. Sushanth conditions like temperature,
and S. Sujatha humidity.
2 “IoT Based • Monitoring of environmental
. Agriculture conditions like temperature,
Monitoring and humidity.
Smart • Automatic irrigation by using relay.
Irrigation
System Using
Raspberry Pi”,
Mrs.T.Vineela,
J.NagaHarini,C
h.Kiranma,G.H
arshitha,B.Adi
Laksh.
3 “A Low-Cost • Enables the farmer to switch on and
. Smart off the motor with a single click.
Irrigation • Monitoring soil moisture,
Control temperature and humidity.
System”
Chandan
Kumar Sahu,
Pramitee
Behera.
4 “Smart • Smart irrigation system
. Agriculture (Detection of temperature, humidity,
Monitoring moisture).
System Using • Detection of Leaf wetness, Animal
IOT”. movement
Dr. Sanjay N.
Patil,
Madhuri B.
Jadhav

Department of ECE, BEC, Bagalkot


IoT Based Smart Agriculture System Page |9

5 “IoT based • Storage problem detection using


. Smart remote controlled robot.
Agriculture”. • Smart irrigation system
Nikesh (Detection of temperature, humidity,
Gondchawar , moisture).
Prof. Dr. R. S. • Smart warehouse management
Kawitkar system.

Department of ECE, BEC, Bagalkot


IoT Based Smart Agriculture System P a g e | 10

3.PROPOSED SYSTEM
The proposed system focuses on live monitoring of soil moisture, temperature and humidity of
storage, spoilage detection of onion yield covering based on rain detection. The system provides the
concept of “Plug & Sense” in which farmers can directly implement smart farming by putting the system
on the field and getting live data on various devices like smart phones, tablets etc. and the data generated
via sensors can be easily shared.

3.1 OBJECTIVES
Proposed system objectives are:
➢ Irrigation based on soil moisture level.
➢ Sensing of temperature and humidity.
➢ Automatic yield covering.
➢ Smoke and spoilage detection in storage case

Department of ECE, BEC, Bagalkot


IoT Based Smart Agriculture System P a g e | 11

• BLOCK DIAGRAM
Figure 3.1 shows the proposed system of IoT based smart agriculture system.

Soil moisture MQ-2 gas sensor


sensor (FC 28)

Rain detection Power supply


Arduino UNO
sensor (HL-83)

Buzzer
MQ-135

Motor control
system

Nodemcu
NodeMCU
DHT11 Sensor
Motor

Internet
Application (Blynk)

Figure 3.1 Proposed system

3.2 Working
It consists of NodeMCU and Arduino for interfacing all sensors. The sensors used are.
1. Soil moisture sensor
2. DHT11 sensor
3. Rain detection sensor
4. MQ2 gas sensor,
5. MQ-135 gas sensor
Soil moisture sensor senses the moisture level of the soil to make motor turn on or off. DHT11
sensor is used to sense the temperature and humidity in storage of onion. Rain detection sensor
senses the presence of rain and gives the digital output-based on output does yield covering.MQ-
2 sensor which senses smoke.

Department of ECE, BEC, Bagalkot


IoT Based Smart Agriculture System P a g e | 12

MQ-135 sensor used to detect the spoilage of onion, gives alertness through buzzer. DC motor
used to cover the harvested yield. All these sensed parameters are sent to Arduino. Serial
communication is done between Arduino and NodeMCU.

3.3 COMPONENTS:
3.3.1 Arduino

Figure 3.3.1 Arduino


The figure 3.3.1 shows diagram of Arduino uno microcontroller. The Arduino Uno is a microcontroller
board based on the ATmega328(datasheet). It has 14 digital input/output pins (of which 6 can be used
as PWM outputs),

6 analog inputs, a 16 MHz crystal oscillator, a USB connection, a power jack, an ICSP header, and a
reset button.

Table 1 parameter and specifications of Arduino.

Parameter Specifications

Input voltage(limit) 6-20 volts

Digital I/O pins 14

Analog inputs 6

Maximum current per pin 40mA

Flash memory 32kb

SRAM 2kb

EEPROM 1kb

Clock 16Mhz

Department of ECE, BEC, Bagalkot


IoT Based Smart Agriculture System P a g e | 13

3.3.2 NodeMCU

Figure 3.3.2 NodeMCU

The NodeMCU ESP8266 development board comes with the ESP-12E module containing ESP8266
chip having Tensilica Xtensa 32-bit LX106 RISC microprocessor. This microprocessor supports RTOS
and operates at 80MHz to 160 MHz adjustable clock frequency. NodeMCU has 128 KB RAM and 4MB
of Flash memory to store data and programs. Its high processing power with in-built Wi-Fi / Bluetooth
and Deep Sleep Operating features make it ideal for IoT projects.

NodeMCU can be powered using Micro USB jack and VIN pin (External Supply Pin). It supports
UART, SPI, and I2C interface.

3.3.3 Soil Moisture Sensor

Figure 3.3.3 Soil moisture sensor

Department of ECE, BEC, Bagalkot


IoT Based Smart Agriculture System P a g e | 14

Figure 3.3.3 shows the diagram of soil moisture sensor. Soil moisture sensor is a sensor which senses
the moisture content of the soil. The sensor has both analog and digital output. The digital output is fixed
and the analog output threshold can be varied. It works on the principal of open and short circuits. The
output is high or low indicated by the LED. When the soil is dry the current will not pass through it and
so it will act as open circuit. Hence the output is said to be maximum. When the soil is wet, the current
will pass from one terminal to the other and the circuit is said to be short, and the output will be zero.

Table 3 Performance parameters and specifications of Soil Moisture Sensor.

Parameter Specifications
Model name FC 28
Operating Temperature -40 to +60 deg C
Sensing Range 0-45%volumetric water content of soil
Operating Voltage 5V DC
Power Consumption 3mA

3.3.4 DHT11 Sensor

Figure 3.3.4 DHT11 sensor


Figure 3.3.4 shows the diagram of DHT11 Sensor. Its small size, low power consummation an up-to-
20-meter signal transmission making it the best choice for various applications, This DHT11 Humidity
sensor features humidity sensor complex with calibrated digital signal output. By using the exclusive
digital-signal-acquisition technique and temperature & humidity sensing technology, it ensures high
reliability and excellent long-term stability. This sensor includes a resistive –type humidity measurement
component.

Department of ECE, BEC, Bagalkot


IoT Based Smart Agriculture System P a g e | 15

Table 4 Parameters of temperature and humidity (DHT11)

Parameter Specifications

Input/output voltage 3V / 5V

Humidity Range 20-80 percentage

Temperature Range 0–50-degree Celcius

Sampling Rate 1Hz

Response time 50 ms

Sensing Range 20-90%RH

Accuracy +\-5%RH

Temperature Accuracy +\-2% degree Celcius

3.3.5. Rain Detection Sensor

Figure 3.3.5 Rain detection sensor


Figure 3.3.5 shows the diagram of rain detection sensor. The rain senor module is an easy tool for rain
detection. It can be used as switch when raindrop falls through the raining board and also for measuring
rainfall intensity. The module features, a rain board and the control board that is separate for more
convenience, power indicator LED and an adjustable sensitivity through a potentiometer. The analog
output used in detection of drops in amount of rainfall. Connected to 5V power supply, the LED will

Department of ECE, BEC, Bagalkot


IoT Based Smart Agriculture System P a g e | 16

turn on when induction board has no rain drop, and the output is high. When dropping a little amount
water, the output is low, the switch indicator will turn on, Brush off the water droplets, and when restored
to the initial state, outputs high level.

Table 5 Parameters and specification of rain detection sensor

Parameter Specifications
Working voltage 5v
Output format Digital output (0 or 1)
Pcb size 3.2*1.4 cm
current 15mA

3.3.6.MQ-2 Gas sensor

Figure 3.3.6 MQ-2 Gas sensor


Figure 3.3.6 shows the MQ-2 Gas sensor. The MQ-2 Gas sensor can detect or measure gasses like LPG,
Alcohol, Propane, Hydrogen, CO and even methane. The module version of this sensor comes with a
Digital Pin which makes this sensor to operate even without a microcontroller and that comes in handy
when you are only trying to detect one particular gas.

Department of ECE, BEC, Bagalkot


IoT Based Smart Agriculture System P a g e | 17

Table 6 Parameters and specification of MQ-2 gas sensor.

Parameters Specifications
Operating voltage 5v
Load resistance 20 kilo ohms
Heater resistance 33 ohms
Heating consumption < 800mv
Sensing resistance 10 to 60 kilo ohms
Concentration scope 200 to 10000 ppm

3.3.7 MQ-135 sensor

Figure 3.3.7 MQ-135 Gas sensor


• Table 7 Parameters and specification of MQ-2 gas sensor.

Parameters Specifications
Operating voltage 5v
Load resistance 20 kilo ohms
Pin type Digital or Analog
Analog output voltage 0V to 5V
Digital Output Voltage 0V to 5V
Concentration scope 200 to 10000 ppm

Department of ECE, BEC, Bagalkot


IoT Based Smart Agriculture System P a g e | 18

4.IMPLEMENTATION
4.1 Simulation of proposed work:
The Proteus Design Suite is a proprietary software tool suite used primarily for electronic design
automation.

The Proteus Design Suite is a Windows application for schematic, simulation, and PCB layout design.
It can be used in many configurations, depending on the size of designs being produced and the
requirements for microcontroller simulation. Schematic capture in the Proteus Design Suite is used for
both the simulation of designs and as the design phase of a PCB layout project. It is therefore a core
component and is included with all product configurations.

Figure 4.1 Simulation in proteus software.


The above figure 4.1 depicts simulation part of the project in proteus software.

Department of ECE, BEC, Bagalkot


IoT Based Smart Agriculture System P a g e | 19

4.2 Hardware implementation

• Serial communication between Arduino uno and NodeMCU.


Serial communication is a communication process wherein data transfer occurs by
transmitting data one bit at a time in sequential order over a computer bus or a communication
channel. It is the most widely used approach to transfer information between data processing
equipment and peripherals. Binary One represents a logic HIGH or 5 Volts, and zero
represents a logic LOW or 0 Volts, used for communicating between the Arduino board and
a computer or other devices. All Arduino boards have at least one serial port which is also
known as a UART or USART. It communicates on digital pins 0 (RX) and 1 (TX) as well as
with the computer via USB. Serial communication on pins TX/RX uses TTL logic levels (5V
or 3.3V depending on the board). To establish serial communication between two devices, the
devices should be connected as shown in below figure 4.2.

Figure 4.2 Serial communication between Arduino and NodeMCU.

Department of ECE, BEC, Bagalkot


IoT Based Smart Agriculture System P a g e | 20

Figure 4.3 Hardware implementation


The above figure 4.3 shows the connection between Arduino, NodeMCU and sensors. Arduino
and NodeMCU are interconnected by means of Serial Communication here DHT11, MQ-2 and
MQ-135 sensors are used in storage of onion, to monitor temperature, humidity, smoke,
spoilage. FC-28 sensor used to monitor moisture level of soil. Water pump will be ON/OFF
based on Soil moisture level.
HL-83 Rain sensor used detects the rain.

Department of ECE, BEC, Bagalkot


IoT Based Smart Agriculture System P a g e | 21

• Algorithm:

Step 1: Start

Step 2: Read all data from sensors

Step 3: Monitor the measured data

Step 4: If soil moisture < 60, turn ON motor


Else turn OFF

Step 5: If rain sensor output 0, turn ON motor


Else turn OFF

Step 6: If gas sensor value > 300ppm, turn on buzzer


Else turn OFF

Step 7: Repeat step2

Step 8: Stop

Department of ECE, BEC, Bagalkot


IoT Based Smart Agriculture System P a g e | 22

• System flow graph

Start

MQ gas
DHT11
sensor
Read the data from sensors
and send the measured data to
Soil the cloud using Arduino and Rain
NodeMCU.
Moisture detection

Monitor the measured data


(Temperature, Soil moisture,
Gas, Rain) of union crop.

If the soil If PPM >300


moisture <60 If rain
output=0
TRUE TRUE TRUE
Turn ON the
Turn ON the Turn ON the
motor pump
DC MOTOR buzzer

Turn OFF
Turn OFF
Turn OFF

Figure 4.4 System flow graph of proposed system

Department of ECE, BEC, Bagalkot


IoT Based Smart Agriculture System P a g e | 23

• A flowchart is a picture of the separate steps of a process in sequential order. It is a generic tool
that can be adapted for a wide variety of purposes, and can be used to describe various
processes, such as a manufacturing process, an administrative or service process, or a project
plan.
• In the first step, reading the data from all sensors like Soil moisture, DHT11, Rain detection
and MQ gas. The measured data are sent to Arduino for processing purpose and then send to
Cloud through
Wi-Fi module.
• Monitoring of the data takes place in the processor like as measurement of temperature, soil
moisture level, possibility of rain, gas level.
• In the next step, based on weather conditions operations are takes place in order wise. For
example, if the moisture level is less than 60% then motor pump ON automatically and if it is
greater than mentioned level, motor will be in turn OFF condition.
• If it is raining in field, DC motor turn ON to cover the yield.
• If the gas level is more than 300 ppm, then Buzzer in ON state as it gives alertness for stored
yield.
• In this way the above-mentioned steps take place to perform the specified tasks.

Department of ECE, BEC, Bagalkot


IoT Based Smart Agriculture System P a g e | 24

5.RESULTS
• Simulation Results: The below figure 5.1 depicts the simulation result of proposed system
using proteus software. Output of DHT11 and soil moisture sensor is available in virtual
terminal.

Figure 5.1 Proteus software result of proposed system.

Department of ECE, BEC, Bagalkot


IoT Based Smart Agriculture System P a g e | 25

Figure 5.2 Blynk app result


The above figure 5.2 shows depict sensors data on blynk. We have created new project in blynk app with
email id to get authentication id. From authentication id NodeMCU connected to blynk app by
substituting in program part.

Department of ECE, BEC, Bagalkot


IoT Based Smart Agriculture System P a g e | 26

• Soil moisture:

Soil moisture Sensor


80.00
If sensor detects soil 70
70.00 moisture less than 65
60%, water pump will 60
60.00
turn on.
Soil moisture level

50.00

40.00
30
30.00

20.00

10.00

0.00
12:00 AM 02:24 AM 04:48 AM 07:12 AM 09:36 AM 12:00 PM 02:24 PM 04:48 PM 07:12 PM
Time

Figure 5.3 Real time analysis of FC-28 Sensor

Figure 5.3 shows the graphical analysis of FC-28 soil moisture sensor. When FC-28
senses the moisture level of soil if it is less than 60% then the motor pump will be on, and
motor supplies the water to the field after reaching the 60% moisture level the motor pump will
turned off.

• MQ-2 Gas sensor


The figure 5.4 shows the graphical representation of MQ-2 gas sensor result. Here MQ-
2 gas sensor used to detect smoke in the storage place, when reading is above 300ppm the
buzzer will be on.

Department of ECE, BEC, Bagalkot


IoT Based Smart Agriculture System P a g e | 27

MQ-2 Gas sensor


600.00 560

500
500.00
Smoke level in ppm

400.00

300.00 250

200.00
145 If sensor detects more
than 300 ppm gas,
100.00 buzzer will turn on

0.00
12:00 AM 02:24 AM 04:48 AM 07:12 AM 09:36 AM 12:00 PM 02:24 PM 04:48 PM 07:12 PM
Time

Figure 5.4 Real time analysis of MQ-2 Sensor

• MQ-135 Gas Sensor

MQ-135 Gas sensor


60.00
50
50.00 If sensor detects more than 35

37
Ammonial level in ppm

40.00

30.00 25

20.00
10
10.00

0.00
12:00 AM 02:24 AM 04:48 AM 07:12 AM 09:36 AM 12:00 PM 02:24 PM 04:48 PM 07:12 PM
Time

Figure 5.5 Real time analysis of MQ-135 Sensor

Department of ECE, BEC, Bagalkot


IoT Based Smart Agriculture System P a g e | 28

The above figure 5.5 shows the real time analysis of MQ-135 sensor. MQ-135 is used
to monitor spoilage of onion if sensor reading is greater than 35ppm the buzzer will be turned
on.

• DHT11

DHT11
80 76

70
60 Humidit
58
y54
Temperature and Humidity

60

50

40 33
26 28
30 22
20
Temperature
10

0
12:00 AM 02:24 AM 04:48 AM 07:12 AM 09:36 AM 12:00 PM 02:24 PM 04:48 PM 07:12 PM
Time

Figure 5.6 Real time analysis of DHT11 Sensor

The above figure 5.6 shows graphical representation of DHT11 sensor result. DTH11
sensor sense the temperature and humidity level in storage place of onion, where optimum
temperature and humidity for onion storage are 32-40 C and 75-80 RH% respectively.

Department of ECE, BEC, Bagalkot


IoT Based Smart Agriculture System P a g e | 29

6.CONCLUSION AND FUTURE SCOPE:


Proposed IoT based system monitors the real time environmental parameters such as
temperature, humidity, soil moisture level, smoke. In response to rain detection sensor and MQ-135
sensor yield covering and spoilage detection of onion is done respectively. The farmer can continuously
monitor different environmental parameter without any interaction with additional server. The
agriculture monitoring system is designed using Arduino and NodeMCU. The sensors are successfully
interfaced with Arduino and IoT achieved. All observations and experimental tests prove that project is
complete solution to field activities, irrigation and storage problems using soil moisture sensor, rain
detector sensor, dht11 sensor, gas sensor. The implementation of such system in field can help to
improve the yield of crop and overall production. The future scope of proposed system is to add pH
sensor for maintaining soil nutrients and cooling system in storage room to maintain the temperature.

Department of ECE, BEC, Bagalkot


IoT Based Smart Agriculture System P a g e | 30

7.REFERENCES
1. G. Sushanth, S. Sujatha, “IOT Based Smart Agriculture System”, 1,2Department of ECE, Christ
University, Bangalore, India, 978-1-5386-3624-4/18/$31.00 c IEEE-2018.

2. Mrs.T.Vineela, J. NagaHarini, Ch.Kiranma, G.Harshitha, B.AdiLaksh, “IoT Based Agriculture


Monitoring and Smart Irrigation System Using Raspberry Pi”, International Research Journal of
Engineering and Technology (IRJET). Volume: 5 Issue: 1 | Jan 2018.

3. Chandan Kumar Sahu, Pramitee Behera, “A Low-Cost Smart Irrigation Control System”, IEEE
sponsored 2nd International Conference on Electronics and Communication System (ICECS2015)
2015.

4. 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.

5. Nikesh Gondchawar, Prof. Dr. R. S. Kawitkar” IoT based Smart Agriculture” International Journal
of Advanced Research in Computer and Communication Engineering Vol. 5, Issue 6, June 2016.

6. P. Nandhini, V. Kalpana, J. Sikkandhar Batcha, “IoT Based Smart Agriculture Monitoring and
Irrigation System Using Raspberry Pi Kit", International Journal of Engineering Development and
Research (IJEDR), ISSN:2321-9939, Volume.6, Issue 2, pp.820-824, June 2018.

7. Dr. N. RAJESHKUMAR, B. VAISHNAVI, K. SARANYA, C. SURABHI,” SMART CROP-FIELD


MONITORING AND AUTOMATION IRRIGATION SYSTEM USING IoT”,published on International
Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 06 Issue: 03 | Mar
2019,

Department of ECE, BEC, Bagalkot


IoT Based Smart Agriculture System P a g e | 31

8. R. N. Rao and B. Sridhar, "IoT based smart crop-field monitoring and automation irrigation system,"
2018 2nd International Conference on Inventive Systems and Control (ICISC), Coimbatore, India,
2018.

9. S. R. Prathibha, A. Hongal and M. P. Jyothi, "IOT Based Monitoring System in Smart Agriculture,"
2017 International Conference on Recent Advances in Electronics and Communication Technology
(ICRAECT), Bangalore, India, 2017.
10. M. S. Islam and G. K. Dey, "Precision Agriculture: Renewable Energy Based Smart Crop Field
Monitoring and Management System Using WSN via IoT," 2019 International Conference on
Sustainable Technologies for Industry 4.0 (STI), Dhaka, Bangladesh, 2019.

11. Ms. Swapnali B.Pawar, Prof. Priti Rajput, Prof. Asif Shaikh,” Smart Irrigation System Using IOT And
Raspberry Pi”, international Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 05 Issue: 08 | Aug 2018.

12. Shilpa R Maiya, Dr Aishwarya P,” Smart Agriculture using IoT”, International Research Journal of
Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 07 Issue: 04 | Apr 2020.

13. M. S. D. Abhiram, J. Kuppili and N. A. Manga, "Smart Farming System using IoT for Efficient Crop
Growth," 2020 IEEE International Students' Conference on Electrical,Electronics and Computer
Science (SCEECS), Bhopal, India, 2020.

14. S. Namani and B. Gonen, "Smart Agriculture Based on IoT and Cloud Computing," 2020 3rd
International Conference on Information and Computer Technologies (ICICT), San Jose, CA, USA,
2020.

15. Y. Mekonnen, L. Burton, A. Sarwat and S. Bhansali, "IoT Sensor Network Approach for Smart
Farming: An Application in Food, Energy and Water System," 2018 IEEE Global Humanitarian
Technology Conference (GHTC), San Jose, CA, USA, 2018.

Department of ECE, BEC, Bagalkot


IoT Based Smart Agriculture System P a g e | 32

16. M. Dholu and K. A. Ghodinde, "Internet of Things (IoT) for Precision Agriculture Application,"
2018 2nd International Conference on Trends in Electronics and Informatics (ICOEI), Tirunelveli,
India, 2018.

17. A. Srivastava, D. K. Das and R. Kumar, "Monitoring of Soil Parameters and Controlling of Soil
Moisture through IoT based Smart Agriculture," 2020 IEEE Students Conference on Engineering &
Systems (SCES), Prayagraj, India, 2020.

18. S. Ayyasamy, S. Eswaran, B. Manikandan, S. P. Mithun Solomon and S. Nirmal Kumar, "IoT based
Agri Soil Maintenance Through Micro-Nutrients and Protection of Crops from Excess Water," 2020
Fourth International Conference on Computing Methodologies and Communication (ICCMC),
Erode, India, 2020.

19. L. Dan, W. Hongli, Z. Mengya and X. Jianqiu, "Intelligent Agriculture Greenhouse Environment
Monitoring System Based on the Android Platform," 2017 International Conference on Smart Grid
and Electrical Automation (ICSGEA), Changsha, China, 2017.

20. S. Verma, R. Gala, S. Madhavan, S. Burkule, S. Chauhan and C. Prakash, "An Internet of Things
(IoT) Architecture for Smart Agriculture," 2018 Fourth International Conference on Computing
Communication Control and Automation (ICCUBEA), Pune, India, 2018.

21. M. S. D. Abhiram, J. Kuppili and N. A. Manga, "Smart Farming System using IoT for Efficient Crop
Growth," 2020 IEEE International Students' Conference on Electrical,Electronics and Computer
Science (SCEECS), Bhopal, India, 2020.

22. L. Kamelia, Y. S. Nugraha, M. R. Effendi and T. Priatna, "The IoT-Based Monitoring Systems for
Humidity and Soil Acidity Using Wireless Communication," 2019 IEEE 5th International
Conference on Wireless and Telematics (ICWT), Yogyakarta, Indonesia, 2019.

Department of ECE, BEC, Bagalkot


IoT Based Smart Agriculture System P a g e | 33

23. V. V. Abhyankar, S. A. Gavade and K. S. Bhole, "System Development for Simultaneous


Measurement and Control of pH and Moisture of Soil," 2019 International Conference on Nascent
Technologies in Engineering (ICNTE), Navi Mumbai, India, 2019.

24. S. Athani, C. H. Tejeshwar, M. M. Patil, P. Patil and R. Kulkarni, "Soil moisture monitoring using
IoT enabled arduino sensors with neural networks for improving soil management for farmers and
predict seasonal rainfall for planning future harvest in North Karnataka — India," 2017 International
Conference on I-SMAC (IoT in Social, Mobile, Analytics and Cloud) (I-SMAC), Palladam, India,
2017.
25. .M. Lavanaya and R. Parameswari, "Soil Nutrients Monitoring for Greenhouse Yield Enhancement
Using Ph Value with Iot and Wireless Sensor Network," 2018 Second International Conference on
Green Computing and Internet of Things (ICGCIoT), Bangalore, India, 2018.

Department of ECE, BEC, Bagalkot


IoT Based Smart Agriculture System P a g e | 34

APPENDIX
Source code listing
• Collecting data through sensors

#include <SoftwareSerial.h>
#include <ArduinoJson.h>
SoftwareSerial s(5,6);
const int Sensor2 = A1;
int buzzer = 2;
int gasthreshold = 300;
int val;
void setup() {
s.begin(115200);
pinMode(A0,INPUT);
pinMode(A1,INPUT);
pinMode(4,INPUT);
pinMode(7,OUTPUT);
pinMode(8,OUTPUT);
pinMode(10,OUTPUT);
pinMode(9,OUTPUT);
}
StaticJsonBuffer<1000> jsonBuffer;
JsonObject& root = jsonBuffer.createObject();
void loop() {
int smoke = analogRead(A0);
Serial.println(smoke);
if(smoke>=gasthreshold){
tone(buzzer,1000,200);
}
else{
noTone(buzzer);
}

Department of ECE, BEC, Bagalkot


IoT Based Smart Agriculture System P a g e | 35

root["gasv"]= analogRead(A0);
delay(100);
float moisture_percentage;
int sensor_analog;
sensor_analog = analogRead(Sensor2);
moisture_percentage = ( 100 - ( (sensor_analog/1023.00) * 100 ) );
if(moisture_percentage <= 50){
digitalWrite(10,HIGH);
digitalWrite(9,LOW);
}
else {
digitalWrite(10,LOW);
digitalWrite(9,LOW);
}
root["Moisture"] = moisture_percentage;
val = digitalRead(4); // rain sensor output pin connected
Serial.println(val); // see the value in serial mpnitor in Arduino IDE
delay(100);
//Rain sensor code starts from here;
if(val == 1 )
{
digitalWrite(7,LOW);
digitalWrite(8,LOW);
//digitalWrite(3,HIGH);
}
else
{
digitalWrite(7,HIGH);
digitalWrite(8,LOW);
// digitalWrite(3,LOW);
}

Department of ECE, BEC, Bagalkot


IoT Based Smart Agriculture System P a g e | 36

if(s.available()>0)
{
root.printTo(s);
}
}

//End of the program for Arduino.

Department of ECE, BEC, Bagalkot


IoT Based Smart Agriculture System P a g e | 37

• Monitoring and Analyzing Data Through IoT

#include <SoftwareSerial.h>
SoftwareSerial s(D6,D5);
#include <ArduinoJson.h>
#define BLYNK_PRINT Serial

#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include <DHT.h>

// You should get Auth Token in the Blynk App.


// Go to the Project Settings (nut icon).
char auth[] = "pjsSWQflkz56PbyyN4NHvP5wFG6HeIEs";

// Your WiFi credentials.


// Set password to "" for open networks.
char ssid[] = "somuD";
char pass[] = "somu8787";

#define DHTPIN 0 // D3

// Uncomment whatever type you're using!


#define DHTTYPE DHT11 // DHT 11

DHT dht(DHTPIN, DHTTYPE);


BlynkTimer timer;
void sendSensor()

Department of ECE, BEC, Bagalkot


IoT Based Smart Agriculture System P a g e | 38

{
float h = dht.readHumidity();
float t = dht.readTemperature(); // or dht.readTemperature(true) for Fahrenheit

if (isnan(h) || isnan(t)) {
Serial.println("Failed to read from DHT sensor!");
return;
}
// You can send any value at any time.
// Please don't send more that 10 values per second.
Blynk.virtualWrite(V5, t);
Blynk.virtualWrite(V6, h);
}
void sendSensor1(){
StaticJsonBuffer<1000> jsonBuffer;
JsonObject& root = jsonBuffer.parseObject(s);

if (root == JsonObject::invalid())
{
return.
}
int data4=root["gasv"];
Blynk.virtualWrite(V7, data4);
float data5 = root["Moisture"];
Blynk.virtualWrite(V8, data5);
//if( data5 <= 50.0){
//Blynk.notify(" your plant watering");
//}
//Blynk.virtualWrite(V8, data5);

Department of ECE, BEC, Bagalkot


IoT Based Smart Agriculture System P a g e | 39

void setup()
{
// Debug console
Serial.begin(9600);

Blynk.begin(auth, ssid, pass);


// You can also specify server:
//Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 8442);
//Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8442);

dht.begin();
// Initialize Serial port
Serial.begin(115200);
s.begin(115200);
while (!Serial) continue;

// Setup a function to be called every second


timer.setInterval(1000L, sendSensor);
timer.setInterval(2000L, sendSensor1);
}
void loop()
{
Blynk.run();
timer.run();
}

Department of ECE, BEC, Bagalkot


IoT Based Smart Agriculture System P a g e | 40

Department of ECE, BEC, Bagalkot

You might also like