0% found this document useful (0 votes)
43 views6 pages

Raindetectorpaper 1

Uploaded by

danieldolapo579
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views6 pages

Raindetectorpaper 1

Uploaded by

danieldolapo579
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/379727337

DESIGN AND CONSTRUCTION OF A RAIN DETECTOR WITH AN ALARM


SYSTEM

Article · April 2024

CITATIONS READS

4 1,152

6 authors, including:

Cookey Iyen
Federal University Wukari
25 PUBLICATIONS 20 CITATIONS

SEE PROFILE

All content following this page was uploaded by Cookey Iyen on 10 April 2024.

The user has requested enhancement of the downloaded file.


DESIGN AND CONSTRUCTION OF A RAIN DETECTOR WITH Supported by
AN ALARM SYSTEM

Cookey Iyen1*, Benedict Ayomanor2, Abubakar Orume1, Samuel Saleh1, Simon Jaafaru3 and Bunmi Jacob Akeredolu1
1Department of Pure and Applied Physics, Federal University Wukari, PMB 1020, Taraba State, Nigeria
3Department of Science Laboratory Technology, Federal Polytechnic Nasarawa, Nigeria
2Shedda Science and Technology Complex (SHESTCO), Gwagwalada, Abuja, Nigeria

*Corresponding author: iyen@fuwukari.edu.ng

Received: June 25, 2020 Accepted: October 15, 2020


Abstract: From time immemorial man has used the sun to dry many things, a process known as sun drying. Sun drying is
carried out in the farm, home, industry, laboratory, hospitals and other institution for a number of reasons. These
reasons include totally driving out water molecules from the things being dried like clothes, some farm produce,
during building work, industries where certain plants used for pharmaceutical/chemical purpose are exposed to
direct sunlight for a little while to cause some chemical changes in them and at home when windows are opened to
allow the sun rays to fall into rooms to eliminate dampness and allow for proper aeration. When rain falls, it will
cause a setback to all the reasons for sun-drying enumerated above, especially when the materials being sun dried
are not retrieved quickly. Thus, designing and constructing a device which gives one a heads-up the instant it starts
to rain or serves an indicator as to whether rain will fall or not hopefully giving enough time to retrieve the
materials being sun dried is a welcome idea. In this work, the designed and constructed rain detector with an alarm
system using an Atmega 328p microcontroller chip was programmed using the arduino board. The constructed
system has an alarm system and light Emitting Diode which buzzes and blinks immediately it starts to rain and a
Liquid Crystal Display (LCD) which displays the intensity of the rain. The obtained experimental results showed
changes in sensor reading to different Weather conditions; such as, for no rain, drizzle and heavy rainfall,
respectively.
Keywords: Alarm, arduino, Atmega 328 PUP, detector, microcontroller, rain sensors

Introduction machines, water pumps, bathtubs, toilets, dishwashers, and


Mankind has always harnessed the elements of nature for high-efficiency furnace pumps (Beard et al., 2010). They may
different purposes. Water for irrigation and Electricity also be used to alert users when there is a moisture problem
generation (Fthenakis and Kim, 2010), wind for wind mill (Becker & Gudesen, 2000).
used for many applications ranging from turning turbines that
generate electricity, to quarry for crushing stones, sun for Materials and Method
drying, heating and generation of electricity (Mekhilef, Saidur Instruments
and Safari, 2015). From time immemorial humans used the An Arduino board Uno (R3), LM 393 based rain sensor,
sun to dry many things, a process known as sun drying. Sun Liquid crystal display (LCD), Atmega 328 Arduino
drying is carried out in the farm, home, industry, laboratory, microcontroller, Light emitting diode (LED), Power supply
hospitals and other institution for a number of reasons (Amos, module (PSM), Buzzer, Socket, Variable resistor, connecting
2014). According to Anastasi et al. (2009) these reasons range wires, Capacitors, Vero board, Switch, 16MHz Crystal
from totally driving out water molecules from the things being Oscillator, Paper Capacitor and Jumper Wires, Soldering Iron,
dried like clothes, some farm produce. Soldering lead.
When rain falls, it causes a setback to all the reasons for sun- Construction
drying, especially when the materials being sun dried are not The block diagram for the circuit is as shown in Fig. 1. The
retrieved quickly (Bagree, 2012). Thus, designing and project is based on the Atmega 328 microcontroller and the
constructing a device which gives one a heads-up the instant it LM393 based rain sensor. The analog output of the rain sensor
starts to rain, hopefully gives one time to retrieve the materials is connected to one of the analog inputs of the
being sun dried. Also, since it can rain at any time without any microcontroller. The values of the analog readings on the
warning, clothes in a clothing line outside the house that are microcontroller are then read using the serial monitor of the
almost dry may get wet again if they are not retrieved on time. arduino Integrated Development Environment (IDE) when the
Thus, this project will also help house wives and other users rain sensor is exposed to different intensity of water. Based on
to be quickly alerted to avoid rain from wetting shirts/ dresses the readings, the microcontroller is then calibrated to trigger a
being sundried at the clothes line outside the house (Barnaghi Light Emitting Diode and a Buzzer when it is raining. The
et al., 2012). 16 × 2 Liquid Crystal Display is programmed to display the
Water/rain alarm detector is a self-contained electronic device intensity of the rainfall.
that sounds an alarm when its sensor is in contact with water.
It comprises of rain sensor (Jayant, 2015) and microcontroller
(Hernando, 2016). It can be used near water heaters, washing

FUW Trends in Science & Technology Journal, www.ftstjournal.com


e-ISSN: 24085162; p-ISSN: 20485170; December, 2020: Vol. 5 No. 3 pp. 686 – 690 686
Construction of Rain Detector with Alarm System

Fig. 1: Block diagram of the design

Table 1: Result of the sensor calibration experiment


Analog reading
S/N State Range
First reading Second reading Third reading
1 Sensor Dry 1023 946 900 900-1023
2 Sensor Wet 451 480 889 451-899
3 Sensor under heavy water 400 350 450 <450

Calibration of sensor defined time interval. This extra feature helps in reducing
The rain detector has the rain sensor plate as the main false alarm counts to some extent.
component, if the rain sensor plate of the rain sensor module A simple experiment was performed to obtain the readings
is in dry state; an analog output (AO) from the module is 5V obtained from the rain sensor when there was no rain, when it
which gets converted to 1023 by the analog to digital was raining and when it was raining very heavily. Table 1
converter of the Arduino chip. During rain, the sensor plate shows the result of the experiment. The readings were
elements are bridged by the rain water and hence this analog obtained from the serial monitor of the arduino Integrated
output gradually changes from 5V to a lower voltage in which Development Environment (IDE).
the digital output changes as well, based on the moisture level
between the sensor pads. By this way, the sensor reports the Result and Discussion
absence and presence of the rain in an analog way; this helps Figure 2 shows the circuit diagram of the completed Circuit,
to determine the intensity of the rain by analyzing the output Fig. 3 shows the circuit after construction without packaging
analog signal. The approximation is handled by a simple while Fig. 4 shows the circuit after packaging. The sketch
Arduino sketch. An additional function is delaying of the alert used for programming the arduino chip is shown in Appendix
and the glowing generation; buzzer raises an alert only when I.
raining at a detection of a certain threshold, within a pre-

FUW Trends in Science & Technology Journal, www.ftstjournal.com


e-ISSN: 24085162; p-ISSN: 20485170; December, 2020: Vol. 5 No. 3 pp. 686 – 690 687
Construction of Rain Detector with Alarm System

Fig. 2: Completed circuit diagram

In this research, the arduino was programmed to detect and


display when the rain intensity is heavy, drizzling or low. The
actions of the Buzzer and Light Emitting Diode were
determined by the intensity of the rain. Raju (2017) used the
rain sensor module, temperature sensor and the arduino
microcontroller for automatic farm irrigation. Ruby and
Jawahar (2017) worked on smart agriculture to prevent crops
from spoilage during rain and efficiently recycle rain water for
irrigation. They made use of the wifi module, rain sensors,
GSM module and the Arduino microcontroller. Latha and
Murthy (2016) worked on a GSM based rainfall detector using
Arduino. In their work, a rain sensor module with LM393
interfaced with the Arduino microcontroller was used for Fig. 4: Completed circuit after packaging
rainfall measurement, the measured values were transferred
via text message to a specified mobile number for analysis.
The research works referenced above made use of rain sensor
module and arduino microcontroller to sense and measure
rainfall. Results obtained shows that the method and result of
this research is in agreement with that of other similar
researches carried out by other researchers round the world.

Conclusion
This project is the design and construction of a rain detector
with an alarm system that can detects rain fall, the device was
able to detect any moisture or drop of liquid on the rain sensor
panel or board using an embedded system for the detection of
rain and its program into the microcontroller (Atmega 328).
It may be concluded that the aim and objectives of the project
have been met by designing and constructing a rain detector
Fig. 3: Completed circuit before packaging with an alarm system which may be used for demonstration
purpose only. The rain detector with an alarm system
constructed has the capability to sense rainfall and tells when
it is heavy or low. Moreover, the system was designed,
implemented and tested within the constraints of available

FUW Trends in Science & Technology Journal, www.ftstjournal.com


e-ISSN: 24085162; p-ISSN: 20485170; December, 2020: Vol. 5 No. 3 pp. 686 – 690 688
Construction of Rain Detector with Alarm System

components and instruments. The results of the tests show as Barnaghi P, Wang W, Henson C & Taylor K 2012. Semantics
satisfactory the reliability of the various units and the system for the internet of things. Int. J. Semantic Web and Infor.
as a whole. Sys., 8(1): 1-21.
Future work would consist of redesigning of a rain detector Beard KV, Bringi V & Thurai M 2010. A new understanding
with an alarm system that include a rechargeable battery of raindrop shape. Atmospheric Research, 97(4): 396-
which may be solar powered as the source of power to avoid 415.
the current interruption as it is when using town power Becker G & Güdesen A 2000. Passive sensing with acoustics
supply, because in the absence of power the system wouldn’t on the battlefield. Applied Acoustics, 59(2): 149-178.
work anymore and that will render the system not reaching its Fthenakis V & Kim HC 2010. Life-cycle uses of water in US
significance. Furthermore a more complex calibration should electricity generation. Renewable and Sust. Energy Rev.,
be made on the sensor to give a more detailed reading or 14(7): 2039-2048.
information about the weather condition. Hernando B 2016. The Untold History of Arduino. Arduino
Conflict of Interest History; Retrieved 2019 from
Authors have declared that there is no conflict of interest https://arduinohistory.github.io/Luettu
reported in this work. Jayant 2015. Rain Alarm. Circuit Digest, Retrieved 2019 from
https://circuitdigest.com/rain-alarm-project
References Latha NA & Murthy RB 2016. GSM based rainfall detector
Amos J 2014. Smart umbrellas could collect rain data. using Arduino. Int. J. Electr. and Commun. Engr.
Science, Retrieved 2019, from (IJECE), 5(3): 11-16.
http://www.bbc.co.uk/news/science-environment- Mekhilef S, Saidur, R & Safari S 2011. A review on solar
27222282 energy use in industries. Renewable and Sust. Energy
Anastasi G, Conti M, Di Francesco M & Passarella A 2009. Rev., 15(4): 1777-1790.
Energy conservation in wireless sensor networks: A Raju V 2017. An automatic farm monitoring system using
survey. Ad Hoc Networks, 7(3): 537-568. arduino and wireless sensor networks. Int. J. Innovative
Bagree R 2012. Characterization and Design of a Readout Res. in Sci. Engr. and Techn., 6(7): 1111-1119.
Circuit for a Piezoelectric based Acoustic Disdrometer. Ruby, R.A & Jawahar, A. (2017). Smart agro system using
TU Delft, Delft University of Technology. wireless sensor networks. Int. Conf. on Intelligent Comp.
and Control Sys. ICICCS, pp. 400-403.

APPENDIX I: The Arduino Sketch for the Microcontroller Used in the Project

The complete Syntax used to program the Arduino Chip (Atmega 328 microcontroller):
// include the library code:
#include <LiquidCrystal.h>
// initialize the library by associating any needed LCD interface pin
// with the arduino pin number it is connected to
const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
int rainSensePin= 0; // analog pin 0 - sensor i/p
int alertPin= 8; // digital pin 8 - alert o/p
int curCounter= 0; // current counter - goes up by 1 every second while sensing
void setup(){
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
Serial.begin(9600);
pinMode(alertPin, OUTPUT);
pinMode(rainSensePin, INPUT);
lcd.setCursor (0,0);
lcd.print("RAIN DETECTOR");
delay (3000);
lcd.clear();
}
void loop()
{
int rainSenseReading = analogRead(rainSensePin);
float counter = (millis() / 1000);
lcd.clear();
// check to see how long it is raining at the threshold level
// rain strength value from 0 - 1023
// heavy rain -to- no rain.
if (rainSenseReading<= 450){ // end of the time delay
digitalWrite(alertPin, HIGH); //raise an alert after x time
delay (100);
digitalWrite (alertPin, LOW);
lcd.setCursor(0, 0);
lcd.print("HEAVY RAINFALL");
lcd.setCursor (0,1);

FUW Trends in Science & Technology Journal, www.ftstjournal.com


e-ISSN: 24085162; p-ISSN: 20485170; December, 2020: Vol. 5 No. 3 pp. 686 – 690 689
Construction of Rain Detector with Alarm System

lcd.print(rainSenseReading);
Serial.println(rainSenseReading);
delay (500);
lcd.clear();
}
if ((rainSenseReading>450)&& (rainSenseReading<900)){ // end of the time delay
digitalWrite(alertPin, HIGH); //raise an alert after x time
delay (500);
digitalWrite (alertPin, LOW);
lcd.setCursor(0, 0);
lcd.print("WET/LOW RAINFALL");
lcd.setCursor(0,1);
lcd.print(rainSenseReading);
delay (1000);
lcd.clear();
}
if (rainSenseReading> 900){ // end of the time delay
digitalWrite(alertPin, LOW); //raise an alert after x time
lcd.setCursor(0, 0);
lcd.print("NOT RAINING");
lcd.setCursor(0,1);
lcd.print(rainSenseReading);
delay (2000);
lcd.clear();
}}

FUW Trends in Science & Technology Journal, www.ftstjournal.com


e-ISSN: 24085162; p-ISSN: 20485170; December, 2020: Vol. 5 No. 3 pp. 686 – 690 690

View publication stats

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy