This article deals with a proposal of a smart water meter for monitoring water consumption and for accidental leakage detection. The hardware part of the smart water meter consists of a mini-computer and a pulse water meter. Application logic is then in the hands of the original software that evaluates water consumption patterns. If a water leak is detected, the smart water meter uses a ball valve to close the inlet. The meter also has a self-learning mode that can recommend set limits within the reference period. A separate application interface is designed for communication between the meter and the user .Various computer simulations were used to test and initiate different water consumption scenarios.
Smart Water Meter System for Detecting Sudden Water Leakage
1. Smart Water Meter System for Detecting
Sudden Water Leakage
Aneek Banerjee
National Institute of Science and Technology, Berhampur, Orisha-761008
aneek.uit.bwn@gmail.com
Abstract — This article deals with a proposal of a smart water meter for monitoring water
consumption and for accidental leakage detection. The hardware part of the smart water meter
consists of a mini-computer and a pulse water meter. Application logic is then in the hands of the
original software that evaluates water consumption patterns. If a water leak is detected, the smart
water meter uses a ball valve to close the inlet. The meter also has a self-learning mode that can
recommend set limits within the reference period. A separate application interface is designed for
communication between the meter and the user .Various computer simulations were used to test
and initiate different water consumption scenarios.
Keywords - Smart water meter; water leak; web services; water monitoring; computer
simulation.
I. INTRODUCTION
Nowadays, we witness the dynamic development of industry 4.0 that can be found in all areas.
One of the industry's 4.0 components is the Internet of Things (IoT), which is mainly used for
consumer, business and infrastructure applications. Besides the Internet of Things, it is also
possible to see EIoT (Enterprise Internet of Things), which is mainly used in business solutions.
Currently, experts estimate that the Internet of Things will include approximately 30 billion
devices in 2020, and the market value is estimated to be $ 80 billion [1]. Within this area, for
example, smart buildings can be built to monitor key systems and units. One of the important
monitored substances is water, for which the most monitored are its quality or consumption.
Water is nowadays an increasingly discussed commodity, as it is one of vital substances. One of
the reasons why water attracts ever more attention is its depletion. It mainly involves a
significant drop in groundwater [2]. As a result, many supporting activities come not only from
the state to address this issue in the future. However, the fact remains that water is and will be a
valuable commodity, and one of the areas that is particularly important for end customers is the
monitoring of its consumption and early detection of unwanted leakage. On average, around 20%
loss of the total water distribution [3] is reported worldwide. Sudden leakage of water can cause
considerable damage in the short term, especially to equipment adjacent to the point of leak. On
the other hand, such leakage is relatively easy to detect. Another significant problem can be a
small but long term and continuous leakage. In these cases, there is not necessarily a great
damage to property, but rather in higher or additional water costs. It is precisely these long and
continuous water leaks that should be detected and, in the event of their occurrence, inform about
them in good time and adequately respond to them.
2. II. STATE OF ART
In the area of water monitoring, a number of entities or organizations already currently operate,
particularly in the area of surveillance. This is, for example, a design of real-time automated
reading system using IoT to be deployed in smart cities. These systems use a system of
measuring sensors and communicate via, for example, esp8266 [14] wireless communication
technology. Data is most often stored on cloud servers for more detailed data processing. Other
systems, for example, monitor grid pressure [5]. With these systems, water distributors can
remotely monitor network status and detect sudden leakages early on both the backbone network
and end nodes such as city hydrants. On the basis of long-term monitoring of water distribution
networks, it is possible to, for example, determine the age of the network and to detect the no
longer adequate condition of individual parts of the pipeline. In these cases, it is most often a
continuous increase in consumption at the same measured water flow [6]. Most systems,
however, primarily aim at the industrial use of distribution networks and monitoring the
consumption of larger agglomerations as one of the smart city subsystems.
III. SOLUTION
A. Main motivation
The main objective is the design of autonomous water consumption monitoring system for small
and medium-sized buildings, mainly households, administrative buildings or educational
institutions. Especially in buildings with a higher number of persons, more complex water
distribution systems with higher number of end-points are built, such as sanitary facilities. These
end-points are the most common source of water leakage problems. Excessive use leads to
higher wear and thus to an earlier potential failure. This often leads either to sudden leakage or
long-term water leakage, which in both cases entails additional costs.
B. Hardware
The basic part of the smart water meter is shown in Figure 1 and consists of four parts:
Central control unit- in this case, the Raspberry Pi Zero W [7] single-core mini-computer
expanded by a real time unit (RTC) using the standard Linux Raspbian environment [8]. In this
Linux environment there is implemented software, which mainly provides:
o reception of information about flow rate from the water meter
o communication within the application interface via a wireless network
o periodic evaluation of the water flow based on established rules according to application logic
o two-way valve control
Pulse Water Meter - Provides information on the intensity and continuity of water flow. In
general, any pulse water meter can be used, even with any sensitivity (number of pulses per liter)
Two-way ball valve - Based on the request from the control system (both external from the
user and internal based on the evaluation of the autonomous mode) controls the opening or
closing of the water flow.
3. Backup battery - Provides a standby power supply in the event of a power outage, for greater
stability when the main power supply has been dropped, the battery has been supplied with a
suitable capacitor.
Control
Control
unit
Fig. 1. Basic concept of a smart water meter
C. Software solution
The software part is built on the JAVA platform [10] using the MySQL database [10] and the Pi4j
[12] library which provides object-oriented access to the Raspberry Pi I/O minicomputer
One of the basic activities of the software is to evaluate input pulses from the water meter. These
pulses are:
Stored in a local database for periodic measurement of consumption - Periodic measurement of
consumption
According to the rules set, it is continuously evaluated whether there is a sudden water leakage
– leakage detection
1) Periodic measurement of consumption
Individual pulses from a water meter are stored in a local database and are evaluated in a
periodic interval (for example one hour). The water meter may have different granularity
according to its parameters (for example 1 liter = 2 impulses). At these discreet moments, the
total consumption over the given period is calculated and the cumulative sum is stored in a cloud
database via application interface. In the event of an Internet signal failure and transmission
failure, the data is again stored in the local database and is transmitted when the connection
between the measuring device and the server is available again.
Pulse
Water
Meter
Ball
ValveControl Unit
4. 2) Leak Detection
The basic idea of leakage detection is primarily based on monitoring continuous off take,
secondarily on set daily limits. For continuous off take, it is assumed that this continuous status
may only last for a limited period of time. If this condition lasts longer than the set time, this
status can subsequently be declared as undesired leakage. Continuous off take times can be
divided into time zones (for example, day/night), with single limits being entered either manually
or on a basis of, so called, self-learning mode. Such self-learning mode based on a specific
algorithm following observation recommends limits, using basic statistical indicators such as:
Average
Median
Diffusion
Standard deviation
IV. CASE STUDY
For example, if we focus on households, we can estimate daytime limits from the average
consumption. For leak detection, however, the aforementioned continuity, which can be further
distinguished according to the daily time, for example day and night mode, is more important.
The night mode can be judged based on stricter criteria than the daily one. By experimental
measurements within selected households it was found that the longest periods of continuous off
take are reached in times dedicated to personal hygiene (filling of the tub) in the range of 20-30
minutes, depending on the water flow and the size of the tub. Household appliances (dishwasher,
washing machine) are only marginal to this measurement. Based on these findings, two modes
were established:
Day (6am to 1am) with a 20-minute limit for maximum continuous off take.
Night (from 1am to 6am) with a limit of 5 minutes for maximum continuous off take.
Day mode covers maximum off take. No significant long term off take is expected during the
night mode, so the limit may be set more strictly.
A. Testing
Testing took place both within the selected household and by using a computer simulation. For
this purpose, a simple simulation tool was designed and implemented. It contains the core of a
discrete simulation and allows to introduce different situations of both standard and non-standard
water off take. The simulation scenarios themselves can then be based either on historical or
generated data.
5. V. DESIGN OF APPLICATION INTERFACE
The whole system can be divided into three layers:
Measurement-water meter layer
Communication layer
User layer
The overall concept of the smart water meter system is illustrated in Figure 2.
Fig. 2. Overall concept of the smart water meter system
In order to communicate with the smart water meter, it was necessary to design a suitable
application interface (API). For this case, the REST (Representational State Transfer)
architecture was chosen. Application interface is implemented as a web service and consists of a
set of methods that provide basic communication means between:
User layer and database
Water meter and database
The communication interface can be divided into three parts:
6. Communication with the sensor
o GET /api/Sensor
o GET /api/Sensor/{id}
o GET /api/Sensor/{id}/consumption
o POST /api/Sensor/{id}/consumption
o PUT /api/Sensor/{id}/live
Ball valve control
o PUT /api/Valve/setState
VI. USER INTERFACE
For the sake of completeness of the proposed smart water meter system, it was necessary to
design and implement an application that would provide clear information on water
consumption, inform about leakage via a text message and at the same time enable the basic
administration of the water meter.
Currently implemented is:
responsive web application
Despite all the benefits of a responsive web application based primarily on its versatility, native
mobile application brings greater convenience and more intuitive user friendliness.
Mobile application was built for the Android platform, one of the screens is illustrated in Figure
3.
7. Fig. 3. A sample of a running web site
VII. CONCLUSION
Attention was primarily paid to the proposal of a smart water meter, which can measure water
consumption on an ongoing basis, but also has an autonomous mode. Within this superstructure,
the water meter can detect water leaks, both sudden and long-term. This is achieved by
continuous off take detection, which should only last for a limited time in a normal state. The
proposed water meter also has a self-learning mode which, based on the statistical evaluation of
the reference period, is designed to recommend required limits. The water meter is further
supplemented with a backup battery and is therefore able to use its own power source for a
certain period of time in the event of a power outage. Above the smart water meter, this can be
included in the measurement layer, a second layer providing application interface with access to
the cloud database within web services was built. This layer allows communication between the
client and the water meter. Within the user layer, two applications have been proposed.
8. This web application which allows remote management and configuration of the meter including
user administration.
ACKNOWLEDGMENTS
This work has been supported by the project “Smart Water Monitoring System” installed at
National Institute of Science and Technology, Berhampur, Odisha.
REFERENCES
[1] K. Mundle, Home Smart Home: Domesticating the Internet of Things. Toptal.com [online].,
2015 [cit. 2018-01-05]. Dostupné z: https://www.toptal.com/designers/interactive/smart-home-
domesticinternet-of-things.
[2] The biggest problem today - water. Prumyslovaekologie.cz [online].Průmyslová ekologie,
2017 [cit. 2018-01-05]. Dostupné z:
http://www.prumyslovaekologie.cz/Dokument/103217/nejvetsiproblem-soucasnosti-voda.aspx
[3] G. Moser, S. G. Paal, and I. F. C. Smith, “Leak Detection of Water Supply Networks Using
Error-Domain Model Falsification”, Journal of Computing in Civil Engineering, vol. 32, no. 2, p.
04017077-, 2018.
[4] Y. Gao, M. J. Brennan, and P. F. Joseph, “A comparison of time delay estimators for the
detection of leak noise signals in plastic water distribution pipes”, Journal of Sound and
Vibration, vol. 292, no. 3-5,pp. 552-570, 2006.
[5] G. Moser, S. G. Paal, and I. F. C. Smith, “Leak Detection of Water
Supply Networks Using Error-Domain Model Falsification”, Journal of
Computing in Civil Engineering, vol. 32, no. 2, p. 04017077-, 2018.
[6] A. Rajeswaran, S. Narasimhan, and S. Narasimhan, “A graph partitioning algorithm for leak
detection in water distribution networks”, vol. 108, pp. 11-23, 2018.
[7] “RASPBERRY PI DOCUMENTATION”, Raspberrypi.org. [Online]. Available:
https://www.raspberrypi.org/documentation/raspbian/.[Accessed: 05-Jan.-2018].
[8] “RASPBIAN”, Raspberrypi.org. [Online]. Available:
https://www.raspberrypi.org/documentation/raspbian/. [Accessed: 06-Jan.-2018].
[9] “Java™ Platform, Standard Edition 7 API Specification”, Docs.oracle.com. [Online].
Available: https://docs.oracle.com/javase/7/docs/api/. [Accessed: 06-Jan.-2018].
[10] “MySQL Documentation”, Mysql.com, 2017. [Online]. Available:
https://dev.mysql.com/doc/. [Accessed: 06-Jan.-2018].
[11] “Pi4J: Parent POM 1.1 API”, Pi4j.com, 2017. [Online]. Available: http://pi4j.com/apidocs/.
[Accessed: 06-Jan.-2018].
[12] “Water consumption in the region fell again”, Czso.cz, 2014. [Online]. Available:
https://www.czso.cz/csu/xh/spotreba-vody-v-kraji-opetklesla.[Accessed: 06-Jan.-2018].
[13] “REST API DOCUMENTATION BEST PRACTICES”, Bocoup.com, 2017. [Online].
Available: https://bocoup.com/blog/documenting-yourapi.[Accessed: 06-Jan.-2018].
[14] “ESP8266-WiFi Module”https://en.wikipedia.org/wiki/ESP8266;The ESP8266 is a low-cost
Wi-Fi microchip with full TCP/IP stack and microcontroller capability produced by Shanghai-
based Chinese manufacturer Espressif;NodeMCU ESP32 Hayes command set MicroPython.