How To Detect Rainfall Using Rain Sensor?

The world is suffering from unexpected climate changes and these changes are caused by various activities practiced by mankind. When these changes occur the temperature is raised dramatically and it could result in heavy rainfall, floods, etc. Saving water in the responsibility of each an every citizen and if we will not pay attention to preserve this basic necessity of life we will suffer badly shortly. In this project, we will create a rain alarm so that when the rain starts we could do some actions to save water as we could provide that water to plants, we could make some hardware to send that water in the Overhead tank, etc. The rainwater detector circuit will detect the rainwater and generate an alert for the people nearby so that they could take immediate action. The circuit is not very complex and can be prepared by anyone who has some basic knowledge regarding electrical components like resistors, capacitors, and transistors.

Rain Alarm Circuit

How To Integrate Basic Electrical Components For Designing Rainsensor Circuit?

Now, as we have the basic idea of our project, let’s move towards collecting the components, designing the circuit on software for testing and then finally assembling it on hardware. We will make this circuit on a PCB board and then place it at a suitable place so that whenever rain starts we can be notified by the alarm.

Step 1: Components Needed (Hardware)

Step 2: Components Needed (Software)

  • Proteus 8 Professional (Can be downloaded from Here)

After downloading the Proteus 8 Professional, design the circuit on it. We have included software simulations here so that it may be convenient for beginners to design the circuit and make appropriate connections on the hardware.

Step 3: Studying The Components

Now as we have made a list of all the components that we are going to use in this project. Let us move a step further and go through a brief study of all the main hardware components.

Raindrop Sensor: The raindrop sensor module detects rainfall. It works on the principle of Ohm’s Law. (V=IR). When there is no rain the resistance on the sensor will be very high because there is no conduction between the wires in the sensor. As soon as the rainwater starts to fall onto the sensor the conduction path is made and the resistance between wires is reduced. When the conduction is reduced the electric component that is connected to the sensor is triggered and it’s state changes.

Raindrop Sensor

This sensor can also be made at home if we have the PCB board. Those who don’t want to purchase this sensor can make it at home by making a pulse train pattern with the help of a sharp thing like a knife. The diameter of the pulses should be approximately 3 cm and the same pattern can be made as shown in the above picture. I have made this sensor at home and attached the picture below:

Raindrop Sensor Designed At Home

555 Timer IC: This IC has a variety of applications like providing time delays, as an oscillator, etc. There are three main configurations of the 555 timer IC. Astable multivibrator, monostable multivibrator, and bistable multivibrator. In this project, we will use it as an Astable multivibrator. In this mode, the IC acts as an oscillator that generates a square pulse. The frequency of the circuit can be adjusted by tuning the circuit. i.e. by varying the values of capacitors and resistors that are used in the circuit. The IC will generate a frequency when a high square pulse is applied to the RESET pin.

555 Timer IC

Buzzer: A Buzzer is an audio signaling device or a loudspeaker in which a piezoelectric effect is used to produce sound. A voltage is applied to the piezoelectric material to produce an initial mechanical motion. Then the resonators or the diaphragms are used to convert this motion into an audible sound signal. These speakers or buzzers are comparatively easy to use and have a wide range of applications. For example, they are used in digital quartz watches. For ultrasonic applications, the operate well in the range of 1-5 kHz and up to 100 kHz.


BC 548 NPN Transistor: It is a general-purpose transistor that is used for two main purposes mostly (Switching and amplification). The range of gain value for this transistor is between 100-800. This transistor can handle a maximum current of about 500mA hence it is not used in the type of circuit that has loads that operate on larger amperes. When the transistor is biased it allows current to flow through it and that stage is called saturation region. When the base current is removed transistor is off and it goes in fully Cut-off region.

BC 548 Transistor

Step 4: Block Diagram

We have made a block diagram to easily understand the working principle of the circuit.

Block Diagram

Step 5: Understanding The Working Principle

After assembling the hardware we will see that as soon as the water is dropped onto the rain sensor the board will start conducting and as a result both of the transistors will turn ON and hence the LED will also turn ON because it is connected to the emitter of transistor Q1. When the transistor Q2 goes in saturation region the capacitor C1 will behave as a jumper between both of the transistors Q1 and Q3 and it will be charged by resistor R4. When Q3 goes in the saturation region the RESET pin of 555 timer IC will be triggered and a signal will be sent at the output pin 3 of the IC at which the buzzer is connected and hence buzzer will start ringing. When there will be no rain there will be no conduction and resistance of the sensor is very high, hence the RESET pin of IC is not triggered resulting in no alarm.

Step 6: Simulating the circuit

Before making the circuit it is better to simulate and examine all the readings on a software. The software we are going to use is the Proteus Design Suite. Proteus is a software on which electronic circuits are simulated.

  1. After you download and install the Proteus software, open it. Open a new schematic by clicking the ISIS icon on the menu.
    New Schemetic.
  2. When the new schematic appears, click on the icon on the side menu. This will open a box in which you can select all the components that will be used.
    New Schematic
  3. Now type the name of the components that will be used to make the circuit. The component will appear in a list on the right side.
    Selecting Components
  4. In the same way, as above, search all the components. They will appear in the Devices List.
    Component List

Step 7: Making a PCB Layout

As we are going to make the hardware circuit on a PCB, We need to make a PCB layout for this circuit first.

  1. To make the PCB layout on Proteus, we first need to assign the PCB packages to every component on the schematic. to assign packages, right mouse clicks on the component you want to assign the package and select Packaging Tool.
    Assign Packages
  2. Click on the ARIES option on the top menu to open a PCB schematic.
  3. From the Components List, Place all the components on the screen in a design you want your circuit to look like.
  4. Click on the track mode and connect all the pins that the software is telling you to connect by pointing an arrow.
  5. When the whole layout is made, it will look like this:

Step 8: Circuit Diagram

After making the PCB layout the circuit diagram will look like this.

Circuit Diagram

Step 9: Setting Up The Hardware

As we have now simulated the circuit on software and it is working perfectly fine. Now let us move ahead and place the components on PCB. A PCB is a printed circuit board. It is a board fully coated with copper on one side and fully insulating from the other side. Making the circuit on the PCB is comparatively a lengthy process. After the circuit is simulated on the software, and its PCB layout is made, the circuit layout is printed on a butter paper. Before placing the butter paper on the PCB board use the PCB scrapper to rub the board so that the copper layer on board is diminished from top of the board.

Removing The Copper Layer

Then the butter paper is placed on the PCB board and ironed until the circuit is printed on the board (It takes approximately five minutes).

Ironing The PCB Board

Now, when the circuit is printed on the board, it is dipped into the FeCl3 solution of hot water to remove extra copper from the board, only the copper under the printed circuit will be left behind.

PCB Etching

After that rub the PCB board with the scrapper so the wiring will be prominent. Now drill the holes in the respective places and place the components on the circuit board.

Drilling Holes In PCB

Solder the components on the board. Finally, check the continuity of the circuit and if discontinuity occurs at any place de-solder the components and connect them again. It is better to apply hot glue using a hot glue gun on the positive and negative terminals of battery so that the terminals of battery may not be detached from the circuit.

Setting The DMM For Continuity Checking

Step 10: Testing The Circuit

After assembling the hardware components on the PCB board and checking the continuity we need to check whether our circuit is working properly or not we will test our circuit. Firstly, we will connect the battery and then we will drop some water onto the sensor and check whether the LED starts glowing and the buzzer starts ringing or not. If this happens it means that we have completed our project.

Hardware Assembled For Testing


  1. It can be used in the fields to alert farmers about rain.
  2. The most common application is that it can be used in Automobiles so that whenever rain starts the driver turns ON the wipers on listening to the sound of the buzzer.
  3. If some hardware is installed to store the rainwater into the overhead tanks then this circuit is very useful at home because it notifies people living in the house as soon as the rain starts and they can then make proper arrangements to store that water.

Hamza Iqbal

Hey! I am Hamza. I am an Electrical Engineer who has a very innovative approach towards daily life stuff. I tend to make life easier by making circuits and designs to automate things around me. I mainly work with printed circuit boards on proteus to bring life to my inventions.