SMART WATERFLOW MONITORING AND
ALARMING SYSTEM
A Major Project Submitted to Thiagarajar College (Autonomous)
Affiliated to Madurai Kamaraj University
In partial fulfillment of the requirement for the degree of
BACHELOR OF COMPUTER APPLICATION
submitted by
M. MURUGANANDAM (20SUCA13)
M. SABARI KUMAR (20SUCA19)
P. GAYATHIRI (20SUCA34)
Under the guidance of
DR. S. Abirami M.Sc., M. Phil., Ph.D.
Associate and Head-in-charge
DEPARTMENT OF COMPUTER APPLICATION
AND
INFORMATION TECHNOLOGY
THIAGARAJAR COLLEGE(AUTONOMOUS)
(Re-Accredited with “A” Grade by NAAC)
MADURAI-625009
NOVEMBER – 2022
Dr. S. ABIRAMI M.Sc., M.Phil., Ph.D.
Associate and Head-in-charge,
Department of Computer Application and Information Technology,
Thiagarajar College, Madurai - 625 009.
BONAFIDE CERTIFICATE
This is to certify that this Major Project entitled “WATERFLOW MONITORING
AND ALARM SYSTEM ” submitted by M. MURUGANANDAM (20SUCA13)
and M.SABARI KUMAR (20SUCA19) , P.GAYATHIRI (20SUCA34) students of
Bachelor of Computer Application degree course in the Department of Computer
Application and Information Technology, Thiagarajar College (Autonomous), Madurai,
affiliated to Madurai Kamaraj University, Madurai, is a bonafide record of work carried out
by them, under my guidance and supervision as a partial fulfilment of the course.
It is further certified that to the best of my knowledge, this Project report or any other
part of this project has not been submitted in this university or elsewhere for any other degree or
diploma.
Submitted for Viva-Voce held on_______________.
Head of the Department Internal Guide
Dr. S. Abirami, M.sc, M.Phil., Ph.D.,
Head of the Department,
Department of CA&IT,
Thiagarajar College,
Madurai 625009.
External Examiner
DECLARATION
DECLARATION
The Major Project work entitled “WATERFLOW MONITERING AND ALARM
SYSTEM” has been carried out by us in the Department of Computer Application and
Information Technology, Thiagarajar College (Autonomous) Madurai, affiliated to
Madurai Kamaraj University, Madurai, in partial fulfilment of the requirements for the
Degree of Bachelor of Computer Application.
We further declare that this major project work or any part of this work has not been
submitted in this university or elsewhere for any other degree or diploma.
Signature
M.MURUGANANDAM(20SUCA13)
M.SABARI KUMAR (20SUCA19)
P .GAYATHIRI (20SUCA34)
Date:
Place:
CONTENT
TABLE OF CONTENT
Ch.NO TITLE Pg. No
1
Introduction 1
1.1. Abstract 2
5
1.2. Acknowledgement
7
1.3. System Analysis 9
1.4.System Configuration
2
System design 11
12
2.1. Data Flow Diagram
13
2.2 Circuit Diagram
3 System Specification 15
16
3.1. About the Language
3.2. About the Sensors 18
3.3. Project Description 25
3.4.Working Principle 28
3.5. Screen shots 30
38
4.1.Source Code
4 42
4.2.Testing
5 Conclusion 44
Future Enhancement
6 46
Bibliography & References
7 48
INTRODUCTION
1
ABSTRACT
2
ABSTRACT
The project is entitled as “SMART WATERFLOW MONITORING AND
ALARMING SYSTEM” developed using Arduino and C++ with Arduino IDE.
The objective of the project is to avoid the accidents that happen in the waterfalls due
to the rapid increase of the water flow in the waterfalls .The project initiates its process when
we place a water flow sensor, a few distance before the waterfalls. Which is connected with
the Arduino UNO with the respective pin and also a buzzer alarm and a LED bulb is connected
for indicating when the water flow increases its limit range.
The system makes use of
• Water flow sensor
• Arduino
• LED bulbs
• Alarming buzzer
• Hose pipes
• LCD screen
WATERFLOW SENSOR:
We use a water flow sensor to measure the water flow rate. The Water flow rate is
the volume of fluid that passes per unit time. People often use water flow sensors for automatic
water heater control, DIY coffee machines, water vending machines, etc….
ARDUINO UNO:
Arduino acts as the brain of the system and processes the data from the sensor. Arduino
is an opensource hardware platform that is readily available for hobbyists and enthusiast across
the globe to build projects.
3
LED BULB:
LED BULB is used to indicate that the speed of water flow is increasing rapidly.
ALARMING BUZZER:
The system needs this component to generate the alarming sound to create an
awareness for the people.
HOSE PIPE:
HOSE PIPES are used for the water flow, which is directly connected to the water
source from one side and connected with the water flow sensor on the other side.
LCD SCREEN:
It is used to display the speed and volume of the water, which is flowing through the
sensor.
After completion of the proposed IOT device, the device would alert the people in-
charge behind the waterfalls to clear the people before the flood, thereby saving the valuable
human lives.
4
ACKNOWLEDGEMENT
5
ACKNOWLEDGEMENT
First and foremost, we render our deep and sincere thanks to the Lord Almighty for his
Blessings. He has bestowed us with good health enabling us to complete our project.
we whole heartedly thank the Management for the golden opportunity given to me to
study in this esteemed Institution.
We take great delight in expressing our thanks to our Principal Dr. D. Pandiaraja
M.Sc., M.Phil., PGDCA., B.Ed., Ph.D. Thiagarajar College, Madurai, for giving me an
opportunity to study in this institution.
Our special and sincere thanks to all the faculty members, Department of Computer
Application and Information Technology , Thiagarajar college, Madurai for providing
laboratory facilities and her timely support throughout the project.
We immensely pleased to record our profound gratitude and heartfelt thanks to our
esteemed guide for her continuous guidance, supervision, encouragement and valuable
suggestions throughout the entire project. We deem it as a special privilege to work under his
guidance. we remain forever grateful to her.
We wish to dedicate our thanks to all the staff members and my friends for their
precious support through their prayers in our hardships and helping us to attain our goal.
At this juncture, we would like to express our heartfelt gratitude to our ever-loving
family members for bearing all the inconvenience and providing their constant support and
encouragement now and forever.
Finally, we thank all those who have helped us directly and indirectly for the successful
completion of our Project.
6
SYSTEM ANALYSIS
7
SYSTEM ANALYSIS
EXISTING SYSTEM
There is no automated system for measuring the speed of waterflow in the
waterfalls. Therefore, the lot of peoples are suffering , so they get stuck into the
sudden flood , Currently the people authorities in waterfalls giving warning to the
people manually , even they could not give warning priorly because they cannot
predict the speed of the waterflow in a waterfall.
PROPOSED SYSTEM
The proposed IOT System for waterflow monitoring and Alarming to detect
high-level flow of water .The Hall-effect sensor was used in this system to measure the
waterflow speed, which then used to create awareness alarm would alert the peoples
near the waterfalls, thereby saving the peoples from any disasters occurrences.
8
SYSTEM
CONFIGURATION
9
SYSTEM CONFIGURATION
Hardware Specification
Processor : AMD E-450 APU
Processor Speed : 1.65 GHz
RAM : 2 GB
Cache Memory : 512KB
Software Specification
Operating System : Windows 11.
Technology Used : Arduino, C++
IDE : Arduino IDE
Sensors
Microcontroller : Arduino UNO
Sensor : YF-S201(HALL EFFECT SENSOR)
10
SYSTEM DESIGN
11
SYSTEM DESIGN
2.1 DATA FLOW DIAGRAM:
The Data flow diagram is a graphical tool. It is used to describe and analyse the
movement of the data through a system manual . They focus on the data flowing into system
between processed and in out of data stores. This is a central tool and the basis from which
other components are developed. The system models are termed as Data Flow Diagram. The
Data flow Diagram is also known as Data Flow graph or a bubble chart.
The basic notations are,
- Indicates the Flow of Data.
- Indicate the form.
- Indicate the Process being carried out by the form.
DFD :
Arduino UNO LCD
Sensor
Convert Digital into Analog Signal
RGB Alarming Buzzer
12
CIRCUIT DIAGRAM
13
2.2 Circuit Diagram:
14
SYSTEM SPECIFICATION
15
ABOUT THE LANGUAGE
16
3.1 ABOUT THE LANGUAGE
3.1.1 ARDUINO:
Coding on Arduino are written using C++.
C++ is a statically typed, compiled, general-purpose, case-sensitive, free-form
programming language that supports procedural, object-oriented, and generic
programming.
C++ is regarded as a middle-level language, as it comprises a combination of both
high-level and low-level language features.
C++ is a superset of C, and that virtually any legal C program is a legal C++ program.
Features of C++:
C++ provides a structured approach wherein you can break the problem into parts and
design the solution modularly.
It provides you a rich set of library functions that you can use while implementing the
solution.
Advantages of C++:
C++ is used by hundreds of thousands of programmers in essentially every application
domain.
C++ is being highly used to write device drivers and other software that rely on direct
manipulation of hardware under real-time constraints.
++ is widely used for teaching and research because it is clean enough for successful
teaching of basic concepts.
17
ABOUT THE SENSOR
18
3.2 ABOUT THE SENSOR
3.2.1 Waterflow sensor
Description of the YF-S201:
Water flow sensors are installed at the water source or pipes to measure the rate of
flow of water and calculate the amount of water flowed through the pipe. Rate of flow of YF
water is measured as litres per hour or cubic meters.
Water flow sensor consists of a copper body, a water rotor, and a hall-effect sensor. When
water flows through the rotor, rotor rolls, its speed changes with different rate of flow.
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.
YFS201 Hall Effect Water Flow Sensor
19
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 rotation of 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 LCD display.
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.
Applications of YF - S201:
• Agriculture
• Food processing
• Coffee/Tea makers
• Water Management
• Mining Industry
Connection Details:
Red wire: +5V
Black wire : GND
Yellow wire : PWM output
20
How to use YF - S201 :
The YF-S201 connections are pretty simple, the module contains 3 pins which are
generally colour coded as red, black, and yellow.
The Red is the power pin that is connected to the 5V of the microcontroller, the black is
the ground pin and the yellow is the signal output pin that can be connected to the digital pin
of the microcontroller.
3.2.2 Arduino Uno
The Arduino Uno is an open-source microcontroller board based on the
Microchip ATmega328P microcontroller and developed by Arduino.cc The board is
equipped with sets of digital and analog input/output (I/O) pins that may be interfaced
to various expansion boards (shields) and other circuits. The board has 14 digital I/O
pins (six capable of PWM output), 6 analog I/O pins, and is programmable with the
Arduino IDE (Integrated Development Environment), via a type B USB cable. It can
be powered by the USB cable or by an external 9-volt battery, though it accepts voltages
between 7 and 20 volts. It is similar to the Arduino Nano and Leonardo.[5][6] The
hardware reference design is distributed under a Creative Commons Attribution Share-
Alike 2.5 license and is available on the Arduino website. Layout and production files
for some versions of the hardware are also available.
21
Power USB
Arduino board can be powered by using the USB cable from your computer. All you need to
do is connect the USB cable to the USB connection
Power (Barrel Jack)
Arduino boards can be powered directly from the AC mains power supply by
connecting it to the Barrel Jack
Voltage Regulator
The function of the voltage regulator is to control the voltage given to the Arduino
board and stabilize the DC voltages used by the Microcontroller and other elements.
Crystal Oscillator
The crystal oscillator helps Arduino in dealing with time issues. How does Arduino
calculate time? The answer is, by using the crystal oscillator. The number printed on top of
the Arduino crystal is 16.000H9H. It tells us that the frequency is 16,000,000 Hertz or 16
MHz
Arduino Reset
You can reset your Arduino board, i.e., start your program from the beginning. You
can reset the UNO board in two ways. First, by using the reset button (17) on the board.
Second, you can connect an external reset button to the Arduino pin labelled RESET
Pins (3.3, 5, GND, Vin)
• 3.3V − Supply 3.3 output volt
• 5V − Supply 5 output volt
• Most of the components used with Arduino board works fine with 3.3 volt and 5 volts.
• GND (Ground) − There are several GND pins on the Arduino, any of which can be
used to ground your circuit.
• Vin − This pin also can be used to power the Arduino board from an external power
source, like AC mains power supply.
22
Analog pins
The Arduino UNO board has six analog input pins A0 through A5. These pins can read
the signal from an analog sensor like the humidity sensor or temperature sensor and convert it
into a digital value that can be read by the Microcontroller.
Main microcontroller
Each Arduino board has its own microcontroller. You can assume it as the brain of
your board. The main IC (integrated circuit) on the Arduino is slightly different from board
to board. The microcontrollers are usually of the ATMEL Company. You must know what IC
your board has before loading up a new program from the Arduino IDE. This information is
available on the top of the IC. For more details about the IC construction and functions, you
can refer to the data sheet
ICSP pin
Mostly, ICSP (12) is an AVR, a tiny programming header for the Arduino consisting
of MOSI, MISO, SCK, RESET, VCC, and GND. It is often referred to as an SPI (Serial
Peripheral Interface), which could be considered as an "expansion" of the output. Actually,
you are slaving the output device to the master of the SPI bus.
Power LED indicator
This LED should light up when you plug your Arduino into a power source to indicate
that your board is powered up correctly. If this light does not turn on, then there is something
wrong with the connection.
TX and RX LEDs
On your board, you will find two labels: TX (transmit) and RX (receive). They appear
in two places on the Arduino UNO board. First, at the digital pins 0 and 1, to indicate the pins
responsible for serial communication. Second, the TX and RX led (13). The TX led flashes
with different speed while sending the serial data. The speed of flashing depends on the baud
rate used by the board. RX flashes during the receiving process.
23
Digital I/O
The Arduino UNO board has 14 digital I/O pins (15) (of which 6 provide PWM (Pulse
Width Modulation) output. These pins can be configured to work as input digital pins to read
logic values (0 or 1) or as digital output pins to drive different modules like LEDs, relays, etc.
The pins labelled “~” can be used to generate PWM.
AREF
AREF stands for Analog Reference. It is sometimes, used to set an external reference
voltage (between 0 and 5 Volts) as the upper limit for the analog input pins.
24
PROJECT DESCRIPTION
25
3.3 Project Description
The project is entitled as “WATERFLOW MONITORING AND ALARMING
SYSTEM” developed using Arduino and C++ with Arduino IDE.
The objective of the project is to avoid the accidents that happen in the waterfalls due to
the rapid increase of the water flow in the waterfalls .The project initiates its process when we
place a water flow sensor, a few distance before the waterfalls. Which is connected with the
Arduino UNO with the respective pin and also a buzzer alarm and a LED bulb is connected for
indicating when the water flow increases its limit range.
WATERFLOW SENSOR:
We use a water flow sensor to measure the water flow rate. The Water flow rate is the
volume of fluid that passes per unit time. People often use water flow sensors for automatic
water heater control, DIY coffee machines, water vending machines, etc….
ARDUINO UNO:
Arduino acts as the brain of the system and processes the data from the sensor. Arduino
is an opensource hardware platform that is readily available for hobbyists and enthusiast across the
globe to build projects.
LED BULB:
LED BULB is used to indicate that the speed of water flow is increasing rapidly.
ALARMING BUZZER:
The system needs this component to generate the alarming sound to create an awareness
for the people.
26
HOSE PIPE:
HOSE PIPES are used for the water flow, which is directly connected to the water source
from one side and connected with the water flow sensor on the other side.
LCD SCREEN:
It is used to display the speed and volume of the water, which is flowing through the sensor.
After completion of the proposed IOT device, the device would alert the people in-charge
behind the waterfalls to clear the people before the flood, thereby saving the valuable human lives.
27
WORKING PRINCIPLE
28
3.4 WORKING PRINCIPLE :
The development of the Internet of Things (IoT) System on Waterflow Monitoring for
Warning Phenomena. It aims to prevent visitors at a waterfall which warning will be alerted on
the increased water level at the waterfall.
The incident happened at the waterfall during high water level occur suddenly, where
visitors are unknown in the situations. The design system is based on IoT System for Waterflow
Monitoring where water level sensors are used to detect high-level water.
The waterflow sensor (YF-S201) was used in this system where the minimum time
delay of the sensor was detected compared with other sensors.
The Arduino microcontroller board was used as an interface from a sensor as input and
output for generating alert for the people.
The result of the developed system was analyzed based on time delay and efficiency of
water level. The analysis presents the motor rotations increased when the water speed has
increased.
The alert system is one advantage to reduce death cases that happened at the waterfall
which usually happen after rain in the surrounding waterfall.
This helps the tourism sectors in developing more visitors to the waterfall places and
keep visitors safe with the help of the recent technology can reduce bad incidence.
29
SCREEN SHOTS
30
3.5 Screen Shots of components:
3.5.1 Arduino Uno
3.5.2 Water Flow Sensor
31
3.5.3 BUZZER :
3.5.4 LED :
32
3.5.5 JUMPER WIRES
3.5.6 BREAD BOARD :
33
3.5.7 LCD with I2C :
Liquid Crystal Display with I2C
3.5.8 RESISTORS:
34
3.5.9 ARDUINO and LCD :
Displaying volume and speed on the LCD
35
3.5.10 ENTIRE SYSTEM :
Entire Architecture of the system
36
3.5.11 Output of Arduino IDE :
37
SOURCE CODE
38
4.ARDUINO CODE
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
int buzzer = 10;
int red = 11;
int green = 12;
int X;
int Y;
float TIME = 0;
float FREQUENCY = 0;
float WATER = 0;
float TOTAL = 0;
float LS = 0;
const int input = A0;
void setup()
{
Serial.begin(9600);
Serial.begin("Serial Monitor Started...");
lcd.begin();
lcd.backlight();
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Water Flow Meter");
Serial.println("Water Flow Meter");
lcd.setCursor(0,1);
lcd.print("****************");
Serial.println("****************");
39
delay(2000);
pinMode(input, INPUT);
pinMode(buzzer, OUTPUT);
pinMode(red, OUTPUT);
pinMode(green, OUTPUT);
}
void loop()
{
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))
{
lcd.clear();
lcd.setCursor(0,0);
lcd.print("VOL. :0.00");
lcd.setCursor(0,1);
lcd.print("TOTAL:");
lcd.print( TOTAL);
lcd.print(" L");
}
else
{
TOTAL = TOTAL + LS;
40
Serial.print("FREQUENCY :");
Serial.println(FREQUENCY);
if(WATER > 20.00)
{
digitalWrite(buzzer, HIGH);
digitalWrite(red, HIGH);
digitalWrite(green, LOW);
}
else
{
digitalWrite(buzzer, LOW);
digitalWrite(red, LOW);
digitalWrite(green, HIGH);
}
lcd.clear();
lcd.setCursor(0,0);
lcd.print("VOL.: ");
lcd.print(WATER);
lcd.print(" L/M");
lcd.setCursor(0,1);
lcd.print("TOTAL:");
lcd.print( TOTAL);
lcd.print(" L");
}
}
delay(200);
41
TESTING
42
4.2 TESTING :
4.2.1 SYSTEM TESTING :
The testing stage that should be conducted in order to ensure the water flow
monitoring system may works properly. In this part of testing process, we did unit
testing to verify whether all the components were receiving the proper signal.
This testing was done by displaying the volume and speed of the waterflow in the
LCD. In second level of unit testing, we verified the output signal through arduino
IDE. In third level of unit testing, we have tested the complete functionality of
the system with the buzzer and RGB.
4.2.2 FUNCTIONAL-BASED TESTING:
The functional-based test is commonly known as a Black Box Testing is
one of the software tests approaches that examines only the functionality of the
system without seeing into detail the internal structure of the program code. The
trial test has been conducted with execution of the developed system with the help
of flow of the tap water. So, we have tested for different volume of water. We
received the results and output as expected.
43
CONCLUSION
44
5. CONCLUSION
This project is a development of the Internet of Things (IoT) System
on Waterfall Water Level Monitoring for Warning. It aims to prevent injured
visitors at a waterfall which warning will be alerted on the increased water level
at the waterfall. The incident happened at the waterfall during high water level
occur suddenly, where visitors are unknown in the situations. The design system
is based on IoT System for Waterfall Water Level Monitoring where water level
sensors are used to detect high-level water. The waterflow sensor was used in
this system where the minimum time delay of the sensor was detected compared
with other sensors. The Arduino microcontroller board was used as an interface
from a sensor as input and output for data collections
The proposed IOT device would alert the people in-charge behind
the waterfall to clear the people before the flood, thereby saving the valuable
human lives.
45
FUTURE
ENHANCEMENT
46
6. FUTURE ENHANCEMENT
This development of a water monitoring system, with the objective of
notifying the user of the real-time waterflow parameters. The system is able to
measure the speed parameters of water.
In future , the project can be developed with some additional substances such
as adding wi-fi module, which can help the peoples by getting notifications in
their personal devices such as mobile phones, And by adding or extending the
device with any other objectives like better flow sensors or also we can
alternatively change the WATERFLOW SENSOR (YF-S201) by an Ultrasonic
sensor because, it will be more efficient then using the waterflow sensor but it is
not accurately providing the flow speed and velocity of the water in the waterfalls.
So, we can use the ultrasonic sensor alternatively for better enhancement.
47
BIBLIOGRAPHY
&
REFERENCES
48
7. WEB REFERENCE
1. https://how2electronics.com/arduino-water-flow-sensor-measure-flow-rate-
volume/#:~:text=minimum%20300%2C000%20cycles-
,Working%20of%20YFS201%20Hall%20Effect%20Water%20Flow%20Sensor%3A,mag
netic%20field%20perpendicular%20to%20it
2. Automated Waterfall Water Level Monitoring for Warning Phenomena | IEEE
Conference Publication | IEEE Xplore
3. .INSTRUCTABLES:
Arduino Projects - Instructables
4. TINKERCAD:
Circuits | Tinkercad
5. https://www.researchgate.net/publication/350771373_Design_and_Development_o
f_IoT_Based_Water_Flow_Monitoring_for_Pico_Hydro_Power_Plant
49