

The IDC Moisture Sensor is a versatile electronic component designed to detect the moisture level in soil or other materials. It provides real-time data, making it an essential tool for applications such as automated irrigation systems, agricultural monitoring, and environmental studies. By measuring the conductivity of the material, the sensor determines the moisture content and outputs an analog or digital signal for further processing.








The IDC Moisture Sensor is designed for ease of use and compatibility with a wide range of microcontrollers, including Arduino boards. Below are the key technical details:
| Parameter | Value |
|---|---|
| Operating Voltage | 3.3V - 5V |
| Output Type | Analog and Digital |
| Current Consumption | < 20 mA |
| Dimensions | 60mm x 20mm x 5mm |
| Operating Temperature | -10°C to 60°C |
| Detection Range | 0% (dry) to 100% (fully wet) |
The IDC Moisture Sensor typically comes with three pins for easy interfacing. The pinout is as follows:
| Pin Name | Description |
|---|---|
| VCC | Power supply input (3.3V - 5V) |
| GND | Ground connection |
| OUT | Signal output (analog or digital, depending on mode) |
VCC pin to a 3.3V or 5V power source and the GND pin to the ground of your circuit.OUT pin to an analog or digital input pin on your microcontroller. For analog readings, use an analog input pin. For digital readings, ensure the sensor's onboard potentiometer is adjusted to set the desired threshold.The following code demonstrates how to use the IDC Moisture Sensor with an Arduino UNO to read analog values and display them in the Serial Monitor.
// Moisture Sensor Example Code for Arduino UNO
// Reads analog values from the sensor and displays them in the Serial Monitor.
const int sensorPin = A0; // Connect the OUT pin of the sensor to A0 on Arduino
void setup() {
Serial.begin(9600); // Initialize serial communication at 9600 baud
pinMode(sensorPin, INPUT); // Set the sensor pin as an input
}
void loop() {
int sensorValue = analogRead(sensorPin); // Read the analog value from the sensor
Serial.print("Moisture Level: ");
Serial.println(sensorValue); // Print the moisture level to the Serial Monitor
delay(1000); // Wait for 1 second before taking the next reading
}
sensorValue will range from 0 (dry) to 1023 (fully wet) when using a 10-bit ADC on the Arduino UNO.No Output or Incorrect Readings
Fluctuating Readings
Corroded Probes
Sensor Not Responding
Q: Can the sensor be used with a Raspberry Pi?
A: Yes, the sensor can be used with a Raspberry Pi. However, since the Raspberry Pi lacks analog input pins, you will need an external ADC (Analog-to-Digital Converter) to read analog values.
Q: How do I adjust the digital output threshold?
A: Use the onboard potentiometer to set the desired moisture level threshold. The digital output will toggle when the moisture level crosses this threshold.
Q: Is the sensor waterproof?
A: The sensor probes are designed for insertion into moist materials but are not fully waterproof. Avoid submerging the entire sensor module in water.
Q: How long can the sensor be left in the soil?
A: For short-term projects, the sensor can remain in the soil. For long-term use, consider using corrosion-resistant probes or periodically removing the sensor to prevent damage.
By following this documentation, you can effectively integrate the IDC Moisture Sensor into your projects and ensure reliable performance.