Professional Documents
Culture Documents
Rain Sensor Module PDF
Rain Sensor Module PDF
Description
The rain sensor module is an easy tool for rain detection. It can be used as a
switch when raindrop falls through the raining board and also for measuring rainfall
intensity. The module features, a rain board and the control board that is separate for
more convenience, power indicator LED and an adjustable sensitivity though a
potentiometer.
Specifications
Pin Configuration
1
2
3
4
1. VCC: 5V DC
2. GND: ground
3. DO: high/low output
4. AO: analog output
Wiring Diagram
12 34
Schematic Diagram
Sample Sketch
void setup(){
Serial.begin(9600);
pinMode(2, OUTPUT);
}
void loop(){
//analog output
if(analogRead(0)<300) Serial.println("Heavy Rain");
else if(analogRead(0)<500) Serial.println("Moderate Rain");
else Serial.println("No Rain");
// //digital output
// if(digitalRead(2) == HIGH) Serial.println("No Rain
Detected");
// else Serial.println("Rain Detected");
delay(250);
}
How to Test
The serial monitor shows the results when the raining module was
soaked with water. Based on the amount of water, the analog output can
read different levels of amount of water drop.