Interfacing Raindrop Sensor with Arduino: Today’s tutorial is about the interfacing of Raindrop sensor with Arduino. The rain sensor module is an easy tool for rain detection. It can be used as a switch when raindrop falls through the raining board and also for measuring rainfall intensity. The module features, a rain board and the control board that is separate for more convenience, power indicator LED and an adjustable sensitivity though a potentiometer. We will divide this tutorial in following sections:

Working Principle of Raindrop Sensor

Pin Configuration

Specifications

Circuit Diagram

Testing the Circuit

Applications

Working Principle of Raindrop Sensor

Raindrop sensor is basically a board on which nickel is coated in the form of lines. It works on the principal of resistance. When there is no rain drop on board. Resistance is high so we gets high voltage according to V=IR. When rain drop present it reduces the resistance because water is conductor of electricity and presence of water connects nickel lines in parallel so reduced resistance and reduced voltage drop across it.

Pin Configuration Raindrop Sensor

It consists of two parts one is a black board with nickel layers on it and other is an intergrated chip provided with some output pins.Board has 2 output pin and chip has 6 pin

Chip pins are

+ – Vcc GND A0 D0

Board Pins are

+ –

Pin configuration is as given in picture

Specifications of Raindrop Sensor

Adopts high quality of RF-04 double sided material.

Area: 5cm x 4cm nickel plate on side.

Anti oxidation, anti-conductivity, with long use time.

Comparator output signal clean waveform is good, driving ability, over 15mA.

Potentiometer adjusts the sensitivity.

Working voltage 5V.

Output format: Digital switching output (0 and 1) and analog voltage output AO.

With bolt holes for easy installation.

Small board PCB size: 3.2cm x 1.4cm.

Uses a wide voltage LM393 comparator.

Circuit Diagram of raindrop sensor interfacing with arduino

Connect as follows

Rain Drop Black Board +ve with Integrated Chip +ve

Rain Drop Black Board –ve with Integrated Chip –ve

Integrated Chip Vcc with Arduino Board +5V

Integrated Chip GND with Arduino Board GND

Integrated Chip D0 with Arduino Board Digital pin 2

Integrated Chip A0 with Arduino Board Analog pin A1

The analog output is used in detection of drops in the amount of rainfall. Connected to 5Vpower supply, the LED will turn on when induction board has no rain drop, and DO output is high. When dropping a little amount water, DO output is low, the switch indicator will turn on. Brush off the water droplets, and when restored to the initial state, outputs high level.When no rain digital output is 1 and analog output gives 1023 max value. When rain is present digital output is 0 and analogue output is much less than 1023. Using potentiometer on chip we can control the turning OFF point of digital pin at some value of analog pin.

Video lecture on raindrop detector project

Testing the Raindrop Sensor

Following components will be used

Arduino Board

Rain sensor module

Pin connectors

USB cable

Follow the steps to run program

Connect the components based on the figure shown in the wiring diagram using pin connectors. VCC pin is connected to the 5V power supply, GND pin is connected to the GND, DO pin is connected to a digital I/O pin and the AO pin is connected to the analog output pin. Pin number will be based on the actual program code. After hardware connection, insert the sample sketch into the Arduino IDE. Using a USB cable, connect the ports from the Arduino to the computer. Upload the program. See the results in the serial monitor

Code for rain drop sensor interfacing with arduino

void setup() { // put your setup code here, to run once: Serial.begin (9600); pinMode (2 , INPUT); } void loop() { // put your main code here, to run repeatedly: int value = analogRead(A1); int digital = digitalRead(2); Serial.println (value); Serial.println (digital); delay(2000); }

Applications: