Skip to main content

Rain Drop Detector


RAIN DROP DETECTOR

 This project is used to detect wheather the rain is falling for not. You can use it for your science projects.
FOR VIDEO :

THING'S NEEDED

  1. Arduino UNO R3
  2. Rain Drop Sensor Module
  3. 2 - LEDS
  4. Buzzer

CIRCUIT DIAGRAM

WIRING

SENSOR TO ARDUINO

  • Connect the Vcc Pin of sensor to 5V of Arduino.
  • Connect the GND pin of sensor to GND of Arduino.
  • Connect the AO (analogOutput) of sensor to pin A0 of Arduino.

LED & BUZZER TO ARDUINO

  • Connect the Green LED to pin 2 of Arduino.
  • Connect the Red LED to pin 3 of Arduino.
  • Connect the Buzzer to pin 4 of Arduino.

CODE

// scientist BENIELS LAB
// RAIN DETECTOR

int Sensor_IN = A0; // DEFINING INPUTS
int G_LED = 2; // DEFINING OUTPUTS
int R_LED = 3;
int Buzzer = 4;
// VARIABLE TO STORE SENSOR_IN ANALOG READING'S
int val;

void setup() {
  Serial.begin(9600); // STARTING SERIAL MONITOR
  pinMode(Sensor_IN , INPUT); // SETTING AS INPUT
  pinMode(G_LED , OUTPUT); // SETTING AS OUTPUT
  pinMode(R_LED , OUTPUT); // SETTING AS OUTPUT
  pinMode(Buzzer , OUTPUT); // SETTING AS OUTPUT
  
  // SETTING OUTPUT PIN TO LOW
  digitalWrite(G_LED ,LOW);
  digitalWrite(R_LED ,LOW);
  digitalWrite(Buzzer ,LOW);
}

void loop() {
  val = analogRead(A0);

  if (val < 500) {
    digitalWrite(G_LED , LOW);
    digitalWrite(R_LED , HIGH);
    digitalWrite(Buzzer , HIGH);
  }
  else {
    digitalWrite(G_LED , HIGH);
    digitalWrite(R_LED , LOW);
    digitalWrite(Buzzer , LOW);
  }
}
SUBSCRIBE TO "scientist BENIEL'S LAB" IN YOUTUBE FOR MORE ELECTRONIC'S & ROBOTIC'S PROJECTS.
THANK YOU
















Comments

Popular posts from this blog

Arduno Clock

  Arduino Clock This is a clock using RTC Tiny with Arduino. Using this we can see time & date.  FOR VIDEO :

MQ-5 GAS LEAK DETECTOR

  MQ-5 GAS LEAK DETECTOR  This project is used to detect the gas leak and alert us that the gas is leaking. You can use it for your science projects. FOR VIDEO :

Blutooth Switch (Arduino)

 BLUTOOTH SWITCH (ARDUINO) Hi, Using this we can control leds using Smart Phone via Blutooth. We can also control home appliances using Relay with it. For Video :  CLICK HERE  .