

The Capacitive Soil Moisture Sensor v1.2 is a reliable and non-invasive device designed to measure the volumetric water content in soil. Unlike resistive soil moisture sensors, this capacitive sensor detects changes in soil capacitance, making it less prone to corrosion and more durable over time. It outputs an analog voltage that corresponds to the soil's moisture level, making it easy to integrate with microcontrollers and other electronic systems.








Below are the key technical details of the Capacitive Soil Moisture Sensor v1.2:
| Parameter | Specification |
|---|---|
| Operating Voltage | 3.3V - 5.5V |
| Output Voltage Range | 0V - 3V (analog signal) |
| Current Consumption | < 20mA |
| Interface Type | Analog |
| Dimensions | 98mm x 23mm |
| Operating Temperature | -40°C to 85°C |
| Moisture Detection Range | 0% - 100% (relative soil moisture) |
The Capacitive Soil Moisture Sensor v1.2 has a 3-pin interface:
| Pin | Name | Description |
|---|---|---|
| 1 | VCC | Power supply pin. Connect to 3.3V or 5V depending on your microcontroller. |
| 2 | GND | Ground pin. Connect to the ground of your circuit. |
| 3 | AOUT | Analog output pin. Outputs a voltage proportional to the soil moisture level. |
VCC pin to a 3.3V or 5V power source and the GND pin to the ground of your circuit.AOUT pin to an analog input pin on your microcontroller (e.g., Arduino UNO).Below is an example of how to use the Capacitive Soil Moisture Sensor v1.2 with an Arduino UNO:
// Define the analog pin connected to the sensor's AOUT pin
const int sensorPin = A0;
// Variable to store the sensor reading
int sensorValue;
void setup() {
// Initialize serial communication for debugging
Serial.begin(9600);
}
void loop() {
// Read the analog value from the sensor
sensorValue = analogRead(sensorPin);
// Map the sensor value to a percentage (0% to 100%)
int moisturePercent = map(sensorValue, 1023, 0, 0, 100);
// Print the raw sensor value and the moisture percentage
Serial.print("Raw Sensor Value: ");
Serial.print(sensorValue);
Serial.print(" | Soil Moisture: ");
Serial.print(moisturePercent);
Serial.println("%");
// Wait for 1 second before the next reading
delay(1000);
}
map() function is used to convert the raw analog reading (0-1023) into a percentage (0%-100%). Adjust the mapping range based on your calibration.Serial Monitor in the Arduino IDE to view the sensor readings in real time.No Output or Incorrect Readings
VCC, GND, and AOUT pins are properly connected.Fluctuating Readings
VCC and GND to stabilize the power supply.Sensor Not Responding
Inconsistent Moisture Levels
Q: Can this sensor be used with a Raspberry Pi?
A: 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.
Q: How do I calibrate the sensor?
A: Measure the sensor's output in dry soil and fully saturated soil. Use these values to adjust the mapping range in your code.
Q: Is the sensor suitable for long-term outdoor use?
A: The sensor is not waterproof and may degrade over time in harsh outdoor conditions. Use protective enclosures and periodic maintenance for long-term use.
Q: Can I use this sensor with a 3.3V microcontroller?
A: Yes, the sensor operates within a voltage range of 3.3V to 5.5V, making it compatible with 3.3V microcontrollers like ESP32 or STM32.