5V
5V
20mA (typical)
Digital (0V or 5V)
High sensitivity to detect rain or water droplets
-20C to 80C
0-99% RH
30mm x 20mm x 10mm (L x W x H)
10g (approx.)
3-pin connector (VCC, GND, OUT)
Applications
Conclusion
The Rain Drop Sensor Module is a reliable and accurate component for detecting rain or water droplets in various applications. Its high sensitivity, digital output, and low power consumption make it an ideal choice for IoT-based projects and systems.
Rain Drop Sensor Module Documentation
Overview
The Rain Drop Sensor Module is a digital sensor designed to detect raindrops and provide a digital output signal. This module is commonly used in IoT applications such as weather stations, agricultural monitoring systems, and smart home automation. The sensor module is easy to integrate into various microcontrollers and development boards.
Pinouts and Specifications
VCC: 3.3V or 5V power supply
GND: Ground
OUT: Digital output signal (HIGH or LOW)
Sensitivity: Adjustable via potentiometer
Response Time: Typically 10-20ms
Operating Temperature: -20C to 80C
Code Examples
### Example 1: Using the Rain Drop Sensor Module with Arduino
In this example, we will connect the Rain Drop Sensor Module to an Arduino Uno board and read the digital output signal.
```c
const int rainSensorPin = 2; // Connect the OUT pin to digital pin 2 on Arduino
void setup() {
pinMode(rainSensorPin, INPUT);
Serial.begin(9600);
}
void loop() {
int rainState = digitalRead(rainSensorPin);
if (rainState == HIGH) {
Serial.println("Rain detected!");
} else {
Serial.println("No rain detected.");
}
delay(1000);
}
```
### Example 2: Using the Rain Drop Sensor Module with Raspberry Pi (Python)
In this example, we will connect the Rain Drop Sensor Module to a Raspberry Pi and read the digital output signal using Python.
```python
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
rainSensorPin = 17 # Connect the OUT pin to GPIO 17 on Raspberry Pi
GPIO.setup(rainSensorPin, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
while True:
if GPIO.input(rainSensorPin):
print("Rain detected!")
else:
print("No rain detected.")
time.sleep(1)
```
### Example 3: Using the Rain Drop Sensor Module with ESP32 (MicroPython)
In this example, we will connect the Rain Drop Sensor Module to an ESP32 board and read the digital output signal using MicroPython.
```python
import machine
import time
rainSensorPin = 33 # Connect the OUT pin to GPIO 33 on ESP32
rainSensor = machine.Pin(rainSensorPin, machine.Pin.IN)
while True:
if rainSensor.value():
print("Rain detected!")
else:
print("No rain detected.")
time.sleep(1)
```
Note: Make sure to adjust the pin numbers and connections according to your specific development board and setup.
Troubleshooting Tips
Ensure the sensor module is properly connected to the power supply and ground.
Adjust the sensitivity of the sensor module via the potentiometer to optimize the detection threshold.
If the sensor module is not responding, check the connections and ensure the output signal is not inverted (i.e., LOW when rain is detected and HIGH when no rain is detected).