Rain alarm circuit using Arduino uno
CHAPTER 1
INTRODUCTION
1
VDF GOI, LATUR
Rain alarm circuit using Arduino uno
1.1 OBJECTIVE
The objective of this project is to design and implement an automatic rain-detection
alarm system using an Arduino microcontroller. The system aims to:
2 Detect the presence of rain accurately using a rain sensor or moisture-sensing
plate.
3 Provide an immediate alert (buzzer, LED, or message) when rainfall is detected.
4 Help protect outdoor equipment, clothes, or electronics by giving early
warnings.
5 Demonstrate the use of Arduino for real-time environmental monitoring and
automation.
6 Build a low-cost and reliable weather-sensing solution for home or educational use.
6.1
1.2 EXISTING SYSTEM
In the existing systems used for detecting rain, several traditional and basic methods are commonly
followed:
1. Manual Monitoring
Traditionally, people detect rain manually by observing weather conditions. This requires human presence
and continuous attention.
Limitations:
Not reliable or timely
Human-dependent
No automated alert system
2. Mechanical Rain Detectors
Some older rain-detection systems use simple mechanical methods, such as:
Simple buzzers
Limitations:
No processing capability
Cannot integrate with other systems (e.g., motors, IoT, displays)
No flexibility for customization or expansion
2
VDF GOI, LATUR
Rain alarm circuit using Arduino uno
CHAPTER 2
PROJECT DESCRIPTION
3
VDF GOI, LATUR
Rain alarm circuit using Arduino uno
2.1 BASIC BLOCK DIAGRAM
FIG.1 BLOCK DIAGRAM OF THE SYSTEM
2.2 BLOCK DIAGRAM DESCRIPTION
2.2.1) ARDUINO UNO (V3.0)
The block diagram of the rain alarm system consists of several key components working
together to detect rain and provide an alert. Each block performs a specific function that
contributes to the overall operation of the system.
The power supply provides the necessary voltage to the Arduino, rain sensor, buzzer, and
LED. It ensures stable and continuous operation of the entire circuit. When rainwater falls
on the sensing plate, it changes conductivity. The sensor converts this change into an electrical
signal (analog or digital), which is sent to the Arduino.
2.2.2) BUZZER
Here in this project we are using a buzzer for the indication purpose whenever
the condition of the patient is at very critical stage athats mean above the cut off stage the
sms is sent to the doctor that means controlling person same at the similar time the buzzer
is connected in the system is ringing so the other persons will get notified about the patient.
4
VDF GOI, LATUR
Rain alarm circuit using Arduino uno
This is actual job done by the buzzer as a ringer.
(2.2.3 ) Rain Sensor Module :
Rain Detection Board
Has parallel exposed conductive tracks.
When water droplets fall, they create a conductive path.
This reduces the resistance, which changes the voltage output.
Control Module Board
Uses an LM393 comparator to convert sensor signal into:
o Digital output (D0) → Rain or No Rain
o Analog output (A0) → Amount of rain (wetness level)
5
VDF GOI, LATUR
Rain alarm circuit using Arduino uno
CHAPTER 3
CIRCUIT DIAGRAM AND DESCRIPTION
6
VDF GOI, LATUR
Rain alarm circuit using Arduino uno
3.1 CIRCUIT DIAGRAM OF THE PROJECT
FIG.2 CI
RCUIT DIAGRAM
3.2 CIRCUIT DIAGRAM DESCRIPTION
In this article, we will be discussing the rain drop sensor which is also known
as the rain detector sensor. Basically rain drop sensor is a tool used for sensing
rain, which consists of two modules a rain
board that detects the rain and control module which compare the analog
value and converts it in to digital value. Basically rain drop sensor can be used
in automobile to control the wipers automatically. It can also be used for rain
detection and alert notification [Link] first part of the rain drop sensor is
7
VDF GOI, LATUR
Rain alarm circuit using Arduino uno
the pcb board which consists of soldered wires and it gives signal directly
whenever the rain drop fall on [Link] rain drop sensor consists of metal strips
which are left exposed. This metal has certain resistivity when this
metal exposed to water the resistance will be changed the more exposed to
water the conductivity of this metal will be more or the resistance will be
decreased
When a raindrop gets on it completes the path between the two grids and thus
allows current to flow. It consists of two wires which is connected with the
pcb wires and with this we are using an analog-to-digital converter. The rain
detector sensor comes with a board this board is a signal conditioning it will
convert the resistance to voltage and it has two outputs which are analog and
digital. The analog output will give us voltage according to the quantity of the
water that is exposes to the rain drop sensor. The more water exposed the
sensor the less voltage it will give us. On the board module we have lm393
comparator IC. This IC is used to make digital output when water or voltage
reaches certain level it will give a LOW output we can change the threshold by
turning this potentiometer which is blue in color.
The ADC will be used in case of the microcontroller where we do not have
analog pins while in case of the Arduino we have analog pins so we can also
use it directly with the Arduino. The two pins at one end of the ADC will be
connected with the rain drop sensor while at the other end of the comparator
we have 4 pins.
A0 which is analog value gives us voltage if the rain drop is maximum it will
gives us maximum value and if the rain drop value is minimum the voltage
will be minimum. D0 is the digital pin which is adjusted with the variable
resistor and gives us value in 0 and 1 form. The potentiometer of the module
is used to control the sensitivity of the module.
8
VDF GOI, LATUR
Rain alarm circuit using Arduino uno
Let’s start the experiment with the analog output using Arduino. First i
will connect the rain detector sensor pad to the board module by connecting
the two wires of the rain detector pad sensor with the rain drop sensor with
the board module and then connect the sensor module with Arduino.
I will left the digital output not connected and as usual we can use a very
simple easy to read the analog voltage. Let just open the analog read serial
example file upload the sketch.
Then i will try to drop water on the sensor pad when the water drop the ADC
is dropped too and we can see that when the water is slipped from the pad
the ADC rise again and when i add more water it will decrease the voltage or
the ADC again.
So as i said at the beginning the more water on the sensor means less voltage
output. So the water and the voltage are inversely proportional and when i dry
the sensor pad it back to 1023.
Now we can determine threshold so every certain value of ADC we will know
that it is raining so i will take 900 as a threshold. So whenever the ADC is less
than 900 it is rain and i will make a simple alarm so whenever it is raining
a buzzer will sound. Simply connect the buzzer to pin 13 of arduino.
Now as show in the above circuit diagram:
We will connect the rain sensor with the two pins of the ADC as shown
above the ADC consists of 4 pins.
The ground pin of the ADC will be connected with the negative
terminal of the battery.
Connect VCC of the ADC with the 9V
Now connect D0 of the ADC at one end of the 1KΩ resistor and connect
the other terminal of the resistor with the base of the BC547 transistor
9
VDF GOI, LATUR
Rain alarm circuit using Arduino uno
Connect the emitter of BC547 transistor with the ground
Connect the collect of the BC547 with the cathode of the led
Working of the Rain Detector circuit:
When the rain sensor will detect the rain we will get 5V at D0 of the ADC as
1KΩ resistor is used for biasing of the transistor will make the transistor in
active state. The transistor will start working like a switch. The collector and
emitter will be shorted and as the led has already gaining positive voltage and
will obtain ground through this transistor and the led will start glowing. We
can also use buzzer in place of the led.
10
VDF GOI, LATUR
Rain alarm circuit using Arduino uno
CHAPTER 4
SOFTWARE DESCRIPTION
11
VDF GOI, LATUR
Rain alarm circuit using Arduino uno
4.1 ARDUINO SOFTWARE
4.1.1) HISTORY
The concept of rain detection for automated systems, such as automotive wipers and
irrigation controls, has existed since the mid-20th century, but its history in the context of
the Arduino software (IDE) is tied to the platform's own development and the rise of DIY
electronics projects.
General History of Rain Detection Technology
Early Development (1950s-1970s): The first automotive rain-sensitive systems
were experimented with in the late 1950s, with the 1970 Citroën SM being one of
the first production cars to feature an automatic rain sensor for its windshield
wipers.
Commercial Applications (1980s-Present): Rain sensors became common in
commercial products like irrigation systems to conserve water by automatically
shutting off sprinklers during rainfall.
Rain Alarm using Arduino Software History
The "software" history for a rain alarm using Arduino refers to the evolution of the
programming environment and the community-driven code development:
Arduino Platform Launch (2005): The Arduino project started with the goal of
providing a low-cost, easy-to-use platform for hobbyists and students. The initial
Arduino Software (IDE) was released around this time, offering a simplified
C/C++ based programming environment.
Early DIY Projects (Late 2000s): As the Arduino platform gained popularity,
hobbyists began creating and sharing basic projects, including simple rain alarms.
12
VDF GOI, LATUR
Rain alarm circuit using Arduino uno
These early projects often used basic analog or digital inputs from simple,
homemade sensors (like a PCB with exposed copper traces).
Sensor Module Proliferation (Early 2010s): The introduction of inexpensive, pre-
built rain sensor modules (e.g., YL-83/FC-37) with integrated comparator chips
(like the LM393) made projects more reliable and accessible. The software for
these projects primarily involved simple digital or analog read functions
and if statements within the Arduino loop() function to check for a predefined
threshold.
Rise of IoT Integration (Mid-2010s-Present): More advanced projects emerged
that integrated the rain sensor with communication modules (Wi-Fi, GSM,
Bluetooth) to send text message or cloud-based notifications to smartphones using
platforms like ThingSpeak or Firebase. This required incorporating additional
libraries and more complex code for network communication.
Code Sharing and Libraries: The history is marked by extensive code sharing on
platforms like the Arduino Project Hub, Instructables, and GitHub, where users
provide complete, working "sketches" (Arduino programs) for others to use and
modify.
In summary, the "software history" is not a single linear product, but rather a progression
of the Arduino IDE itself (from version 1.0 onward) and the increasing sophistication of
shared project code and libraries, moving from simple local alarms to integrated smart
home and IoT solutions.
4.1.2) SOFTWARE
Arduino Program (Software Code)
Below is the standard software code used for a rain alarm.
✔ Rain Alarm Code (Simple Version)
int sensorPin = 7; // D0 pin from rain sensor
int buzzer = 8; // Buzzer pin
13
VDF GOI, LATUR
Rain alarm circuit using Arduino uno
void setup() {
pinMode(sensorPin, INPUT);
pinMode(buzzer, OUTPUT);
[Link](9600);
}
void loop() {
int rain = digitalRead(sensorPin);
if (rain == LOW) { // Sensor detects rain
[Link]("Rain Detected!");
digitalWrite(buzzer, HIGH); // Turn buzzer ON
} else {
[Link]("No Rain");
digitalWrite(buzzer, LOW); // Turn buzzer OFF
}
delay(200);
}
14
VDF GOI, LATUR
Rain alarm circuit using Arduino uno
CHAPTER 5
HARDWAREV DESCRIPTION
15
VDF GOI, LATUR
Rain alarm circuit using Arduino uno
A basic Arduino rain alarm requires an Arduino Uno, a rain sensor
module (which includes the sensor and a control board), an LED, a buzzer,
and a power source. The rain sensor has a board with tracks that changes its
resistance when wet, while the control module converts this to either an
analog or digital signal. The Arduino reads this signal and triggers the
buzzer and/or LED when rain is detected. This video demonstrates how to
connect and program a rain sensor with an Arduino:
5.1 Hardware components
Arduino Uno: The central microcontroller that reads the sensor and
controls the alarm.
Rain Sensor Module: This module usually consists of two parts:
o Sensor Board: A PCB with exposed copper tracks that you
place in an area where it can get wet.
o Control Module: A small board with an integrated circuit (like
an LM393 comparator) that processes the signal from the
sensor.
Buzzer: An audible alarm to alert you to the rain.
LED: A visual indicator, often a red LED, to show when rain is
detected.
Jumper Wires: To connect the components together.
Power Source: A USB cable, adapter, or battery to power the Arduino.
Resistors: To protect the LED (a current-limiting resistor is needed).
5.2 How to connect them
Connect the rain sensor to the Arduino:
o Connect the VCC pin on the sensor module to the 5V pin on the
Arduino.
16
VDF GOI, LATUR
Rain alarm circuit using Arduino uno
o Connect the GND pin on the sensor module to a GND pin on
the Arduino.
o Connect the AO (Analog Output) pin on the sensor module to
an analog input pin on the Arduino (e.g., A0) for reading the
intensity of the rain.
o Connect the D0 (Digital Output) pin on the sensor module to a
digital input pin on the Arduino (e.g., pin 7) to get a simple
"rain detected" or "not detected" signal.
5.3 Connect the LED and buzzer to the Arduino:
o Connect the positive (anode) leg of the LED to a digital output
pin on the Arduino (e.g., pin 13) through a resistor to limit
current.
o Connect the negative (cathode) leg of the LED to a GND pin on
the Arduino.
o Connect the positive terminal of the buzzer to another digital
output pin on the Arduino (e.g., pin 8).
o Connect the negative terminal of the buzzer to GND.
You can watch this video for a step-by-step guide on connecting the rain
sensor and other components:
5.4 How it works
When the rain sensor's board is dry, it has high resistance, and the
control module outputs a high voltage (or HIGH digital signal).
When rain falls, it creates a conductive path between the tracks on the
sensor board, decreasing the resistance.
17
VDF GOI, LATUR
Rain alarm circuit using Arduino uno
This causes the voltage from the control module to drop. The Arduino
can then read this change.
If using the analog output (AO), the Arduino reads a value that
decreases with more rain. The code can use this to determine the rain's
intensity.
If using the digital output (D0), a potentiometer on the control module
can be used to set a threshold. When the sensor gets wet enough to
cross this threshold, the D0 pin changes from HIGH to LOW,
triggering the alarm.
The Arduino code reads the signal from the sensor. If the signal
indicates rain, it sends a HIGH signal to the buzzer and LED, turning
them on.
18
VDF GOI, LATUR
Rain alarm circuit using Arduino uno
CHAPTER 6
RESULT & CONCLUSION
19
VDF GOI, LATUR
Rain alarm circuit using Arduino uno
6.1 ADVANTAGES
1. Low cost and accessibility
[Link] and versatile
[Link] for convenience
[Link] conservation
[Link] measures
[Link] collection
6.2 APPLICATTIONS
[Link] has been applied in an agriculture field .
[Link] is used preservation the rain water.
6.3 FUTURE SCOPE
The future scope for an Arduino rain alarm includes integration with IoT and smart
home systems, such as automatically closing windows or controlling irrigation systems.
Other advancements involve improving sensor accuracy with more advanced technologies
like optical or radar sensors, adding remote notifications via SMS, and creating
autonomous applications like weather-responsive automatic clothing covers.
6.4 CONCLUSION
A rain alarm with Arduino is a successful project that demonstrates a practical application
of electronics, providing a low-cost and reliable system for detecting rainfall and triggering
an alarm or other actions. The conclusion is that the system effectively safeguards property
by providing early alerts and can be expanded for applications like smart irrigation or
automatic window/roof closing, making it useful for both domestic and industrial
purposes.
20
VDF GOI, LATUR
Rain alarm circuit using Arduino uno
REFERENCES
[1] Arun E,Marimuthu V,Pradeep E and Karthikeyan M on”Remote Patient Monitoring-
An implementation in ICU Ward”, International Conference on Information and Network
Techonology IPCSIT,Vol 4, 2011 pages 260-264..
[2] Pedro Girao,Fernando Santiago,Pena A ,”Enabling Telecare assessment and Android
OS smartphone”,IEEE 2011,page289-293.
[3] Sukanesh R,Rajan S.P, Vijayprasath S.S Prabhu ,”GSM based tale alert system”,
IEEE 2010,pages 1-5.
[4] Kamel M, Fawzy S.,"Secure remote patient Monitoring system” IEEE Feb 2011,
pages 339-432.
[5] C. Scully, J. Lee, J. Meyer, A. Gorbach, D. Granquist, Fraser, Y. Mendelson, and K.
Chon, “Physiological parameter monitoring from optical Recordings with a mobile
phone,” IEEE Trans. Biomed. Eng., vol. 99, no. 5, pp. 749–898, 2011.
[6] J. E and L. Martin, “Investigating a smartphone imaging unit for
photoplethysmography,” Physiol. Meas., vol. 31, no. 11, pp. N79–N83, 2010.
[7] S. Lv, Y. Lu, and Y. Ji, “An enhanced IEEE 1588 time synchronization for
asymmetric communication Link in packet transport network,” Commun. Lett. vol.14,
no. 8, pp. 764–766, 2010.
21
VDF GOI, LATUR