

The Rain Sensor Module is a device designed to detect the presence and intensity of rain. It consists of a rain detection board and a control module that outputs both analog and digital signals. The module is widely used in weather monitoring systems, automatic windshield wipers, irrigation systems, and other automation projects where rain detection is required.
This sensor is easy to integrate into microcontroller-based systems, such as Arduino, Raspberry Pi, or other development boards, making it a popular choice for hobbyists and professionals alike.








| Pin Name | Description |
|---|---|
| VCC | Power supply input (3.3V to 5V) |
| GND | Ground connection |
| DO | Digital output pin (HIGH when no rain, LOW when rain is detected) |
| AO | Analog output pin (provides a voltage proportional to rain intensity) |
| Pin Name | Description |
|---|---|
| S | Signal pin connected to the control module |
| + | Power supply input (connected to VCC of the control module) |
| - | Ground connection (connected to GND of the control module) |
Connect the Module:
Adjust Sensitivity:
Monitor Outputs:
The following example demonstrates how to use the Rain Sensor Module with an Arduino UNO to detect rain and measure its intensity.
// Define pin connections
const int digitalPin = 2; // Digital output from the sensor
const int analogPin = A0; // Analog output from the sensor
void setup() {
pinMode(digitalPin, INPUT); // Set digital pin as input
Serial.begin(9600); // Initialize serial communication
}
void loop() {
// Read digital output (rain detected or not)
int rainDetected = digitalRead(digitalPin);
if (rainDetected == LOW) {
Serial.println("Rain detected!"); // Print message if rain is detected
} else {
Serial.println("No rain detected."); // Print message if no rain is detected
}
// Read analog output (rain intensity)
int rainIntensity = analogRead(analogPin);
Serial.print("Rain Intensity: ");
Serial.println(rainIntensity); // Print the analog value (0-1023)
delay(1000); // Wait for 1 second before the next reading
}
The sensor is not detecting rain:
The digital output LED is always ON or OFF:
Analog output values are inconsistent:
The module stops working after prolonged use:
Q: Can the Rain Sensor Module detect the amount of rainfall?
A: Yes, the analog output (AO) provides a voltage proportional to the rain intensity, which can be used to estimate the amount of rainfall.
Q: Is the module waterproof?
A: The rain detection board is not fully waterproof and may corrode over time if exposed to rain for extended periods. Consider using a protective coating or enclosure.
Q: Can I use this module with a Raspberry Pi?
A: Yes, the module can be used with a Raspberry Pi. Connect the digital or analog output to the GPIO pins of the Raspberry Pi and use appropriate libraries to read the data.
Q: How do I clean the rain detection board?
A: Use a soft, dry cloth or a slightly damp cloth to gently clean the board. Avoid using abrasive materials or submerging the board in water.