0% found this document useful (0 votes)
4 views1 page

Smart Rain Detector Arduino Project

The Smart Rain Detector project utilizes an Arduino Uno and a rain sensor to detect rain, activating a buzzer and LED as alerts. The system can be expanded to automate tasks such as closing windows or turning off irrigation. The provided Arduino code and connection diagram detail the setup and operation of the device.

Uploaded by

akurifayaz2004
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views1 page

Smart Rain Detector Arduino Project

The Smart Rain Detector project utilizes an Arduino Uno and a rain sensor to detect rain, activating a buzzer and LED as alerts. The system can be expanded to automate tasks such as closing windows or turning off irrigation. The provided Arduino code and connection diagram detail the setup and operation of the device.

Uploaded by

akurifayaz2004
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Smart Rain Detector using Arduino

This project detects rain using a rain sensor and alerts the user using a buzzer and LED. It can also
be extended to automatically close windows or turn off irrigation systems.

Components Required:
1. Arduino Uno
2. Rain Sensor Module
3. Buzzer
4. LED
5. Resistor (220 ohm)
6. Jumper wires
7. Breadboard

Working Principle:
The rain sensor detects water droplets. When rain falls on the sensor, it changes resistance.
Arduino reads this signal and activates the buzzer and LED.

Arduino Code:
int rainPin = 2;
int buzzer = 3;
int led = 4;

void setup() {
pinMode(rainPin, INPUT);
pinMode(buzzer, OUTPUT);
pinMode(led, OUTPUT);
}

void loop() {
int rainState = digitalRead(rainPin);

if (rainState == LOW) {
digitalWrite(buzzer, HIGH);
digitalWrite(led, HIGH);
} else {
digitalWrite(buzzer, LOW);
digitalWrite(led, LOW);
}
}

Connection Diagram (Text Representation):


Rain Sensor VCC -> 5V (Arduino)
Rain Sensor GND -> GND (Arduino)
Rain Sensor DO -> Pin 2

Buzzer + -> Pin 3


Buzzer - -> GND

LED + -> Pin 4 (via resistor)


LED - -> GND

Final Output:
When rain is detected, the buzzer sounds and LED glows. When no rain is detected, both remain
off.

You might also like