Reportt
Reportt
In
ELECTRONICS AND COMMMUNICATION ENGINEERING
By
1
DEPARTMENT OF ECE (ELECTRONICS AND COMMUNICATION ENGINEERING)
VASIREDDY VENKATADRI IINSTITUTE OF TECHNOLOGY: NAMBUR
(AUTONOMOUS)
CERTIFICATE
This is to certify that the project titled “ RAIN DETECTOR USING RAIN DROP SENSOR WITH
ARDUINO UNO ” is a bonafide record of work done by MEDA POOJITHA( 22BQ1A0482 ),
KAMMA SRAVYA ( 22BQ1A0456 ), PALAPARTHI HIMASIRI ( 22BQ1A04A6 ), KUMBA
KEZIYA
RANI ( 22BQ1A0474 ) as part of the Skill Oriented Course Open-Source Hardware Tools for Electronics
Engineers under the guidance of Mrs.T.Vineela, Assistant Professor in partial fulfillment of the
requirement of the degree for Bachelor of Technology in Electronics and Communication Engineering
during the academic year 2023-2024.
EXTERNAL EXAMINER
ii
DECLARATION
DATE:
PLACE:VVIT, NAMBUR SIGNATURE OF THE CANDIDATES:
MEDA POOJITHA(22BQ1A0482)
KAMMA SRAVYA(22BQ1A0456)
PALAPARTHI
HIMASIRI(22BQ1A04A6)
1
ACKNOWLEDGEMENT
We express our sincere thanks to Dr. K. Giribabu. Dean of Studies for providing
support and stimulating environment for developing the project.
Our sincere thanks to Dr. M.Y. Bhanumurthy. Head of the Department. Department
of ECE for his co-operation and guidance which help us to make our project successful and
complete in all aspects.
We also express our sincere thanks and are grateful to our guide Mrs.T.Vineela.
Department of ECE, for motivating us to make our project successful and fully complete We
are grateful for his precious guidance and suggestions.
We also place our floral gratitude to all other teaching staff and lab technicians for
their constant support and advice throughout the project.
MEDA POOJITHA(22BQ1A0482)
KAMMA SRAVYA(22BQ1A0456)
PALAPARTHI HIMASIRI(22BQ1A04A6)
LIST OF ABBREVATIONS
LIST OF FIGURES
ABSTRACT
CHAPTER-1:INTRODUCTION
CHAPTER-3 : WORKING
CHAPTER-4: RESULTS&CONCLUSION
4.1 Output
4.2 Applications
4.3 Expected Outcome
REFERENCES
APPENDIX
2
LIST OF ABBREVATIONS
FULL FORM
3
LIST OF FIGURES
1.3 Buzzer 10
2.4 Buzzer 15
2.6 Laptop 15
4
5.1 Display of Sensor for Flood Prediction 24
5
ABSTRACT
The Arduino based project requires a Rain drop sensor.The Rain Detector using
arduino and Rain drop 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 surroundings.Rain Detector
Project is a simple but very useful project that detects Rain (Rain Water) and automatically
triggers an alarm or buzzer so that we can make some actions and save the rainwater. As a
result, we can increase the water levels of underground water by using the underwater
recharge technique.
Benefits of the project are Conserves water -- prevents watering during and after rain
events (until sensor dries), saves money, Less watering means less water you have pay for on
your utility bill and sensor reduces wear on the irrigation system because the system runs
only when nature isn't doing the watering for you.In conclusion ,The rain sensor detects
raindrops, creating a conductive path that triggers the transistor to amplify the current. This
amplified current activates both the LED, providing a visual indication of rain, and the
buzzer, producing an audible alert. The microcontrollers of the Arduino board can be
programmed using C and C++ languages. When a code is written in Arduino uno ide
software and connected to the board through a USB cable, Arduino boards have lot of
applications in the present days scenario, so we have decided to do a small project on them.
6
CHAPTER -01
INTRODUCTION
1.1 Defining Arduino: An Arduino is actually a microcontroller based kit which can be
either used directly by purchasing from the vendor or can be made at home using the
components, owing to its open source hardware feature. It is basically used in
communications and in controlling or operating many devices.
2. Over the years Arduino has been the brain of thousands of projects, from everyday
objects to complex scientific instruments. A worldwide community of makers - students,
hobbyists, artists, programmers, and professionals - has gathered around this open-source
platform, their contributions have added up to an incredible amount of accessible
knowledge that can be of great help to novices and experts alike.
3. Arduino was born at the Ivrea Interaction Design Institute as an easy tool for fast
prototyping, aimed at students without a background in electronics and programming. As
soon as it reached a wider community, the Arduino board started changing to adapt to
new needs and challenges, differentiating its offer from simple 8-bit boards to products
for IoT applications, wearable, 3D printing, and embedded environments. All Arduino
boards are completely open-source, empowering users to build them independently and
eventually adapt them to their particular needs. The software, too, is opensource
7
Arduino is an open-source electronics platform based on easy-to-use hardware and
software. It consists of a microcontroller and a development environment, making it suitable
for hobbyists, artists, designers, and anyone interested in creating interactive projects.
How to program an Arduino :The Arduino tool window consists of the toolbar with the
buttons like verify, upload, new, open, save, serial monitor. It also consists of a text editor to
write the code, a message area which displays the feedback like showing the errors, the text
console which displays the output and a series of menus like the File, Edit, Tools menu. Thus
the code is uploaded by the bootloader onto the microcontroller.
Arduino boards come in various shapes and sizes, but they typically include a microcontroller
(like the AT mega series from Atmel) and input/output pins that allow you to connect
sensors, motors, LEDs, and other componentsThe Arduino IDE (Integrated Development
Environment) is used to write code for Arduino boards. It's based on the Processing
programming language and providessimple interface for writing, compiling, and uploading
code to the Arduino board.
8
1.2 RAIN DROP SENSOR
Rain drop sensors are used for the detection of rain and also for measuring rain
fall intensity. Rain drop sensors can be can be used for all kinds of weather monitoring .A
rain drop sensor is a board on which nickel is coated in the form of lines . It works on the
principle of resistance. The rain drop sensor measures the moisture via analog output pins and
it provides a digital output when a threshold of moisture exceeds. The rain drop sensor
module is based on the LM393 op amp. It consists of electronics module and a printed circuit
board that collects the rain drops.
The working of the rain sensor is very simple if you take a look at the schematic above.
You’ll see that it is a very simple circuit which just compares the voltages and according to
that delivers the output.The Non-inverting input of one comparator in connected to the
sensing plate with a 10 kΩ pull-up resistor. Also, it has 10nF capacitor in parallel to reduce
the noise from the sensing plate. The other end of the plate is connected to GND. The
inverting input of the same comparator with a 10k potentiometer between VCC & GND. This
is done in order to control the value to the microcontroller. Hence, as a result, controlling the
comparing the voltage of the two inputs of the comparator.
9
The output pin of the comparator is connected to the OUT pin of the module, which gives
value to the microcontroller. Also, it is connected to the on-board LED for indication in the
rain sensor.
1.3 BUZZER
A buzzer is understood as a device that creates an audible tone under the influence
of an applied external voltage. This output may either be in the form of buzzing or a beeping
sound .This is a result of the induced rapid moments created in a diaphragm of the buzzer.
Fig :1.3-Buzzer
Magnetic buzzers operate using electromagnetic principles. When power is applied, current
runs through the coil of wire inside the buzzer, which produces a magnetic field. The flexible
ferromagnetic disk is attracted to the coil when the magnetic field is activated, then returns to
rest when the magnetic field is off.
10
1.4 PRINCIPLE OR MEDTHODOLOGY
A Rain sensor that completes a circuit through transistors and a battery when rain touches it.
This causes an LED to light up or a buzzer to sound, alerting people that rain has been
detected.When rain drop present it reduces the resistance because water is the conductor of
electricity and the presence of water connects nickel lines in parallel reducing resistance and
reducing voltage drop across it. The more intense the rainfall the lower the resistance.
Fig:1.4-Block Diagram
Construction Methodology:
The system includes a rain sensor, a timer (such as the 555 IC), and a buzzer.
When rain is detected, the sensor triggers the timer, which activates the buzzer to sound an
alarm.The construction involves assembling the components, testing the system, and
installing the completed design1.Enhance the rain detector by integrating it with smart home
automation systems.
Explore wireless communication options to send alerts to mobile devices or central
monitoring stations.
Consider adding features like adjustable sensitivity, self-calibration, and real-time
11
weather data integration.Collaborate with environmental agencies to deploy rain detectors for
flood prediction and disaster management2.Remember that rain detectors serve a practical
purpose and can be urther improved with technological advancementsa rain sensor that
completes a circuit through transistors and a battery when rain touches it. This causes an LED
to light up and a buzzer to sound, alerting people that rain has been detected.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 Raindrop sensors are used for the detection of rain and also for measuring
rainfall intensity. Raindrop sensors can be used for all kinds of weather monitoring.
12
CHAPTER-02
13
PROCEDURE
Components Required:
In this project we have used the Arduino and rain drop sensor along with the jumping
wires and the buzzer details list of the hard ware components are
14
2.4 Buzzer
Fig :2.4-Buzzer
2.6 Laptop
15
CHAPTER-03
Since, we believe in learning by doing. So, we decided to make our own Arduino board
instead of using the readymade board. So, the steps required to make an arduino board are as
follows: Boot-loading an Atmega328 using the Arduino board/AVR Programmer by
uploading the boot loader to the Microcontroller. Making the connections on a general
purpose PCB, connecting the crystal oscillator, capacitors, connectors for the connections to
Arduino board etc. Providing the power supply, usually 5 volts. Arduino is Ready to use.
After you have done all this, then only the minimum circuitry like crystal oscillator,
capacitors, connectors, power supply is required to complete the board. The same circuit can
be made on the PCB, either designed or general purpose. Since, Arduino is an Open- Source.
Hence, it is easy to make and can have any enhancements as per the requirements.
Rain Sensor is a simple sensor that gives digital output. This sensor is very common for
detecting rains, especially in tropical and subtropic regions. These type of sensor are easily
available in the online and offline market at a very cheap price or can be built easily for large
scale purpose. It comes in various version/type as you can see, but the basic working always
remains the same. The plates where the rain falls can be custom-built on a separate PCB for
large scale.
This sensor is similar to many other sensors like soil-moisture sensor, sound sensor,
vibration sensor etc. You can relate it’s schematic and working of rain sensor much to these
sensors. Also like soil moisture sensor main PCB, its main PCB also has a center hole
through which you can stick or fix it on a separate place from the sensing area.
16
Advantages:
The main advantage of the rain sensor is the sensitivity of the sensor at such a cheap price.
The sensing area is quite good for small projects and can easily be expanded more, as
recommended above.Secondly, there are mounting holes present on both sensing plate and
main PCB which can be used to mount both the PCB on separate places.
Disadvantages:
The main disadvantage of the sensor is the same as the Soil Moisture Sensor. That is the
quality of the PCB of the sensing Plate or PCB. Which you should consider if you are using
this sensor task in which plate is exposed to moisture and water for a long time.
The second disadvantage is very selective, as the analog value which is provided in the
sensor is not used mainly. Analog value is not useful in most of the cases because, as soon as
the water falls on the plates, the Digital output will be high, so there is no scope for analog
values
Fig:3.1-Processing Software
17
Processing is an open source programming language and integrated development
environment (IDE) built for the electronic arts, new media art, and visual design communities
with the purpose of teaching the fundamentals of computer programming in a visual context,
and to serve as the foundation for electronic sketchbooks. The project was initiated in 2001
by Casey Reas and Benjamin Fry, both formerly of the Aesthetics and Computation Group at
the MIT Media Lab. One of the stated aims of Processing is to act as a tool to get non-
programmers started with programming, through the instant gratification of visual feedback.
The language builds on the Java language, but uses a simplified syntax and graphics
programming models.
The Arduino boards are available readily in the electronics market, but we decided to make
our own Arduino board instead of buying one. So, the first problem was where to start from
to achieve this goal. Since, all parts on an Arduino board are SMD’s, so we had to find a way
to replace the SMD’s with DIP IC’s and also had to make an AVR programmer in order to
pursue our further work. Hence, it took us some days to determine and plan our course of
action. After that we had to boot load the AVR chip so as to make it compatible with the
Arduino
IDE software. Hence, we had to find a way to boot load the Arduino using the AVR
programmer. It took us a long time to make the AVR programmer by researching on the type
of communication and architecture of the AVR as it is not as same as a 8051 microcontroller.
B. Communicating with Arduino through PC Another major problem related to the Arduino
board was the communication with it from PC. Since, there is a requirement of an RS-232 to
TTL conversion for the communication, so try some methods: [1] Firstly I used the MAX-
232 IC to communicate with the Arduino as with the 8051 but due to large voltage drop and
mismatch in the speed, it failed to communicate.
18
Next, I tried to use a dedicated AVR as USB to Serial converter as in the original Arduino
board, the difference being DIP AVR used by us instead of the SMD Mega16U2 controller.
But, unfortunately I was unable to communicate through it. [3] At last I had no other choice
but to use the FTDI FT-232R chip for USB toSerialconversion Finally it worked
19
CHAPTER-04
RESULT&CONCLUSION
4.1 Output :-
20
4.2 APPLICATIONS:
1. It helps in saving money by switching off the irrigation system when it rains. This saves
money by cutting off bills on electricity consumption.
2 .It extends life of rain sensor based systems such as car wiper, irrigation systems by
running them only when it is necessary.
3.Rain sensors help save water during rain events and hence water is available during
summer and emergency applications such as firefighting etc.
4. Operating principle is very easy.It consumes less power for operation. Installation of rain
sensor based systems are very much simple.
21
4.3 EXPECTED OUTCOME
1. This project aims on the use of Ultrasonic Sensor by connected to the Arduino UNO R3
board and the signal from the sensor further provided to the screen formed on the laptop to
measure the presence of any obstacle in front of the sensor as well as determine the range
and angle at which the obstacle is detected by the sensor
3. To increase the range of object detection, Radar can be made more improved which Is
known as “lidar” Lidar is advanced type of radar which uses visible from laser
22
CHAPTER-05
Enhance the rain detector by integrating it with smart home automation systems. Explore
wireless communication options to send alerts to mobile devices or central monitoring
stations.Consider adding features like adjustable sensitivity, self-calibration, and real-time
weather data integration.
Collaborate with environmental agencies to deploy rain detectors for flood prediction and
disaster management2.Remember that rain detectors serve a practical purpose and can be urther
improved with technological advancements
The rain detector, also known as a rain alarm, is a simple electronic device designed to detect
rain and provide an alert.The rain detector gives you an early warning when it starts raining,
allowing you to close windows and protect your possessions.
It can be used in homes, offices, and industrial settings to prevent damage caused by
rainwater.
23
References
[1] http://www.arduino.cc/
[2] http://www.arduinoproducts .cc/
[3] Kumar T. &Kushwaha, D. S. An Intelligent Reconnaissance Framework for
Homeland Security. Def. Sci. J. 69, 4 (2019).doi: https://doi.org/10.14429/dsj.67.10286
[4] Singh, D. K. &Kushwaha, D. S. Automatic Intruder Combat System: A wayto
SmartBorderSurveillance.Def.Sci.J.67,50(2017).doi:https://doi.org/10.14429/dsj.67.1026
[5] Zanella A. et al. (2014). Internet of Things for smart cities, IEEE Internet Things
J. , vol. 1, no. 1, pp. 22–32.
[6] https://youtu.be/2PeJX55tUa4
[7]https://drive.google.com/drive/folder…
[8]https://youtu.be/q6lpOm6b72E?feature=shared
24
Appendix
ARDIUNO CODE:
25
later in the Processing IDE for indexing
}
// Repeats the previous lines from 165 to 15 degrees
for(int i=165;i>15;i--){
myServo.write(i); delay(30);
distance = calculateDistance();
Serial.print(i); Serial.print(",");
Serial.print(distance);
Serial.print(".");
}
}
// Function for calculating the distance measured by the Ultrasonic sensor int
calculateDistance(){
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
// Sets the trigPin on HIGH state for 10 micro seconds
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH); // Reads the echoPin, returns the sound wave travel
time in microseconds
distance= duration*0.034/2;
return distance;
}
26
Processing code:-
void setup()
{
pinMode(BUZZER_PIN, OUTPUT);
//Serial.begin(9600);
}
void loop()
{
int sensorValue = digitalRead(2);
//Serial.println(sensorValue); if
(sensorValue == LOW)
{
analogWrite(BUZZER_PIN, 50);
}
else
{
analogWrite(BUZZER_PIN, 0);
}
delay(1000);
}
27
28