Project Report
Project Report
BELAGAVI
A Project Report On
In
Computer Science & Engineering
UMAKANTH N 3VC19CS173
T ACHYUTH 3VC19CS165
SUNDEEP G 3VC19CS158
VALMEEKI KIRANKUMAR 3VC19CS178
CERTIFICATE
This is to certify that project work entitled “DETECTION AND CONTROLLING OF
WATER OVERFLOW USING IOT” is bonafide Work carried out by UMAKANTH N
(3VC19CS173),T ACHYUTH (3VC19CS165),SUNDEEP G (3VC19CS158), VALMEEKI
KIRANKUMAR (3VC19CS178) of 8th Semester in partial fulfillment for the award of degree of
Bachelor of Engineering in Computer Science & Engineering of the Visvesvaraya Technological
University, Belagavi during the year 2021-2022. It is certified that all corrections/suggestions
indicated have been incorporated in the report. The project report has been approved as it
satisfies the academic requirement in respect of project work prescribed for the Bachelor of
Engineering Degree.
Signature of Principal
Dr T Hanumantha Reddy
RYMEC, Ballari
Name of Examiners Signature with Date
ACKNOWLEDGEMENT
The satisfaction and euphoria that accompany the successful completion of any task would be
incomplete without the mention of the people who made it possible, whose constant guidance
and encouragement crowned our effort with success.
We express our sincere gratitude to our Principal Dr. T. Hanumantha Reddy for giving us an
opportunity to carry out our academic project.
We wish to place on record our grateful thank to Dr. Girisha H, Head of the Department,
Computer Science and Engineering RYMEC, Ballari for providing encouragement and guidance.
We hereby like to thank Dr. Chidananda H, Associate Professor, Department Computer
Science and Engineering, on their periodic inspection time to time evaluation of the project and
for the support, coordination, valuable suggestions and guidance given to us in completion of the
project.
Also, we thank the members of the faculty of Computer Science and Engineering Department
whose suggestions enable us to surpass many of the seemingly impossible hurdles.
We also thank our guides and lastly, we thank everybody who has directly or indirectly helped
us in the course of this Project.
PROJECT ASSOCIATES
UMAKANTH N 3VC19CS173
T ACHYUTH 3VC19CS165
SUNDEEP G 3VC19CS158
VALMEEKI KIRANKUMAR 3VC19CS178
Abstract
Water wastage is a major disadvantage for any form of life as there is only 3% of fresh
water is available on earth and 0.5% of water is edible to drink. So we should use fresh
water appropriately and do not waste .
To avoid this wastage the product we are going to develop will help in some cases. The
main purpose to implement this model is automated water filling to maximum capacity of
container placed below the filling point. This helps to reduce overflow of water and
mainly required or maximum capacity that a container can bare .
This application is useful in mineral water plant where people put 25 coin in the machine
and machine vend predefined quantity of water, but here people don't use same type cans
to fill they take unsized cans where some water gets wasted.
To avoid that this model helps which is automated. And further updates can be done like
price calculation automatically for quantity of water filled.
TABLE OF CONTENTS
Chapter 5 RESULTS
5.1 Snapshots
Chapter 6 CONCLUSIONS
6.1 Summary
6.2 Suggestions for future extensions of project
REFERENCES
APPENDICES
STUDENT DETAILS
LIST OF FIGURES
Figure No Figure Name Page No
Fig 2.2 File Structure 6
Fig 3.1 System Architecture 8
Fig 3.2.1 level1 Data Flow Diagram 9
Fig 3.2.2 Data Flow Diagram 10
Fig 3.3 Use Case Diagram 11
Fig 3.4 Sequence Diagram 12
Fig 3.5 Flowchart 13
Fig 5.1.1 Detecting Different Containers and 25
their Height
Fig 5.1.2 Filling the different containers up to 25
the mark
Fig 5.1.3 Filled exactly up to the mark without 26
overflow
Fig 5.4 Detected Object Name 26
Fig 5.5 Detection of object from Live 27
Fig 5.6 Results obtained 27
Fig 5.7 Object tracking Live 27
Fig 5.8 Object search from Image 28
Fig 5.9 Results Obtained 28
Fig 5.10 Object detection from Live 29
Fig 5.11 Results obtained 29
LIST OF TABLES
INTRODUCTION
Drinking water is water that is safe and suitable for human consumption. It is a vital resource for
human life and plays a critical role in maintaining good health. Drinking water can come from
various sources, including groundwater, surface water, and municipal water supplies. Water is a
transparent, odorless, tasteless liquid that is essential for the survival of all living organisms. It is
a basic necessity for human life, and it plays a crucial role in various biological processes,
including digestion, circulation, and temperature regulation. It is the most abundant substance on
Earth's surface, covering approximately 71% of the planet's surface. However, only a small
percentage of this water is freshwater that is accessible for human use, with the majority of it
being in the form of saltwater in oceans and seas. Despite its abundance, water scarcity is a
growing concern worldwide, and it is estimated that more than two billion people lack access to
safe and clean water. Saving drinking water using IoT is an innovative approach to conserve
water and reduce wastage. This system uses sensors connected to the internet of things (IoT) to
monitor the usage of water.
EXISTING SYSTEM:
In Existing Automatic Water Filling Systems, the way of filling water is only for fixed volumes.
Some Automatic filling Water Systems are made for just predefined containers.
An example of this existing system is, mineral water plant filling system, where a 5 rupee coin is
placed and predefined quantity of water is filled to containers.
The size and shape of each container is different, so pre-defined water quantity can be filled.
If the water container carried has less volume than the predefined value then there will be a
overflow of water which leads to wastage of drinking water.
PROPOSED SYSTEM
In this proposed system the object height is detected when placed under a prefixed filling point.
Different Containers when placed under filling point, the system automatically fills water to
containers up to maximum capacity.
In this System for detection and processing we use sensors which do not need appropriate light
conditions and the sensors detect height of the object in low light also.
This System is used for filling water for different containers up to the mark.
This System can be very helpful at water filling plants.
1.3 OBJECTIVES:
Detecting the height of the water container.
Filling the water container with water without overflow.
CHAPTER 2
Functional requirements are a set of statements that define the functions that the system should
provide, how the system should react to particular input and how the system should behave in
particular situations. In some cases, the functional requirements may also specify what the
system should not do. A function is described as a set of inputs, the behaviour, and outputs.
No Overflow
System doesn’t let the water to be overflowed it stops whenever the container is reached
its maximum capacity.
Accurate container height detection
It will give accurate Parameter values of the different water containers
Less cost
System was built with three sensors and two motors which was less cost.
Simple and flexible
System was simple it built with some sensors and motors and we can replace those
whenever we required.
CHAPTER 3
SYSTEM DESIGN
DC MOTOR
PROXIMITY
SENSOR KJ
MOTOR
ULTRASONIC DRIVER
ARDUINO MEGA
SENSOR
DC WATER
PUMP
ULTRASONIC
SENSOR
PUSH BUTTON
An controller, those noteworthy and only the IoT empower water following framework. It is
significantly discovered that the majority of the IoT build address utilization. An controller with
outside Wi-Fi and the vitality productive what’s more additionally realize convoluted
meandering. In the ESP8266, will be a single chip microcontroller inside constructed Wi-Fi
module, which might a chance to be identified with those closest Wi-Fi warm spot to net
connectivity. Sensor are without delay interface of the controller of the uncover domesticated
water acceptable. Those sensor parameters would be used to discover those water levels and will
measure by method for setting the sensor under dissimilar result about water. Those measure for
parameters have a chance to be seen. Eventually, pursuing the utilization of LCD(Liquid Crystal
Display).Those majority of the data from the sensor are send of the cloud for the utilization about
controller are the edge will be prepared inside the cloud dependent upon the prerequisites
supplied with those side for WHO(World Health Organization) .
Message will be send from cloud of the clients portable if the value exceeds the brink. An
caution message is sent to the user as well as to the government using an IoT.Likewise, provides
remedial measures to keep up the level of the measurement parameters with move forward those
nature from claiming water. This may be utilized by both the water first class monitoring
government in additional to user in the smart water great tracking devices, the clever water
sensor interface devices that integrated facts storage, records processing the water measurement.
At Level 0
PUSHES BUTTON
OBJECT HEIGHT
SENSORS DETECTION
USER
DETECTS HEIGHT
At Level 1
3.3 DESCRIPTION
Arduino Mega
The Arduino Mega is a microcontroller board based on the ATmega2560 microcontroller. It has
54 digital input/output pins, 16 analog inputs, 4 UARTs (hardware serial ports), a 16 MHz
crystal oscillator, a USB connection, a power jack, an ICSP header, and a reset button.
The board is designed for projects that require a large number of inputs and outputs or need to
control multiple devices. It can be programmed using the Arduino software and is compatible
with most Arduino shields.
The ATmega2560 microcontroller has 256 KB of flash memory for storing code, 8 KB of
SRAM, and 4 KB of EEPROM. It also has a wide range of communication interfaces, including
I2C, SPI, and CAN.
Overall, the Arduino Mega is a powerful microcontroller board that can be used for a wide range
of projects, from robotics and automation to home automation and IoT applications.
Ultrasonic sensor
An ultrasonic sensor is a type of sensor that uses sound waves to detect the distance to an object.
It works by emitting high-frequency sound waves, typically in the range of 40kHz, and then
measuring the time it takes for the sound waves to bounce back after hitting an object.
The sensor has two main components: a transmitter and a receiver. The transmitter emits the
sound waves, and the receiver picks up the echoes that bounce back from objects in the sensor's
range. By measuring the time between the sound wave emission and the echo reception, the
sensor can calculate the distance to the object.
Proximity Sensor
A proximity sensor is an electronic sensor that detects the presence or absence of nearby objects
without any physical contact. The sensor works by emitting an electromagnetic or electrostatic
field and then measuring changes in the field caused by the presence of an object.
There are several types of proximity sensors, including inductive sensors, capacitive sensors,
ultrasonic sensors, and optical sensors. Inductive sensors use electromagnetic fields to detect
metallic objects, while capacitive sensors use an electrostatic field to detect any conductive
material. Ultrasonic sensors use sound waves to detect the distance to an object, and optical
sensors use light to detect the presence of objects.
Proximity sensors are commonly used in
automation and robotics applications, such as
object detection, distance measurement, and
object recognition. They are also used in
consumer electronics, such as smartphones and
laptops, for proximity sensing and touchless
user interfaces.
DC Motor
A DC motor, or direct current motor, is a type of electric motor that converts electrical energy
into mechanical energy. It works by applying a DC voltage to the motor's terminals, which
creates an electromagnetic field that causes the motor's rotor to rotate.
DC motors come in many different sizes and types, from small hobby
motors to large industrial motors. They are commonly used in a wide range of applications,
including robotics, automation, electric vehicles, and industrial machinery.
A water pump motor is an electric motor that is specifically designed to drive a water pump. It
works by converting electrical energy into mechanical energy to drive the pump impeller, which
in turn creates suction to draw water into the pump and then pressurizes the water to move it
through the plumbing system.
Water pump motors can be powered by different types of electricity, including AC (alternating
current) and DC (direct current). They can also be classified into two main types: submersible
motors and non-submersible motors.
Motor Driver
3.4 DESCRIPTION
Power Micro-USB, 3.3V, GND, Vin Micro-USB: NodeMCU can be powered through the USB
port
3.3V: Regulated 3.3V can be supplied to this pin to power the board
Control Pins EN, RST The pin and the button resets the microcontroller
Arduino Mega
Microcontroller: ATmega2560
Operating Voltage: 5V
SRAM: 8 KB
EEPROM: 4 KB
A use case diagram is a graphical depiction of a user's possible interactions with a system. A use
case diagram shows various use cases and different types of users the system has and will often
be accompanied by other types of diagrams as well. The use cases are represented by either
circles or ellipses.
3.6 Class Diagram
In software engineering, a class diagram in the Unified Modelling Language is a type of static
structure diagram that describes the structure of a system by showing the system's classes, their
attributes, operations, and the relationships among objects.
ObjectDetection()
HeightMeasure()
WaterFlow()
Activity Diagram
Activity diagrams are graphical representations of workflows of stepwise activities and actions
with support for choice, iteration and concurrency.
A sequence diagram shows object interactions arranged in time sequence. It depicts the objects
involved in the scenario and the sequence of messages exchanged between the objects needed to
carry out the functionality of the scenario.
3.11 IMPLEMENTATION LANGUAGES
When designing software for a smaller embedded system with the 8051, it is very
common place to develop the entire product using assembly code. With many projects,
this is a feasible approach since the amount of code that must be generated is typically
less than 8 kilobytes and is relatively simple in nature. If a hardware engineer is tasked
with designing both the hardware and the software, he or she will frequently be
tempted to write the software in assembly language.
The trouble with projects done with assembly code can is that they can be difficult to
read and maintain, especially if they are not well commented. Additionally, the amount
of code reusable from a typical assembly language project is usually very low. Use of a
higher-level language like C can directly address these issues. A program written in C
is easier to read than an assembly program.
Since a C program possesses greater structure, it is easier to understand and maintain.
Because of its modularity, a C program can better lend itself to reuse of code from
project to project. The division of code into functions will force better structure of the
software and lead to functions that can be taken from one project and used in another,
thus reducing overall development time. A high order language such as C allows a
developer to write code, which resembles a human’s thought process more closely than
does the equivalent assembly code. [25]The developer can focus more time on
designing the algorithms of the system rather than having to concentrate on their
individual implementation. This will greatly reduce development time and lower
debugging time since the code is more understandable.
By using a language like C, the programmer does not have to be intimately familiar
with the architecture of the processor. This means that someone new to a given
processor can get a project up and running quicker, since the internals and organization
of the target processor do not have to be learned. Additionally, code developed in C
will be more portable to other systems than code developed in assembly. Many target
processors have C compilers available, which support ANSI C.
All of this is not to say that assembly language does not have its place. In fact, many
embedded systems (particularly real time systems) have a combination of C and
assembly code. For time critical operations, assembly code is frequently the only way
to go. One of the great things about the C language is that it allows you to perform low-
level manipulations of the hardware, if need be, yet provides you the functionality and
abstraction of a higher order language.
CHAPTER 4
SYSTEM TESTING
Testing
Testing is the process of evaluating a system or its component(s) with the intent to find whether
it satisfies the specified requirements or not. Testing is executing a system in order to identify
any gaps, errors, or missing requirements in contrary to the actual requirements.
Testing Principle
Before applying methods to design effective test cases, a software engineer must understand the
basic principle that guides software testing. All the tests should be traceable to customer
requirements.
There are different methods that can be used for software testing. They are,
1.Black-Box Testing
The technique of testing without having any knowledge of the interior workings of the
application is called black-box testing. The tester is oblivious to the system architecture and does
not have access to the source code. Typically, while performing a black-box test, a tester will
interact with the system's user interface by providing inputs and examining outputs without
knowing how and where the inputs are worked upon.
2.White-Box Testing
White-box testing is the detailed investigation of internal logic and structure of the code. White-
box testing is also called glass testing or open-box testing. In order to perform white-box testing
on an application, a tester needs to know the internal workings of the code. The tester needs to
have a look inside the source code and find out which unit/chunk of the code is behaving
inappropriately.
4.2 Levels of Testing
There are different levels during the process of testing. Levels of testing include different
methodologies that can be used while conducting software testing. The main levels of software
testing are:
Functional Testing:
This is a type of black-box testing that is based on the specifications of the software that is to be
tested. The application is tested by providing input and then the results are examined that need to
conform to the functionality it was intended for. Functional testing of software is conducted on a
complete, integrated system to evaluate the system's compliance with its specified requirements.
There are five steps that are involved while testing an application for functionality.
• The determination of the functionality that the intended application is meant to perform.
• The output based on the test data and the specifications of the application.
• The comparison of actual and expected results based on the executed test cases.
Non-functional Testing
This section is based upon testing an application from its non-functional attributes. Non-
functional testing involves testing software from the requirements which are non-functional in
nature but important such as performance, security, user interface, etc. Testing can be done in
different levels of SDLC. Few of them are
Unit Testing
Unit testing is a software development process in which the smallest testable parts of an
application, called units, are individually and independently scrutinized for proper operation.
Unit testing is often automated but it can also be done manually. The goal of unit testing is to
isolate each part of the program and show that individual parts are correct in terms of
requirements and functionality. Test cases and results are shown in the Tables.
• Development is faster.
• The cost of fixing a defect detected during unit testing is lesser in comparison to that of
defects detected at higher levels.
• Debugging is easy.
Remarks: - Pass
Expected output: - Should show different values for different types of objects
Expected output: - Water Flow values should be different for different water containers
Integration testing is a level of software testing where individual units are combined and tested
as a group. The purpose of this level of testing is to expose faults in the interaction between
integrated units. Test drivers and test stubs are used to assist in Integration Testing. Integration
testing is defined as the testing of combined parts of an application to determine if they function
correctly. It occurs after unit testing and before validation testing. Integration testing can be done
in two ways: Bottom-up integration testing and Top-down integration testing.
1.Bottom-up Integration
This testing begins with unit testing, followed by tests of progressively higher-level
combinations of units called modules or builds.
2.Top-down Integration
In this testing, the highest-level modules are tested first and progressively, lower-level modules
are tested thereafter.
Integration Testing:
Remarks: - Pass.
System testing:
• System testing is the first step in the Software Development Life Cycle, where the
application is tested as a whole.
• The application is tested thoroughly to verify that it meets the functional and technical
specifications.
• System testing enables us to test, verify, and validate both the business requirements as
well as the application architecture.
System Testing is shown in below tables
Expected output: - Water containers height should be detected and fill up to the mark and
stop
Remarks: - Pass
CHAPTER 5
5.1 SNAPSHOTS
6.1 Conclusion:
Detection and Controlling of Water Overflow using IOT is very useful in saving drinking water.
System detects the height of the object and fills out the water container without water overflow.
Water can be filled to different types of containers without overflow.
This project can be mainly used in mineral water plant and industrial filling processes.
For further we can add features to this project like flow rate and pricing accordingly the water
filled.
By keeping the embedded devices in the environment for monitoring enables self protection (i.e.,
smart environment) to the environment. To implement this need to deploy the sensor devices in
the environment for collecting the data and analysis. By deploying sensor devices in the
environment, we can bring the environment into real life i.e., it can interact with other objects.
6.2 Future Scope:
In future we use IOT concept in this project
REFERENCES
1. "A Review of Water Level Detection Methods for Water Tank Control" by K. Z. Goh, T.
H. Lee, and W. L. Soong, published in IEEE Sensors Journal. This paper reviews various
methods for water level detection, including float switches, ultrasonic sensors, and
pressure sensors.
6. "IoT-Based Smart Water Management System for Leakage Detection and Water
Conservation" by K. S. Bhatti, K. Alghathbar, and A. A. Khan, published in Sensors.
This paper proposes a smart water management system that uses IoT devices for leakage
detection and water conservation, including overflow detection and prevention.
7. "Smart Water Management System Using IoT and Machine Learning" by S. V. Guduru
and S. S. Sarawadekar, published in International Journal of Engineering and Advanced
Technology. This paper presents a smart water management system that uses IoT devices
and machine learning algorithms for water flow monitoring and overflow detection.
8. "IoT-Based Real-Time Water Level Monitoring and Control System Using Raspberry Pi"
by N. D. D. Dang and T. T. Thuy, published in International Journal of Engineering and
Technology. This paper describes an IoT-based real-time water level monitoring and
control system that uses Raspberry Pi and ultrasonic sensors to detect water levels and
control water flow to prevent overflow.
10. "Smart Water Management System Using IoT and Wireless Sensor Networks" by M. R.
Naeem and M. A. Qadeer, published in International Journal of Electrical and Computer
Engineering. This paper presents a smart water management system that uses IoT devices
and wireless sensor networks for water flow monitoring and overflow detection.
11. "Real-Time Water Overflow Monitoring and Control System Using IoT" by S. R. Jadhav,
S. P. Mane, and P. V. Panchal, published in International Journal of Scientific and
Research Publications. This paper proposes a real-time water overflow monitoring and
control system that uses IoT devices and machine learning algorithms for detecting and
preventing water overflow.