

The DFRobot Gravity Analog Capacitive Soil Moisture Sensor is a reliable and durable device designed to measure the volumetric water content in soil. Unlike resistive soil moisture sensors, this capacitive sensor is corrosion-resistant, ensuring a longer lifespan and consistent performance. It outputs an analog voltage that corresponds to the soil's moisture level, making it easy to integrate into various electronic projects.








Below are the key technical details for the DFRobot Gravity Analog Capacitive Soil Moisture Sensor:
| Parameter | Value |
|---|---|
| Operating Voltage | 3.3V - 5.5V |
| Output Voltage Range | 0V - 3.0V (analog signal) |
| Interface Type | Analog |
| Operating Current | < 20mA |
| Measurement Range | 0% - 100% soil moisture |
| Dimensions | 98mm x 23mm x 3mm |
| Weight | 15g |
| Material | Corrosion-resistant PCB |
The sensor has a 3-pin interface for easy connection:
| Pin | Name | Description |
|---|---|---|
| 1 | VCC | Power supply pin (3.3V - 5.5V) |
| 2 | GND | Ground pin |
| 3 | AOUT | Analog output pin that provides the moisture reading |
Connect the Sensor:
Power the Circuit:
Read the Analog Signal:
Below is an example Arduino sketch to read and display soil moisture levels using the sensor:
// Define the analog pin connected to the sensor
const int soilMoisturePin = A0;
// Variable to store the sensor reading
int soilMoistureValue;
void setup() {
// Initialize serial communication for debugging
Serial.begin(9600);
}
void loop() {
// Read the analog value from the sensor
soilMoistureValue = analogRead(soilMoisturePin);
// Map the analog value (0-1023) to a percentage (0-100%)
int moisturePercentage = map(soilMoistureValue, 0, 1023, 0, 100);
// Print the moisture percentage to the Serial Monitor
Serial.print("Soil Moisture: ");
Serial.print(moisturePercentage);
Serial.println("%");
// Wait for 1 second before taking the next reading
delay(1000);
}
No Output or Incorrect Readings:
Fluctuating Readings:
Sensor Not Responding:
Inconsistent Readings in Different Soils:
Q1: Can this sensor be used outdoors?
A1: Yes, but it is recommended to protect the sensor from prolonged exposure to water and extreme weather conditions to extend its lifespan.
Q2: How do I interpret the analog output voltage?
A2: The output voltage decreases as the soil moisture increases. You can map the voltage range to a percentage for easier interpretation.
Q3: Can I use this sensor with a Raspberry Pi?
A3: Yes, but since the Raspberry Pi lacks analog input pins, you will need an ADC (Analog-to-Digital Converter) module to read the sensor's output.
Q4: How deep should I insert the sensor into the soil?
A4: Insert the sensor so that the sensing area is fully covered by soil for accurate readings. Avoid burying the entire sensor to prevent damage to the connector.