A rain drop sensor on the windowsill plus a buzzer indoors — the instant the first drops fall, you know about it.
What you’ll build
The rain sensor board changes resistance when water bridges its traces. The Arduino Nano reads it on an analog pin, and below the wet threshold it beeps the buzzer and lights the blue LED until the board dries off again.
Components you’ll need
| Component | Qty | Price |
|---|---|---|
| Arduino Nano ATmega328P Compatible Board | 1 | ₹149 |
| Rain Drop Sensor | 1 | ₹199 |
| Active Buzzer | 1 | ₹299 |
| 5mm Blue LED | 1 | ₹49 |
| 220 Ohm 1/4W | 1 | ₹49 |
| 400 Point Breadboard | 1 | ₹299 |
| Total | ₹1,044 |
Step-by-step guide
- Connect the rain sensor’s control board: VCC to 5V, GND to GND, A0 to the Nano’s A0.
- Place the sensing pad outside (window ledge, clothesline pole) angled slightly so water runs off after rain stops.
- Wire the buzzer to D8 and the blue LED to D9 through a 220Ω resistor.
- Upload the sketch and check the dry reading in the Serial Monitor (typically 900+).
- Sprinkle a few drops of water on the pad — the value should fall sharply and the alert fire.
The code
Lower analog values mean more water on the pad. The sketch beeps in short pulses so the alarm is noticeable without being deafening.
const int rain=A0, buzzer=8, led=9;
const int WET = 600; // below this = raining
void setup(){ pinMode(buzzer,OUTPUT); pinMode(led,OUTPUT); Serial.begin(9600); }
void loop(){
int v = analogRead(rain);
Serial.println(v);
if(v < WET){
digitalWrite(led,HIGH);
digitalWrite(buzzer,HIGH); delay(200);
digitalWrite(buzzer,LOW); delay(800);
} else {
digitalWrite(led,LOW);
delay(1000);
}
}Build this project
Add all 6 required components to your cart in one click — total ₹1,044.
Add all components to cart