📋 Overview
This capacitive soil moisture sensor measures the relative moisture content of soil and outputs a corresponding analog DC voltage between 0V (dry) and 3V (saturated/wet). Unlike older resistive moisture probes, this sensor uses capacitive sensing technology — the two exposed copper traces on the sensor board form a capacitor whose capacitance changes with the moisture level of the surrounding soil. Because there is no bare metal in direct, continuous contact carrying current through the soil, this sensor resists the corrosion that shortens the life of resistive sensors.
The board includes an onboard voltage regulator, so it accepts a wide supply range of 3.3V to 5.5V DC, making it compatible with 3.3V boards (like many ESP32 and ESP8266 boards) as well as standard 5V Arduino boards (like the Uno, Nano, and Mega). It uses the common 3-pin PH2.0 sensor connector, and a 20 cm (8 inch) 3-conductor Dupont cable is included so you can connect it straight to your microcontroller's header pins.
💡 Good to know: This sensor's output voltage always stays between 0V and 3V, even when powered from 5V. On a standard 5V Arduino Uno/Nano (10-bit ADC, 0–1023 reading range), that means your raw analogRead() values will realistically top out around 600–650, not 1023. This is normal — see the Calibration section below.
⭐ Key Features
- Analog Output (0–3V): A clear, easily readable voltage output ranging from 0V (dry) to 3V (saturated), for precise moisture level monitoring.
- Wide Voltage Range (3.3V–5.5V VCC): An onboard voltage regulator keeps operation stable across a broad supply range, so it works with most common microcontrollers and power sources.
- Capacitive Sensing Technology: Measures moisture using capacitance rather than direct resistive contact, which minimizes corrosion and extends the sensor's usable life versus traditional resistive probes.
- Arduino Compatibility: Connects to Arduino and other microcontrollers through the standard 3-pin sensor interface.
- Includes Connection Cable: Ships with a 20 cm, 3-conductor Dupont cable so you can wire it up right out of the box.
- Durable and Reliable: Built for long-lasting performance, even in challenging soil conditions.
📊 Specifications
| Supply Voltage (VCC) | 3.3V–5.5V DC |
| Analog Output Voltage | 0–3.0V DC (0V = dry, 3V = saturated) |
| Sensing Technology | Capacitive |
| Connector Interface | PH2.0, 3-pin |
| Included Cable Length | Approx. 20 cm (7.9 inches) |
| PCB Dimensions | Approx. 99 × 23 mm (3.9 × 0.9 inches) L × W |
📌 Pinout / Pin Diagram
The sensor board has 3 pins, usually labeled on the silkscreen as follows:
- VCC — Power input, 3.3V to 5.5V DC
- GND — Ground
- AOUT — Analog voltage output (0–3V), connect to an analog input pin on your microcontroller
🔌 Wiring / Connections
Wiring this sensor to an Arduino Uno (or similar 5V board) is straightforward:
- Sensor VCC → Arduino 5V (or 3.3V pin on a 3.3V board)
- Sensor GND → Arduino GND
- Sensor AOUT → Arduino analog input, e.g. A0
Use the included 3-conductor Dupont cable to connect the sensor's 3-pin PH2.0 header to your Arduino's header pins — no soldering required.
🚀 Getting Started
- Wire the sensor to your Arduino as shown above.
- Open the Arduino IDE and upload the sample sketch below.
- Open the Serial Monitor (set to 9600 baud) to view live readings.
- Insert the sensing portion of the probe (the two copper pads) fully into dry soil and note the reading.
- Insert the probe into thoroughly saturated/wet soil (or a cup of water, keeping the electronics above the waterline) and note that reading.
- Use those two values to calibrate your code, as described in the Calibration section below.
💻 Software / Sample Code
// Capacitive Soil Moisture Sensor V1.2 — basic reading example
const int sensorPin = A0;
void setup() {
Serial.begin(9600);
}
void loop() {
int rawValue = analogRead(sensorPin);
Serial.print("Raw ADC Value: ");
Serial.println(rawValue);
delay(1000);
}
Once you've recorded your own dry and wet raw values (see Calibration below), you can convert readings to an approximate moisture percentage:
// Convert raw reading to a 0-100% moisture value
// Replace dryValue and wetValue with YOUR measured readings
const int sensorPin = A0;
const int dryValue = 600; // raw reading in dry air/soil
const int wetValue = 280; // raw reading fully submerged in water
void setup() {
Serial.begin(9600);
}
void loop() {
int rawValue = analogRead(sensorPin);
int moisturePercent = map(rawValue, dryValue, wetValue, 0, 100);
moisturePercent = constrain(moisturePercent, 0, 100);
Serial.print("Moisture: ");
Serial.print(moisturePercent);
Serial.println("%");
delay(1000);
}
🔧 Calibration
Because capacitive sensors vary slightly from unit to unit, and because soil composition affects readings, you should always calibrate each sensor to your own soil rather than relying on values from someone else's project.
- Dry reading: With the sensor completely dry (in open air or bone-dry soil), run the basic sketch above and record the raw ADC value shown in the Serial Monitor.
- Wet reading: Submerge the sensing portion of the probe in water (keep the black electronics housing above the waterline) and record the raw ADC value.
- Plug those two numbers into the
dryValueandwetValueconstants in the second sketch above.
💡 Tip: Readings will typically go down as soil gets wetter, since more moisture increases capacitance. Always calibrate with your own sensor and soil type — sandy, clay, and potting soils all hold moisture differently, which shifts the raw values you'll see.
🚫 Limitations
- Not waterproof — the electronics portion of the board must stay above the soil/waterline. Only the sensing traces should be buried or submerged.
- Output is capped at approximately 3V regardless of supply voltage, so on a 5V Arduino your raw ADC readings will not reach the full 0–1023 range — this is expected behavior, not a fault.
- Like all capacitive moisture sensors, absolute accuracy varies with soil type, salinity, and temperature. It is best used for relative/comparative monitoring (e.g., "wetter than yesterday") rather than a precise scientific moisture percentage unless calibrated against a known reference.
- Not intended for permanent burial in harsh or freezing outdoor conditions without additional protection for the connector and cable.
🎯 Applications
- Garden automatic irrigation systems
- Soil moisture detection and logging
- Intelligent/smart agriculture systems
- Houseplant and greenhouse monitoring
- DIY automation and IoT projects
🏪 Where to Buy
Buy the Capacitive Soil Moisture Sensor at Envistia Mall.
Buy Now
- 📦 Fast US Shipping
- 🔄 Hassle-Free Returns
- 📧 Responsive Customer Support
Disclaimer
This guide is provided for general educational and informational purposes to help you set up and use this product. It is not a substitute for professional engineering advice. Always follow proper electrical safety practices when working with electronic components, including working with low-voltage DC power only and keeping electronics away from moisture and liquids beyond the intended sensing portion of this probe. Envistia LLC (dba Envistia Mall) is not responsible for any damages, losses, or injuries resulting from the use, misuse, or modification of this product. Specifications, wiring, and code examples in this guide are based on manufacturer data and community-tested practices, and are subject to change without notice. Always test your specific setup safely before deploying it in a live application.