RAIN DROP SENSOR

by praneep55 in Circuits > Arduino

873 Views, 3 Favorites, 0 Comments

RAIN DROP SENSOR

WhatsApp Image 2022-03-25 at 11.00.06 AM.jpeg
WhatsApp Image 2022-03-25 at 10.49.15 AM.jpeg
  • A simple Rain Detection System can be easily built by interfacing an Arduino with Rain Sensor. The sensor will detect any rainfall falling on it and the Arduino board will sense it and can perform required actions. A system like this can be used in many different fields, such as agriculture and automobile fields. Rainfall detection can be used to automatically regulate the Irrigation process. Also, continuous rainfall data can help farmers use this smart system to automatically water the crop only when absolutely required. Similarly, in the automobiles sector windshield wipers can be made fully automatic by using the rain detection system. And the Home Automation Systems can also use rain detection to automatically close windows and adjust room temperature. In this tutorial, we will build a basic rain sensor using Arduino with a buzzer. You can then use this set-up to build anything you wish on top of it. Also, note that the rain sensor module is also referred to as a raindrop sensor or rain gauge sensor or rainwater sensor based on usage, but they all refer to the same sensor used in this project and they all work on the same principle.

  • The Rain Detector Using Arduino and Raindrop Sensor is used to alert the surrounding when it’s raining outside. The system is controlled with Arduino UNO. If the waterfalls on the Raindrop sensor it detects that it’s raining outside and a led connected with it will glow and alert the surroundings

COMPONENTS REQUIRED

WhatsApp Image 2022-03-25 at 10.46.09 AM.jpeg
WhatsApp Image 2022-03-25 at 11.17.07 AM.jpeg
WhatsApp Image 2022-03-25 at 11.18.31 AM.jpeg
WhatsApp Image 2022-03-25 at 11.21.02 AM.jpeg

Materials Required

Arduino UNO

Rain sensor

Buzzer

Breadboard

Connecting wires

CIRCUIT DIAGRAM

THE CIRCUIT DIAGRAM OF IOT

  • Connect OLED Display pin[VCC] to Arduino pin[5V]
  • Connect OLED Display pin[GND] to Arduino pin[GND]
  • Connect OLED Display pin[SDA] to Arduino pin[SDA]
  • Connect OLED Display pin[SCL] to Arduino pin[SCL]
  • Connect Arduino 5V to piezo buzzer module pin VCC.
  • Connect Arduino GND to piezo buzzer module pin GND

ARDUINO CODE

#define rainfall A0

#define buzzer 5

int value;

int set=10;

void setup() {

Serial.begin(9600);

pinMode(buzzer,OUTPUT);

pinMode(rainfall,INPUT);

}

void loop() {

value = analogRead(rainfall);

Serial.println("LOL");

Serial.println(value);

value = map(value,0,1023,225,0);

Serial.println(value);

if(value>=set){

Serial.println("rain detected");

digitalWrite(buzzer,HIGH);

}

else{

digitalewrite(buzzer,LOW);

}

delay(200);

}

OPERATING PROCEDURE

step1: input :sense the raindrop through sensor

step2: The rain sensor is compared of rain detection plate with a comparator who manages intelligence

step3:connect the comparator has 2 outputs connected to the rain sensor , a digital output (0/1) and an analog output (0 to 1023) . The module is similar to the LM393 IC because it includes the electronic module as well as a PCB

step4:The sensitivity by turning the potentiometer present on the comparator

step5:so the detection can be realize on a drop or in a glass of water

step6:The rain sensor detects water that comes short circuiting the tape of the printed circuit .

step7:The resistance increases when the sensor is wet and the resistance is lower when sensor is dry

step8:output:Detection of the rain in real time

Output

April 6, 2022