Professional Documents
Culture Documents
Bachelor of Technology
in
by
2021-2022
SCHOOL OF ENGINEERING
VISION :
• To be a premier institution ensuring globally competent and ethically
strongprofessionals.
MISSION :
• To provide higher education by refining the traditional methods of teaching to
makeglobally competent professionals.
• To impart quality education by providing the state of the art infrastructure and
innovative research facilities.
An Autonomous Institution
School of Engineering
CERTIFICATE
This is to certify that the project work entitled “FLOOD MONITORING AND
ALERTING SYSTEM” submitted by ARUKONDA RAHUL bearing roll number
187Z1A0406 is in fulfillment for the award of the degree of Bachelor of Technology in
Electronics and Communication Engineering from Jawaharlal Nehru Technological
University, Hyderabad during the academic year 2021-22.
This project is a record of bonafide work carried out by him under the supervised
guidance and has not been submitted to any other university or institution for the award
of any degree.
External Examiner
ACKNOWLEDGEMENT
fulfillment for the award of the degree of Bachelor of Technology in Electronics &
(JNTU), Hyderabad is our original work carried out during the academic year
2021- 22 and has not been submitted earlier to any other university/institution for
incorporated in this report has been copied or fetched from any earlier work done by
others. However, the extract of literature which has been used for the study &
reporting has been duly acknowledged and indexed by providing the details in the
context of references.
Flood is one of the natural disasters which cannot be avoided totally.Every year,death rate
due to flood increases because of absence of early warning.In developed country like
U.S,Japan etc. the flooding problem is minimized significantly and do not affect much due
to availability of emergency systems.But the developing Countries like India,Brazil etc. is
suffering a lot during flood.Every year number of deaths due to flooding keeps increasing
in different part of our country.Whenever, flooding happens living area near the riverbank
and river downstream area are affected severly than others.
They need to be alerted much earlier to have extra time to evacuate immediately.To avoid
this situation we need to be authorized warning systemsystem provides such information
by alerting through buzzer and sending a text message to registered mobile number.To
solve this problem,this project demonstrates the idea and implementation of a Flood
Monitoring and Alerting system using Internet Of Things(IOT) with GSM technology
which is used to alert people through text alert message.
i
LIST OF FIGURES
Figure No Description PageNo
1.6 Existing model block diagram 3
1.7 Proposed model block diagram 4
1.9 Embedded IOT 8
1.10 Embedded Hardware 9
2.1(a) Arduino UNO 12
2.1(b) Pin description of Arduino 13
2.1(c) Memory of Arduino 14
2.1(d) Selecting Arduino 16
2.1(e) Upload button 16
2.1(f) Arduino in detail 17
2.1(g) ICSP Header 18
2.2(a) GSM module 19
2.2(b) GSM technology Architecture 20
2.2(c) GSM circuit 25
2.3 16*2 LCD display 27
2.4 Water flow sensor 30
2.5 Heat sink 32
2.6 Relay module 34
2.7(a) Buzzer 37
2.7(b) Internal circuit of buzzer 41
2.8(a) 12V DC motor 42
2.8(b) DC motor construction parts 43
2.8(c) Production of torque in a DC motor 44
2.10 Basic Arduino coding window 48
3.2 Block diagram 50
3.3 Circuit diagram 51
3.4 Flow chart 52
3.5 Experimental setup 53
ii
4(a) Alert SMS notification 55
4(b) ThingSpeak Uploaded data 56
iii
CHAPTER 1
INTRODUCTION
FLOOD MONITORING AND ALERTING SYSTEM
INTRODUCTION
Flood occurs when water overflows from the river, lake or from heavy rainfall and it
can happen at any time of the year. Flooding can be very dangerous, when floods happen
in an area that people live, the water carries along objects like houses, cars, furniture and
even people. It can wipe away property, trees and many more heavy items. For years,
flooded roads have beena problem in Metro Mumbai. It causes heavy flow of traffic.
Both motorists and commuters are getting stuck in a flooded areas and getting lost in
finding possible routes just to go to their destinations. When traffic happened, people’s
money, time and effort are wasted. Through the local government unit flood control has
been extending their efforts to inform the commuters regarding the situation in flooded
areas during rainy season, still the dissemination of information to the locals are not
enough.
For this reason, the “Arduino Flood Detector System” is been develop, to help the
road user to avoid this problem happened. It was invented based on problem faced by
motorists and commuters when flood occurred. This will avoid the traffic jam because
the users have a time to find a possible routes before they are going to be stuck at the
flood area.
1.2 MOTIVATION
This flood monitoring system is designed and developed to warn and alert both
authority and the owners of the vehicles about the flood almost immediately. A water
level sensor will be set at two points of water level which is at 0.05 m and 0.09 m. When
the water reaches this point, it will light on the Light Emitting Diode (LED) and trigger
the buzzer that acts as an alarm to alert both authority and owner. All the readings of
water level are shown in an application called Blynk that will connect through the
connection of a Wireless Fidelity (Wi-Fi) for reference. This project applied both,
hardware and software programming.
The hardware components of this system is divided into three (3) main parts which
1
Department of ECE,NNRESGI
FLOOD MONITORING AND ALERTING SYSTEM
are: i) the water level sensor as the input system, ii) an Arduino Mega 2560 as the main
microcontroller which controlall inputs and output of the system and an ESP 8266 Wi-Fi
module as an interfacewith the output and connection to application respectively and, iii)
an LED and a buzzer as the output system. Meanwhile, for software programming,
Arduino software IDE is used for hardware coding. Hence, a system and mechanism
for real-time surveillance of the potentialflooding at the car park should be established.
Other researchers also implement this type of project to overcome the flood crisis.
The project as reported in [7-8] is quite similar with this project, but was more
focused more on the detection of water level. Unfortunately, the system cannot send any
notification directly to the users. Besides that, researchers in [8-9] also developed
roughly the same system, where the system can warn and alert users through a
technology called Global System Messaging (GSM) technology.
System which is used in this research possesses advantages compared to these two
systems where it can send notifications prompt, direct and fast, in fact the fastest to the
users. Users can receive this notification through an application called the Blnyk
Application that has been installed in each user’s smartphone. This system has been
implemented with the latest technology called the Internet of Things (IoT), that have this
amazing capability of sending anyinformation wirelessly. The objective of this project is
to design, develop and build a flood warning system especially for parking spaces that
will alert and warn the vehicle owner apart from developing an application that can be
monitored effortlessly via a newest technology of wireless connection.
1.3 OBJECTIVES
The main objective of this project is to develop and design a flood detection system that
will detect flood automatically and send data to the Local Government Unit and to
residents usingan Arduino. Specific Objectives
-To design a circuit and create a programming code using the microcontroller.
-To apply the Serial Communication in transmitting the data from one place to another
place.
-To detect the current level of the flood where the system sensor will be divided into
four levels.
1.4 SCOPE
This study is conducted to solve the problems brought about by floods. The device shall
contain with the following features: It has ultrasonic sensor to sense the distance of water
level of flood on the road. The system provided a camera that will display the real-time
image of the flood that can view via livestream.
It includes Serial Communication to send warning text message with the content of
date, time, water level and road accessibility. The system has three (3) modules which
are Users, Logs, and Contact Numbers. It can be modify by the admin.
The unit containing the sensor is suggested to be place in front of Our system. The
position of the sensor must be placed perpendicular to the flood water; otherwise, there
2
Department of ECE,NNRESGI
FLOOD MONITORING AND ALERTING SYSTEM
The sensor is suggested to be placed on a pole with a height of about 3 to 3.5 meters. The
flood sensors and microcontrollers will be powered by a Solar Power Bank with 80,
000 Ampere Ampere-Hour (mAh) for the benefit of continuous operation of water
flood height detection and network data transmission.
3
Department of ECE,NNRESGI
FLOOD MONITORING AND ALERTING SYSTEM
4
Department of ECE,NNRESGI
FLOOD MONITORING AND ALERTING SYSTEM
5
Department of ECE,NNRESGI
FLOOD MONITORING AND ALERTING SYSTEM
Sense: The devices that sense its surrounding environment in the form of
temperature, movement, and appearance of things, etc.
Send and receive data: IoT devices are able to send and receive the data over the
networkconnection.
Analyzation: The devices are used for analyzation of the data that received from
the otherdevice over the internet networks.
Controlled: IoT devices may control from some endpoint also. Otherwise, the IoT
devicesare themselves communicate with each other endlessly leads to the system
failure.
6
Department of ECE,NNRESGI
FLOOD MONITORING AND ALERTING SYSTEM
APPLICATIONS:-
3. Health Care:-
IoT applications can turn reactive medical-based systems into proactive wellness-based
systems.The resources that current medical research uses, lack critical real-world
information.
It mostly uses leftover data, controlled environments, and volunteers for medical
examination. IoT opens ways to a sea of valuable data through analysis, real-time field
data, and testing. The Internet of Things also improves the current devices in power,
precision, and availability. IoT focuses on creating systems rather than just equipment.
It is essential to know about the embedded devices while learning the IoT or building
the projects on IoT. The embedded devices are the objects that build the unique
computing system. These systems may or may not connect to the Internet.
An embedded device system generally runs as a single application. However, these
devices can connect through the internet connection, and able communicate through
othernetwork devices.
The embedded system software can be as simple as lighting controls running using
an 8- bit microcontroller. It can also be complicated software for missiles, process
control systems, airplanes etc.
7
Department of ECE,NNRESGI
FLOOD MONITORING AND ALERTING SYSTEM
8
Department of ECE,NNRESGI
FLOOD MONITORING AND ALERTING SYSTEM
The embedded system software can be as simple as lighting controls running using
an 8-bit microcontroller. It can also be complicated software for missiles, process
control systems, airplanes etc.
The term “embedded systems” is usually used to describe the devices or machines
that operate with minimum or no human supervision. Probably any device that runs
software can be called an embedded system to some extent. Think of your dishwasher,
microwave, washing machine, or oven: these devices arrive with a computer board that
is pre-programmed and requires no updating.
Embedded systems are a subset of the Internet of Things (IoT), an integration of
devices connected to the internet. Small software programs that implement a few
functions tend to be embedded systems. The IoT is a process in which objects are
equipped with sensors, processors for the hardware development, software systems,
protocols and web APIs, which together create a connected environment of embedded
systems.
IoT is getting more and more popular in our daily lives, so this technology’s
advancement is inevitable and can be definitely expected to continue. This can pose
some problems with privacy and security, which will require new solutions and
improvements of the system securityof internet-connected embedded systems.
The growth potential for the embedded industry is enormous. And the path forward
is becoming clearer every day. It’s time that we start building IoT systems, and provide
value to our customers.The Internet of Things (IoT) is no longer a fanciful vision. It is
very much withus, in everything from factory automation to on-demand entertainment.
IoT software solutions have largely had to be built from scratch with a high degree
of customization to specific requirements, which has driven up the cost and complexity
of development and deterred many prospective entrants to the market.
What have been missing are developer tools that alleviate the costs associated with
building the foundational infrastructure—the “plumbing” of their solutions—so they can
focus on optimizing the core functionality and bring solutions to market more quickly
with less cost. Benison Technologies is addressing these challenges with new solutions
that have the potentialto expand the market for IoT by reducing the cost and complexity
of development.
10
Department of ECE,NNRESGI
FLOOD MONITORING AND ALERTING SYSTEM
brighten by touching the base, and in innumerable applications of which most people are
never aware. With advances in micro machinery and easy-To use micro controller
platforms, the uses of sensors have expanded beyond the traditional fields of
temperature, pressure and flow measurement.
A sensor's sensitivity indicates how much its output changes when the input quantity
it measures changes. For instance, if the mercury in a thermometer moves 1 cm when
the temperature changes by 1 °C, its sensitivity is 1 cm/°C (it is basically the slope
assuming alinear characteristic). Some sensors can also affect what they measure; for
instance, a room temperature thermometer inserted into a hot cup of liquid cools the
liquid while the liquid heats the thermometer. Sensors are usually designed to have a
small effect on what is measured; making the sensor smaller often improves this and
may introduce other advantages.
Specifications of sensor:
PRECISION: The ability of sensor to output the same value for same input over a
number of trials
11
Department of ECE,NNRESGI
CHAPTER 2
DESCRIPTION ABOUT CIRCUIT
COMPONENTS
FLOOD MONITORING AND ALERTING SYSTEM
DESCRIPTION ABOUT CIRCUIT COMPONENTS
The Arduino UNO is a standard board of Arduino. Here UNO means 'one' in Italian. It
was named as UNO to label the first release of Arduino Software. It was also the first
USB board released by Arduino. It is considered as the powerful board used in various
projects. Arduino.cc developed the Arduino UNO board.Arduino UNO is
based on an ATmega328P microcontroller.
It is easy to use compared to other boards, such as the Arduino Mega board, etc. The
board consists of digital and analog Input/Output pins (I/O), shields, and other
circuits.The Arduino UNO includes 6 analog pin inputs, 14 digital pins, a connector, a
power jack, and an ICSP (In- Circuit Serial Programming) header. It is programmed
based on IDE, which stands for Integrated Development Environment. It ca n run on
both online and offline platforms.
12
DEPARTMENT OF ECE,NNRESGI
FLOOD MONITORING AND ALERTING SYSTEM
13
DEPARTMENT OF ECE,NNRESGI
FLOOD MONITORING AND ALERTING SYSTEM
USB- It allows the board to connect to the computer. It is essential for the
programming of the Arduino UNO board.
Crystal Oscillator- The Crystal oscillator has a frequency of 16MHz, which makes
the Arduino UNO a powerful board.
Voltage Regulator- The voltage regulator converts the input voltage to 5V.
GND- Ground pins. The ground pin acts as a pin with zero voltage.
Vin- It is the input voltage.
Analog Pins- The pins numbered from A0 to A5 are analog pins. The function of
Analog pins is to read the analog sensor used in the connection. It can also act as GPIO
(General Purpose Input Output) pins.
The preinstalled flash has a bootloader, which takes the memory of 0.5 Kb.Here,
SRAM stands for Static Random Access Memory, and EEPROM stands for
Electrically ErasableProgrammable Read-Only Memory.
14
DEPARTMENT OF ECE,NNRESGI
FLOOD MONITORING AND ALERTING SYSTEM
There are 20 Input/Output pins present on the Arduino UNO board. These 20 pis
include 6 PWM pins, 6 analog pins, and 8 digital I/O pins.
The PWM pins are Pulse Width Modulation capable pins.
The crystal oscillator present in Arduino UNO comes with a frequency of 16MHz.
It also has a Arduino integrated WiFi module. Such Arduino UNO board is based on
the Integrated WiFi ESP8266 Module and ATmega328P microcontroller.
The input voltage of the UNO board varies from 7V to 20V.
Arduino UNO automatically draws power from the external power supply. It can also
draw power from the USB.
15
DEPARTMENT OF ECE,NNRESGI
FLOOD MONITORING AND ALERTING SYSTEM
Select the port. Click on the Tools -> Port (select the port). The port likely will be
COM3 or higher. For example, COM6, etc. The COM1 and COM2 ports will not
appear, because these two ports are reserved for the hardware serial ports.
Now, upload and run the written code or sketch.
To upload and run, click on the button present on the top panel of the Arduino
display, asshown below:
Within the few seconds after the compile and run of code or sketch, the RX and TX
light present on the Arduino board will flash.
The 'Done Uploading' message will appear after the code is successfully
uploaded. The message will be visible in the status bar.
The Arduino UNO Board, with the specification of pins, is shown below:
16
DEPARTMENT OF ECE,NNRESGI
FLOOD MONITORING AND ALERTING SYSTEM
17
DEPARTMENT OF ECE,NNRESGI
FLOOD MONITORING AND ALERTING SYSTEM
The ICSP header consists of 6 pins.The structure of the ICSP header is shown below
SDA:-It stands for Serial Data. It is a line used by the slave and master to send and
receivedata. It is called as a data line, while SCL is called as a clock line.
SCL:-It stands for Serial Clock. It is defined as the line that carries the clock data. It
is used to synchronize the transfer of data between the two devices. The Serial Clock is
generated bythe device and it is called as master.
SPI:-It stands for Serial Peripheral Interface. It is popularly used by the
microcontrollers to communicate with one or more peripheral devices quickly. It uses
conductors for data receiving, data sending, synchronization, and device selection (for
communication).
18
DEPARTMENT OF ECE,NNRESGI
FLOOD MONITORING AND ALERTING SYSTEM
MOSI:-It stands for Master Output/ Slave Input.The MOSI and SCK are driven by
theMaster.
SS:-It stands for Slave Select. It is the Slave Select line, which is used by the master.
It actsas the enable line.
I2C:-It is the two-wire serial communication protocol. It stands for Inter Integrated
Circuits. The I2C is a serial communication protocol that uses SCL(Serial Clock) and
SDA (Serial Data) to receive and send data between two devices.3.3V and 5V are the
operating voltages of the board.
19
DEPARTMENT OF ECE,NNRESGI
FLOOD MONITORING AND ALERTING SYSTEM
Digital cellular technology like GSM (Global System for Mobile Communication) is
used to transmit mobile data as well as voice services. This concept was implemented
at Bell Laboratories using a mobile radio system in 1970.
As the name suggests, it is the standardization group name that was established in
the year1982 to make a general European mobile telephone standard. This technology
owns above 70% of the market share of the digital cellular subscriber around the
world. This technology was developed by using digital technology.
At present, GSM technology supports above 1 billion mobile subscribers around the
world in the above 210 countries. This technology provides voice and data services
from fundamentalto complex. This article discusses an overview of GSM technology.
20
DEPARTMENT OF ECE,NNRESGI
FLOOD MONITORING AND ALERTING SYSTEM
21
DEPARTMENT OF ECE,NNRESGI
FLOOD MONITORING AND ALERTING SYSTEM
22
DEPARTMENT OF ECE,NNRESGI
FLOOD MONITORING AND ALERTING SYSTEM
collection of BTSs, assigns channels. It converses with the Base Transceiver Stations
over Abis interface.
The subsystem element in the base station of the GSM network uses the radio allowable
technology to allow a number of operators to right to use the system concurrently.
Every channel supports up to 8 operators by allowing a base station to include different
channels; a huge number of operators could be accommodated through every base
station.
These are located carefully through the provider of the network to allow whole area
coverage. This area can be enclosed with a base station that is often being called a cell.
Because it is not achievable to stop the signals from overlapping into the nearby cells
and channels which are used in single-cell are not utilized in the next.
Mobile Station
It is the mobile phone which consists of the transceiver, the display, and the processor
and is controlled by a SIM card operating over the network.
The MS (Mobile stations) or ME (mobile equipment) are most generally identified
through cell otherwise mobile phones which are the part of a GSM mobile
communications n/w that the operator observes & operates. At present, their dimension
has reduced radically whereas the functionality level has very much increased. And one
more benefit is that the time among charges has drastically enlarged. There are different
elements to the mobile phone, though the two essential elements are the hardware & the
SIM.
The hardware includes the major elements of the mobile phone like the case,
display, battery, & the electronics utilized to produce the signal & process the data
receiver to be broadcasted. The mobile station includes a number called the IMEI. This
can be set up on the mobile phonewhile manufacturing & it cannot be modified.
It is accessed by the network during registration to check whether the equipment has
been reported as stolen.
The SIM (Subscriber Identity Module) card includes the data which gives the user
identity toward the network. And also, it includes different information like a number
called the IMSI (International Mobile Subscriber Identity). When this IMSI is used in the
SIM card, the mobile user could simply change mobiles by moving the SIM from one
mobile to another.
So mobile changing is easy without changing the same mobile number means that
people would frequently improve, thus making a further income stream for the
providers of network & serving to enhance the total financial victory of GSM.
Operation and Support Subsystem (OSS)
The operation support subsystem (OSS) is a part of the complete GSM network
architecture. This is connected to the NSS & the BSC components. This OSS is mainly
used to control the GSM network & the BSS traffic load. It should be noted down that
when the number of BS enhances through the subscriber population scaling then some
of the preservation tasks are moved to the base transceiver stations so that the ownership
cost of the system can be reduced. The GSM network architecture of 2G mainly follows
a logical technique of operation. This is very simple as compared with present
architectures of mobile phone network which utilize software-defined units to allow
extremely supple operation. But the architecture of 2G GSM will demonstrate the voice
& operational fundamental functions that are required & how they arranged together.
When the GSM system is digital, then the network is a data network.
23
DEPARTMENT OF ECE,NNRESGI
FLOOD MONITORING AND ALERTING SYSTEM
The security strategies standardized for the GSM system make it the most secure
telecommunications standard currently accessible. Although the confidentiality of a call
and secrecy of the GSM subscriber is just ensured on the radio channel, this is a major
step in achieving end-to-end security.
GSM Modem
A GSM modem is a device that can be either a mobile phone or a modem device that
can be used to make a computer or any other processor communicate over a network. A
GSM modem requires a SIM card to be operated and operates over a network range
subscribed by the network operator. It can be connected to a computer through serial,
USB, or Bluetooth connection.
A GSM modem can also be a standard GSM mobile phone with the appropriate
cable and software driver to connect to a serial port or USB port on your computer.
GSM modem is usually preferable to a GSM mobile phone. The GSM modem has a
wide range of applications in transaction terminals, supply chain management, security
applications, weather stations, andGPRS mode remote data logging.
But the architecture of 2G GSM will demonstrate the voice & operational
fundamental functions that are required & how they arranged together. When the GSM
system is digital, then the network is a data network.
GSM technology will allow communication anywhere, anytime, and with anyone. The
functional architecture of GSM employing intelligent networking principles, and its
ideology, which provides the development of GSM is the first step towards a true
personal communication system that enough standardization to ensure compatibility.
1.A person is critically injured or has fallen ill and needs to be immediately taken care of.
All he or the person accompanying him has is a mobile phone.
2.A patient is discharged from the hospital and thinks of taking rest at his home, but still
has to go to the hospital for regular checkups. He may have a mobile phone and also
some medical sensor devices like health monitoring devices.
In both situations, the only way which can provide a solution is by using the mobile
communication system. In other words, using communication technologies any situation
like the above can be handled just by transmitting the patient details through the
communication network and receiving them and processing them at the receiver section-
either a the healthcarecenter or at the doctor’s home.
The doctor simply monitors the patient details and gives back the instructions to the
person(in the 1st case)so that he can at least take some precautions before finally
reaching the hospital and in the 2nd case monitors the test results of the patient and in case
of any abnormalities, takesthe next step for further treatment.
This whole situation is the telemedicine services. The telemedicine system can be used in
eitherof the three ways.
Using Video conferencing, where patients sitting at one place can have direct
interaction with the health care providers and accordingly carry on the curing process.
By using health monitoring sensors that keep updating about the health of the patient and
accordingly guide the health care providers to carry on the treatment.
By transmitting the acquired medical data and transmit the acquired data forconsultation
and processing.
For the above three ways, a wireless communication technique is used. Medical services
require many ways of getting access to stored resources. These can be medical
databases or online hosts with devices that can help recover and monitor patient health.
Different access options are broadband network, through medium-throughput media and
narrowband through GSM.
The advantages of GSM technology in the telemedicine system include the following.
It is more cost-effective.
GSM receivers are widely available- mobile phones and GSM modems
It has a high data transfer speed.
26
DEPARTMENT OF ECE,NNRESGI
FLOOD MONITORING AND ALERTING SYSTEM
The Patient Unit: It collects information from the patient, sends it as an analog
signal or converts it to the digital signal, controls the data flow, and transmits the data. It
basically consists of various medical sensors like heartbeat sensor, blood pressure
monitor, skin temperature monitor, spirometry sensor, etc which outputs an electrical
signal and sends these signals to the processor or a controller ( a Microcontroller or a
PC) for further processing of the signals and then transmits the results through a wireless
communication network.
Communication Network: It is used for data security and data transmission. The
GSM technology is used which uses mobile stations, base substations, and network
systems. The mobile station consists of the basic mobile access point or the mobile phone
and links the mobile phones with the GSM network forcommunication.
Receiver Unit/Server Side: It is basically a healthcare system where a GSM
modem is installed which receives and decodes the signals and sends them to the
presentation unit.
Presentation Unit: It is basically the processor that converts the data received into a
well-defined format and stores them so that the doctors can regularly monitor it and any
feedback to the client-side can be sent via SMS from the GSM modem.
A Simple Telemedicine System
A Basic Telemedicine system can be shown in a simplified way. It consists of two
units – The transmitter unit and the receiver unit. The transmitter unit transmits the
sensor input and the receiver unit receives this input to carry on further processing.
27
DEPARTMENT OF ECE,NNRESGI
FLOOD MONITORING AND ALERTING SYSTEM
LCD (Liquid Crystal Display) is a type of flat panel display which uses liquid crystals
in its primary form of operation. LEDs have a large and varying set of use cases for
consumers and businesses, as they can be commonly found in smartphones, televisions,
computer monitors and instrument panels.
LCDs were a big leap in terms of the technology they replaced, which include light-
emitting diode (LED) and gas-plasma displays. LCDs allowed displays to be much
thinner than cathode ray tube (CRT) technology. LCDs consume much less power than
LED and gas-display displays because they work on the principle of blocking light
rather than emitting it. Where an LED emits light, the liquid crystals in an LCD produces
an image using a backlight.
As LCDs have replaced older display technologies, LCDs have begun being
replaced by new display technologies such as OLED’s.
Types of LCDs
Types of LCDs include:
Twisted Nematic (TN)- which are inexpensive while having high response times.
However, TN displays have low contrast ratios, viewing angles and color contrasts.
In Panel Switching displays (IPS Panels)- which boast much better contrast ratios,
viewing angles and color contrast when compared to TN LCDs.
28
DEPARTMENT OF ECE,NNRESGI
FLOOD MONITORING AND ALERTING SYSTEM
Vertical Alignment Panels (VA Panels)- which are seen as a medium quality
between TN and IPS displays.
Advanced Fringe Field Switching (AFFS)- which is a top performer compared IPS
displays in color reproduction range.
An LCD (Liquid Crystal Display) screen is an electronic display module and has a
wide range of applications. A 16x2 LCD display is very basic module and is very
commonly used in various devices and circuits. A 16x2 LCD means it can display 16
characters per line and there are 2 such lines. In this LCD each character is displayed in
5x7 pixel matrix. The 16 x 2 intelligent alphanumeric dot matrix display is capable of
displaying 224 different characters and symbols. This LCD has two registers, namely,
Command and Data.Command register stores various commands given to the display.
Data register stores data to be displayed. The process of controlling the display
involves putting the data that form the image of what you want to display into the data
registers, then putting instructions in the instruction register.
In your arduino project Liquid Crystal Display simplifies this for you so you don't
need to know the low-levellinstructions. Contrast of the display can be adjusted by
adjusting the potentiometer to be connected across VEE pin.
29
DEPARTMENT OF ECE,NNRESGI
FLOOD MONITORING AND ALERTING SYSTEM
Sensors play a very crucial role in today’s automatic systems. Being a small, low cost
and reliable device, sensors are easy to embed with larger electronics. Today we can
find various types of sensors in the market.
With the advance in technology, sensors are also evolved in their functioning and
size. From the early size of cm units, size of sensors has shrunk to the scale of nm.
Sensors have also solved many challenges of electronic and electrical engineering such
as finding the intensity of ambient light, determining the temperature in the furnace,
calculating humidity of surrounding, etc…. Water flow sensor gives an amazing solution
for measuring the flow rate of liquids.
30
DEPARTMENT OF ECE,NNRESGI
FLOOD MONITORING AND ALERTING SYSTEM
Water flow sensors are installed at the water source or pipes to measure the rate
of flow ofwater and calculate the amount of water flowed through the pipe. Rate of
flow of water is measured as liters per hour or cubic meters.
Working Principle
Water flow sensor consists of a plastic valve from which water can pass. A water rotor
along with a hall effect sensor is present the sense and measure the water flow.
When water flows through the valve it rotates the rotor. By this, the change can be
observed in the speed of the motor. This change is calculated as output as a pulse signal
by the hall effect sensor. Thus, the rate of flow of water can be measured.
The main working principle behind the working of this sensor is the Hall effect.
According to this principle, in this sensor, a voltage difference is induced in the
conductor due to the rotationof the rotor. This induced voltage difference is transverse to
the electric current.
When the moving fan is rotated due to the flow of water, it rotates the rotor which
induces the voltage. This induced voltage is measured by the hall effect sensor and
displayed on the LCDdisplay.
The water flow sensor can be used with hot waters, cold waters, warm waters, clean
water, and dirty water also. These sensors are available in different diameters, with
different flow rate ranges.
These sensors can be easily interfaced with microcontrollers like Arduino. For this, an
Arduino microcontroller board for processing, a Hall effect water flow sensor, a 16×2
LCD display, and Breadboard connecting wires are required. The sensor is placed at the
water source inlet or at the opening of the pipe.
The sensor contains three wires. Red wire to connect with supply voltage. Black wire
to connect to ground and a yellow wire to collect output from Hall effect sensor. For
supply voltage 5V to 18V of DC is required.
Applications of Water Flow Sensor
Water flow sensors can measure the rate of flow of water either by measuring velocity
or displacement. These sensors can also measure the flow of water like fluids such as
measuring milk in a dairy industry etc…
There are various types of water flow sensors available based on their diameter and
method of measuring. A cost-effective and most commonly used water flow sensor is
Paddlewheel sensor.It can be used with water-like fluids.
For the type of applications where a straight pipe is not available for inlet, Positive
displacement flow meter is used. This type of water flow sensor can be used for viscous
liquidsalso.
For working with dirty water and wastewater which may be conductive, Magnetic
flow meter is used. For applications such as sewage water, slurries, and other dirty
liquids Ultrasonic flow meters are used.
31
DEPARTMENT OF ECE,NNRESGI
FLOOD MONITORING AND ALERTING SYSTEM
YFS201 Hall effect sensor is an example of this sensor. These sensors also require a
display to display the measurements. This sensor outputs 4-5 pulses for every liter of
liquid flowing through it per minute. It has a working flow rate of 1-30liters per minute.
Heat Sinks are one of the most common forms of thermal management in technology,
machinery, and even in natural systems. These components are so ubiquitous that
they're easy to overlook, even by those who are familiar with the technology. We'll
address the basic working principles involved in heat sinks, introduce active and
passive heat sinkconfigurations, and discuss how some users implement heat sinks in
their applications.
- Mechanical
- Electrical
32
DEPARTMENT OF ECE,NNRESGI
FLOOD MONITORING AND ALERTING SYSTEM
- Chemical
- Nuclear
- Solar
- Friction
This process relies on the heat sink's temperature gradient and its working
fluid―most commonly air or a non-electrically- conductive liquid. The working fluid
passes across the surface of the warm heat sink and utilizes thermal diffusion and
convection to remove heat away from the surface and into the ambient environment.
This stage relies on, yet again, a temperature gradient to remove heat from the
heat sink. Therefore, if the ambient temperature is not cooler than the heat sink, no
convection and subsequent heat removal will occur. This step is also where the total
surface area of the heat sink becomes most advantageous. A large surface area
provides an increased area for thermal diffusion and convection to occur.
Utilize forced air to increase fluid flow across the hot area. Forced air is most
commonly generated by a fan,blower or even movement of the entire object―such as a
motorcycle's engine being cooled by the air passing along the heat sink fins designed
into the engine. One example of a fan producing forced air across a heat sink is the
33
DEPARTMENT OF ECE,NNRESGI
FLOOD MONITORING AND ALERTING SYSTEM
fan in your personal computer turning on after your computer gets warm. The fan
forces air across the heat sink, which allows more unheated air to move across the
heat sink surface, thus increasing the total thermal gradient across the heat sink
system and allowing more heat to exit the overall system.
You can find stock heat sinks to cool most common chip sizes. Some heat sinks are
custom designed to handle a specific chip or device's thermal loads best.
We use relays for a wide range of applications such as home automation, cars and bikes
(automobiles), industrial applications, DIY Projects, test and measurement equipment,
and many more.
34
DEPARTMENT OF ECE,NNRESGI
FLOOD MONITORING AND ALERTING SYSTEM
What is a Relay?
Relays can switch one or more circuits. Each switch in relay is referred as pole.
Number of circuits a relay connects is indicated by throws.Depending on the poles and
throws, relays areclassified into
-Single Pole Single Throw
-Single Pole Double Throw
-Double Pole Single Throw
-Double Pole Double Throw
Types of Relays
Relays can be classified into different types depending on their functionality,
structure, application etc. We listed out some of the common types of relays here.
-Electromagnetic
-Latching
-Electronic
-Non-Latching
-Reed
-High-Voltage
-Small Signal
-Time Delay
-Multi-Dimensional
-Thermal
-Differential
-Distance
-Automotive
-Frequency
-Polarized
-Rotary
36
DEPARTMENT OF ECE,NNRESGI
FLOOD MONITORING AND ALERTING SYSTEM
-Sequence
-Moving Coil
-Buchholz
-Safety
-Supervision
-Ground Fault
We made a dedicated guide on different types of relays. To learn more about different
types ofrelays, read Classification of Relays.
Relay Applications
Relays are used to protect the electrical system and to minimize the damage to the
equipment connected in the system due to over currents/voltages. The relay is used for
the purpose of protection of the equipment connected with it.
These are used to control the high voltage circuit with low voltage signal in
applications audio amplifiers and some types of modems.
These are used to control a high current circuit by a low current signal in the
applications like starter solenoid in automobile. These can detect and isolate the faults
that occurred in power transmission and distribution system.
2.7 BUZZER
There are many ways to communicate between the user and a product. One of the best
ways is audio communication using a buzzer IC. So during the design process,
understanding some technologies with configurations is very helpful. So, this article
discusses an overview of an audio signaling device like a beeper or a buzzer working
with applications.
What is a Buzzer?
An audio signaling device like a beeper or buzzer may be electromechanical or
piezoelectric or mechanical type. The main function of this is to convert the signal from
audio to sound. Generally, it is powered through DC voltage and used in timers, alarm
devices, printers, alarms, computers, etc. Based on the various designs, it can generate
different sounds like alarm, music, bell & siren.
The pin configuration of the buzzer is shown below. It includes two pins namely
positive and negative. The positive terminal of this is represented with the ‘+’ symbol or
a longer terminal. This terminal is powered through 6Volts whereas the negative
terminal is represented with the ‘-‘symbol or short terminal and it is connected to the
GND terminal.
History:-
The history of an electromechanical buzzer and piezoelectric is discussed below.
Electromechanical
This buzzer was launched in the year 1831 by an American Scientist namely Joseph
Henry but, this was used in doorbells until they were eliminated in 1930 in support of
musical bells, whichhad a smooth tone.
Piezoelectric
These buzzers were invented by manufacturers of Japanese & fixed into a broad
range of devices during the period of 1970s – 1980s. So, this development primarily
came due to cooperative efforts through the manufacturing companies of Japanese. In
the year 1951, they recognized the Application Research Committee of Barium Titanate
that allows the corporations to be cooperative competitively & bring about numerous
piezoelectric creations.
Specifications
The specifications of the buzzer include the following.
Colour is black
-The frequency range is 3,300Hz
-Operating Temperature ranges from – 20° C to +60°C
-Operating voltage ranges from 3V to 24V DC
-The sound pressure level is 85dBA or 10cm
-The supply current is below 15mA
38
DEPARTMENT OF ECE,NNRESGI
FLOOD MONITORING AND ALERTING SYSTEM
Types of Buzzer
A buzzer is available in different types which include the following.
-Piezoelectric
-Electromagnetic
-Mechanical
-Electromechanical
-Magnetic
Piezoelectric
As the name suggests, the piezoelectric type uses the piezoelectric ceramic’s
piezoelectric effect & pulse current to make the metal plate vibrate & generate sound.
This kind of buzzer is made with a resonance box, multi resonator, piezoelectric plate,
housing, impedance matcher, etc. Some of the buzzers are also designed with LED’s.
The multi resonator of this mainly includes ICs and transistors. Once the supply is given
to this resonator, it will oscillate and generates an audio signal with 1.5 to 2.kHz. The
impedance matcher will force the piezoelectric plate to produce sound
Electromagnetic
This type of buzzer is made with a magnet, solenoid coil, oscillator, housing,
vibration diaphragm, and magnet. Once the power supply is given, the oscillator which
produces the audio signal current will supply throughout the solenoid coil to generate a
magnetic field.
Sometimes, the vibration diaphragm will vibrate & generates sound under the
magnet & solenoid coil interaction. The frequency range of this ranges from 2 kHz to
4kHz.
Mechanical
These types of buzzers are subtypes of electromagnetic, so the components used in this
type are also similar. But the main difference is that the vibrating buzzer is placed on
the outside instead of the inside.
Electromechanical
The designing of these types of buzzers can be done with a bare metal disc & an
electromagnet. The working principle of this is similar to magnetic and electromagnetic.
It generates sound throughout the disc movement & magnetism.
Magnetic
Like a piezo type, magnetic is also used to generate a sound but they are different due to
core functionality. The magnetic type is more fixed as compared to the piezo type
because they work through a magnetic field.
Magnetic buzzers utilize an electric charge instead of depending on piezo materials to
generate a magnetic field, after that it permits another element of the buzzer to vibrate &
generate sound.
39
DEPARTMENT OF ECE,NNRESGI
FLOOD MONITORING AND ALERTING SYSTEM
The applications of magnetic buzzers are similar to the piezo type in household devices,
alarmssuch as watches, clocks & keyboards.
Working Principle
The working principle of a buzzer depends on the theory that, once the voltage is given
acrossa piezoelectric material, then a pressure difference is produced.
Mounting Configurations
The mounting configurations of buzzers include the following.
-Panel Mount
-Wire Leads
-Screw Terminals
-Through Hole
-Spring Contact
-Surface Mount
-Plane surface
How to use a Buzzer?
A buzzer is an efficient component to include the features of sound in our system or
project. It is an extremely small & solid two-pin device thus it can be simply utilized on
breadboard or PCB. So in most applications, this component is widely used.
There are two kinds of buzzers commonly available like simple and readymade. Once
a simple type is power-driven then it will generate a beep sound continuously. A
readymade type looks heavier & generates a Beep. Beep. Beep. This sound is because of
the internal oscillating circuit within it.
This buzzer uses a DC power supply that ranges from 4V – 9V. To operate this, a 9V
battery is used but it is suggested to utilize a regulated +5V/+6V DC supply. Generally,
it is connected through a switching circuit to switch ON/OFF the buzzer at the necessary
time interval.
40
DEPARTMENT OF ECE,NNRESGI
FLOOD MONITORING AND ALERTING SYSTEM
Once the two probes of the circuit are placed in the tank, it detects the level of water.
Once the water level exceeds the fixed level, then it generates a beep sound through a
buzzer connected to the circuit. This circuit uses a BC547B NPN Trasistor however we
can also use any general-purpose transistor instead of using 2N3904/2N2222.
This water level sensor circuit working is very simple and the transistor used within the
circuit works as a switch. Once the two probes notice the water level within the tank, then
the transistor turns ON & the voltage begins flowing throughout the transistor to trigger
the buzzer.
Advantages
The advantages of a buzzer include the following.
-Simply Compatible
-Frequency Response is Good
-Size is small
-Energy Consumption is less
-The Range of Voltage usage is Large
-Sound Pressure is high.
41
DEPARTMENT OF ECE,NNRESGI
FLOOD MONITORING AND ALERTING SYSTEM
Disadvantages
The disadvantages of the buzzer include the following.
-Controlling is a little hard
-Generates Annoying Sound
-Training is necessary to know how to repair the condition without just turning off.
Applications
The applications of the buzzer include the following.
-Communication Devices
-Electronics used in Automobiles
-Alarm Circuits
-Portable Devices
-Security Systems
-Timers
-Household Appliances
-Electronic Metronomes
-Sporting Events
-Annunciator Panels
-Game Shows
2.8 DC MOTOR
What is a DC Motor?
A DC motor is defined as a class of electrical motors that convert direct current
electrical energy into mechanical energy.
From the above definition, we can conclude that any electric motor that is operated
using direct current or DC is called a DC motor. We will understand the DC motor
construction and how a DC motor converts the supplied DC electrical energy into
mechanical energy in the next few sections.
DC Motor Diagram
Armature or Rotor
The armature of a DC motor is a cylinder of magnetic laminations that are insulated
from one another. The armature is perpendicular to the axis of the cylinder. The
armature is a rotating part that rotates on its axis and is separated from the field coil by
an air gap.
magnetic field. This electro-magnet has a cylindrical cavity between its poles.
Commutator
The commutator of a DC motor is a cylindrical structure that is made of copper
segments stacked together but insulated from each other using mica. The primary
function of a commutator is to supply electrical current to the armature winding.
Brushes
The brushes of a DC motor are made with graphite and carbon structure. These
brushes conduct electric current from the external circuit to the rotating commutator.
Hence, we come to understand that the commutator and the brush unit are concerned
with transmitting the power from the static electrical circuit to the mechanically rotating
region or the rotor.
DC Motor Working
In the previous section, we discussed the various components of a DC motor. Now,
using thisknowledge let us understand the working of DC motors.
A magnetic field arises in the air gap when the field coil of the DC motor is energised.
The created magnetic field is in the direction of the radii of the armature. The magnetic
field entersthe armature from the North pole side of the field coil and “exits” the armature
from the field coil’s South pole side.
44
DEPARTMENT OF ECE,NNRESGI
FLOOD MONITORING AND ALERTING SYSTEM
Types of DC motor
DC motors have a wide range of applications ranging from electric shavers to
automobiles. To cater to this wide range of applications, they are classified into different
types based on the field winding connections to the armature as:
Applications of DC Motor
The applications of different types of DC motors are listed below:
Shunt DC Motors
Owing to the fairly constant speed and medium starting torque of shunt DC motors,
they are used in the following applications:
Series DC Motors
Owing to the high starting torque and variable speed of series DC motors, they are used
in the following applications:
-Conveyors
-Hoists, Elevators
-Cranes
-Electric Locomotives
45
DEPARTMENT OF ECE,NNRESGI
FLOOD MONITORING AND ALERTING SYSTEM
-Shears
-Heavy Planers
-Rolling mills
-Elevators
We will consider each of these features in detail below. The core element of Thing
Speak is a‘Thing Speak Channel’.A channel stores the data that we send to Thing Speak
and comprises of the below elements:
8 fields for storing data of any type -These can be used to store the data from a sensor
or from an embedded device.
3 location fields - Can be used to store the latitude, longitude and the elevation. These
are very useful for tracking a moving device.
1 status field - A short message to describe the data stored in the channel. To use Thing
Speak, we need to sign up and create a channel. Once we have a channel, we can send
the data, allow Thing Speak to process it and also retrieve the same. Let us start
exploring Thing Speak by signing up and setting up a channel.
Thing Speak is IoT Cloud platform where you can send sensor data to the cloud.
You can also analyze and visualize your data with MATLAB or other software,
including making your ownapplications.
The Thing Speak service is operated by MathWorks. In order to sign up for
ThingSpeak, you must create a new MathWorks Account or log in to your existing
MathWorks Account.
Thing Speak is free for small non-commercial projects.
Things Speak includes a Web Service (REST API) that lets you collect and store
sensor data in the cloud and develop Internet of Things applications. It works with
Arduino, Raspberry Pi and MATLAB (premade libraries and APIs exists) But it should
work with all kind of Programming Languages, since it uses a REST API and HTTP.
46
DEPARTMENT OF ECE,NNRESGI
FLOOD MONITORING AND ALERTING SYSTEM
The software used to program the heart of the project is Arduino IDE which can be
programmed in C/C++ language.
Brackets
There are two types of brackets used in the Arduino coding, which are listed below:
Parentheses ( )
Curly Brackets { }
Parentheses ( )
The parentheses brackets are the group of the arguments, such as method, function,
or a codestatement. These are also used to group the math equations.
Curly Brackets { }
The statements in the code are enclosed in the curly brackets. We always require
closed curlybrackets to match the open curly bracket in the code or sketch.
Line Comment
There are two types of line comments, which are listed below:
comment will not be displayed in the output. Such text is specified for a better
understanding of the code or for the explanation of any code statement.
The // (two forward slashes) are also used to ignore some extra lines of code without
deleting it.
The Multi-line comment is written to group the information for clear understanding.
It starts with the single forward slash and an asterisk symbol (/ *). It also ends with the /
*. It is commonly used to write the larger text. It is a comment, which is also ignored by
the compiler.
Coding Screen
The coding screen is divided into two blocks. The setup is considered as the
preparation block, while the loop is considered as the execution block. It is shown
below:
The set of statements in the setup and loop blocks are enclosed with the curly
brackets. We can write multiple statements depending on the coding
requirements for aparticular project.
Zero setup () resides at the top of each sketch. As soon as the program starts running,
the codeinside the curly bracket is executed in the setup and it executes only once.
48
DEPARTMENT OF ECE,NNRESGI
FLOOD MONITORING AND ALERTING SYSTEM
The loop contains statements that are executed repeatedly. The section of code inside
the curlybrackets is repeated depending on the value of variables.
Time in Arduino
The time in Arduino programming is measured in a millisecond.
For example, for a 5-second delay, the time displayed will be 5000
The digitalWrite () will disable the LOW during the INPUT mode. The output pin
will be considered as HIGH.
We can use the INPUT mode to use the external pull-down resistor. We are required
to set the pinMode as INPUT_PULLUP. It is used to reverse the nature of the INPUT
mode.
The sufficient amount of current is provided by the pull-up mode to dimly light an
LED, which is connected to the pin in the INPUT mode. If the LED is working dimly, it
means this conditionis working out.
digitalWrite( )
The digitalWrite ( ) function is used to set the value of a pin as HIGH or LOW.Where,
HIGH: It sets the value of the voltage. For the 5V board, it will set the value of 5V, while
for 3.3V, it will set the value of 3.3V.
LOW: It sets the value = 0 (GND).
49
DEPARTMENT OF ECE,NNRESGI
CHAPTER 3
CONSTRUCTION OF THE CIRCUIT
FLOOD MONITORING AND ALERTING SYSTEM
“The main goal of the circuit is if the water flow increases then that signal is sent to the
Arduino and from the Arduino it is sent into the GSM which is used to send alert
message and then to the buzzer which makes alert through sound and then this
information is uploaded into the Thingspeak Cloud.
50
DEPARTMENT OF ECE,NNRESGI
FLOOD MONITORING AND ALERTING SYSTEM
51
DEPARTMENT OF ECE,NNRESGI
FLOOD MONITORING AND ALERTING SYSTEM
53
DEPARTMENT OF ECE,NNRESGI
FLOOD MONITORING AND ALERTING SYSTEM
The above figure shows the experimental setup of the Flood monitoring and alerting
system.
The Circuit consists of GSM module and Arduino UNO and a relay module and a
buzzer anda water flow sensor and a DC motor and a 16*4 LCD display unit .
LCD is connected to the Arduino and all other components like water flow
sensor ,GSMmodule is also connected to Arduino.Realy module is connected to the DC
motor.
3.6 WORKING
Basically, Flood monitoring and alerting system detects a flooding condition upstream
and warns inhabitants downstream of the approaching flood. The longer the time
between the warning and the actual arrival of the flood, the better the residents can
prepare by bringing their belongings and themselves to safe places.Early warning
systems have been recognized as an effective tool to reduce vulnerabilities and improve
preparedness and response to natural hazards. The importance of early warning has been
underlined in various UN General Assembly resolutions as a critical element of disaster
reduction.
This circuit consists of an Arduino which is the heart of the project as the various
componentsare connected to it and the whole circuit functioning is done through this
Arduino only.
There is an 16*2 LCD display which is connected to the Arduino used to display the
various functions such as the System ready message and the title and the status of the
system and also to display the Data which is initially uploaded to the cloud and also to
display the commands of GSM module which is used to send text message to the
registered mobile number.Also when the water flow is increased the flow rate is also
displayed on the display.
Then the GSM is also connected to the Arduino only.There is a water flow sensor
which is used to measure the flow rate of the water and update to the Arduino and then
the Arduino as per the code compare this value with the threshold and if it is violated
then it sends signal to the GSM and the GSM sends message to the registered mobile
number.There is also a sound buzzer which is connected to the Arduino along with GSM
it is used to alert the people through sound.Then there is a DC motor which is connected
to the Arduino through a relay which is used to decrease the flow of water by rotating in
the opposite direction.
At first as we turn on the circuit and then the LCD displays as the flood alerting
system and the data is initially uploaded to the thingspeak cloud and also sends sms to
the registered mobile number with a message that “Flood alerting system” and then the
lcd displays as system ready and then the water starts flowing through the water flow
sensor as it contains the turbine inside which rotates corresponding to the speed of the
water and generates analong pulses as the voltage increases and the those values are sent
to the Arduino and compared with the Thresholdvalues given in the code and if that value
exceeds the threshold then it gives signal to the sound buzzer and GSM to send a message
stating that “Alert!water flow increased” and the the signal is sent to the DC motor
through the relay module and then the motor also activates by rotating which is used to
remove the excess amount of water and also used to recude the water flow byrotating in
the opposite direction.
54
DEPARTMENT OF ECE,NNRESGI
CHAPTER 4
RESULTS
FLOOD MONITORING AND ALERTING SYSTEM
RESULTS
CONCLUSION
Disasters, as the name suggests, brings about great havoc on lives and property
indiscriminately across the globe. Developing countries, however, experience much
worse destruction than the developed ones and are as well as less equipped to deal with
the aftereffects of these calamities.
Foreknowledge of the disaster could thus help all, especially the developing
countries by providing time to secure property and evacuate. Developing early warning
systems may be complicated, with many facets to the system requirements and many
additional intricacies, when within a developing country.
This project has tried to implement a potential Floods cannot be predicted easily,
but we are tryingto develop a system which tries to detect flood and give early
intimation to nearby people. TheIoT based flood detection and alert system may prove
to save the lives of people by reducing the human quick out during emergency
situations.
With further improvement to the system we will be able to predict even more
accurately andreduce the amount of false alerts. Adding to that with further
modification wewill be able topredict how much area around the river bank will be
affected due to the water level which will be crucial so that the resident of that area
could be evacuated to a safe place before floodactually causes any damage.
And also with few more further improvements like adding an APR33A3 to this system
mayfurther be helpful to the people who don’t know how to read a text message as it
sends therecorded voice messages to the registered mobile numbers.
57
DEPARTMENT OF ECE,NNRESGI
REFERENCES
1) N. Weng Chan, "Increasing flood risk in Malaysia: causes and solutions", Disaster
Prev. Manag. An Int. J., vol. 6, no. 2, pp. 72-86, May 1997.
2) H. A. Rahman, "Global Climate Change and Its Effects on Human Habitat and
Environment in Malaysia", Malaysian J. Environ. Manag., vol. 10, no. 2, pp. 17-32,
2009.
3) Heavy mid-afternoon rain causes flash floods in city centre - Nation The Star Onlins
6) Flood Detection using Sensor Network and Notification via SMS and Public
Network.
7). K. Khedo, Real-Time Flood Monitoring Using Wireless Sensor Networks, pp. 59-69,
2013.
8)E. N. Udo and E. B. Isong, Asian journal of computer and information systems, vol.1,
no.
APPENDX
CODE FOR SIMULATION
#include <LiquidCrystal.h>
LiquidCrystal lcd(13, 12, 11, 10, 9, 8);
int buzzer=A1;
int motor=6;
int X;
int Y;
int temp=0;
float TIME = 0;
float FREQUENCY = 0;
float WATER = 0;
float TOTAL = 0;
float LS = 0;
const int input = A0;
String data="";
int message=0;
int times=0;
int flowo=0;
int flowc=0;
void beep()
{
digitalWrite(buzzer,LOW);delay(1000);digitalWrite(buzzer,HIGH);delay(1000);
digitalWrite(buzzer,LOW);delay(1000);digitalWrite(buzzer,HIGH);delay(1000);
digitalWrite(buzzer,LOW);delay(1000);digitalWrite(buzzer,HIGH);delay(1000);
}
void setup()
{
pinMode(input,INPUT);
pinMode(buzzer,OUTPUT);digitalWrite(buzzer,HIGH);
pinMode(motor, OUTPUT); digitalWrite(motor,HIGH);
Serial.begin(9600);delay(1000);
lcd.clear();
lcd.clear();lcd.print("AT");Serial.print("AT\r\n");delay(1000);
lcd.clear();lcd.print("ATE0");Serial.print("ATE0\r\n");delay(1000);
lcd.clear();lcd.print("AT+CMGF=1");Serial.print("AT+CMGF=1\r\n");delay(1000);
lcd.clear();lcd.print("AT+CNMI=1,2,0,0");Serial.print("AT+CNMI=1,2,0,0\r\n");delay(10
00);
lcd.clear();lcd.print("DATA UPLOADING");
Serial.print("AT+SAPBR=3,1,");Serial.print('"');Serial.print("Contype");Serial.print('"');Se
rial.print(',');Serial.print('"');Serial.print("GPRS");Serial.print('"');Serial.print("\r\n");delay(
1000);
Serial.print("AT+SAPBR=3,1,");Serial.print('"');Serial.print("APN");Serial.print('"');Serial
.print(',');Serial.print('"');Serial.print("WWW");Serial.print('"');Serial.print("\r\n");delay(10
00);
Serial.print("AT+SAPBR=1,1\r\n");delay(10000);Serial.print("AT+SAPBR=1,1\r\n");dela
y(1000);Serial.print("AT+SAPBR=1,1\r\n");delay(1000);Serial.print("AT+SAPBR=1,1\r\
iv
n");delay(1000);Serial.print("AT+SAPBR=1,1\r\n");delay(1000);
Serial.print("AT+SAPBR=2,1\r\n");delay(1000);
Serial.print("AT+HTTPINIT\r\n");delay(1000);
Serial.print("AT+HTTPPARA=");Serial.print('"');Serial.print("URL");Serial.print('"');Seri
al.print(',');Serial.print('"');Serial.print("http://api.thingspeak.com/update?key=Y5WMK5L
0Q3F76Z5X &field1=Flood Alerting
System....");Serial.print('"');Serial.print("\r\n");delay(3000);
Serial.print("AT+HTTPACTION=0\r\n"); delay(1000);
Serial.print("AT+HTTPACTION=0\r\n"); delay(1000);
lcd.clear();lcd.print("DATA UPLOADED");delay(1000);
Serial.print("AT+CMGS=");
Serial.print('"');
Serial.print("9110728528");
Serial.print('"');
Serial.print("\r\n");delay(1000);
Serial.print("Flood Alerting System......");delay(100);
Serial.write(0x1A);delay(10000);
lcd.begin(16, 2);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Chance of flood");
lcd.setCursor(0,1);lcd.print("ALERTING GSM&IoT");delay(2000);
lcd.clear();
lcd.print("system ready....");
delay(1000);
}
void loop()
{
temp=temp+1;
X = pulseIn(input, HIGH);
Y = pulseIn(input, LOW);
TIME = X + Y;
FREQUENCY = 1000000/TIME;
WATER = FREQUENCY/7.5;
LS = WATER/60;
if(FREQUENCY >= 0)
{
if(isinf(FREQUENCY))
{
digitalWrite(motor,HIGH);
delay(500);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("VOL. :0.00");
}
}
else
{
TOTAL = TOTAL + LS;
lcd.clear();
lcd.setCursor(0,0);
v
lcd.print("VOL.: ");
lcd.print(WATER*(-1));
lcd.print(" L/M");
if((WATER*(-1))>2)
{
lcd.clear();
lcd.print("Chances of Flood");
lcd.setCursor(0,1);
lcd.print("VOL.: ");
lcd.print(WATER*(-1));
lcd.print(" L/M");
digitalWrite(motor,LOW);
delay(1000);
beep();
lcd.clear();
lcd.clear();lcd.print("AT");Serial.print("AT\r\n");delay(1000);
lcd.clear();lcd.print("ATE0");Serial.print("ATE0\r\n");delay(1000);
lcd.clear();lcd.print("AT+CMGF=1");Serial.print("AT+CMGF=1\r\n");delay(1000);
lcd.clear();lcd.print("AT+CNMI=1,2,0,0");Serial.print("AT+CNMI=1,2,0,0\r\n");delay(10
00);
lcd.clear();lcd.print("DATA UPLOADING");
Serial.print("AT+SAPBR=3,1,");Serial.print('"');Serial.print("Contype");Serial.print('"');Se
rial.print(',');Serial.print('"');Serial.print("GPRS");Serial.print('"');Serial.print("\r\n");delay(
1000);
Serial.print("AT+SAPBR=3,1,");Serial.print('"');Serial.print("APN");Serial.print('"');Serial
.print(',');Serial.print('"');Serial.print("WWW");Serial.print('"');Serial.print("\r\n");delay(10
00);
Serial.print("AT+SAPBR=1,1\r\n");delay(10000);Serial.print("AT+SAPBR=1,1\r\n");dela
y(1000);Serial.print("AT+SAPBR=1,1\r\n");delay(1000);Serial.print("AT+SAPBR=1,1\r\
n");delay(1000);Serial.print("AT+SAPBR=1,1\r\n");delay(1000);
Serial.print("AT+SAPBR=2,1\r\n");delay(1000);
Serial.print("AT+HTTPINIT\r\n");delay(1000);
Serial.print("AT+HTTPPARA=");Serial.print('"');Serial.print("URL");Serial.print('"');Seri
al.print(',');Serial.print('"');Serial.print("http://api.thingspeak.com/update?key=91SHW5G
UCCRO6Y5M&field1=Alert!Chances_of_Flood");Serial.print('"');Serial.print("\r\n");dela
y(3000);
Serial.print("AT+HTTPACTION=0\r\n"); delay(1000);
Serial.print("AT+HTTPACTION=0\r\n"); delay(1000);
lcd.clear();lcd.print("DATA UPLOADED");delay(1000);
Serial.print("AT+CMGS=");
Serial.print('"');
Serial.print("9110728528");
Serial.print('"');
Serial.print("\r\n");delay(1000);
Serial.print("Alert!Water flow increased");delay(100);
Serial.write(0x1A);delay(10000);
}
else
{
digitalWrite(motor,HIGH);
vi
delay(500);
}
}
}
vii