Rain Detection Sensor Module – LM393 Analog & Digital Output
The Rain Sensor Module is an easy-to-use electronic sensor designed to detect rainfall, water droplets, and surface moisture. It is ideal for Arduino, ESP32, and other microcontroller-based projects requiring automatic rain detection.
The module consists of a rain detection plate and an LM393 comparator control board, providing both analog (AO) and digital (DO) outputs. The analog output allows monitoring of changes in moisture levels, while the digital output provides a simple rain/no-rain signal with adjustable sensitivity.
Its compact design, adjustable potentiometer, and mounting holes make it suitable for weather monitoring, smart irrigation systems, automatic rain alarms, and educational electronics projects.
Key Features
-
Rain and Water Detection: Detects water droplets and moisture on the sensing plate.
-
Dual Output: Provides analog (AO) and digital (DO) signals.
-
LM393 Comparator: Provides digital switching based on the selected detection threshold.
-
Adjustable Sensitivity: Onboard potentiometer allows adjustment of the digital detection threshold.
-
LED Indicators: Power and digital detection status indicators.
-
Microcontroller Compatible: Can be connected to Arduino, ESP32, ESP8266, and other compatible controllers.
-
Separate Detection Plate: Allows convenient positioning of the sensing surface.
-
Easy Installation: Mounting holes simplify integration into electronics projects.
-
Low-Cost Solution: Suitable for DIY weather stations and automation projects.
Technical Specifications
| Parameter |
Specification |
| Product Type |
Rain Detection Sensor Module |
| Comparator IC |
LM393 |
| Operating Voltage |
3.3–5V DC |
| Sensor Plate Dimensions |
50 × 40mm |
| Control Board Dimensions |
32 × 14mm |
| Output Types |
Analog (AO) and Digital (DO) |
| Digital Output |
HIGH / LOW |
| Analog Output |
Voltage varies with detected moisture |
| Sensitivity Adjustment |
Onboard Potentiometer |
| Detection Method |
Conductive Rain Sensing Plate |
| Indicator LEDs |
Power and Detection Status |
| Mounting |
PCB Mounting Holes |
| Compatible Controllers |
Arduino, ESP32, ESP8266 and similar microcontrollers |
Pin Configuration
| Pin |
Function |
Connection |
| VCC |
Power Supply |
3.3V or 5V |
| GND |
Ground |
GND |
| DO |
Digital Output |
Microcontroller Digital Input |
| AO |
Analog Output |
Microcontroller ADC Input |
Working Principle
The rain sensor uses a conductive detection plate to identify the presence of water droplets.
When water falls onto the sensing plate, it creates conductive paths between the exposed traces, changing the electrical resistance.
The control board processes this change and generates two output signals:
Analog Output (AO)
Provides a variable voltage corresponding to the conductivity of the sensing plate. It can be connected to an analog input for monitoring relative moisture changes.
Digital Output (DO)
Provides a HIGH or LOW signal based on the threshold set by the onboard potentiometer.
Typical operation:
-
Dry Surface: Digital output HIGH.
-
Water Detected: Digital output LOW.
-
Sensitivity: Adjustable using the onboard potentiometer.
The digital output indicator LED typically activates when moisture exceeds the configured threshold.
Arduino Connection Example
| Rain Sensor |
Arduino UNO |
| VCC |
5V |
| GND |
GND |
| AO |
A0 |
| DO |
D2 |
The analog output can be used to monitor changes in moisture, while the digital output can trigger an alarm or automated response.
ESP32 Connection Example
| Rain Sensor |
ESP32 |
| VCC |
3.3V |
| GND |
GND |
| AO |
GPIO34 (ADC) |
| DO |
GPIO27 |
Important: Power the module at 3.3V when connecting its outputs directly to an ESP32 to avoid exceeding the ESP32's GPIO voltage limits.
Applications
- Rain Detection Systems
- DIY Weather Stations
- Smart Irrigation Projects
- Automatic Window Closing Systems
- Rain Alarm Systems
- Outdoor Weather Monitoring
- Arduino and ESP32 Projects
- Educational Electronics Experiments
- Home Automation Systems
- Water Droplet Detection
Important Notes
- The sensing plate detects water through electrical conductivity; it does not directly measure rainfall in millimeters.
- Analog readings depend on water conductivity, droplet distribution, and sensor condition.
- The digital output threshold can be adjusted using the potentiometer.
- Prolonged exposure to moisture can cause corrosion of the exposed conductive traces.
- Clean and dry the sensing plate periodically for reliable operation.
- The control board is not waterproof and should be protected from direct rain and moisture.
- For permanent outdoor installations, additional weatherproofing and maintenance are recommended.
- The sensor is not designed for precision rainfall measurement.
Package Includes
- 1 × Rain Detection Sensor Plate
- 1 × LM393 Comparator Control Module
- 1 × Connection Cable Set