A rain sensor is one kind of switching device which is used to detect the rainfall. It works like a switch and the working principle of this sensor is, whenever there is rain, the switch will be normally closed.

The rain sensor module/board is shown below. Basically, this board includes nickel coated lines and it works on the resistance principle. This sensor module permits to gauge moisture through analog output pins & it gives a digital output while moisture threshold surpasses.


This module uses a PCB  to collect the raindrops. When the rain falls on the board, then it creates a parallel resistance path to calculate through the operational amplifier.

This sensor is a resistive dipole, and based on the moisture only it shows the resistance. For example, it shows more resistance when it is dry and shows less resistance when it is wet.

Pin Configuration

The pin configuration of this sensor is shown below. This sensor includes four pins which include the following.

  • Pin1 (VCC): It is a 5V DC pin
  • Pin2 (GND): it is a GND (ground) pin
  • Pin3 (DO): It is a low/ high output pin
  • Pin4 (AO): It is an analog output pin


  • This sensor module uses good quality of double-sided material.
  • Anti-conductivity & oxidation with long time use
  • The area of this sensor includes 5cm x 4cm and can be built with a nickel plate on the side
  • The sensitivity can be adjusted by a potentiometer
  • The required voltage is 5V
  • The size of the small PCB is 3.2cm x 1.4cm
  • For easy installation, it uses bolt holes
  • It uses an LM393 comparator with wide voltage
  • The output of the comparator is