DIY ARDUINO RAIN DETECTOR

3.5K54

Intro: DIY ARDUINO RAIN DETECTOR

NOT AGAIN!!!!!!!!!!!!!!!

The clothes which were put out to dry again got wet due to a sneaky drizzle!

Wait! I have found a solution...............

The ARDUINO RAIN DETECTOR!!!!!!!!!!!!!!!!

STEP 1: Parts Required.


The following parts will be required for this project:-

1) Arduino UNO board.

2) A rain sensor.

3) An LED.

4)Jumper wires.

STEP 2: Assembly.

Connect the Arduino pin D9 to sensor pin DO(digital output), gnd to gnd, vcc to 5v, and Arduino pin A0 to AO(analog output).

Connect the LED to Arduino digital pin 13.

STEP 3: Code:-

int a=9;

int b=0;

int c;

int d;

void setup()

{

pinMode(a,INPUT);

pinMode(b,INPUT);

pinMode(LED_BUILTIN,OUTPUT);

Serial.begin(9600);

}

void loop()

{

c=digitalRead(a);

if(c==LOW)

{

digitalWrite(LED_BUILTIN,HIGH);

}

else

{

digitalWrite(LED_BUILTIN,LOW);

}

d=analogRead(b);

Serial.print("Rain Reading=");

Serial.print(d);

Serial.println();

delay(1000);

}

STEP 4: READY!

Hey! Why is that LED over there glowing? 
Opps...Its drizzling! I can't let the clothes get wet!

STEP 5: How Does It Work?

The 'Rain Sensor Module' has a metal plate with two strips of conductive metal which are not connected together.

When drops of rainwater , which is a good conductor of electricity falls on the plate, there is a short - circuit in between the strips and then , the main sensor module receives the feedback and conveys the signal to the Arduino.

Thanks a lot for reading !

P.S. please vote for this project for the microcontroller contest so that I can come up with more awesome projects!!!!!

3 Comments

This is awesome! Have you thought about integrating it with Twitter or something? So that you can send out a tweet automatically in case you're not around to see the LED?

Thanks!

Well, a better way would be to attach a bluetooth module to send a signal to a pc or android phone !

Working on it........

Good luck adding on to the project! Looking forward to seeing what you come up with