Contents
ABSTRACT
The human are still not able to battle the natural calamities besides huge development in technologies. The fact is that the natural calamities can neither be abolished nor be prevented. But the technology has been developed gigantically in order to prevent loss of life. This project is totally based on informing the civilians about the upcoming flood so that they can evacuate the danger area before the flood hits. For detecting the rise in water level Ultrasonic Sensor and Water Level Sensor is used. For detecting the change in humidity and temperature Humidity and Temperature Sensor is used. The data from the DTH11 and HC-SR04 is read by the microcomputer and analyze the data in order to detect the level of water. If the level of water is less than the defined threshold value then the microcomputer turns the LED and buzzer on. Furthermore, the data obtained from the microcomputer is uploaded to the database. The values of the sensors updating in real time can be monitored in database table. The content of the database table is now linked with the web API (Application Programming Interface) and trigger is set. And now when the level of water crosses the threshold value the trigger is triggered and the web API sends the SMS to the phone number registered to it.
INTRODUCTION
Background
An overflow of a large amount of water beyond its normal limits, especially over what is normally dry land. A flood is an overflow of water that submerges land .In the sense of “flowing water”, the word may also be applied to the inflow of the tide. Floods are an area of study of the discipline hydrology and are of significant concern in agriculture, civil engineering and public health. Flooding may occur as an overflow of water from water bodies, such as a river, lake, or ocean, in which the water overtops or breaks levees, resulting in some of that water escaping its usual boundaries, or it may occur due to an accumulation of rainwater on saturated ground in an area flood. While the size of a lake or other body of water will vary with seasonal changes in precipitation and snow melt, these changes in size are unlikely to be considered significant unless they flood property or drown domestic animals. Some floods develop slowly, while others such as flash flood scan develop in just a few minutes and without visible signs of rain.
Flooding is not new to the Terai districts of Nepal. Every year, the monsoon floods have caused significant damage and loss to human lives and livelihoods within these southern flood plains. Yet each time the rescue and relief operations seem slow and insufficient and the government comes under fire for not responding quickly enough. A critical review – that is, reflecting and building on lessons from past flood events along with institutional memory – is seriously lacking, particularly across the government entities. Identifying lessons and learnings from past events is critical in order to recognize the simple lapses that can be avoided and solutions that can immediately be put into effect. This Post-Event Review Capability (PERC) report discusses the overall disaster management landscape, i.e. disaster risk reduction, preparedness, response, and recovery during the 2017 floods in Nepal. Focusing on the four river basins -Karnali, Babai, West Rapti, and Kankai – an effort is made to critically examine the flood event and impacts together with response and recovery measures undertaken by government and various other agencies in flood-affected
areas of these rivers. Comparing the 2017 flood effects and impacts with previous flood response in the region, this review tries to identify the most useful lessons to take forward, and what could now be done differently to lessen the risks of future floods.
Objectives
The main objectives of the project are:
- To read the temperature and humidity of the environment continuously
- To warn the people through SMS system using web API
- To detect the level of water in real time
Scope
The main purpose of application is to know nearest flood situation.
Application
The early flood detection and avoidance system has following applications:
Early information about flood.
Gives the real time temperature and humidity data along with level of water.
LITERATURE REVIEW
The projects addressing similar problem like in this project, have been already done in national and international level but each of such projects are provided with different features but here in this project all such special features from different projects are combined into a single project.
“IOT-based-Cantralized-Remote-Sensing-for-Early-Flood-Detection” [1] the objective of this telemetry based project is to monitor the flood situation at the earliest and send a notification in case of danger on the webpage. The notification sent can be read globally through IOT. An ultrasonic sensor is connected to the microcontroller that measures the value of water in the dams or rivers and sends that information to the microcontroller. The GPRS sends that notification through the internet on the webpage using IOT network.
“Flood Monitoring and Early Warning System Using Ultrasonic Sensor” [2] it envisions a safe, prepared and less casualty community before, during and after typhoon devastation. The model also promotes the use of real-time monitoring system through the developed web-based application and SMS notification system as an easy medium in disseminating information particularly in the remote areas. By allowing the system in two-way communication, it gives more flexibility in providing important information to the community.
“SMS Based Early Flood Warning System Using Raspberry PI” [3] this project is about designing a system that can measure the speed of the rise of the water level at the potential flooded area. Raspberry Pi is used to collect the data from the water sensor and transmit the data to GSM Module to send the alert by using an SMS via a mobile phone. The analysis will be done to show how the Raspberry Pi will be integrated with the smartphone to give an alert. The system will be tested in order to ensure that all specifications needed have been met. A performance test will also be run in order to see the efficiency of the system.
“Design of early warning flood detection systems for developing countries” [4] in this project the Warning communities of the incoming flood provides an effective solution to this by giving people sufficient time to evacuate and protect their property.
“Flood Monitoring and Early Warning System Using Ultrasonic Sensor” [5] The two monitoring devices are composed of Ultrasonic sensor to measure the distance of the water level, Arduino micro-controller that process the signal from the sensor, GSM module to send the data or information from the micro-controller to the computer server and a power source using Solar Panel, Regulator and Battery. Once a sensor is triggered, an output signal will be relayed to the micro-controller which serves as a switch that triggers the connected GSM module to send an alert message or water level status to another GSM modem connected to a computer server. Then, the developed program installed in the computer server will interpret and analyze the message received then automatically send a text message to the concern agencies’ numbers stored in a database. Also, the developed program will then automatically relay the alert message or status by uploading to the developed website. Furthermore, concern agencies, local officials and the local communities could inquire about the current status by sending a message that contains keywords.
“Early Flood Detection and Monitoring System Based on Wireless Sensor Network” [6] the system involves the deployment of sensor nodes at specific flood vulnerable locations for real-time flood monitoring and detection. Flood events relating to flash flooding and run-off water or overflow are successfully monitored in real time which saves individuals plenty of time to prepare against predicted flood occurrence, saving them from the aftermath of flood disaster. The system was tested via simulation of different flood scenarios, and the outcome was efficient and accurate.
“Flood level indicator and risk warning system for remote location monitoring using flood observatory system” [7] FOS can be deployed in flood prone areas in afford to create a well-used standard for remote flood observation systems. The ability to receive real time information on flood level empowers both government and private organizations to react to imminent danger in an effective manner. With the real time flood information, allows public safety organizations and other emergency managers to effectively plan their resource deployment within the limited time of alert. Warning as flood rises could be used to save life’s and properties in many ways can help such organization and government to spend sufficient amount of money in restoration process.
METHODOLOGY
System Block Diagram
The block diagram of the overall system is shown in the figure below. The sensors placed at the different places reads the data which are manipulated through the microcontroller and the values of the sensors are displayed. The values obtained repeatedly are send to database and through the web API, warning message is sent into the phone.
The raspberry Pi used is the brain of the project. It is responsible for acquiring, processing, storing and communicating the information from sensors, and then executing the events respectively. Raspberry reads the data from the Ultrasonic sensor (HCSR04) and Temperature and Humidity sensor (DHT11). Then the Raspberry pi
processes the obtained value of the sensor and displays it. The value from the Ultrasonic sensor is used to determine the level of water. The certain threshold value for the distance between the ultrasonic sensor and the river is fixed The value of distance obtained from the ultrasonic sensor is updated repeatedly with the change in the water level. If the value of the distance is less than the fixed threshold value then the led and buzzer will turn on which signifies that there is high chances of occurring flood. If the value of distance is greater than the fixed threshold value then the LED and the buzzer will remain off which signifies that there is nothing to worry about. The Raspberry pi displays the value of temperature, humidity and the distance between the sensor and the river in its local terminal too.
The values of the sensors are obtained repeatedly in the certain interval of time. So the real time values of the sensors are obtained. The values obtained are uploaded to the local server of the Raspberry Pi using the MySQLdb. The data obtained in MySQLdb from the Raspberry pi are date and time, temperature, humidity, distance of ultrasonic sensor and river and the remarks regarding the flood. The date and time is auto incremented since it doesn’t require any sensor input data. The values of temperature and the humidity changes corresponding to the changes in the environmental temperature and humidity and gets updated in the database table. The main role here is of the ultrasonic sensor. The value of the ultrasonic sensor is updated repeatedly in certain interval of time and shows the distance. If the value of the distance is less than the threshold value then the warning message regarding flood will be displayed in the remarks and if the value of the distance is greater than the threshold value then remarks will display default message. The data in the database table are updated automatically every 6 seconds.
Now, the main motive of the system to alert the people about the coming flood is done by the web API. The data from the database is linked to the web API. What the web API does is, it continuously keeps on reading the value of sensors from the data base. And when the value of distance becomes less than the threshold value the web API indicates it so by changing the color the trigger used there. The contact or phone number of the residents are also uploaded in the web API so, it quickly informs the local people about flood by sending the warning SMS to the people whose numbers are registered in it.
Flowchart
Hardware Description
Raspberry Pi
The Raspberry Pi is a low cost, credit-card sized computer that plugs into a computer monitor or TV, and uses a standard keyboard and mouse. It is a capable little device that enables people of all ages to explore computing, and to learn how to program in languages like Scratch and Python. It’s capable of doing everything you’d expect a desktop computer to do, from browsing the internet and playing high-definition video, to making spreadsheets, word-processing, and playing games. the Raspberry Pi has the ability to interact with the outside world, and has been used in a wide array of digital maker projects, from music machines and parent detectors to weather stations and tweeting birdhouses with infra-red cameras. We want to see the Raspberry Pi being used by kids all over the world to learn to program and understand how computers work.
Ultrasonic Sensor
The sensor head emits an ultrasonic wave and receives the wave reflected back from the target. Ultrasonic Sensors measure the distance to the target by measuring the time between the emission and reception. It uses a single ultrasonic element for both emission and reception. In a reflective model ultrasonic sensor, a single oscillator emits and receives ultrasonic waves alternately. This enables miniaturization of the sensor head.
Specifications:
a. Operating voltage: +5V
b. Theoretical Measuring Distance: 2cm to 450cm
c. Practical Measuring Distance: 2cm to 80cm
d. Accuracy: 3mm
e. Measuring angle covered: <15°
Buzzer
A buzzer is a device which makes a buzzing or beeping noise. This type of buzzer requires some kind of oscillator to drive it—if you apply a DC voltage you will just get a click. They are used in places where you need something that emits an audible tone, but don’t care about high-fidelity sound reproduction, like microwave ovens, smoke alarms, and electronic toys.
Specifications
a. Rated Voltage: 6V DC
b. Operating Voltage: 4-8V DC
c. Rated current: <30mA
d. Sound Type: Continuous Beep
e. Resonant Frequency: ~2300 Hz
f. Small and neat sealed package
Temperature and Humidity Sensors (DHT11)
Temperature sensors measure air temperature, while humidity sensors measure air humidity. The calculation of the air humidity does not directly influence a wind site assessment, but knowing this parameter helps assessing the potential danger of ice build-up at the measuring location. Temperature sensors should always be mounted at a height of at least 10m to ensure sufficient distance from heat radiating from the earth. This DHT11 Temperature and Humidity Sensor features a calibrated digital signal output with the temperature and humidity sensor capability. It is integrated with a high-performance 8-bit microcontroller. Its technology ensures the high reliability and excellent long-term stability
Specification
a. Supply Voltage: +5 V
b. Temperature range: 0-50 °C error of ± 2 °C
c. Humidity: 20-90% RH ± 5% RH error
PCB Wizard
PCB Wizard is a powerful package for designing single-sided and double-sided printed circuit boards (PCBs).
It provides a comprehensive range of tools covering all the traditional steps in PCB production, including schematic drawing, schematic capture, component placement, automatic routing, Bill of Materials reporting and file generation for manufacturing.
Software Description
Python [8]
Python is an interpreted, object-oriented programming language similar to PERL, that has gained popularity because of its clear syntax and readability. Python is said to be relatively easy to learn and portable, meaning its statements can be interpreted in a number of operating systems, including UNIX-based systems, Mac OS, MS-DOS, OS/2, and various versions of Microsoft Windows 98. Python was created by Guido van Rossum, a former resident of the Netherlands, whose favorite comedy group at the time was Monty Python’s Flying Circus. The source code is freely available and open for modification and reuse. Python has a significant number of users.
Raspbian
Raspbian is a Debian-based computer operating system for Raspberry Pi. There are several versions of Raspbian including Raspbian Buster and Raspbian Stretch. Since 2015 it has been officially provided by the Raspberry Pi Foundation as the primary operating system for the family of Raspberry Pi single-board computers Raspbian is the recommended operating system for normal use on a Raspberry Pi. Raspbian is a free operating system based on Debian, optimized for the Raspberry Pi hardware. Raspbian comes with over 35,000 packages: pre compiled software bundled in a nice format for easy installation on your Raspberry Pi. Raspbian is a community project under active development, with an emphasis on improving the stability and performance of as many Debian packages as possible.
MySQLdb
MySQL is a fast, easy-to-use RDBMS being used for many small and big businesses. MySQL is developed, marketed and supported by MySQL AB, which is a Swedish company. MySQL is becoming so popular because of many good reasons. MySQL is released under an open-source license. So you have nothing to pay to use it. MySQL is a very powerful program in its own right. It handles a large subset of the functionality of the most expensive and powerful database packages. MySQL uses a standard form of the well-known SQL data language. MySQL works on many operating systems and with many languages including PYTHON, PHP, PERL, C, C++, JAVA, etc. MySQL works very quickly and works well even with large data sets and is very friendly to PHP, the most appreciated language for web development. It supports large databases, up to 50 million rows or more in a table. The default file size limit for a table is 4GB, but you can increase this (if your operating system can handle it) to a theoretical limit of 8 million terabytes (TB). MySQL is customizable. The open-source GPL license allows programmers to modify the MySQL software to fit their own specific environments. The value obtained from external sensors can also be uploaded to the MySQLdb and through which it can be monitored in web
page, mobile application, SMS, etc.
Cayenne
Cayenne is a very useful web API where we can select from a large variety of pre-packaged end-to-end IoT solutions that include software, hardware, and connectivity. IT helps to have direct access to everything needs to be started selling right away, from marketing materials to proven sales tools. Through cayenne any database can be linked it any web sites, mobile app, SMS system etc. This is very applicable since it is free of cost of very easy to use.
DESIGN AND IMPLEMENTATION
Raspberry Pi
Every complex embedded system needs a microcontroller or a microprocessor. This project uses a Raspberry Pi because it was the best fit for the needs of the project. The main goal of this project is to automate and digitize the attendance system. For this, the system needs to save the attendance data in such a way that it will be available and can be analyzed easily. For this, Raspberry pi was the most reasonable microprocessor. Also, the system needed to have a RTOS for users to be able to operate it easily. The design of such RTOS is difficult in other microcontrollers due to the programming language limitation. In Pi, one can use any language as per the need of the project.
DHT11 Sensor
The DHT11 temperature and humidity sensor is a nice little module that provides digital temperature and humidity readings. It’s really easy to set up, and only requires one wire for the data signal. These sensors are popular for use in remote weather stations, soil monitors, and home automation systems. Programming the DHT11 and connecting it to a Raspberry Pi is pretty simple too. In this tutorial, I’ll show you how to connect the DHT11 to the Raspberry Pi and output the humidity and temperature readings to an SSH terminal or to an LCD. Then I’ll give you some example programs for programming it with either C or Python.
Buzzer
A buzzer or beeper is an audio signaling device, which may be mechanical, electromechanical, or piezoelectric (piezo for short). Typical uses of buzzers and beepers include alarm devices, timers, and confirmation of user input such as a mouse click or key stroke.
LED
The circuit consists of a power supply (the Raspberry Pi), an LED that lights when the power is applied, and a resistor to limit the current that can flow through the circuit. You will be using one of the ‘ground’ (GND) pins to act like the ‘negative’ or 0 volt ends of a battery. The ‘positive’ end of the battery will be provided by a GPIO pin. Here we will be using pin 18. When they are ‘taken high’, which means it outputs 3.3 volts, the LED will light.
Ultrasonic sensor with pi
There are four pins on the ultrasound module that are connected to the Raspberry .The pins are connected as following example:
VCC to Pin 2 (VCC)
GND to Pin 6 (GND)
TRIG to Pin 12 (GPIO18)
connect the 330Ω resistor to ECHO. On its end you connect it to Pin 18 (GPIO24) and through a 470Ω resistor you connect it also to Pin6 (GND).
The GPIO pins only tolerate maximal 3.3V. The connection to GND is to have an obvious signal on GPIO24. If no pulse is sent, the signal is 0 (through the connection with GND), else it is 1. If there would be no connection to GND, the input would be undefined if no signal is sent (randomly 0 or 1), so ambiguous. Below here is the structure as a circuit diagram:
CODING (FILE)
RESULT AND ANALYSIS
Result
After all the complete connections of the system were made successfully along with the required software, the system was ready for testing. Individual models were tested at the beginning of the project. The system was tested for analyzing the various parameters such as temperature, humidity and level of water.
The data extraction was done on the Monday August 5 2019 from 6AM to 10 PM for the temperature and the obtained temperature was not much different from the real time environment temperature so the sensor seems to be feasible. The above plot shows the temperature obtained from DHT11.
The data extraction was done on the same day from 9:25 AM to 10:10 AM. The data obtained from the DHT11 was not much different from the humidity of the environment so in this case too, the sensor is feasible for measuring the humidity of the environment.
The value of ultrasonic sensor gives the distance between the sensor and the river which is normally calculated as the level of water. The value of distance was measured by varying the position of ultrasonic sensor and the data come out to be not much different than the distance measured on the measuring tape. This signifies that the ultrasonic sensor is feasible for the use in system. The above table shows the distance calculated from the measuring tape and ultrasonic sensor.
5.2 Limitation
As no any machine can be perfect and this line also affect out project as well. Desired output was observed. The system designed has the following limitation:
- DHT11 sensor can measure the temperature only from 0-50 degree Celsius and cannot operate on lower or higher range of temperature than this.
- DHT11 sensor can measure the humidity only from 20-95% RH and hence cannot operate on lower or higher range than this.
- HC-SR04 (Ultrasonic sensor) has the maximum range of only 400 centimeters.
The web API delays sometime to deliver the SMS.
DISCUSSION AND CONCLUSION
Finally, it is concluded that, the system can detect and hypothesize the flood earlier. The project is based on embedded system and close loop control system. System consists of hardware and software applications to detect water level of rivers, dams etc. System automatically detects the change in level of water and alerts the system when it crosses the threshold value(less than 20cm). The system include ultrasonic sensor to detect the rise in water level and alert if distance between water and sensor is less than 20 cm. DHT11 sense the temperature and humidity which help to analysis the environmental factor for flooding. If the water level crosses the threshold value than Raspberry pi turns the buzzer and led turn on which symbolizes the warning for early flood.
Future Enhancement
This project can be made useful in various purposes when the system is enhanced as per the requirement of the relevant field. But here the main concern is to enhance the system so that it can be highly applicable for the determination of water level in river and warn the people in real time. The further enhancement which can be carried out may be:
- The temperature and the humidity sensor having higher operating range can be used for the application various regions.
- The distance sensor having higher range of operation can be used for larger system.
- The water flow sensor can be used to determine the discharge of water which also aids on early detection of flood.
- The system can be implemented in various places and the data of one system can be used to alert the other interconnected system so that the system become more feasible, fast and effective.
- The web API can be made more advanced to handle the overall data of the different connected system.
- Along with SMS the people can be alerted through phone calls, android app, web pages etc.
APPENDIX
PROJECT BY
Nirmal adhikari
Pradip shrestha(https://www.facebook.com/pradip.shrestha.1420
Sandesh sigdel
Sudip poudel