Preprint
Article

A Device for Controlling the Chlorination in Small Umbrian Water Distribution Systems

Altmetrics

Downloads

68

Views

35

Comments

0

A peer-reviewed article of this preprint also exists.

This version is not peer-reviewed

Submitted:

28 August 2024

Posted:

29 August 2024

You are already at the latest version

Alerts
Abstract
Umbria is an Italian region with a highly fragmented water supply, with many small water distribution systems fed by local sources. The chlorination in these small water systems faces many difficulties related to the high demand variation, low economic relevance, and access to infrastructures. As a result, there are many noncompliances with the quality of the supplied water, which causes a decrease in the performance indicators and tariff. This research investigates the possibility of using a low-cost chlorination system to consider different environmental conditions (e.g., temperature variations of water and environment, pH, ...) and discontinuous consumption. A device for this specific use is developed and tested by laboratory tests and is ready for use in the field.
Keywords: 
Subject: Engineering  -   Civil Engineering

1. Introduction

The Italian regulatory authority for energy, networks, and environment (Autorità di Regolazione per Energia, Reti e Ambiente, ARERA), which regulates and supervises water services activities, introduced in 2017 a directive with a list of performance indicators measuring the technical quality of water utilities [1]. Based on the values of the indicators and the achieved goals, the Italian utilities are ranked so that the best performing are allowed to increase the tariff, whereas the worst must decrease them. One of the introduced macro-indicators, M3, is specifically devoted to the quality of water delivered and is numerically evaluated by the number of samples and water quality parameters non-compliant with national standards. In such a regulatory framework, the high-quality standard of the delivered water is a prerequisite to maintaining or justifying the tariff increase and has a relevant economic interest.
In the Umbria Region of Italy, due to the low population density and the availability of springs and water resources, many communities have built and used small infrastructures for water supply and distribution, which survived the interconnection process pursued by the managers. As a result, about one thousand small systems in the region still deliver water from springs and wells to a limited number of users. In these systems, water chlorination is a rather complicated task [2,3]. Due to the reduced demand, the supply tanks are small and often far from the energy supply network. Furthermore, the aggregated demand is highly discontinuous and can vary hourly, daily, and seasonally. The systems used for water treatment are usually supplied by photovoltaic panels and release a given amount of chlorine per day, at the same hour and for a given duration, without considering the actual water delivered or the environment temperatures.
An improvement could be achieved using devices already on the market that measure the water entering a tank and activate a chlorination pump. These systems are expensive compared to the economic income they provide. Furthermore, they usually do not allow measurement of physical parameters such as the temperature [4,5,6] and remote control, which is often useful given the difficult access to the tanks. Temperature is not only relevant for the chlorination itself but can also be used as a precursor of quality degradation, typically associated with a temperature increase. For all these reasons, we started the project to develop a new device suited to the requirements of the Umbrian small water distribution systems.

2. Device Characteristics

The preliminary analysis of the needs and the requested tasks led to the development of a new control and monitoring system, providing these characteristics and features:
-
acquisition of pulses or measurements from flow meters;
-
control of peristaltic pumps or similar devices;
-
monitoring and logging physical parameters such as water temperature;
-
logging and control with different sampling frequencies of other quantities (e.g., levels, pressures,…) by different measures devices (0-5 V, 4-20 mA, …);
-
remote monitoring;
-
low energy consumption;
-
low cost.
The device’s fundamental task is chlorinating the water in a tank based on actual demand in time, storing locally and transmitting over long distances measurements of water temperature, demands, and pump activation, with a reduced supply of energy and cost.
The device must be able to control the peristaltic pumps for chlorination, which are often already installed in the systems, using a preprogrammed set of parameters. Chlorination must depend on water demand and water and environment temperatures.
The simplest and lowest-cost solution for monitoring the water inflows and outflows in the tank where the water treatment occurs is to use pulse counters, which are often already integrated into the flow meters used in the systems under study.
The water temperature in the tank can be used as a further parameter to control the chlorination directly. In this case, air and water temperatures in the spring could be used for forecasting, monitoring, and control in the medium or long term.
All measurements, including demands, environment and water temperatures, and quantity of pumped chlorine, must be stored locally and transferred on request to data collection and analysis systems. The sampling frequency could be greater than the data transmission frequency: mean, maxima, and minima values over longer intervals (day) could be transmitted, while the whole set of quantities sampled at a higher frequency (one sample per minute or hours) can be stored locally. Data from pulse emitters connected to water meters are stored as timestamps and transformed into cumulative volume readings at a given frequency. The transmission of measurements over long distances could strongly reduce the need for survey and direct inspection, which, due to the impervious location of reservoirs, could be problematic.
For the same reason, i.e., the location of reservoirs in remote and isolated areas, the supply of energy is a limiting factor and the device being studied should not significantly increase the consumption of electric energy of the systems already present. Energy harvesting from water could also be considered a further energy supply source.
Generally speaking, water quality noncompliance with standards affects the ARERA M3 macro-indicator and hence the whole tariff; in practice, the installation of the devices faces a reduced number of users in the system, which implies a reduced economic relevance. For this reason, the device had to be low-cost.

3. The Device

Considering the economic constraints, the device was developed using off-the-shelf components. In detail, after testing many such devices, the choice was made for an ESP32 microcontroller board with LoRa-embedded capabilities. The choice was made considering the performance during tests and the cost/performance ratio. Using an off-the-shelf device required designing a front-end board capable of interfacing the device with sensors and other devices involved in the system. The developed front-end board (Figure 1) has the following inputs/outputs:
-
2 connectors for Analog Devices DS1820 temperature digital one-wire sensors with a ±0.5°C accuracy, with the possibility of connecting more sensors on the same connectors;
-
6 inputs for digital or analog signals individually configurable as pull-up or pull-down;
-
1 I2C connector to add further devices;
-
1 relay-controlled clean contact (NO-NC) to control the chlorination pump;
-
1 serial port for a GPS receiver.
As previously mentioned, the main device used in the prototype is a Lilygo TTGO ESP32-Paxcounter LoRa32 2.1_1.6 board. This card implements an ESP32, a 128x64pixel OLED display, a LoRa module (Semtech SX1276), and a MicroSD card slot.
LoRa is a low-power and long-range technology. It uses free frequency bands for which it is unnecessary to pay licenses (ISM band - Industrial Scientifical Medical). The bands used are 433 MHz (almost worldwide), 868 MHz (Europe) and 915 MHz (North America and Australia). The variant used is the one for the LoRa frequency used in Europe, which is 868MHz. LoRa technology can be used directly (i.e., point to point) or via the LoRaWAN network, which covers almost the whole world. Although LoRa is a low-energy technology, the device supports a lithium-ion battery with a charging module that provides considerable working time without an external power supply.
In many applications, the accuracy of data synchronization with GMT is not critical, but timing accuracy may be of interest in some circumstances. In consideration, therefore, of the fact that the device can operate in stand-alone mode for long periods and aware that the timing of the card can lead to sliding of the synchronism of the order of 1ms every 8 hours, it was considered an exact synchronization mode of the card clock with the GMT. Since the device can be used in areas without access to the network, the most accurate and reliable system for synchronization appeared to be the use of GPS, which is ubiquitous on the planet. The possibility of synchronizing the card clock (and, therefore, of the acquired data) through a GPS module has been implemented. The module used is the GlobalTop PA6H, which can be programmed and read through a serial port, providing an accuracy of about 1 ms. The location of the device is also automatically detected.
Figure 1 shows the assembled device in the 3-D printed box inside a water-proof enclosure.

4. The Tests

The reliability of the developed device was assessed by comparing it with a NI DAQ system in the Water Engineering Laboratory of the University of Perugia, Italy. Some of the set-up components and interfaces have also been used to analyze the intermittent water supply in water distribution systems. More details can be found in [7,8,9]. In the preliminary tests, internal pull-up/pull-down resistors were used to speed up the development of the acquisition software. Once the first release of the software was ready, a front-end board was designed to use external pull-up/pull-down resistors and physical low-pass filters and reliably interface all the inputs. During testing, several versions of the board were developed to improve performance (e.g., noise reduction) and to implement devices such as GPS or a new type of miniaturized relay.
The components were tested in different conditions to assess their reliability. The pulse acquisition was analyzed by coupling the device to a pulse generator and then to a water meter. Specific tests for measuring temperatures, transmitting data by LoRa, and synchronizing by GPS were also carried out.

4.1. Tests with Pulse Generator

The first series of tests were made using a pulse generator to inject a well-known pulse train to simulate the water meter output. The timing of those pulses was collected in parallel by the device under development and by a high-end NI C-DAQ system (Figure 2) made of a chassis model NI9188 provided with six two-channel analog acquisition modules NI9218, one four-temperature module NI9217 (±0.1°C accuracy) and one eight-channels digital acquisition module NI9401. Custom software has been developed using National Instruments LabView.

4.2. Tests with Water Meter

At the end of this preliminary activity, the two acquisition systems were used to measure a real pulse water meter connected to a laboratory pipe system (Figure 2). A Maddalena single-jet CD ONE TRP water meter was used with a reed switch. The pulse-meter output and the controlled relay open/close time were measured in these tests.

4.3. Tests with Termometers

A temperature test was also performed by comparing the measurements of two DS1820 sensors, connected to an ESP32 prototype, and an RTD100 sensor, connected to the NI temperature module, fixed together, and immersed in the same liquid (Figure 3).

4.4. Tests of LoRa Transmission

The tests on the LoRa component were performed considering different transmission frequencies, which can be adjusted according to needs, including a reduced board’s power consumption. In the tests, the LoRa signal was received by another module of the same type connected to a Raspberry Pi board, which functions as a gateway and extracts the data from each transmitting device, making it available over the internet.

4.5. Tests with GPS

As for the GPS, the implemented software synchronizes the system every hour, thus keeping the time shift under one millisecond. The absolute time and the ESP counter (in ms) are written together in a file on the SD card. From this data, it will be possible to synchronize the readings taken by the board (timestamp = ESP counter).

5. The Results

The tests Allowed for assessing the reliability of the components of the device and improving them before their use in the field.

5.1. The Pulse Generator and the Noise Reduction

The series of tests using the pulse generator were mainly devoted to assessing the effect of noise on data logging.
The first tests of this series showed a greater sensitivity to the noise of the developing device compared to the NI system. This evidence required improvements in the front-end design and noise shielding system. To this aim, several tests were carried out using different values for the line pull-up resistor and adopting RC filters to cut high-frequency noise. Moreover, different ways of shielding and grounding the lines and the device were tested. Adopting an improved design, input analog filters, and better shielding has allowed the near-total reduction of incoming disturbances. Finally, a software filtering system was implemented that effectively eliminated any residual spikes. In the software implementation,
-
considering that the impulse frequencies of the meters reach a maximum of around 1 Hz which roughly corresponds to a square wave of 500ms in the 0 state and 500 ms in the 1 state,
-
considering that the measured spikes have a duration of less than 1 ms,
-
having verified that the board is capable of acquiring digital channels at a frequency of approximately 1.8MHz,
when an input is triggered by the edge of an impulse, it is sufficient to repeatedly measure the state of the input for 2 ms (although the period can be adjusted as needed) to determine the validity of the impulse itself. If the impulse changes state during this period, it can be classified as a disturbance.
A long test in this regard was conducted by pulsing the channels (three simultaneously) with impulses of different and known durations and phases. The result was completely free of unfiltered disturbances. The produced file also allowed for the identification of disturbances presence and location, thereby determining their origin.
The developed front-end design and shielding reduced the initial presence of spurious (up to 4 extra triggers in a second) to zero in several tests lasting more than 48 hours in a noisy environment.
After implementing the previously described software filtering, further extended duration tests (10 days) using the pulse generator produced acquisitions utterly free of errors. Specifically, the two outputs of the pulse generator were used, set to 0.5Hz and 0.4Hz, respectively. The second output was also sent to a device that generated a fixed delay of 400 ms. This resulted in three trains of pulses with known durations and phases. These signals were sent to three separate inputs of the prototype and recorded on an SD card. The SD card stores the timestamps (in ms) of the detected edges and the sum of the repeated measures previously described. By measuring the intervals between consecutive timestamps, the subsequent data analysis allows for the immediate detection of unexpected pulses. Over several extended-duration tests spanning multiple days, no acquisition errors were detected.
Comparative measurements of the pulse train were also conducted using both the prototype and the National Instruments system, allowing for a comparison of measurement accuracy. Figure 4 shows the results of a 30-minute test with 18000 pulses sent to both systems every 1000 ms. The intervals between the pulses acquired by the ESP-32 board perfectly agreed with the pulse generator programmed times (blue histogram with one bin in Figure 4). At the same time, the NI system caused a noticeable jitter (±4 ms) and a spreading of the durations around the mean value (green histogram). This is because the ESP-32 system is real-time, unlike the NI-DAQ system. In Figure 4, a fitting of the measured pulse interval by normal distributions is also shown (blue and green lines for the device and the NI C-DAQ system, respectively).

5.2. Water Meter

A further series of tests were carried out connecting the device and the NI C-DAQ to a Maddalena single-jet CD ONE TRP water meter equipped with a reed switch, sending one pulse per liter.
Figure 5 shows the pulses sent by the water meter during a 15-minute test and acquired by the NI-CDAQ system (blue lines on the top) and the device (cyan line, bottom). The openings and closures of the relay controlling the peristaltic pump were also acquired by the NI C-DAQ (purple) and the device in feedback (green). A simple chlorination rule was set, activating the relay connected to the peristaltic pump for 6 seconds every 100 liters of water. Different chlorination rules, based on environmental measurements such as temperature, pH, and water residence time in the tank, could be easily implemented without any change in the system reliability.
The same data of Figure 5 are also shown in Figure 6 and Figure 7 over a smaller time range to show the agreement between pulse and relay opening acquisition by C-DAQ and device.
As shown in Figure 8, the flow through the water meter varied during the tests, and the pulse frequency varied accordingly. The duty cycle of the reed switch was very close to 1/2, with opening and closure of the same durations. The acquisition frequency of 1.8 MHz and the software settings allowed the detection of distinct pulses even with a measured flow of ten times the water meter overload flow rate Q4, according to [10] . For the used water meters Q4 = 3,13 m3/h.
In addition to using the standard software, some tests were conducted with slightly modified software to collect both the rising and falling edges of the signal. All the tests showed a perfect agreement between the acquisition devices, considering the NI C-DAQ system jitter.

5.3. Temperature

To assess the reliability of the temperatures measured by the device, three sensors were tied together and immersed in a container filled with room temperature water, to which hot water was gradually added. The NI9217 module of the NI C-DAQ system was connected to an RTD100 sensor while the device was connected to two DS1880 sensors. The acquisitio frequency was set to 0,33Hz (1 acquisition every 30 seconds).
Figure 9 shows the temperature measured by the three sensors during the test. According to the NI9217 module settings, the C-DAQ measurements (bleu diamonds) have a better resolution than the device (squares and stars). Nevertheless, differences between measurements can be considered negligible since they are lower than the thermometers accuracy (± 0.1 °C). In Figure 9, a second-order polynomial fitting of the measured temperatures is also shown (blue, red, and green solid lines for the thermometer connected to the NI C-DAQ and to the two thermometers connected to the device, respectively).

5.4. Other Tests

Preliminary tests were performed to assess the LoRa transmission and the GPS synchronization. Long-run tests of several days with different LoRa transmission frequencies confirmed the reliability of data transmission from the laboratory to other computers in the city of Perugia. The time stamps acquired by the device and the NI C-DAQ in the same tests were compared, which confirmed that the timing provided by the GPS module was accurate, as requested.
Specific tests to evaluate the energy consumption and battery supply with different LoRa transmission frequencies were inconclusive.

6. Conclusions

Due to the reduced population density and the diffused availability of water resources in the Umbrian region in Itay, many small systems supply water to a few connected users. The variability of the demand combined with the small dimensions of the upstream tanks limits the reliability of the chlorination at given time intervals and quantities. The activities described in this paper aimed to assess the reliability of a low-cost, market-available device specifically developed to improve the chlorination of small drinking water supply systems. Specifically, tests carried out at the Water Engineering Laboratory of the University of Perugia, Italy, by comparison with the results of a National Instrument C-DAQ system, allowed the development and the improvement of device features.
The device acquired precise pulse times sent by water meters and two temperatures. The acquired data can be stored locally and transmitted using LoRa technology. Further data, such as water pH and water temperature at the spring and analog signals from flow meters and level sensors, could also be acquired. All data can be used to implement different chlorination rules, with criteria and timing configurable via software, involving the demands, the environmental and tank water temperatures, and the time between chlorinations. The device was tested in the laboratory as a necessary and preliminary step. This allowed us to optimistically look forward to the field tests, which are the essential complement and natural prosecution of the described activities.

Author Contributions

F.C.: methodology, hardware and software development, preparation test rig, testing, analysis, manuscript preparation, manuscript editing, administration; M.F.: methodology, analysis, manuscript preparation, manuscript editing, administration. All authors have read and agreed to the published version of the manuscript..

Funding

“This research received no external funding”.

Data Availability Statement

The data presented in this study are available on motivated requests from the corresponding author.

Acknowledgments

The active support of Claudio Del Principe for the laboratory activities is greatly acknowledged.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Autorita di Regolazione per Energia Reti e Ambiente (Italian Regulatory Authority for Energy Networks and Environment, ARERA). Technical quality regulation of the integrated water service and each componing services (in Italian, Regolazione della qualità tecnica del servizio idrico integrato ovvero di ciascuno dei singoli servizi che lo compongono (RQTI) - Deliberazione 917/2017/R/IDR), 2017.
  2. Poleneni, S.; Inniss, E. Small Water Distribution System Operations and Disinfection By Product Fate. Journal of Water Resource and Protection 2013, 5, 35–41. [Google Scholar] [CrossRef]
  3. Schal, S.L. Water quality sensor placement guidance for small water distribution systems. PhD thesis, University of Kentucky,, 2013.
  4. Fisher, I.; Kastl, G.; Sathasivan, A. A suitable model of combined effects of temperature and initial condition on chlorine bulk decay in water distribution systems. Water Research 2012, 46, 3293–3303. [Google Scholar] [CrossRef]
  5. Manuel, J. Rodriguez, J.B.S. Assessing empirical linear and non-linear modelling of residual chlorine in urban drinking water systems. Environmental Modelling and Software, 1999; 93–102. [Google Scholar]
  6. Garcia-Avila, F.; Sanchez-Alvarracin, C.; Cadme-Galabay, M.; Conchado-Martinez, J.; Garcia-Mera, G.; Zhindon-Arevalo, C. Relationship between chlorine decay and temperature in the drinking water. Methods X 2020, 7. [Google Scholar] [CrossRef]
  7. Ferrante, M.; Rogers, D.; Casinini, F.; Mugabi, J. A Laboratory Set-Up for the Analysis of Intermittent Water Supply: First Results. Water 2022, 14. [Google Scholar] [CrossRef]
  8. Ferrante, M.; Rogers, D.; Mugabi, J.; Casinini, F. Addressing Water Meter Inaccuracies Caused By Intermittent Water Supply: A Laboratory Investigation of Remedial Measures. Water Resources Management 2023, 37, 3921–3933. [Google Scholar] [CrossRef]
  9. Ferrante, M.; Rogers, D.; Mugabi, J.; Casinini, F. A Laboratory Investigation on the Effects of Intermittent Water Supply and Remedial Measures. Water Resources Research 2024, 60. [Google Scholar] [CrossRef]
  10. ISO4064-1:2017. Water Meters For Cold Potable Water And Hot Water - Part 1: Metrological And Technical Requirements, 2017.
Figure 1. The front-end board (a) with Lilygo and GPS boards, and (b) fully assembled device inside a 3d-printed box.
Figure 1. The front-end board (a) with Lilygo and GPS boards, and (b) fully assembled device inside a 3d-printed box.
Preprints 116580 g001
Figure 2. In two series of tests, the device was connected in parallel with a National Instruments C-DAQ data acquisition system, and pulses were sent by (a) a pulse generator and (b) a Maddalena single-jet water meter .
Figure 2. In two series of tests, the device was connected in parallel with a National Instruments C-DAQ data acquisition system, and pulses were sent by (a) a pulse generator and (b) a Maddalena single-jet water meter .
Preprints 116580 g002
Figure 3. To assess temperature measurements, a series of tests was carried out measuring temperatures using both the device and the National Instruments C-DAQ data acquisition system by thermometers in the same liquid.
Figure 3. To assess temperature measurements, a series of tests was carried out measuring temperatures using both the device and the National Instruments C-DAQ data acquisition system by thermometers in the same liquid.
Preprints 116580 g003
Figure 4. Distribution of distances between pulses read by the two systems. 1800 pulses (30 min) @1 Hz (1000ms) generated by pulser. The histogram of distances count is normalized to STD area (1).
Figure 4. Distribution of distances between pulses read by the two systems. 1800 pulses (30 min) @1 Hz (1000ms) generated by pulser. The histogram of distances count is normalized to STD area (1).
Preprints 116580 g004
Figure 5. Pulses per liter sent by the water meter and acquired over a 15 min test by the NI C-DAQ system (blue lines, top) and the device (cyan, bottom). The relay openings and closures controlled by the device were also acquired by the NI C-DAQ system (purple, top) and the device in feedback (green, top).
Figure 5. Pulses per liter sent by the water meter and acquired over a 15 min test by the NI C-DAQ system (blue lines, top) and the device (cyan, bottom). The relay openings and closures controlled by the device were also acquired by the NI C-DAQ system (purple, top) and the device in feedback (green, top).
Preprints 116580 g005
Figure 6. Same pulses per liter shown in Figure 5, sent by the water meter and acquired by the NI C-DAQ system (blue lines, top) and the device (cyan, bottom).
Figure 6. Same pulses per liter shown in Figure 5, sent by the water meter and acquired by the NI C-DAQ system (blue lines, top) and the device (cyan, bottom).
Preprints 116580 g006
Figure 7. Same pulses per liter shown in Figure 5, sent by the water meter and acquired by the NI C-DAQ system (blue lines, top) and the device (cyan, bottom). The relay openings and closures controlled by the device were also acquired in agreement with the NI C-DAQ system (purple, top) and the device in feedback (green, top).
Figure 7. Same pulses per liter shown in Figure 5, sent by the water meter and acquired by the NI C-DAQ system (blue lines, top) and the device (cyan, bottom). The relay openings and closures controlled by the device were also acquired in agreement with the NI C-DAQ system (purple, top) and the device in feedback (green, top).
Preprints 116580 g007
Figure 8. Pulses per liter sent by the water meter for different measured flows and acquired by the NI C-DAQ system (blue lines, top) and the device (cyan, bottom).
Figure 8. Pulses per liter sent by the water meter for different measured flows and acquired by the NI C-DAQ system (blue lines, top) and the device (cyan, bottom).
Preprints 116580 g008
Figure 9. Temperatures measured by the NI C-DAQ (diamonds), two systems and polynomial fit of the same.
Figure 9. Temperatures measured by the NI C-DAQ (diamonds), two systems and polynomial fit of the same.
Preprints 116580 g009
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.
Prerpints.org logo

Preprints.org is a free preprint server supported by MDPI in Basel, Switzerland.

Subscribe

© 2024 MDPI (Basel, Switzerland) unless otherwise stated