You are on page 1of 51

RIVER WATER LEVEL DETECTOR

(RWLD)

MUHAMMAD ARIF BIN MOHAMAD YUSOF


52101120020

NIK HAFIZUDDIN BIN N AHMAD YANI


52101120369

UNIVERSITI KUALA LUMPUR


JANUARY 2023
RIVER WATER LEVEL DETECTOR
(RWLD)

MUHAMMAD ARIF BIN MOHAMAD YUSOF


52101120020

NIK HAFIZUDDIN BIN N AHMAD YANI


52101120369

Report Submitted to fulfil the Partial


Requirements
For the Diploma of Information Technology
Universiti Kuala Lumpur

JANUARY 2023

2|R WL D
DECLARATION

I declare that this report is my original work and all references have been cited
adequately as required by the University.

Date: 05/01/2023 Signature:……………………


(Hardcover submission date) Full Name: MUHAMMAD ARIF BIN

MOHAMAD YUSOF
ID Number: 52101120020

Signature……………………
Full Name: NIK HAFIZUDDIN BIN
N AHMAD YANI
ID Number 52101120369

3|R WL D
APPROVAL PAGE

We have supervised and examined this report and verify that it meets the program and
University’s requirements for the Diploma In Information Technology

Date: 05/01/2023 Signature:…………………

(Hardcover submission date) Supervisor: Ts. Yuhanis Omar


Official Stamp

4|R WL D
ACKNOWLEDGEMENT

We would like to express our deepest appreciation to all those who have contributed
to the successful completion of this project. The development of the River Water Level
Detector (RWLD) system would not have been possible without the help and support
of numerous individuals. First and foremost, we would like to express our gratitude to
our supervisor, Ts. Yuhanis Binti Omar, for their invaluable guidance and support
throughout the duration of this project. Their expertise and encouragement have been
instrumental in helping us to complete this project. We are grateful to the members of
the Kampung Baru community for their participation in the deployment and testing of
the RWLD system. Their feedback and input were invaluable in ensuring that the
system met the needs of the community. We hope that the RWLD system will make a
positive impact on the community and help to mitigate the impact of floods in the future.
We would also like to thank our families and friends for their unwavering support and
encouragement throughout the course of this project. Their love and support have
been a constant source of motivation and inspiration. Finally, we would like to
acknowledge the support of Ts. Yuhanis Binti Omar in funding this project. Without
their financial support, this project would not have been possible. We hope that the
RWLD system will make a meaningful contribution to flood prevention and early
warning efforts in communities located near rivers and other bodies of water.

5|R WL D
CONTENTS

DECLARATION.................................................................................................................. 3
APPROVAL PAGE ............................................................................................................. 4
ACKNOWLEDGEMENT ..................................................................................................... 5
LIST OF FIGURES............................................................................................................. 8
LIST OF TABLES ............................................................................................................... 9
LIST OF ABBREVIATIONS ...............................................................................................10
ABSTRACT .......................................................................................................................11

CHAPTER 1: INTRODUCTION..........................................................................................12
1.1 Background of Study ...................................................................................................12
1.2 Problem Statement ......................................................................................................13
1.3 Project Aim..................................................................................................................13
1.3 Objectives ...................................................................................................................13
1.4 Scope of Study ............................................................................................................14

CHAPTER 2: LITERATURE REVIEW ................................................................................15


2.1 Introduction .................................................................................................................15
2.2 Flood Disaster .............................................................................................................15
2.3 Water Level System (Sensors) .....................................................................................17
2.4 Internet of Things.........................................................................................................18
2.5 Monitoring System .......................................................................................................19
2.6 Features of Proposed ..................................................................................................21
2.7 Summary.....................................................................................................................22

CHAPTER 3: METHODOLOGY.........................................................................................23
3.1 Introduction .................................................................................................................23
Figure 2 Agile Model..........................................................................................................23
3.2 Planning Phase ...........................................................................................................24
3.3 Requirement Analysis Phase .......................................................................................24
3.4 Design phase ..............................................................................................................26
3.4.1 System Visualization .................................................................................................27
3.4.2 Prototype Design ......................................................................................................28
3.4.3 Mobile Application Interface Design...........................................................................29

6|R WL D
3.5 Development Phase ....................................................................................................30
3.6 Testing Phase .............................................................................................................32
3.6.1 Functionality Testing .................................................................................................33
3.6.2 Usability Testing .......................................................................................................33

CHAPTER 4: RESULT AND DISCUSSION........................................................................38


4.1 Introduction .................................................................................................................38
4.2 Uploading Test ............................................................................................................38
4.3 Ultrasonic Test ............................................................................................................40
4.4 Mobile Application Test ................................................................................................41

CHAPTER 5: CONCLUSION .............................................................................................43


5.1 Introduction .................................................................................................................43
5.2 Future Recommendation..............................................................................................44

REFERENCES..................................................................................................................45
APPENDIXES ...................................................................................................................47

7|R WL D
LIST OF FIGURES

FIGURE PAGE

1 Flood Flow 16
2 Agile Model 23

3 Activity Diagram 27

4 Schematic Design 28

5 Mobile Application Interface Design 29

6 Overall View Project 31

7 Test Case 33

8 Connecting to Firebase 39

9 Connected to Firebase 39

10 Water Level Reading 41

11 Mobile Application Interface 42

12 Sequence Diagram 51

13 Use Case Diagram 51


LIST OF TABLES

TABLE PAGE

1 Features of Proposed 21

2 Requirement Analysis Phase 25

3 Development Phase 30

4 Testing Phase 32

5 Measurement of Ultrasonic Sensor 40

9|R WL D
LIST OF ABBREVIATIONS

IoT Internet of Things

HCI Human-Computer Interaction

UI User Interface

IDE Integrated Development Environment

10 | R W L D
ABSTRACT

Floods are a common natural disaster that can have devastating


consequences, including the destruction of infrastructure and loss of life. Flood
monitoring systems can help to mitigate these effects by monitoring flood levels and
warning people about the risk of flooding. Existing flood monitoring techniques include
multi-satellite analysis, image classification, and wireless sensor networks. In this
project, we developed a new flood monitoring system that utilizes mobile phone
notifications and in-home buzzers to alert local residents about rising water levels in a
specific area. Water sensors were installed in the nearby river and in residents' homes
to monitor water levels and inform victims of potential flooding. The system also
includes a RWLD application that allows residents to view the history of water rise in
their selected area. The goal of this project was to provide an effective and efficient
method for monitoring and warning local residents about the danger of flooding.

11 | R W L D
CHAPTER 1: INTRODUCTION

1.1 Background of Study

Floods are a major natural disaster that can cause significant damage and loss of life.
As climate change continues to exacerbate weather patterns, flood risk has become
an increasingly pressing concern in many parts of the world. In order to mitigate the
impact of floods, it is important to have systems in place to monitor and predict flood
events, as well as to alert people in affected areas so that they can take necessary
precautions.

To address this issue, we propose the development of a River Water Level


Detector for communities located near rivers or other bodies of water. This system
would utilize sensors to continuously monitor water levels in real-time and provide an
alarm to alert residents of nearby homes when the water level is approaching
dangerous levels. The alarm system would also be linked to a mobile notification
system, ensuring that even if the homeowner is away from the house or unable to
respond to the alarm, they will still receive notification of the potential flood risk.

In addition to providing a warning system for individual homes, the flood


detection system could also be used to alert local authorities and emergency services
of potential flood events, enabling them to respond more effectively and minimize the
impact of the flood. Overall, this system has the potential to greatly reduce the risk of
loss of life and property damage due to floods and could be a valuable tool in helping
communities prepare for and respond to these natural disasters.

12 | R W L D
1.2 Problem Statement

A serious natural disaster that can result in severe damage and fatalities is flooding.
Every year, many local residents are affected by floods, suffering losses, injuries, and
even the loss of loved ones. The risk of injury or death due to rising water levels in the
home, particularly at night when victims may be unconscious or asleep, is a major
concern. In addition, the elderly and disabled may be particularly vulnerable in
emergency situations such as floods, due to factors such as age and disability, and
may require special attention and support. The monsoon season is a time of increased
anxiety for many people living in flood-prone areas, as the risk of natural disasters
such as floods increases.

1.3 Project Aim

The aim of this project is to develop a system to mitigate the impact of floods and
improve the safety of local residents by providing early warning of rising water levels
and supporting emergency response efforts.

1.3 Objectives

The objectives of the project are:

1. To provide early warning of rising water levels in nearby rivers, with a focus on
alerting elderly and disabled individuals to potential flood risk.
2. To minimize property loss and reduce the risk of death due to flooding by
encouraging potential flood victims to take timely action to protect their
valuables.
3. To support the safety and well-being of communities located near rivers and
other bodies of water by providing timely information about flood risk and
helping to coordinate emergency response efforts.

13 | R W L D
1.4 Scope of Study

The scope of this study is to develop a flood warning system for the Kampung Baru
community in order to mitigate the negative impacts of flooding on daily life. The
system will use ultrasonic sensor installed in a strategic location near the community
to continuously monitor water levels and transmit the data to a mobile application for
real-time updates. The goal of the project is to provide timely and accurate alerts to
residents in the event of a flood, enabling them to take necessary precautions and
reduce the impact of flooding on their daily activities.

14 | R W L D
CHAPTER 2: LITERATURE REVIEW

2.1 Introduction

This chapter will provide a comprehensive review of the existing literature that is
relevant to the proposed water level monitoring system with a mobile platform for the
community in Kampung Baru. The review will focus on various aspects of the project,
including monitoring systems, warning systems, and mobile platforms, as well as their
applications in the context of flood disasters. The chapter will also discuss related work
on water level monitoring and flood prevention, highlighting the strengths and
limitations of these approaches. To develop the proposed system, the project will
utilize advanced development techniques, including the use of ultrasonic sensor to
detect rising water levels and trigger notifications to nearby residents through a user-
friendly mobile application. This will enable the community to stay informed about
potential flood risks and take necessary precautions to mitigate the impact of floods
on their daily lives.

2.2 Flood Disaster

A flood is a natural event that occurs when an area is inundated with water from a
river, stream, or other body of water, often as a result of heavy rainfall, a dam or levee
failure, or a coastal storm surge. Floods can cause significant damage to
infrastructure, homes, and businesses, and can also pose a serious threat to human
life. A flash flood is caused by intense rainfall in a short period of time or high river
discharge, according to Archer, D., & Fowler, H. (2015, July). Physical infrastructure
such as residences, schools, health centres, roads, culverts, marketplaces, gabion
embankments, spurs, and hand pumps might be harmed. Natural catastrophes, such
as frequent flash floods, do significant harm to society, and they are especially
concerning when they occur in densely inhabited regions or places with large
concentrations of economic activity.

There are several types of floods that can occur, including riverine floods,
coastal floods, and flash floods. Riverine floods occur when a river overflows its banks

15 | R W L D
and inundates the surrounding area. Coastal floods occur when a storm surge or high
tides cause seawater to flood inland areas. Flash floods are sudden and intense floods
that often occur in areas with steep terrain and can be caused by heavy rainfall or a
dam or levee failure. According to reports, flash floods happened in this area once in
2002, once in 2008, once in 2011, and three times in 2014. The 2008 flash flood was
0.5-1.5 m high and swamped two-thirds of Kajang City (Krishnan, 2008).

Floods can have a range of impacts on communities, including economic,


social, and environmental costs. For example, floods can damage or destroy homes
and businesses, disrupt transportation and communication networks, and contaminate
water and food supplies (Sosa et al., 2015). Floods can also have serious health
impacts, including the risk of waterborne diseases and mental health issues. As a
result of this condition, low-lying areas may be swiftly inundated. Figure 1
demonstrates this.

Figure 1 Flood Flow

Overall, floods are complex natural disasters that can have significant impacts on
communities. Effective flood prevention and management strategies are essential for
mitigating the risks and impacts of floods and helping communities to recover from
these events.

16 | R W L D
2.3 Water Level System (Sensors)

A water sensor, also known as a water level sensor or a liquid level sensor, is a device
that is used to measure the level of water in a tank, pool, or other container. Water
sensors can be used for a variety of applications, including monitoring the water level
in a water treatment plant, monitoring the water level in a swimming pool, or detecting
leaks in a plumbing system. According to Peggie L Olive (2006), a low cost, real-time
water quality monitoring system which can be applied in remote rivers, lakes, coastal
areas and other water bodies is presented.

The application of water management schemes requires the installation of


water level data-acquisition systems in multiple, geographically isolated large-scale
storage tanks of water distribution networks (Upadhyay, 2012). There are various
types of water sensors available, each with its own unique features and capabilities.
Some water sensors are designed to be submerged in water, while others are
designed to be mounted on the outside of a container or pipe. Water sensors can be
classified based on the type of sensor technology they use, such as ultrasonic
sensors, capacitive sensors, or resistive sensors (Hongbin et al., 2016). Ultrasonic
sensors use sound waves to measure the distance to the water surface, while
capacitive sensors use electrical capacitance to measure the presence of water.
Resistive sensors use a resistive element that changes resistance based on the level
of water present. The application of water management schemes requires the
installation of water level data-acquisition systems in multiple, geographically isolated
large-scale storage tanks of water distribution networks

Water sensors can be used to measure the level of water in a continuous or


discrete manner. Continuous water sensors provide a continuous output signal that
varies based on the water level, while discrete water sensors provide a digital output
signal that indicates whether the water level is above or below a certain threshold
(Reedyk et al., 1997). Water sensors can also be used in conjunction with other
sensors, such as temperature sensors or pH sensors, to provide a more complete
picture of the water quality and conditions.

Overall, water sensors are an important tool for monitoring the level of water in
a variety of applications, providing valuable information for water management, flood
prevention, and leak detection.

17 | R W L D
2.4 Internet of Things

Polymeni, Sofia, et al. (Nov. 2022). The Internet of Things (IoT) refers to the
interconnected network of physical devices, vehicles, buildings, and other objects that
are embedded with sensors, software, and network connectivity, allowing them to
collect and exchange data. The IoT enables these objects to communicate and interact
with each other and with people in a seamless and intelligent manner, leading to new
levels of efficiency, productivity, and convenience in various industries and
applications.

One of the key drivers of the IoT is the proliferation of low-cost and high-
performance computing and communication technologies, such as sensors,
microcontrollers, wireless networks, and cloud computing, which enable the
integration of intelligence and connectivity into a wide range of devices and systems.
Data on things including light intensity, temperature, humidity, soil pH, soil fertility, and
other things were gathered via the Internet of Things (Liu et al., 2019). The IoT also
relies on standard protocols and technologies, such as the Internet Protocol (IP), to
facilitate interoperability and data exchange among different devices and systems.

Karan, Ebrahim, et al. (July 2016). The potential benefits of the IoT are
numerous and diverse, ranging from energy efficiency and environmental monitoring
to transportation and healthcare. For example, the IoT can help reduce energy
consumption and greenhouse gas emissions by enabling smart buildings and cities
that optimize the use of resources and infrastructure. It can also improve transportation
safety and efficiency by enabling connected and autonomous vehicles to communicate
with each other and with traffic systems. In healthcare, the IoT can enable remote
patient monitoring and telemedicine, allowing healthcare providers to collect and
analyze vital signs and other data from patients in real-time and remotely.

Wheelus, Charles, and Xingquan Zhu. (Oct. 2020) However, the IoT also raises
significant challenges and concerns, such as data privacy and security, network
scalability and reliability, and ethical and regulatory issues. Ensuring the security and
privacy of data collected and transmitted through the IoT is a critical issue, as the IoT
involves the exchange of sensitive and personal information and may be vulnerable to
cyber-attacks and data breaches. Ensuring the scalability and reliability of the IoT

18 | R W L D
infrastructure is also important, as the number of connected devices is expected to
grow exponentially in the coming years. Finally, the IoT requires addressing ethical
and regulatory issues, such as the appropriate use of data and the potential impact of
the IoT on employment and social inequalities.

Overall, the IoT represents a significant technological and societal


transformation, with the potential to revolutionize various industries and applications,
but also requiring careful consideration and management of its implications and
impacts.

2.5 Monitoring System

Monitoring systems play a vital role in various fields by continuously or periodically


collecting, processing, and analyzing data from various sources in order to track the
status or performance of a particular system or process. These systems can be used
to detect and alert individuals or organizations to potential issues or problems in real-
time, allowing them to take timely and appropriate action (Hoppe et al., 2021). They
can also be used to track trends and patterns over time, allowing organizations to
optimize their operations and make informed decisions.

There are various types of monitoring systems, depending on the specific


application and the type of data being collected. For example, an environmental
monitoring system might use sensors to collect data on air quality, water quality, and
weather conditions. These systems can be used to monitor the environment for a
variety of purposes, including detecting pollution, tracking natural disasters, and
predicting weather patterns.

Industrial process control systems use sensors to monitor the performance of


manufacturing equipment, allowing companies to optimize production and improve
efficiency (Azizi, 2015). These systems can also be used to detect and prevent
equipment failures, which can result in costly downtime and lost production.

Healthcare monitoring systems use sensors or wearable devices to collect data


on a patient's vital signs, such as heart rate, blood pressure, and oxygen levels. These
systems can be used to remotely monitor patients, alerting healthcare providers to

19 | R W L D
potential issues and allowing them to take timely and appropriate action (Brown et al.,
2017). They can also be used to track patient progress over time, allowing healthcare
providers to make informed decisions about treatment plans.

Lebourgeois, Valentine, et al. (Nov. 2008). Security monitoring systems use


cameras or other sensors to detect and track movements or activities, helping to
prevent crime and protect individuals and property. These systems can be used in a
variety of settings, including residential homes, commercial businesses, and public
spaces.

Taheri, Saman, et al. (Nov. 2022). In addition to the types of monitoring systems
mentioned above, there are also systems that monitor and control building systems,
such as heating, ventilation, and air conditioning (HVAC) systems, lighting, and
security systems. These systems can be used to optimize energy usage and improve
the overall functionality and comfort of a building.

In general, monitoring systems play a crucial role in various fields by continuously


collecting, processing, and analyzing data from various sources. They help to detect
and alert individuals or organizations to potential issues or problems in real-time,
allowing them to take timely and appropriate action. They can also be used to track
trends and patterns over time, allowing organizations to optimize their operations and
make informed decisions.

20 | R W L D
2.6 Features of Proposed

This project's features, which are listed in Table 2, make it exceptionally user-friendly
and simple for people of all ability levels to use. Modern technology has been
incorporated to make this project more advanced and unique than other similar
systems now on the market. This project also follows current technical developments,
emphasising its applicability and efficiency in the current technological environment.
Overall, the project is a perfect solution for a variety of applications due to its user-
friendliness and integration of cutting-edge technologies.

Table 1 Features of proposed


Features Description

Water Level • In this project, the ultrasonic sensor


used to measure water level on the
nearest river
Notification • A quick and easy way to remain updated
on significant events taking place in their
neighbourhood
• Warning them of potential risks or
emergencies that might endanger their
safety or wellbeing
• Residents will be able to keep updated
about the possibility of flood
occurrences
• The purpose of this function is to
improve community safety and security
by disseminating precise and timely
information about possible threats.
Buzzer • A buzzer can be installed in a house to
alert the homeowner about rising water
levels
• The buzzer is triggered by sensors
designed to detect the presence of
water
• These sensors are typically placed in
areas of the home where water is most
likely to accumulate, such as in the
basement or near water pipes
• When a sensor detects the presence of
water, it sends a signal to the buzzer,
which activates and produces a loud,
continuous sound

21 | R W L D
• The purpose of the sound is to alert the
homeowner to the presence of water, so
they can take steps to address the issue
and prevent damage to their home

2.7 Summary

In conclusion, this chapter has provided a thorough overview of the research project,
including the design and implementation of the monitoring system, warning system,
and mobile platform. The use of the Internet of Things (IoT) was identified as the most
suitable approach for this project, as it allows for real-time data collection and analysis.
The goals and guidance for the project were outlined, along with the requirements and
development process for the water level monitoring system. It is crucial that all
technologies and systems involved in the project are fully understood before moving
forward with implementation. The success of the project depends on a solid foundation
of knowledge and understanding. Therefore, thorough research and analysis were
conducted to ensure that the project is well-informed and professionally executed.

22 | R W L D
CHAPTER 3: METHODOLOGY

3.1 Introduction

The methodology for developing the River Water Level Detector will be outlined in this
chapter. This methodology aims to provide a structured approach for creating the
project, taking into account the available methods, resources, and tools to complete
the work and achieve the project's goals. In order to achieve these goals, the agile
model methodology will be used for this project. The agile model methodology consists
of five phases: planning, requirement analysis, design, development, and testing.
These phases will be followed in order to complete the River Water Level Detector
project effectively and efficiently.

Figure 2 Agile Model

23 | R W L D
3.2 Planning Phase

The planning phase of the project, also referred to as the feasibility stage, was a critical
component in the overall success of the project. During this phase, we thoroughly
evaluated the goals, objectives, and potential challenges of the project in order to
develop a solid foundation and roadmap for moving forward. This process involved
identifying and analysing the problem being addressed, examining the current systems
in place, and determining the necessary resources and scope for effectively executing
the project. We also made efforts to anticipate and mitigate any potential issues that
could impact development, in order to ensure the smooth progress and completion of
the project. In addition, we established a clear and detailed project timeline in order to
meet any necessary deadlines and deliver the final product on time. Overall, the
thorough planning and organization efforts undertaken during this phase were
essential for the successful execution and completion of the project.

3.3 Requirement Analysis Phase

The requirement analysis phase is a crucial aspect of this project, as it allows for the
evaluation and understanding of the necessary requirements for a successful flood
disaster monitoring and warning system. In order to effectively address the problem s
faced by residents during a flood disaster, it is important to identify and examine
potential solutions through the analysis of relevant journal articles and studies. This
process helps to deepen our understanding of the monitoring and warning system
concepts, as well as the utilization of IoT technologies and mobile tools as platforms
for data monitoring.

Furthermore, the requirement analysis phase involves the examination of similar and
related work or approaches, with a particular focus on projects related to water level
monitoring. This is an important step in order to determine the most suitable
development methodology and sensor for the project. After careful review and
analysis, it has been determined that the water analogue liquid sensor is the most
effective choice to be used in conjunction with the NodeMCU microcontroller in this
project.

24 | R W L D
Overall, the requirement analysis phase is a vital part of the project development
process, as it helps to ensure that all necessary requirements are thoroughly
evaluated and understood, paving the way for a successful and effective flood disaster
monitoring and warning system.

Table 2 Requirement Analysis Phase

Activities Technique/Tools Deliverable

Identify Flood Disaster Organize


Issue and Solution for Literature Review
the problem

Finished Chapter
Identify concept based 1& 2
Refer articles and
on Monitoring and
Warning System journals

Identify tools and


Research about
technique for
related information
development

25 | R W L D
3.4 Design phase

The design phase of a mobile application development project is a crucial step that
sets the foundation for the system's functionality and user experience. This phase
typically consists of three distinct phases: system visualization, prototype design, and
mobile application interface design.

The system visualization phase involves understanding the business


requirements and user needs, identifying key functionalities and features, and creating
a high-level system architecture. This phase provides a conceptual overview of the
proposed system and helps ensure that the final product meets the needs of the users
and the business.

The prototype design phase involves creating a detailed, interactive mock-up


of the system. This phase allows designers and developers to test and validate the
user experience and functionality, and typically involves creating wireframes, flow
diagrams, and other visual aids to represent the proposed system.

The mobile application interface design phase focuses on creating the visual
elements of the application, such as the layout, colour scheme, and overall aesthetic.
This phase also involves designing the user interface (UI) elements, such as buttons,
icons, and input fields, to ensure a seamless and intuitive user experience.

Overall, the design phase plays a crucial role in the development of a mobile
application. By thoroughly planning and prototyping the system during this phase,
developers can ensure that the final product meets the needs of the users and the
business and provides a positive user experience.

26 | R W L D
3.4.1 System Visualization

System visualization aims to provide realistic view about the overall system process.
As a result, the system has to be visualised before the project's development begins.
The complete system process is illustrated in this project's activity diagram, which is
displayed in Figure. Draw.io will be used as the programme for creating the activity
diagram.

Figure 3 Activity Diagram

27 | R W L D
3.4.2 Prototype Design

A clear explanation of how the NodeMCU and Arduino components of the system can
work together is provided by the prototype design as shown in Figure. Before the real
components are linked together, the configuration of the prototype components may
be determined according to the prototype design. To avoid any problems from
occurring during the development process, the prototype design must be accurate.

Figure 4 Schematic Design

28 | R W L D
3.4.3 Mobile Application Interface Design

Users could understand better how input was displayed through the mobile application
interface, which is designed to display data from water level monitoring. The interface
design of mobile applications is said to adhere to the HCI principles. The fundamentals
of human computer interaction focus on creating systems that are simple for users to
use and comprehend, regardless of the information presented. Thus, Balsamiq
software is used to sketch the proposed mobile application interface as shown in
Figure.

Figure 5 Mobile Application Interface Design

29 | R W L D
3.5 Development Phase

Next will be the development phase. The development phase includes four activities.
Figure depicts the phases of development that provide developers a clear picture of
what is happening throughout the process and reach the research goal, which is to
create a complete prototype for River Water Level Detector.

Table 3 Development Phase

Activities Technique/Tools Deliverable

Create Firebase Firebase


database project web server

Connect all required Refer schematic


component diagram

Full coding Arduino IDE


Software

Develop mobile Android Studio


apps IDE Software
Prototype of
River Water
Level Detector
Mobile
Application

30 | R W L D
First, a new Firebase database project will be created to start off the development
process. As a result, since the Firebase database is a cloud-hosted database, an
internet connection is necessary while developing the Firebase database project. The
required component, including sensor and buzzer, will then be connected referred to
schematic design.

Once all the component are already connected, the development process will continue
by generating the program code. The NodeMCU microcontroller with the ultrasonic
sensor will be used to execute the programme code, which will be written using the
Arduino IDE software. All necessary variables will be defined, and algorithm code will
be written using the C programming language. For more detailed explanation of
development phase will be discussed in Chapter 4. Figure depicts overall view of
project from a broad perspective.

Figure 6 Overall View Project

31 | R W L D
3.6 Testing Phase

The testing phase is an essential part of the development process, serving as the final
phase of the methodology and serving to evaluate the functionality and usability of the
completed water level monitoring prototype. This phase plays a critical role in ensuring
that the system functions as intended and that users are able to effectively utilize it
through the mobile app. By conducting thorough testing and analysis, we can ensure
that the prototype is reliable, user-friendly, and capable of effectively protecting the
community from the dangers of natural disasters. The actions involved in the
evaluation phase are shown in Figure.

Table 4 Testing Phase

Activities Technique/Tools Deliverable

System integration
Functionality functionality testing
testing of hardware and
software

Functionality
Conduct and usability
Usability testing
questionnaire testing of
River Water
Level Detector
Mobile
Application

32 | R W L D
3.6.1 Functionality Testing

Functional testing is a form of testing that aims to determine whether each application
feature functions in accordance with the programme requirements. Each function is
compared to the associated requirement to see if its output matches the end user's
expectations. The testing is carried out by supplying sample inputs, collecting the
resulting outputs, and ensuring that the actual outputs match the predicted outputs.
Figure below shows the test case to identify the functionality of the prototype and
mobile application of RWLD.

Figure 7 Test Case

3.6.2 Usability Testing

Respondents are asked to rate each statement on a 5-point Likert scale, where 1 =
Strongly Disagree and 5 = Strongly Agree. The overall SUS score is calculated by
averaging the scores for all 10 statements, with a possible range of 0-100. A higher
score indicates a more usable system.

33 | R W L D
34 | R W L D
35 | R W L D
36 | R W L D
37 | R W L D
CHAPTER 4: RESULT AND DISCUSSION
4.1 Introduction

The results and discussion chapter of a project is an important aspect of the report as
it presents and interprets the findings from the testing and evaluation of the system. In
the case of the River Water Level Detector, the prototype testing can be divided into
three categories: uploading test, ultrasonic sensor test, and mobile application test.

The uploading test evaluates the effectiveness of the system in transmitting


data to the server. It is important to ensure that the data is being accurately and reliably
transmitted, as the water level readings are critical for flood prediction and warning
systems.

The ultrasonic sensor test assesses the accuracy and reliability of the sensor
in measuring the water level. It is crucial that the sensor is able to provide readings
accurately and consistently, as any errors or inconsistencies in the data can affect the
accuracy of the flood prediction and warning system.

Finally, the mobile application test evaluates the usability and functionality of
the app in displaying the data to users. It is important that the app is user-friendly and
able to effectively present the water level data to the users in a clear and concise
manner.

Generally, the results of these tests will provide valuable insight into the
functionality and effectiveness of the River Water Level Detector system and will help
to identify any areas for improvement.

4.2 Uploading Test

The program code for the River Water Level Detector system was developed using
the Arduino Integrated Development Environment (IDE) software and uploaded to the
NodeMCU microcontroller. This code was necessary to establish connections
between all system components and facilitate the transmission of data to the Firebase
server. The process of creating and uploading the program code was successful, as

38 | R W L D
confirmed by the successful establishment of connections and data transmission
during subsequent testing.

Figure 8 Connecting to Firebase

Figure 9 Connected to Firebase

39 | R W L D
4.3 Ultrasonic Test

The ultrasonic sensor plays a crucial role in the River Water Level Detector system,
as it is responsible for accurately measuring and detecting changes in the water level.
Using ultrasonic technology, the sensor is able to measure the distance from the water
surface to the sensor with a high level of precision. In order to ensure the effectiveness
and reliability of the system, it is important to thoroughly test the performance of the
ultrasonic sensor.

During the prototype testing phase of the project, the ultrasonic sensor was
tested for measurements ranging from 5 cm to 30 cm. An algorithm was developed
and implemented to enable the operation of the sensor in the system. The results of
the testing are presented in the table below, with the distance from the water surface
to the sensor and the corresponding ultrasonic reading.

It is important to note that the testing range of 5 cm to 30 cm is limited, and


further testing with a wider range of measurements will be necessary to fully evaluate
the capabilities of the ultrasonic sensor. However, the results of this prototype testing
provide valuable insight into the performance of the sensor and highlight any areas f or
improvement.

Table 5 Measurement of Ultrasonic Sensor

Level Distance(cm) Action Required


Level 1 => 21cm Display Safe Water Level

Level 2 11 cm – 20 cm Display Caution Water Level

Level 3 0 cm – 10 cm Display Danger Water Level +


Buzzer Alarm

40 | R W L D
Figure 10 Water Level Reading

4.4 Mobile Application Test

In order to develop a mobile application for detecting rising water levels, it is necessary
to utilize Android Studio software for both the front-end and back-end of the
application. By using the empty template in Android Studio, a new project can be
created and the necessary user interface can be developed. Emulator is then used as
the mobile device to display the user interface of the application. The resulting mobile
app will be able to accurately detect rising water levels, providing a valuable tool for
those in potentially flood-prone areas.

41 | R W L D
Figure 11 Mobile Application Interface

42 | R W L D
CHAPTER 5: CONCLUSION
5.1 Introduction

The River Water Level Detector (RWLD) is a comprehensive system designed to help
protect people and property from the dangers of rising water levels. It utilizes multiple
methods of notification, including a mobile app and an alarm installed at the user's
home, to provide early warning and alert individuals to potential danger. The
notifications are issued based on the level of risk associated with the rising water,
allowing users to take appropriate precautions to protect themselves and their
possessions.

The RWLD system is particularly useful in areas prone to flooding, where rising
water levels can pose a significant threat to both life and property. By providing timely
notifications, RWLD helps users stay informed and make informed decisions about
how to respond to changing water levels. It also serves as a useful tool for emergency
responders, who can use the system to identify areas at risk and take appropriate
action to protect people and property.

In general, the RWLD system is a valuable tool for helping to mitigate the risks
associated with rising water levels. Its comprehensive approach to notification,
combined with its ability to provide early warning, makes it an essential resource for
individuals and communities living in flood-prone areas.

43 | R W L D
5.2 Future Recommendation

Recommendations for Enhancing River Water Level Detector (RWLD) System in


Kampung Baru:

1. Expand water level detection area: In order to better predict the probability of
water rise in an area, it is recommended to expand the water level detection
area throughout Kampung Baru. This will allow for more data to be collected on
water rise patterns and improve the accuracy of flood warning systems.

2. Integrate with other systems: To optimize water usage and improve efficiency,
as well as improve water quality for residents, it is recommended to consider
integrating the water sensor monitoring system with other systems, such as
irrigation systems or water treatment plants. This will allow for real-time
monitoring of water quality and flow, enabling timely repairs and adjustments to
be made to the water treatment process. This integration will also allow for a
more comprehensive approach to water management in Kampung Baru,
helping to ensure that residents have access to clean, safe drinking water at all
times.

Overall, these recommendations aim to enhance the effectiveness of the water level
monitoring system in Kampung Baru, ensuring that local residents are alerted as soon
as possible in the event of unexpected flood warnings. By expanding the water level
detection area and integrating with other systems, we can improve the longevity and
reliability of the system, ultimately helping to protect the community from the dangers
of natural disasters.

44 | R W L D
REFERENCES

Khan, M. Q., & Lee, S. (2019, June 6). A Comprehensive Survey of Driving
Monitoring and Assistance Systems. PubMed Central (PMC). Retrieved January 2,
2023, from https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6603637/

Farias, E. P. D. (2021, November). Notes on the distinction between diplomatic


protection and consular protection. JANUS NET E-Journal of International Relation,
12(2). https://doi.org/10.26619/1647-7251.12.2.01

7 Phases of the System Development Life Cycle Guide. (2001, January 21). 7
Phases of the System Development Life Cycle Guide. Retrieved January 2, 2023,
from https://www.clouddefense.ai/blog/system-development-life-
cycle#:~:text=The%20planning%20stage%20(also%20called,objectives%20for%20t
heir%20new%20systems

Zhang, C., & Liu, Z. (2019, October). Application of big data technology in
agricultural Internet of Things. International Journal of Distributed Sensor Networks,
15(10), 155014771988161. https://doi.org/10.1177/1550147719881610

Archer, D., & Fowler, H. (2015, July 27). Characterising flash flood response to
intense rainfall and impacts using historical information and gauged data in Britain.
Journal of Flood Risk Management, 11, S121–S133.
https://doi.org/10.1111/jfr3.12187

Polymeni, Sofia, et al. “IoT-based Prediction Models in the Environmental Context: A


Systematic Literature Review.” Internet of Things, vol. 20, Elsevier BV, Nov. 2022, p.
100612. Crossref, https://doi.org/10.1016/j.iot.2022.100612.

Smalley, S. S. (2008, February). John Once More. The Expository Times, 119(5),
239–239. https://doi.org/10.1177/00145246081190050802

Karan, Ebrahim, et al. “A Stochastic Optimization Approach to Reduce Greenhouse


Gas Emissions From Buildings and Transportation.” Energy, vol. 106, Elsevier BV,
July 2016, pp. 367–77. Crossref, https://doi.org/10.1016/j.energy.2016.03.076

45 | R W L D
Wheelus, Charles, and Xingquan Zhu. “IoT Network Security: Threats, Risks, and a
Data-Driven Defense Framework.” IoT, vol. 1, no. 2, MDPI AG, Oct. 2020, pp. 259–
85. Crossref, https://doi.org/10.3390/iot1020016.

Upadhyay, P. (2012). The Role of Verification and Validation in System Development


Life Cycle. IOSR Journal of Computer Engineering, 5(1), 17–20.
https://doi.org/10.9790/0661-0511720

Hongbin, Y., Liang, L., & Yuandong, A. G. (2016, May). Capacitive micromachined
ultrasonic transducer (CMUT) based micro viscosity sensor. Sensors and Actuators
B: Chemical, 227, 346–351. https://doi.org/10.1016/j.snb.2015.12.061

Sosa, M. E., Gargiulo, M., & Rowles, C. (2015, August). Can Informal
Communication Networks Disrupt Coordination in New Product Development
Projects? Organization Science, 26(4), 1059–1078.
https://doi.org/10.1287/orsc.2015.0974

Hoppe, A., Kastensmidt, F. L., & Becker, J. (2021, November). Investigating real-
time control-flow error detection in hardware: How fast can we detect errors and take
action? Microelectronics Reliability, 126, 114264.
https://doi.org/10.1016/j.microrel.2021.114264

Taheri, Saman, et al. “Model Predictive Control of Heating, Ventilation, and Air
Conditioning (HVAC) Systems: A State-of-the-art Review.” Journal of Building
Engineering, vol. 60, Elsevier BV, Nov. 2022, p. 105067. Crossref,
https://doi.org/10.1016/j.jobe.2022.105067.

Brown, C. M., Kahn, R. S., & Goyal, N. K. (2017, March). Timely and Appropriate
Healthcare Access for Newborns: A Neighborhood-Based, Improvement Science
Approach. New Directions for Evaluation, 2017(153), 35–50.
https://doi.org/10.1002/ev.20234

Lebourgeois, Valentine, et al. “Can Commercial Digital Cameras Be Used as


Multispectral Sensors? A Crop Monitoring Test.” Sensors, vol. 8, no. 11, MDPI AG,
Nov. 2008, pp. 7300–22. Crossref, https://doi.org/10.3390/s8117300.

46 | R W L D
APPENDIXES

Arduino Codes
#include <NewPing.h>
#define BUZZER_PIN D4
#define TRIGGER_PIN D5 // Arduino pin tied to trigger pin on the ultrasonic sensor.
#define ECHO_PIN D6 // Arduino pin tied to echo pin on the ultrasonic sensor.
#define MAX_DISTANCE 200 // Maximum sensor distance is rated at 400-500cm.
#define SAFE_DISTANCE 30 // Safe distance to detect rising water level
#define CAUTION_DISTANCE 20 // Caution distance to detect rising water level
#define DANGER_DISTANCE 10 // Danger distance to detect rising water level
NewPing sonar(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE); // NewPing setup of pins
and maximum distance.
//---------------------------------------------------------------------
#include <Arduino.h>
#if defined(ESP32)
#include <WiFi.h>
#elif defined(ESP8266)
#include <ESP8266WiFi.h>
#endif
#include <Firebase_ESP_Client.h>
//Provide the token generation process info.
#include "addons/TokenHelper.h"
//Provide the RTDB payload printing info and other helper functions.
#include "addons/RTDBHelper.h"
// Insert your network credentials
#define WIFI_SSID "Repcoppp_2.4"
#define WIFI_PASSWORD "Arifyusof"

// Insert Firebase project API Key


#define API_KEY "AIzaSyDyddkI7z-uRGQlbgRN8YmhNwqjnR1VqtE"
// Insert RTDB URLefine the RTDB URL */
#define DATABASE_URL "ultrasonic-36e7f-default-rtdb.firebaseio.com/"

47 | R W L D
//Define Firebase Data object
FirebaseData fbdo;
FirebaseAuth auth;
FirebaseConfig config;
//unsigned long sendDataPrevMillis = 0;
//int count = 0;
bool signupOK = false;
void setup() {

Serial.begin(115200);
pinMode(BUZZER_PIN, OUTPUT);
WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
Serial.print("Connecting to Wi-Fi");
while (WiFi.status() != WL_CONNECTED) {
Serial.print(".");
delay(300);
}
Serial.println();
Serial.print("Connected with IP: ");
Serial.println(WiFi.localIP());
Serial.println();
/* Assign the api key (required) */
config.api_key = API_KEY;
/* Assign the RTDB URL (required) */
config.database_url = DATABASE_URL;

/* Sign up */
if (Firebase.signUp(&config, &auth, "", "")) {
Serial.println("ok");
signupOK = true;
}
else {
Serial.printf("%s\n", config.signer.signupError.message.c_str());
}

48 | R W L D
/* Assign the callback function for the long running token generation task */
config.token_status_callback = tokenStatusCallback; //see addons/TokenHelper.h
Firebase.begin(&config, &auth);
Firebase.reconnectWiFi(true);
}
void loop() {
delay(1000);

// Read distance from ultrasonic sensor


float ultrasonic_cm = sonar.ping_cm();
//Serial.print("Water Level : ");
//Serial.print(ultrasonic_cm); // Send ping, get distance in cm and print result
//Serial.println("cm");
if (Firebase.ready() && signupOK ) {
if (Firebase.RTDB.setFloat(&fbdo, "Ultrasonic/cm", ultrasonic_cm)) {
Serial.println("");
Serial.print("Water Level: ");
Serial.print(ultrasonic_cm);
Serial.println("cm");
}
else {
Serial.println("FAILED");
Serial.println("REASON: " + fbdo.errorReason());
}

}
Serial.println("______________________________");
if (ultrasonic_cm < DANGER_DISTANCE) {

Serial.println("");
Serial.print("DANGER LEVEL");
Serial.println("");
analogWrite(BUZZER_PIN, HIGH);

49 | R W L D
tone(BUZZER_PIN, 1000); // Send 1KHz sound signal...
delay(800); // ...for 1 sec
noTone(BUZZER_PIN); // Stop sound...
delay(800); // ...for 1sec

}else if(ultrasonic_cm < CAUTION_DISTANCE){


Serial.println("");
Serial.print("CAUTION LEVEL");

Serial.println("");
}else if(ultrasonic_cm < SAFE_DISTANCE){
Serial.println("");
Serial.print("SAFE LEVEL");
Serial.println("");
}
}

50 | R W L D
Figure 12 Sequence Diagram

Figure 13 Use Case Diagram

51 | R W L D

You might also like