ESP32/IoT B.Tech/Diploma Beginner

IoT Based Soil Nutrient Monitoring with Arduino & ESP32

IoT Based Soil Nutrient Monitoring & Analysis system using Arduino & ESP32 with Wireless Network with Soil Moisture, Temperature & NPK Sensor

  • Suitable forB.Tech/Diploma ESP32/IoT students
  • Build time1-2 weeks
  • LevelBeginner
  • Available atAjvika Labs, Kakinada

About this project

Overview: IoT Based Soil Nutrient Monitoring
In this project, we will learn about
IoT Based Soil Nutrient Monitoring & Analysis systems
using
Arduino
&
ESP32
. Soil is the base of agriculture. Soil provides
nutrients
that increase the growth of a crop. Some
chemical
and
physical
properties of soil, such as its
moisture
temperature
, soil
nitrogen
phosphorous
&
potassium
content heavily affect the yield of a crop. These properties can be sensed by the open-source hardware, and they can be used in the field.
In this project, a
soil Nutrient monitoring & analysis 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.
To measure the Soil Moisture, we will use a
Capacitive Soil Moisture Sensor
. The temperature of the soil can be measured using the
DS18B20 Waterproof Temperature Sensor
. Similarly, in order to measure the Soil NPK Values, we will use a
Soil NPK Sensor
. All these sensors can be easily interfaced with Arduino.
We will use the
Thingspeak Server
to Monitor the data in graphical & numerical format. We need the GSM or WiFi network in the field to send the data to the server. But the agricultural field doesn’t have access to these networks. In order to solve this, we will use the
NRF2401 Wireless transceiver Module
to send the data from sensor Node to Gateway. The data from the
transmitter
can be transmitted wirelessly from a kilometer distance to the Receiver. The
receiver
is built using
ESP32 WiFi Module
, which has access to WiFi Network. Using this WiFi Network, the data can be uploaded to Thingspeak Server.
So, let’s build an
IoT Based Soil Nutrient Content Analysis, Monitoring & Testing System
simply using Wireless Sensors Network, Arduino & ESP32.
Bill of Materials
The Bill of Material for this great IoT Based Project is given below. All the components can be easily purchased from the Amazon.
S.N.
Components Name
Quantity
Purchase Links

Arduino Nano Board

Amazon
AliExpress

ESP32 Board

Amazon
AliExpress

NR24L01 PA+LNA Module

Amazon
AliExpress

NPK Sensor

Amazon
AliExpress

Capacitive Soil Moisture Sensor

Amazon
AliExpress

DS18B20 Temperature Sensor

Amazon
AliExpress

MAX485 Modbus Module

Amazon
AliExpress

Resistor 4.7K

Amazon
AliExpress

9V Power Supply

Amazon
AliExpress

Connecting Jumper Wires

Amazon
AliExpress

Breadboard

Amazon
AliExpress
Sensors Used: Soil Moisture, Temperature & NPK
The project Iot based soil Nutrient Monitoring, Analysis & Testing requires some sensors which are explained in detail below.
Capacitive Soil Moisture Sensor
To measure the
Soil Moisture Level
we need a Soil Moisture Sensor. For this application, a Capacitive type of Soil Moisture Sensor is preferred. We will use an
analog capacitive soil moisture sensor
that measures soil moisture levels by capacitive sensing. It means the capacitance is varied on the basis of water content present in the soil. The measured capacitance is converted into voltage level basically from
1.2V
to
3.0V
maximum. The advantage of Capacitive Soil Moisture Sensor is that they are made of a corrosion-resistant material giving it long service life.
The Capacitive Soil Moisture Sensor v2.0 operates between
3.3V-5.5V
DC voltage. The output is in Analog form up to 3V Maximum. We can convert the
output voltage
into the Percentage value. You can follow our previous detailed tutorial on this sensor here:
Capacitive Soil Moisture Sensor Tutorial
DS18B20 Waterproof Temperature Sensor
This is a pre-wired and
waterproofed version of the
DS18B20 Sensor
used to measure something far away, or in wet conditions. The Sensor can measure the temperature between
-55 to 125°C
(-67°F to +257°F). The cable is jacketed in PVC. These 1-wire digital temperature sensors are fairly precise, i.e ±0.5°C over much of the range. They work great with any microcontroller using a single digital pin.
The sensor requires two libraries like
Dallas Temperature Sensor Library
&
One-Wire Library
. It also requires a
4.7k
resistor, which is required as a pullup from the DATA to the VCC line when using the sensor. To learn more about this sensor you can go through the previous post:
DS18B20 Sensor Tutorial
NPK Sensor
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. The sensor can be buried in the soil for a long time.
The sensor doesn’t require any
chemical reagent
. The sensor has high measurement accuracy, fast response speed, and good interchangeability & can be used with any
microcontroller
. To read the NPK Data you need any Modbus Module like
RS485/MAX485
. The Modbus module is connected to Microcontroller & to Sensor.
The sensor operates on
9-24V
. The accuracy of the sensor is up to within
2%
. The nitrogen, phosphorous & potassium measuring resolution is up to
1mg/kg (mg/l)
. To learn more about this sensor & register addresing check this previous post:
NPK Sensor Tutorial
NRF24L01 Wireless Transceiver Module
The
nRF24L01
is a wireless
transceiver module
, i.e. each module can both send & receive data. It works within the frequency of
2.4GHz
. The modules when operated efficiently can cover a distance of
100 meters
The second version of this module, i.e.
nRF24L01 PA+LNA
comes with an
SMA connector
, duck-antenna & special
RFX2401C chip
which integrates the
PA + LNA
. This range extender chip along with a duck-antenna helps the module achieve a significantly larger transmission range about
1000m
The module operates at
3.3V
but its SPI pins are 5V tolerable. The NRF24L01 module works with the help of
SPI communications
hence you can use NRF24L01 with any microcontroller with SPI Pins like ESP32 WiFi Module or Arduino Boards. To learn more about this NRF24L01 Module, you can check some of our previous posts here:
NRF24L01 Tutorial
Circuit: IoT Based Soil Nutrient Monitoring with Arduino & ESP32
Now, let us go through our project, i.e.
IoT Based Soil Nutrient Monitoring with Arduino & ESP32
. We have to make a pair of circuits for that. The one circuit is called a Sensor Node that is made using the Arduino Nano Board & some sensors along with the
NRF24L01 Transceiver Module
For the gateway part, we used
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.
Sensor Node Circuit
The sensor Node Circuit & connection diagram is given below. The Sensor Node comprises of
Arduino Nano Board, NRF24L01 Transceiver Module, Soil Moisture Sensor, DS18B20 Temperature Sensor & Soil NPK Sensor
The connection between NRF24L01 & Arduino Nano Board is given below.
NRF24L01
VCC
…………………………………………
3.3V
of Arduino
NRF24L01
CSN
…………………………………………

of Arduino
NRF24L01
MOSI
…………………………………………

of Arduino
NRF24L01
GND
…………………………………………
GND
of Arduino
NRF24L01
CE
…………………………………………

of Arduino
NRF24L01
SCK
…………………………………………

of Arduino
NRF24L01
MISO
…………………………………………

of Arduino
Apart from the NRF24L01 Arduino Connections, the Sensor are connected to analog & digital pin of Arduino. The Capacitive Soil Moisture Sensor Analog pin is connected to
A0
of Arduino. Similarly, the DS18B20 sensor is connected to the D5 of Arduino. And the NPK Sensor is connected to Arduino via Modbus Pin to
2,3,7,8
Pin of Arduino. The NPK Sensor works between
9V-24V
. So an extra supply is required for the circuit. The rest of all components can be powered via Arduino
5V/3.3V
Pin.
Gateway Circuit
The IoT based Soil Nutrient Content Analysis & Monitoring also involves the Gateway. The Gateway is designed using
ESP32 WiFi Module
&
NRF24L01
Wireless Transceiver Module.
The connection between ESP32 Board & NR

Technologies used

ESP32ArduinoThingSpeakWiFiBLEGSMDS18B20SPI

Hardware components

  • ESP32
  • Arduino
  • DS18B20
  • Soil Moisture

Software & tools

  • ThingSpeak

What you get

  • Working project / hardware kit, tested before delivery
  • Complete source code with explanation
  • Project demo and guidance for your viva
  • Project report, PPT and IEEE paper support (on request)
Delivery & Payment
Delivery takes a minimum of two weeks from the date your inquiry is confirmed. Payment is in two parts: • 50% advance to start the project • Remaining 50% before delivery Note: • Documentation and PPT are not included by default • If you need documentation/PPT, it can be arranged for extra time and cost We'll confirm the exact timeline and cost with you after reviewing your requirements.