Soil Moisture Sensors Guide
Circuitkar Team ยท 12 May 2026
Soil Moisture Sensors Guide
Soil moisture sensors are the foundation of smart irrigation projects, but most beginners buy the wrong type and replace it in a month. This guide explains the two sensor types, why one fails quickly, and how to calibrate the good one properly.
Resistive Sensors: Cheap but Short-Lived
The standard two-probe HL-69 resistive sensor (the blue board with two metal probes) works by measuring electrical resistance between the probes. Wet soil conducts better than dry soil, so resistance drops as moisture increases.
The problem: passing DC current through metal probes in soil causes electrolysis. The probes corrode โ rust appears within 2โ4 weeks of continuous use. For a final year project demo that runs for a few days, this works fine. For a deployed garden system running for months, it fails.
Price: โน30โ60. Analog output 0โ3.3V. ADC resolution gives you a 0โ4095 raw reading on ESP32.
Capacitive Sensors: The Right Choice for Deployment
The capacitive soil moisture sensor v1.2 (the long black board with a single probe) measures the dielectric permittivity of the soil. Water has a much higher dielectric constant (~80) than dry soil (~3โ5), so the capacitance between the sensor and soil changes significantly with moisture content. No current passes through the soil โ no electrolysis, no corrosion.
The electronics and probe are coated in a moisture-resistant conformal coating on quality modules. Price: โน80โ150. Analog output. Operating voltage: 3.3Vโ5V. Current: ~5 mA.
Calibration: Essential for Accurate Readings
Raw ADC values are meaningless without calibration. The process:
- Hold the sensor in open air (completely dry). Read and record the ADC value โ call this
DRY_VALUE(typically ~3000โ3500 on a 12-bit ESP32 ADC). - Submerge the sensor to its maximum depth line in water. Read and record โ call this
WET_VALUE(typically ~1200โ1500). - Map:
moisture_percent = map(adc_reading, WET_VALUE, DRY_VALUE, 100, 0)
Calibrate each sensor individually โ values vary between units. Do not submerge the electronics body, only the probe section.
Practical Thresholds for Irrigation
General guidelines (adjust based on plant type):
- Below 30%: soil is dry, trigger irrigation pump
- 30โ60%: optimal range for most plants, no action
- Above 70%: waterlogged, skip irrigation
For vegetable gardens: keep at 40โ60%. For succulents and cacti: allow to drop to 15โ20% before watering. For drip irrigation systems: maintain above 35%.
Wiring Multiple Sensors
If monitoring multiple zones (pots or garden beds), each capacitive sensor needs one analog input pin. The ESP32 has 6 reliable ADC1 pins (GPIO 32โ39) โ you can run up to 6 zones directly.
To power-cycle sensors between readings (reduce current draw and extend sensor life), connect all sensor VCC lines through a P-channel MOSFET or a transistor switched by a GPIO pin. Power sensors only during the reading cycle.
Complete Smart Irrigation Circuit
ESP32 + capacitive soil sensor + 5V relay module + 12V solenoid valve or submersible pump + HLK-PM01 power supply. Add a DHT22 for ambient temperature and humidity, and integrate weather API data to skip irrigation when rain is forecast.
Total component cost for a single-zone system: โน800โ1,200. Find capacitive soil sensors at Circuitkar.
Related Articles
ESP32 for Small Factory Automation: A Practical Starter Guide
How small Indian manufacturers are using ESP32 for basic factory monitoring and control โ real use cases, limitations, and what it costs to get started.
Home Automation Bill of Materials: Complete Component List with Prices
Full BOM for a 3-room smart home โ every component, quantity, price range, and total cost estimate for a DIY home automation installation.
Why Cheap Components Fail and What to Buy Instead
The real reasons why no-name ESP32s, clone sensors, and unbranded relay boards fail โ and how to identify quality components before buying.