Zbotic Logo Zbotic Logo
  • Home
  • Shop
  • Sale
  • 3D Print Service
  • PCB Service
  • B2B
  • Blogs
  • Contact Us
0 0

View Wishlist Add all to cart

0 0
0 Shopping Cart
Shopping cart (0)
Subtotal: ₹0.00

View cartCheckout

  • Shop
  • About Us
  • Contact Us
  • Reseller
  • Blogs
020 69134444
1800 209 0998
[email protected]
Help Desk
Facebook Twitter Instagram Linkedin YouTube
Zbotic Logo Zbotic Logo
0 0

View Wishlist Add all to cart

0 0
0 Shopping Cart
Shopping cart (0)
Subtotal: ₹0.00

View cartCheckout

All departments
  • 3D Print Service
  • 3D Printer
  • Batteries & Chargers
  • Development Boards
  • Drone Parts
  • EBike parts
  • Sensor Modules
  • Electronic Components
  • Electronic Modules
  • IoT and Wireless
  • Mechanical Parts and Workbench Tools
  • Motors & Drivers & Pumps & Actuators
  • DIY and Robot Kits
  • Show more
  • Home
  • Shop
  • Sale
  • 3D Print Service
  • PCB Service
  • B2B
  • Blogs
  • Contact Us
Return to previous page
Home Sensors & Modules

Rain Sensor and Raindrop Detection Module: Arduino Guide

Rain Sensor and Raindrop Detection Module: Arduino Guide

April 1, 2026 /Posted by / 0

A rain sensor module detects the presence of water droplets on its surface, giving Arduino a simple signal to trigger actions — close a window, retract an awning, pause outdoor irrigation, or log rainfall events. The module costs about ₹30-50 and uses a pair of interleaved conductive traces on a PCB; when raindrops bridge these traces, resistance drops and the comparator circuit triggers. This guide covers wiring, code, and practical rain-activated automation projects for Indian conditions.

Table of Contents

  • How Rain Sensor Modules Work
  • Wiring and Arduino Code
  • Adjusting Sensitivity
  • Rain-Activated Projects
  • Improving Outdoor Durability
  • Frequently Asked Questions

How Rain Sensor Modules Work

The rain sensor kit has two parts: a sensing pad (PCB with interleaved traces) and a controller board with an LM393 comparator. In dry conditions, resistance between the traces is very high (megaohms). When water droplets bridge the traces, resistance drops to a few kilohms. The controller board provides both an analogue output (proportional to wetness) and a digital output (above/below threshold set by the onboard potentiometer).

Specifications

  • Operating voltage: 3.3V-5V
  • Outputs: Analogue (A0) and Digital (D0)
  • Detection area: ~40×55 mm typical
  • Response time: <1 second
🛒 Recommended: Browse rain sensors and weather modules at Zbotic — Rain detection modules with comparator boards for Arduino projects.

Wiring and Arduino Code

Module Pin Arduino Pin
VCC 5V
GND GND
A0 A0 (analogue reading)
D0 D2 (digital threshold)
const int analogPin = A0;
const int digitalPin = 2;
const int buzzerPin = 8;

void setup() {
  Serial.begin(9600);
  pinMode(digitalPin, INPUT);
  pinMode(buzzerPin, OUTPUT);
  Serial.println("Rain Sensor Ready");
}

void loop() {
  int analogValue = analogRead(analogPin);
  int digitalValue = digitalRead(digitalPin);

  Serial.print("Wetness: ");
  Serial.print(analogValue);
  Serial.print(" | Rain: ");

  if (digitalValue == LOW) {
    Serial.println("YES - Rain detected!");
    tone(buzzerPin, 1500, 200);
  } else {
    Serial.println("No rain");
  }

  delay(500);
}

The analogue reading gives you a rough indication of how wet the sensor is. Dry = ~1023, light drizzle = ~600-800, heavy rain = ~200-400, fully wet = ~100-200. The digital output flips to LOW when wetness exceeds the potentiometer threshold.

Adjusting Sensitivity

Turn the potentiometer on the controller board to adjust the digital trigger threshold. Clockwise increases sensitivity (triggers on smaller droplets), counterclockwise decreases it. For Indian monsoon conditions where you want to detect the first few drops before heavy rain starts, set high sensitivity. For dew/condensation rejection, reduce sensitivity so only actual rain triggers the output.

Rain-Activated Projects

1. Automatic Window Closer

Detect rain and activate a linear actuator or motor to close a window. Particularly useful in India where sudden monsoon downpours can soak furniture and electronics near windows. Use a relay module to control a 12V linear actuator.

2. Smart Clothesline Retractor

Indian households commonly dry clothes on outdoor clotheslines or terraces. A rain sensor triggers a motor that pulls the clothesline under a covered area when rain starts. Combine with a DHT22 to also retract when humidity exceeds 90% (indicating imminent rain).

🛒 Recommended: DHT22 Temperature and Humidity Sensor — High humidity (>85%) often precedes rain in Indian monsoon season. Combine with a rain sensor for advance warning.

3. Irrigation System Rain Override

If you have an automatic irrigation system, the rain sensor provides a critical override — don’t water the garden when it’s already raining. Wire the rain sensor’s digital output as an input to your irrigation controller to skip watering cycles during rain.

4. Weather Station Rain Logging

Log rain events with timestamps to an SD card or cloud service. Track rainfall patterns over weeks and months. While the basic rain sensor can’t measure rainfall volume (it’s a yes/no detector), it accurately logs rain duration and frequency.

🛒 Recommended: BMP280 Pressure Sensor — Dropping barometric pressure often indicates approaching rain. Combine with a rain sensor for both prediction and detection.

Improving Outdoor Durability

The standard rain sensor PCB corrodes quickly outdoors because DC current flowing through wet traces causes electrolysis. Solutions:

  • Power the sensor intermittently: Use a digital pin to power the sensor only during readings (every 5 seconds). This dramatically reduces corrosion.
  • Apply conformal coating: Spray a thin layer of silicone conformal coating on the traces. It slows corrosion while still allowing water detection.
  • Mount at an angle (30-45°): Rain collects; excess water drains off. This prevents permanent puddles on the sensor surface that accelerate corrosion.
  • Replace regularly: At ₹30-50 each, budgeting a replacement every 3-6 months for outdoor use is reasonable.
// Power saving: only power sensor during readings
const int sensorPower = 7; // Digital pin to power sensor

void setup() {
  pinMode(sensorPower, OUTPUT);
  digitalWrite(sensorPower, LOW); // Off by default
}

int readRainSensor() {
  digitalWrite(sensorPower, HIGH);
  delay(100); // Allow voltage to stabilise
  int value = analogRead(A0);
  digitalWrite(sensorPower, LOW); // Turn off immediately
  return value;
}
🛒 Recommended: DS18B20 Waterproof Temperature Probe — Measure outdoor temperature alongside rain detection for a complete weather monitoring station.

Frequently Asked Questions

Can the rain sensor measure rainfall amount?

No. It detects the presence of rain (binary yes/no) and rough wetness level (analogue). For rainfall volume measurement, you need a tipping bucket rain gauge — a mechanical device where each “tip” represents a fixed volume (usually 0.2 mm of rainfall). The tipping action can trigger a digital input on Arduino for counting.

How do I prevent false triggers from dew?

Reduce the sensitivity via the potentiometer so that thin dew films don’t trigger the digital output. Alternatively, use the analogue reading with a higher software threshold. Mount the sensor vertically or at a steep angle so dew drips off rather than accumulating.

Will the sensor work during Indian monsoon heavy rain?

Yes — in fact, heavy rain is the easiest condition to detect. The challenge is the sensor staying saturated (permanently wet) during prolonged rain, making it unable to distinguish between rain and wet-but-not-raining conditions. After rain stops, the sensor needs time to dry before it can detect the next rainfall event. Mount it in a semi-sheltered spot where it dries quickly between showers.

Can I use this sensor to detect water leaks indoors?

Yes. Place the sensing pad on the floor near washing machines, water heaters, or under sinks. When water leaks onto the pad, it triggers an alarm. For leak detection, the corrosion issue is less critical since it’s indoors and rarely activated.

Conclusion

Rain sensor modules are among the cheapest and simplest Arduino sensors, but they enable practical automation that’s genuinely useful in Indian conditions — protecting clothes from sudden showers, saving water by pausing irrigation, and logging weather events. At ₹30-50, even if you replace the sensing pad every few months due to outdoor corrosion, it remains one of the most cost-effective sensors in your toolkit.

Get rain sensors and weather monitoring components at Zbotic’s sensor modules store.

Tags: Arduino, Rain Sensor, Sensors, Weather
Share Post
  • Facebook
  • Linkedin
  • Whatsapp
Waveshare Motor Driver for Ard...
blog waveshare motor driver for arduino robot build 612827
blog waveshare imu sensor for flight controller projects 612831
Waveshare IMU Sensor for Fligh...

Related posts

Svg%3E
Read more

Encoder Module: Position and Speed Measurement with Arduino

April 1, 2026 0
A rotary encoder converts the angular position and rotation speed of a shaft into electrical signals that Arduino can count... Continue reading
Svg%3E
Read more

Infrared Obstacle Sensor: Line Follower and Object Detection

April 1, 2026 0
Infrared obstacle sensors are the building blocks of line-following robots, edge detection systems, and proximity triggers. These tiny modules emit... Continue reading
Svg%3E
Read more

LiDAR Sensor TFmini: Distance Measurement Beyond Ultrasonic

April 1, 2026 0
When ultrasonic sensors hit their limits — range too short, accuracy too coarse, outdoor sunlight causing interference — LiDAR sensors... Continue reading
Svg%3E
Read more

Pressure Sensor BMP280: Weather Station and Altitude Meter

April 1, 2026 0
The BMP280 barometric pressure sensor by Bosch measures atmospheric pressure with ±1 hPa accuracy and temperature with ±1°C precision. These... Continue reading
Svg%3E
Read more

Colour Sensor TCS3200: Sorting Machine Project with Arduino

April 1, 2026 0
The TCS3200 colour sensor detects the colour of objects by shining white LEDs onto a surface and measuring the reflected... Continue reading

Add comment Cancel reply

Your email address will not be published. Required fields are marked

Facebook Twitter Instagram Pinterest Linkedin Youtube

Get the latest deals and more.

Download on Google Play Download on the App Store

Call us: 020 69134444 / 1800 209 0998

Monday - Saturday 09:30 AM - 06:00 PM
For Technical Supports Email: [email protected]
For Sales / Enquiries Email: [email protected]

  • My Account

    • Cart

    • Wishlist

    • Checkout

    • My Orders

    • Track Order

    • My Account

  • Information

    • FAQs

    • Blogs

    • Career

    • About Us

    • Contact Us

    • Payment Options

  • Policies

    • Privacy Policy

    • Terms & Conditions

    • GST Input Tax Credit

    • Shipping Return Policy

    • E-Waste Collection Points

    • Our Sitemap

© Zbotic.in is registered trademark of Moxie Supply Pvt Ltd – All Rights Reserved
Login
Use Phone Number
Use Email Address
Not a member yet? Register Now
Reset Password
Use Phone Number
Use Email Address
Register
Already a member? Login Now