Stufin
Home Quick Cart Profile

Rain Drop Sensor Module

Buy Now

Operating Voltage

5V

Operating Current

20mA (typical)

Output Signal

Digital (0V or 5V)

Sensitivity

High sensitivity to detect rain or water droplets

Operating Temperature

-20C to 80C

Humidity

0-99% RH

Dimension

30mm x 20mm x 10mm (L x W x H)

Weight

10g (approx.)

Interface

3-pin connector (VCC, GND, OUT)

Applications

  • Weather stations and monitoring systems
  • Agricultural monitoring and automation systems
  • Smart home automation systems
  • Industrial automation and process control systems
  • IoT-based projects and prototypes

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.

Pin Configuration

  • Rain Drop Sensor Module Documentation
  • Overview
  • The Rain Drop Sensor Module is a highly sensitive and accurate sensor designed to detect rain or water droplets. It's commonly used in IoT applications such as weather stations, smart home automation, and industrial control systems.
  • Pin Description
  • The Rain Drop Sensor Module has 5 pins, each with a specific function. Below is a detailed explanation of each pin:
  • 1. VCC
  • Function: Power Supply
  • Description: This pin is used to provide power to the sensor module. Connect it to a 3.3V or 5V DC power source.
  • Recommended Connection: Connect to the positive terminal of the power supply.
  • 2. GND
  • Function: Ground
  • Description: This pin is used to provide a ground connection to the sensor module.
  • Recommended Connection: Connect to the negative terminal of the power supply or a common ground point in your circuit.
  • 3. DO (Digital Output)
  • Function: Digital Signal Output
  • Description: This pin provides a digital signal output indicating the presence or absence of rain droplets. The output is active low, meaning it will be pulled low (0V) when rain is detected.
  • Recommended Connection: Connect to a digital input pin on your microcontroller or a logic-level shifting circuit if necessary.
  • 4. AO (Analog Output)
  • Function: Analog Signal Output
  • Description: This pin provides an analog signal output that varies in voltage based on the intensity of the rain droplets. The output voltage range is 0V to VCC.
  • Recommended Connection: Connect to an analog input pin on your microcontroller or an analog-to-digital converter (ADC) circuit.
  • 5. S (Signal Output)
  • Function: Signal Output
  • Description: This pin is an alternate signal output that can be used in place of the DO (Digital Output) pin. It provides a digital signal output indicating the presence or absence of rain droplets.
  • Recommended Connection: Connect to a digital input pin on your microcontroller or a logic-level shifting circuit if necessary. Note that this pin is optional and can be left unconnected if not used.
  • Connection Structure
  • When connecting the Rain Drop Sensor Module to your microcontroller or circuit, follow the recommended connection structure:
  • VCC to Power Supply (3.3V or 5V)
  • GND to Power Supply (Ground)
  • DO to Microcontroller Digital Input Pin (or Logic-Level Shifting Circuit)
  • AO to Microcontroller Analog Input Pin (or ADC Circuit)
  • S (Optional) to Microcontroller Digital Input Pin (or Logic-Level Shifting Circuit)
  • Important Notes
  • Make sure to use a suitable power supply and avoid voltages above 5V to prevent damage to the sensor module.
  • Use a 10k pull-up resistor on the DO and S pins if your microcontroller requires it.
  • The sensor module is sensitive to ESD, so handle it with care and avoid static electricity exposure.
  • By following these guidelines, you can successfully integrate the Rain Drop Sensor Module into your IoT project and start detecting rain droplets with accuracy.

Code Examples

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).