DIY Soil Moisture Monitoring System with ESP32 2026
Key Takeaway
A DIY soil moisture monitoring system with ESP32 costs ₹2,500-3,500 per node and pays for itself in one season through 30-40% water savings. Capacitive sensors and ESP32 Wi-Fi enable automated irrigation decisions for Indian farmers.
Figure 1: DIY Soil Moisture Monitoring System Architecture
Table of Contents
1. Why Soil Moisture Monitoring Matters
Water is the most limiting factor in Indian farming. Over-irrigation wastes water, energy, and money — typically 30-40% more than needed. Under-irrigation stresses crops and reduces yields. A simple soil moisture monitoring system helps you irrigate just enough.
The typical investment is ₹2,500-3,500 per node — and it pays for itself in one season through water savings alone.
2. Project Overview & Costs
| Component | Purpose | Estimated Cost |
|---|---|---|
| ESP32 Development Board | Microcontroller with Wi-Fi | ₹350-450 |
| Capacitive Soil Moisture Sensor | Measures soil water content | ₹200-300 |
| DS18B20 Temperature Sensor | Measures soil temperature | ₹50-80 + 4.7kΩ resistor |
| Power Supply | Solar or battery | ₹500-1,500 |
| PCB & Connectors | Proper wiring | ₹100-200 |
3. Circuit Diagram & Connections
Connections:
- Capacitive Soil Moisture Sensor:
- VCC → ESP32 5V or 3.3V pin
- GND → ESP32 GND pin
- AOUT → ESP32 GPIO 34 (ADC1_CH6)
- DS18B20 Temperature Sensor:
- VCC → ESP32 5V pin
- GND → ESP32 GND pin
- DATA → ESP32 GPIO 25 (or any GPIO)
- Add 4.7kΩ resistor between VCC and DATA
- Power Options:
- Option A: USB power from power bank (5V)
- Option B: Solar panel (6V-9V) with charge controller
- Option C: 2x 18650 battery holder with 5V step-down module
4. Software & Source Code
Arduino IDE with ESP32 board manager. Required libraries: DallasTemperature, OneWire, Preferences (built into ESP32 Arduino core).
5. Calibration is Critical
- Place sensor in very dry soil → note raw value
- Place sensor in fully saturated soil → note raw value
- Calculate your own map() range: moisturePercent = map(rawMoisture, dry_value, wet_value, 0, 100)
6. Data Visualization Options
- Arduino Serial Monitor (real-time)
- ThingsSpeak free IoT dashboard
- Blynk mobile app
7. Power Options for Remote Farms
| Option | Cost | Pros | Cons |
|---|---|---|---|
| Solar Panel 5W + Charge Controller | ₹800-1,200 | Lifetime power | Higher initial cost |
| Power Bank 10,000mAh | ₹500-800 | Cheap, easy to start | Charge every 2-3 weeks |
| 2x 18650 + Step-down | ₹300-500 | Good balance | Battery replacement 6-12 months |
8. What to Do Next
- Build one node first — test in your field, calibrate the sensor
- Place sensor at root zone — 6-8 inches deep near representative plants
- Set threshold values — e.g., irrigate when moisture < 30%, stop when > 60%
- Add Wi-Fi data sending — start with ThingsSpeak free account
- Build more nodes — one per 2-3 acres, or for different soil types
Related Reading
Sources
- ESP32 Arduino Core: github.com/espressif/arduino-esp32
- DallasTemperature Library: milesburton.com/DallasTemperatureLibrary
- ThingsSpeak Documentation: docs.thingspeak.com
Key Takeaways
- DIY soil moisture monitoring costs ₹2,500-3,500 per node
- Capacitive sensors resist corrosion better than resistive types
- Calibration for your specific soil is mandatory
- 30-40% water savings typical with automated irrigation
- ROI achieved in one crop season for most Indian farms