DIY ARDUINO RAIN DETECTOR

About: Sourya Choudhury is a 14 year old student and an electronics enthusiast living in Kolkata, India.

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!!!!!

Share

    Recommendations

    • Optics Contest

      Optics Contest
    • Make it Glow Contest 2018

      Make it Glow Contest 2018
    • Plastics Contest

      Plastics Contest

    3 Discussions

    0
    None
    Jtilley84

    5 months ago on Step 4

    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?

    2 replies
    0
    None
    Sourya ChoudhuryJtilley84

    Reply 5 months ago

    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........

    0
    None
    Jtilley84Sourya Choudhury

    Reply 5 months ago

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