Raindetectorpaper 1
Raindetectorpaper 1
net/publication/379727337
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.
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
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-
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
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);
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();
}}