Why a Capacitive Soil Moisture Sensor?
If you've used a resistive soil moisture sensor before, you've likely seen the probes corrode within weeks. That's because resistive sensors pass a current through the soil via exposed metal probes, causing electrolysis that degrades them in moist soil. The Capacitive Soil Moisture Sensor – Corrosion-Resistant Analog Module avoids this entirely: its sensing electrodes are embedded under a protective coating and never contact the soil directly. This makes it suitable for permanent outdoor burial, automatic plant watering systems, greenhouse controllers, and any long-term soil monitoring project.
Sensor at a Glance
- Capacitive Soil Moisture Sensor – Corrosion-Resistant Analog Module: Capacitive sensing — no corrosion, works for years in soil Unlike resistive sensors, this module can be buried permanently without degrading, making it ideal for long-term projects.

Capacitive Soil Moisture Sensor – Corrosion-Resistant Analog Module - Capacitive Soil Moisture Sensor – Corrosion-Resistant Analog Module: Analogue output — 0–3.3V, reads on any ADC pin The simple analog voltage output connects directly to Arduino, ESP32, or Raspberry Pi GPIO without extra components.
- Capacitive Soil Moisture Sensor – Corrosion-Resistant Analog Module: 3.3V–5V supply — compatible with Arduino, ESP32, Raspberry Pi Works with both 3.3V and 5V logic systems, so you can use it across different microcontroller platforms.
Wiring the Sensor to Your Arduino
The Capacitive Soil Moisture Sensor has three pins: VCC, GND, and AOUT (analog output). Wiring is straightforward.
- Connect VCC: Connect the sensor's VCC pin to the Arduino's 5V or 3.3V output (3.3V–5V supply is supported).
- Connect GND: Connect the sensor's GND pin to any GND pin on the Arduino.
- Connect AOUT: Connect the sensor's analog output pin to any analog input pin on the Arduino (e.g., A0). The output range is 0–3.3V, which is within the ADC input range of most Arduino boards.
Calibrating the Sensor for Accurate Readings
Calibration maps the raw analog voltage to a moisture percentage. Because soil type affects absolute values (clay reads differently from sandy loam at the same moisture content), you need to calibrate for your specific soil.
- Record the dry value: Insert the sensor into completely dry soil and record the raw ADC value. This is your maximum reading (dry soil ~2.8V).
- Record the wet value: Insert the sensor into water and record the minimum ADC value (wet soil ~1.2V). This is your minimum reading.
- Map to percentage: Use the Arduino map() function to convert the raw ADC value to a moisture percentage, mapping the dry endpoint to 0% and the wet endpoint to 100%.
Sample Arduino Code
After calibration, you can read the sensor with a simple sketch. The code below reads the analog voltage on pin A0, maps it to a percentage using your calibrated endpoints, and prints the result to the Serial Monitor. Remember to adjust the dry and wet values to match your calibration readings.
Capacitive vs Resistive: Key Differences
- Capacitive Soil Moisture Sensor – Corrosion-Resistant Analog Module: Capacitive sensors have no exposed conductors — the sensing element is fully encapsulated — so they remain functional for years in permanently buried applications. For long-term outdoor use, capacitive sensors eliminate the corrosion failure point that plagues resistive designs.
- Capacitive Soil Moisture Sensor – Corrosion-Resistant Analog Module: For temporary use or classroom experiments where longevity is not a concern, the resistive soil moisture sensor is the lower-cost option. If you only need readings for a few days or weeks, a resistive sensor may be sufficient and cheaper. But for permanent installations, the capacitive sensor is the better investment.
Practical Considerations
The capacitive sensor's output is analog (0–3.3V), which means you can read it on any ADC pin. No I2C or SPI communication is needed. The sensor operates on 3.3V–5V, so it works with both 3.3V (ESP32, Raspberry Pi) and 5V (Arduino) systems. For best accuracy, calibrate per soil type and re-calibrate if you change soil or sensor placement.
The corrosion-resistant coating makes this sensor suitable for permanent outdoor burial, but ensure the cable connections are also waterproofed if used outdoors long-term. The sensor does not include a digital output or threshold trigger — you'll need to implement any switching logic in your microcontroller code.


