You are on page 1of 29

Department of Electronics and Communication

“IOT based Soil Moisture and


Nutrient Monitoring Decision
System” by
Darshan Ullas K (1MV17EC031)
Dhananjaya B R (1MV17EC036)
Jashwanth K S (1MV17EC045)
Jayanth M B (1MV17EC046)
Under the guidance of
Ms. Krishnapriya S Sharma
Associate Professor
Department of Electronics and Communication Engineering
Table of Contents
INDEX SLIDE NO.
INTRODUCTION 3-4
OBJECTIVES 5
PROBLEM STATEMENT 6-7
LITERATURE SURVEY 8-9
DESCRIPTION OF COMPONENTS 10-16
NECESSARY LIBRARY ADDED TO Arduino IDE 17
METHODOLOGY 18-19
FLOWCHART 20
BLOCKDIAGRAM 21
ALGORITHM 22-23
SYSTEM ARCHITECTURE 24
CURRENT STATUS OF THE PROJECT 25
EXPECTED RESULT 26
REFERENCES 27
CONCLUSION 28
INTRODUCTION
1. Agriculture contributes 15 to 16% to the country’s GDP [Gross Domestic Product].
2. Agriculture is affected by numerous temporary changes such as climate, soil erosion
by flood, growing the same crop again and again without scientific farming, growing
a crop which is not suitable for a particular soil etc.
3. Adapting smart farming gives results like less wastage of water, an increase in the
quality and yield of crops , and reduced usage of resources.
4. The soil monitoring system for agriculture is a new system that uses parameters such
as moisture, environment temperature, humidity, ground temperature, soil PH,
nutrient monitor etc. 
5. The usage of IoT devices in agriculture helps in the modernizing of information and
communication in smart farming.
6. IoT helps in monitoring the field from any geographic location whenever necessary
7. Implementing IoT in agriculture utilizes sensors and microcontrollers to make use of
the system efficiently, where sensors have the potential to get a large amount of
field information.
8. The key parameters that can be considered for better growth of crops are soil types,
soil moisture, mineral nutrients, temperature, light, oxygen, weather and so on.
9. IoT helps in providing a better yield of the crop which improves productivity. To
monitor the crop in the agriculture field with improved productivity it is necessary to
know the condition of the soil in the field.
10. Automation in agriculture helps to adopt new technology by replacing old traditional
technology with less human interaction which helps in increasing the production
rate.
OBJECTIVES

 To implement  IoT Based Soil Moisture & Nutrient Monitoring decision


system using NodeMCU ESP32.
 In this project, a Soil Moisture & Nutrient Monitoring decision system is proposed in
which the farmer will be able to monitor soil moisture, soil temperature, and soil
nutrient content like Nitrogen, Phosphorous & Potassium.
 The farmer can monitor all these parameters wirelessly on a mobile phone or the PC
System.
 In addition to this an automated system has been developed for the controlled
addition of fertilizers in order to avoid excess or deficient fertilizers in the soil.
PROBLEM STATEMENT
 Usually, Agriculture is affected by numerous temporary changes such as climate, soil
erosion by flood, growing the same crop again and again without scientific farming,
growing a crop which is not suitable for a particular soil etc.
 Basically, the human interference is very much required to monitor the moisture
content of the soil for watering.
 Most of the farmers choose to approximate the amount of fertilizers and add them
manually. However, addition of fertilizers in right amount is a matter of great
importance as excess or insufficient addition can harm the plant life and reduce the
yield.
 Many farms around the world - particularly those in developing countries are small,
comprising of only a few acres. These smallholder farmers continue to follow
conventional farming practices and often face the brunt of high crop losses, low yield,
inferior quality of farm produce etc.
 Conventional methods like crop investigation and soil analyses are very time
consuming. So the agricultural system in India should be advanced to reduce the
efforts of the farmers.
LITERATURE SURVEY
1. Abdullah Na , William Isaac , Shashank Varshney , Ekram Khan[1] made a research and concluded that
Remote monitoring of soil parameters is an emerging trend which has the potential to transform
agricultural practices and increase productivity. In addition to this characterisation of soil is mainly
dependent on soil parameters like pH value , temperature and moisture content.

2. Amrutha A, Lekha R, A Sreedevi [2] concluded that whole process of soil testing for all the measurement
of the macronutrients requires a maximum 30-40minutes after which the field can be fertilized. In
addition, it automates the process of addition of fertilizers thereby reducing the time and manual labour
required . The system is a prototype as the containers to hold the fertilizers are small. If the system is to
be scaled for use in larger farms, containers of appropriate size are to be designed with a capacity of a
few quintals.

3. G.PRAKASH , M.VISHNU VIGNESH [3]will leads to huge number of data collection and better planning
towards farming. Within near future portable device can be developed for every farmer in very low cost
and easy to use mobile application.
4. A.M.Ezhilazhahi and P.T.V.Bhuvaneswari [4]This paper provides implementation of WSN based soil
moisture monitoring system. As WSN is battery operated to enhance the lifetime . EWMA event
detection algorithm is used which generate events only when threshold conditions is met . Rest of the
time, the nodes are in sleep state which can save their energy . This work can also be further extended
by considering more than one sensor module.

5. CHANDHINI. K[5]concluded that the agricultural products quality can be improved because farmers
observe whole cycle from seeding to selling using this IOT based agricultural production system. The
production system can be improved to support more types of products and provide more services . By
taking advantage of IOT technology, the efficiency of agricultural production can get a significant
improvement. With constantly improving, agriculture IOT must be able to lead agriculture production
to a new era
COMPONENT NAME DESCRIPTION QUANTITY FIGURE

NodeMCU ESP32 1

NPK Sensor JXIOT Soil NPK Sensor 1

Soil Moisture Sensor Capacitive Soil Moisture 1


Sensor v2.0

Modbus Module MAX485 Modbus 1

Temperature Sensor DS18B20 Waterproof 1


Temperature Sensor
COMPONENT NAME DESCRIPTION QUANTITY FIGURE
pH sensor - 1

Relay - 4

Solenoid valve - 4

Resistor 4.7K Resistor 1 -

Power Supply 9V - 12V DC Supply 1 -

Connecting Wires Jumper Wires 20 -

Breadboard - 1 -
SOFTWARE USED
SOFTWARE NAME VERSION

Proteus 8 Professional with Advanced v8.9 SP2 [Build 28501] with Advanced
Simulation Simulation

Arduino IDE v.1.8.13


DETAILED DESCRIPTION OF COMPONENTS
NodeMCU ESP32

• ESP32 Board (ESP32 ESP-32S Development Board (ESP-WROOM-32))


• ESP32 is a series of low-cost, low-power system on a chip microcontrollers with
integrated Wi-Fi and dual-mode Bluetooth.
• The ESP32 series employs a Tensilica Xtensa LX6 microprocessor in both dual-
core and single-core variations and includes built-in antenna switches, RF balun,
power amplifier, low-noise receive amplifier, filters, and power-management
modules.
• ESP32 is created and developed by Espressif Systems, a Shanghai-based Chinese
company, and is manufactured by TSMC using their 40 nm process. It is a
successor to the ESP8266 microcontroller.
NPK sensor – JXIOT

1. The soil NPK sensor is suitable for detecting the content of nitrogen,


phosphorus, and potassium in the soil. It helps in determining the fertility of
the soil thereby facilitating the systematic assessment of the soil condition.
2. The sensor can be buried in the soil for a long time. It has a High-quality
probe, rust resistance, electrolytic resistance, salt & alkali corrosion
resistance, to ensure the long-term operation of the probe part.
3. Therefore, it is suitable for all kinds of soil. It is suitable for the detection of
alkaline soil, acid soil, substrate soil, seedling bed soil & coconut bran soil.
Capacitive soil moisture sensor

• capacitive moisture sensor works by measuring the changes in capacitance caused by the water changes in
the dielectric. It does  not measure moisture directly (pure does not conduct electricity well),  instead it
measures the ions that are dissolved in the moisture  These ions and their concentration can be affected by a
number of factors, for example adding fertilizer for instance will decrease the resistance of the soil.
• Capacitive measuring basically measures the dielectric that is formed by the soil and the water is the most
important factor that affects the dielectric.
DSP 18B20 Waterproof Temperature Sensor

• Soil temperature sensor, DS18B20, is a commercially available, digital, high precision, and water proof sensor.
• It uses 12 bits to encode soil temperature and so, even the slightest soil temperature variation can be
detected accurately.
pH sensor

A pH sensor helps to measure the acidity or alkalinity of the water with a value between 0-14.
When the pH value dips below seven, the water starts to become more acidic. Any number
above seven equates to more alkaline. Each type of pH sensor works differently to measure
the quality of the water.
Relay

Relay is also a switch that connects or disconnects two circuits. But instead of manual
operation a relay is applied with electrical signal, which in turn connects or disconnects
another circuit. Relays can be of different types like electromechanical, solid state.
Electromechanical relays are frequently used
NECESSARY LIBRARY ADDED TO Arduino IDE
1. NRF24L01 Library
This library is designed to be maximally compliant with the intended operation of the nRF24L01 2.4GHz Wireless
Transceiver Module. This chip uses the SPI bus, plus two-chip control pins.

2. RH24 Library
This is the RadioHead Packet Radio library for embedded microprocessors. It provides a complete object-oriented library
for sending and receiving packetized messages via a variety of common data radios and other transports on a range of
embedded microprocessors.

3. One Wire Library


The OneWire library lets you access 1-wire devices made by Maxim/Dallas, such as DS18B20 Temperature sensors.
OneWire requires a single 4.7K pull-up resistor, connected between the pin and your power supply.

4. Dallas Temperature Sensor Library


This is the Arduino Library for Maxim Temperature Integrated Circuits. This library supports DS18B20, DS1822, DS1820 &
MAX31820. The Dallas 1-Wire protocol is somewhat complex and requires a bunch of code to parse out the
communication.
The Dallas Temperature Sensor Library can issue simple commands to get temperature readings from the sensor.
METHODOLOGY
• Plants are dependent on environmental factors that frequently change from time to time and place to place.
• Heterogeneous IoT devices such as sensors and NodeMCU ESP32 help to identify the parameters of soil.
• The proposed scheme works as follows:
1) Every sensor senses the related soil parameters and sends it to the NodeMCU .
2)Based on the data provided by the NPK sensor , amount of fertilizer is estimated in the soil.
2) The sensed information is sent to ThingSpeak Cloud through NodeMCU .
3) The live data received from sensors are stored in cloud.
4) Stored data is classified and analyzed using classification algorithm at ThingSpeak cloud.
5) The data such classified which fall beyond threshold values are analyzed and an notification is sent to
the user to perform necessary actions.
6)The data received from the NPK sensor , which fall beyond threshold values are analysed and automatic
dispensation of fertilizers takes place through the help of relays.

• Algorithm for Smart Irrigation System for water dispense in Agriculture


1: Begin
2: Sensors senses data Sm and Sgt
3: Node MCU sends the sensed data to ThingSpeak cloud
4: Data processing in ThingSpeak
5: for i=1 to n
6: {
7: if (Sm <= Mth) && (Sgt>=GTth) *
8: Classified as HIGH;
9: else
10: Classified as LOW;
11: end if
12: }
13: if (Classification = HIGH)
14: Send notification to switch on motor
15: else
16: Store values in DS
17: End
• Data’s sensed by the sensors is sent to NodeMCU and real time values are updated to the ThingSpeak IoT
platform cloud. Where classification algorithm is preferred on the data obtained discreetly and classified based
on threshold value. All values falling above threshold value should be considered for action and for values falling
below threshold value can be stored in data store for further analysis is explained in the above algorithm.
• Now for our project we have to make a pair of circuits for that. The one circuit is called a Sensor Node that is
made using the NodeMCU Board & some sensors along with the NRF24L01 Transceiver Module.
For the gateway part, we use ESP32 WIFI Module along with the NRF24L01 Transceiver Module. The Sensor
Node Sends the data to the Gateway & the Gateway uploads the data to the Thingspeak Server.
FLOWCHART

Fig. Control algorithm for estimation of nitrogen and addition of urea


BLOCKDIAGRAM

Fig. Block diagram of the proposed system


ALGORITHM
Algorithm for Smart Irrigation System for fertilizer dispenser in Agriculture

• It consists of three main parts: sensor system,microcontroller, dispensary system.


• The control system estimates the amount of fertilizers to be added based on the results of soil test
• Depending on the amount of nutrient present, the fertilizer is estimated and added accordingly
• Maintenance dosage is the quantity of fertilizer that is added as a supplement when the nutrient present is
absorbed by the crops during various stages of its growth to maintain balance i.e. when the nutrient levels are
within the optimum levels.

Algorithm:
• Implemented for estimation of nitrogen, and subsequent addition of urea by controlling the turn ON time of the
valve, where t0 is the valve opening time in seconds to add maintenance dosage of urea i.e. when the nutrient
levels are within the limits; t0-t1 is the reduced valve opening time in seconds corresponding to high Nitrogen
levels, t0+t2 is the increased valve opening time in seconds corresponding to very low Nitrogen levels.
• Similar control algorithm is implemented for estimation and addition of MOP and TSP fertilizers.
Addition of urea (to supplement Nitrogen)
• The Nitrogen present in one hectare is 40kg/acre ≡ 98.84kg/ha. For a field of area 1ha, the lower threshold level for N=
280 kg (from Table I). Hence, it can be said that Nitrogen is deficient. The equation to estimate Nitrogen to be added is
described by Table I .
• In the above scenario, it can be estimated to be 100 + 0.25 x 100 = 125 kg of nitrogen. Urea contains 46% N, hence
weight of urea to be added to avail 125kg of available nitrogen is found to be 271.74kg
SYSTEM ARCHITECTURE
pH Sensor CLOUD 1. Input data are taken by the sensor from the external
environment.
Capacitive Soil 2. Sensors are controlled by NodeMCU microcontroller.
Moisture 3. Every data is sensed discretely by sensors and
Sensor v2 stores same to the cloud for further analysis.
Send 4. The threshold value of soil parameters is
JXIOT Soil NodeMCU considered to predict suitability.
Message to
NPK Sensor ESP32 5. Message is sent to the user to take further actions
User
based on prediction
DS18B20
Temperature
Sensor Soil parameters Threshold value
Moisture 30-80%
Temperature 18-40°C
The parameter for the soil varies from place to (atmosphere)
place and time to time. Few parameters are considered in
this work to predict the soil status. Humidity 45-70%
Soil temperature 20-40°C
pH 3-8
CURRENT STATUS OF THE PROJECT
1. Before we restricted our project just to calculate the values of nitrogen, phosphorus, and potassium (NPK) nutrients 
    of soil, but now if there is any deficiency in the nutrient we are using a control system that estimates the amount of 
      fertilizers to be added depending on the amount of nutrient
present.

2. We have developed all the visualization and widgets in


ThinkSpeak cloud, once we connect the devices to the cloud we
can get the results here.

3.  Since Solar energy is a renewable energy source. We are switching


our working to a wireless power source

4.  Due to the unavailability of equipment's we are working on Proteus 


      software to simulate the design. Once we get the equipment we
will apply the same principle to the devices.

Fig. ThinkSpeak visualization and widgets


EXPECTED RESULT
This are the expected results which are obtained from various resources for WHEAT growth
1. Temperature : The optimum temperature should be from 21-24°C.
2. Soil pH : As per reports Wheat grows best when the soil pH is between 6.0 – 7.0 .
3. Humidity : The wheat plants require medium (50-60%) humidity for their growth.
4. NPK values : The nitrogen, phosphorus and potassium doses of 100, 20 and 60 kg ha-1,
respectively were optimum for the maximum yield of wheat under
irrigation by water . If there is excess dosage of NPK to the soil , then it
has negative effects on wheat production.
REFERENCES
[1] Amrutha A, Lekha R, A Sreedevi ." Automatic Soil Nutrient Detection and Fertilizer Dispensary System “
International Conference on Robotics: Current Trends and Future Challenges (RCTFC) (2016)
[2] Abdullah Na , William Issac , Shashank Varshney , Ekram Khan. “An IOT Based System for Remote Monitoring
of Soil Characteristics." 2016 International Conference on Information Technology (IncCITe)- The Next Generation
IT Summit(Confluence).
[3] Lokhande, Kalyani, et al. "IOT based Automatic Farm Monitoring." (2019).
[4] Guchhait, Prasun, Pranav Sehgal, and Vidyadhar J. Aski. "Sensoponics: IoT-Enabled Automated Smart
Irrigation and Soil Composition Monitoring System." Information and Communication Technology for Sustainable
Development . Springer, Singapore, 2020. 93-101.
[5] Shah, Kritika, et al. "Proposed Automated Plant Watering System Using IoT." Available at SSRN 3360353
(2019).
[6] More, Abhishek, et al. "Soil Analysis Using Iot." Available at SSRN 3366756 (2019).
[7] Rajalakshmi, P., and S. Devi Mahalakshmi. "IOT based cropfield monitoring and irrigation automation." 2016
10th International Conference on Intelligent Systems and Control (ISCO). IEEE, 2016.
[8] Bhanu, K. N., T. Bhaskara Reddy, and M. Hanumanthappa. "Multi-agent based context aware information
gathering for agriculture using wireless multimedia sensor networks."Egyptian Informatics Journal 20.1 (2019):
33-44.
CONCLUSION
 By using IoT and data based decisions and by predicting the implications of each and every decision, a
farmer can reap high profits and use his field more efficiently.
 This is a means of assisting farmers in optimizing yield, minimizing input costs and reducing environmental
impact on crop growth.
 Therefore, the drawbacks of the traditional system will be removed successfully by the use of IOT not only
in India, but for all the farmers around the world.
THANK
YOU

You might also like