A platform and protocol to standardise the test and selection low-cost sensors for water level monitoring

Water infrastructure in cities is complex and requires proactive management to optimise function. The scale and distribution of assets across municipalities requires affordable systems which can trigger alerts. Systems underpinned by low-cost sensors could meet increasing monitoring needs: more assets, more often, and at a better resolution. However, low-cost sensors require appropriate testing to assess their performance and optimise their use. Here, we focus on low-cost water level sensors, often considered as the main monitoring parameters for water-related infrastructures. We developed a platform and testing protocol to assess the suitability of lowcost sensors. We assessed the performance of three widely used low-cost sensors: laser-ranging, ultrasonic-ranging, and pressure. Our main results showed that the ultrasonic sensor offers the best price to accuracy ratio, and the pressure sensor provides the highest accuracy while still at a very low cost. Our platform and protocol provide a standardised testing and calibration method which can be applied to any sensor. The platform can be used to gather and share results, to enhance community knowledge and encourage the use of new (low-cost or not) sensors. The development of low-cost sensors is an important step toward the wider use monitoring systems for water infrastructure.


INTRODUCTION
Over the past few centuries, the water sector has seen major paradigm changes regarding drinking water (Walski 2006), sewage (Beder 1993;Geels 2006), and more recently urban drainage (Chocat et al. 2007;Fletcher et al. 2015). In the last few decades, we have seen a rapid expansion of water-related infrastructure associated with the expansion of cities. The focus is now shifting from new design and construction to redesign and asset management (Tscheikner-Gratl et al. 2020). Medium to long-term operation of infrastructure is becoming a priority for all infrastructure, and the economic context that many industrial countries are facing will reinforce the shift from replacement to management (ASCE 2011). Monitoring remains a key element for such a strategy by enabling operation and maintenance actions to align with each asset's condition more closely (Mitchell 2006). Increasing monitoring is required to shift from reactive maintenance to proactive maintenance when considering assets for which there is a low level of knowledge or very limited resources to permit regular inspections or audits. However, today's asset management capabilities are largely limited by constrained budgets (Marlow et al. 2013).
Recent technological advances can support the development of new monitoring systems, including: falling costs, miniaturisation, ease-of-access, modularity, and open-source programming. Low-cost sensors and acquisition systems are already emerging in many fields (Mao et al. 2019), such as in agriculture (Fisher 2007), air quality (Kumar et al. 2015) and biodiversity (Hill et al. 2019). Low-cost technologies have revolutionised air quality monitoring, offering massive increases in spatial and temporal data resolution (Morawska et al. 2018). Although the literature is increasing very rapidly on this subject, there is still no clear definition of the low-cost concept. According to Morawska et al. (2018), 'the term 'low cost' is relative, depending on the users and the specific purposes, and has been used loosely in the literature'. There seems to be a common understanding that low-cost technology refers to a substantially lower price compared to a traditional technology. One emblematic example is the development of ultrasonic sensors for automotive applications as a reverse gear warning system called Back Sonar (Naito 1987) or for suspension control (Carullo & Parvis 2001). Ultrasonic sensors are now available for less than $10 USD and are widely used, offering almost endless possibilities. These sensors have been used, for examples, in smart glass for obstacle detection for blind people (Agarwal et al. 2017), as anemometers (del Valle et al. 2007), underwater distance measurement (Wan & Chin 2015), ablation measurement on the surface of a glacier (Len Keeler & Brugger 2012), spatial-temporal gait measurement for foot displacement (Qi et al. 2014), and as fingerprint sensors (Horsley et al. 2015).
The advent of low-cost monitoring opens the potential for entirely new approaches, where sensory networks measure various aspects of the state and performance of water infrastructure. Systems underpinned by low-cost sensors mean that the monitoring and control functionality previously limited to critical water infrastructure (e.g. via SCADA) can now be applied to a broader range of water infrastructure (Bartos et al. 2018). With regard to water infrastructure, these sensor networks could control changes to system configuration to optimise performance relative to (i) operating conditions and (ii) the maintenance state of the system. Crucially, such systems can use simple alerts to trigger preventative maintenance operations to maintain integrity of aging assets. Delivering on this potential will require investigating new challenges and imagining innovative ways of monitoring. Among the other challenges, it will be necessary to consider the reliability of the sensors as well as the whole monitoring system, the skills related to customised hardware and programming and the management and interpretation of large data sets (Bartos et al. 2018). Low-cost solutions will however improve monitoring possibilities with real-time data acquisition and processing, such that alerts can trigger maintenance operations at the required spatial and temporal resolution. A key challenge is to make the most of the technology in the water industry, not simply replacing the functionality of existing monitoring systems, as illustrated in Table 1 below.
Low-cost sensors are increasingly being applied in the water sector. For example, low-cost sensors have been used for water quality (Lambrou et al. 2014) and turbidity measurements in drinking water (Leeuw & Boss 2018;Kitchener et al. 2019). Parra et al. (2018) have developed a turbidity sensor for fish farms. Assendelft & van Meerveld (2019) have used a low-cost flow measurement system in streams. Montserrat et al. (2013) used temperature to monitor combined sewer overflows. Placencia et al. (2019) have developed system to measure rainfall intensity. Ruano et al. (2009) have developed on-line nitrogen analysers for wastewater treatment plants. We are likely to see the use of these sensors expand and the creation of systems to translate data capture and interpretation into management action.
Water level is one of the most important parameters which can indicate the status of waterways and performance of green and grey infrastructure, and more generally is related to the whole water cycle monitoring. For example, stream water levels monitored at strategic points can be used to trigger flood A 'connected' monitoring system means the possibility to change monitoring conditions such as measurement period or to trigger an action such as water sampling Shared data Online access to data opens up to sharing the measurements to any technical staff but also to a more general public, potentially leading to community awareness and engagement warnings (Chang & Guo 2006;Islam et al. 2014). Similarly, water levels can indicate blocked outlet structures in constructed stormwater wetlands which create inappropriate hydroperiods and result in vegetation loss (Robertson et al. 2018). Water level sensors can be contact or non-contact, and use various measurement principles: pressure sensors, capacitive devices, ultrasonic-ranging sensors, radar sensors, laser-ranging sensors (Morris & Langari 2012;Loizou & Koutroulis 2016). There is an increasing interest for low-cost water level monitoring using for example ultrasonic (Alshekhly & Dalkic 2018;Guaman et al. 2018;Andang et al. 2019), capacitive (Loizou & Koutroulis 2016) and inductive (Yin et al. 2008) sensors. Selecting the most appropriate sensor must consider the cost and security of the supply chain, given we are proposing the creation of new, large monitoring networks. Selection can also include practical considerations, such as the use of non-contact water level sensors to reduce the need for regular site visits to maintain and clean sensors. However, the greatest challenge is to identify sensors which are not only low-cost, but which are reliable and generate accurate data. Studies often benchmark sensor performance in the field against manual water level readings, without quantifying their accuracy or precision. Extensive, standardised assessments of the performance of low-cost sensors are often lacking and there is now an increasing focus on data quality (Mao et al. 2019). The diversity of sensor types and manufacturers represents an opportunity, but at the same time, it is the greatest concern due to reliability of the sensors (Kumar et al. 2015). For applications in the water sector, sensors need to function well across a range of environmental conditions. Some sensors include software or hardware systems to compensate for the change of environmental parameters, e.g. pressure sensors which integrate pressure compensation based on water temperature. However, many low-cost sensors often do not include any compensation: it is thus important to assess the influence of the environment and if necessary, add compensation mechanisms. Table 2 below summarises the different parameters recommended for testing the reliability and performance of a proposed monitoring system. Such parameters are not specific to low-cost sensors but are often investigated when dealing with monitoring. It is also 'important that the sensors/ monitors are tested under both laboratory and field conditions' (Morawska et al. 2018), which should become part of best practice and quality assurance in metrology. Developing a standardised, robust testing platform and protocol to test and develop calibration equations for low-cost water level sensors is critical to creating confidence in their use.
To address to the need for extensive testing of low-cost sensors, we developed a platform and protocol to assess the range, accuracy, and precision of any water level sensor. The platform also assesses the sensitivity of the sensor to environmental variables, including air temperature and relative Longevity or stability Time of operation before replacement (Kumar et al. 2015) Accuracy Sensitivity to the environment Effect of environmental factors (temperature, relative humidity) on sensor output  humidity. The next section describes the platform and the data processing procedure. The results and discussion sections summarize the main findings regarding the assessment of three different types of low-cost sensors used for water level monitoring (laser, ultrasonic and pressure sensors). The last section also discusses the benefits of this platform and its potential application for assessing water level sensors for a wide range of applications: tanks, streams, stormwater control measures, wetlands, floodplains, and pipes.

PLATFORM TO ASSESS WATER LEVEL SENSORS
Description of the testing platform The testing platform was designed to assess the performance of water level sensors which use different measurement principles. Water level is automatically adjusted and measurements from candidate sensors are benchmarked against a reference sensor over a range of water levels (see Table 3 for detail). The testing platform is constructed of 100 mm diameter polyvinyl chloride (PVC) pipe with a T-piece at the base ( Figure 1). The height of the pipe and therefore range of water levels tested can be adjusted according to available space and desired application. As most of our applications involve water level monitoring in streams, stormwater control measures (e.g. infiltration or detention basins), or groundwater level monitoring, we built the platform to test water levels between 0.000 and 1.850 meters. A 25 mm vinyl tube conveyed water to and from the tank via a bidirectional peristaltic pump. Two webcams were installed to monitor the system remotely. More detailed information regarding the platform and how it operates can be found on the project website, https://mind4stormwater.org.
Low cost sensors can be installed on the platform according to their measurement principle: noncontact sensors are positioned above the water and pressure sensors are installed at the base of the The ruler shows the dimension of each sensor (less than 15 mm for the laser-ranging module, and around 25 mm for the ultrasonic-ranging module and the pressure transducer). a according to the information provided by the manufacturer or the distributor of the products. b most observed values as several distributors provide different characteristics. c depending on the target reflectance level and the level of daylight. d absolute pressure, corresponding to a water level between 0 and 12 m.
column. For pressure sensors, an additional sensor can be installed above the water if it requires atmospheric compensation. As environmental factors including temperature and relative humidity can affect measurements, it is important to include additional sensors. Here, we used a temperature-humidity sensor (DHT22), installed very close to the non-contact sensors, above the water column. According to the manufacturer (Aosong 2020), the sensor has an accuracy of +0.5°C for temperatures between À40°C and þ80°C, and +2% relative humidity for the range 0 to 99.9%.

Description of the testing protocol
The platform automatically adjusts water levels such that all sensors can complete measurements at the desired frequency before each change in water level. The parameters of each experiment are controlled by an Arduino Uno board programmed with the Arduino IDE (arduino.cc). The Arduino board communicates directly with all the sensors and controls the pump direction and functioning with three relays. The board sends all data in real time to a computer via serial cable using the Processing software (processing.org). The Processing software collects all data and saves two files at the end of the experiment: a comma-separated values (CSV) file containing all measures timestamped, and a text file containing details describing the experimental parameters, and pump operation. The code for the  Arduino board and Processing are available on the Github platform: https://github.com/fcherqui/ Mind4stormwater/tree/master/Testing-platform. Each experiment consisted of a single complete cycle of emptying the testing platform to minimum height (lower limit) followed by complete filling (upper limit). At the beginning of each experiment, the reference sensor was used to fill the column until the water level reached the upper limit (1.850 m). Once that water level was achieved, the system was idle for 15 seconds (default) to allow the water level to stabilise. For each level, by default 1,000 low-cost measures were made, 10 reference measures (1 every 100 low-cost measures), and 100 measures with the DHT22 sensor (1 every 10 low-cost measures). When all the measurements were finished for a level, the pump started for five seconds to decrease the water level. After five seconds, the pump switched off and a new measurement cycle began with a 15 second stabilisation time. When the water level was below 0.000 metres, the experiment continued with the water pumped in the other direction: the water level thus increased until it reached the upper limit. For each of the three low-cost sensors tested here (see section Parameters used to assess sensors tested), this experiment was repeated three times in the same way to confirm the results obtained (i.e., nine experiments in total).
The testing protocol is fully customisable to the sensors being tested and all the following parameters can be changed: lower limit, upper limit, stabilisation time, pumping time, number of lowcost measures per level, number of reference measures per level, number of air temperature and air relative humidity measures per level. With the default parameters, each experiment lasted between 5 and 12 hours, depending on the low-cost measurement time, which facilitated measurements at 130 discrete water levels. At the start of each experiment, the program estimated the total duration based on the parameters chosen. When selecting the default parameters used here, because the reference sensor required up to two seconds to take a measurement, we set 10 reference measures per level in order to have enough redundancy to control the precision of the reference sensor without substantially increasing the time to complete the experiment. Similar reasoning was applied for the air temperature and relative humidity measures.
As the platform and protocol were fully automated, we included several safeguards in the code. The experiment would automatically stop and trigger an alert if: (1) for any given water level, the difference between the first and last measure from the reference sensor exceeded 2 mm, (2) the water level exceeded safety upper and lower limits, and (3) the pump was active but the water level did not change. It was also possible to manually stop the experiment remotely, using the webcam to diagnose any faults. For the experiments we ran, the reference sensor safeguard was never triggered.

Parameters used to assess sensors tested
The main parameters used to assess low-cost sensors were based on those described in Table 2. The accuracy was assessed by comparing the error between the median reference measure and the median of the 1,000 low-cost measures. The precision (repeatability) corresponded to the dispersion of the 1,000 low-cost measures for each level, i.e., the 'closeness of agreement between indications or measured quantity values obtained by replicate measurements on the same or similar objects under specified conditions' ( JCGM 2012). The range of the sensor was defined as the range corresponding to an accuracy better than +20 mm. We defined this expectation based on the future uses of the sensor in the field for operational monitoring. Of course, for some applicationse.g. streamflow monitoringmuch greater accuracy is typically required.
To assess each parameter, raw measures from the low-cost sensors must be converted into a water level to be compared with the reference sensor (which directly gives a water level). If the low-cost was installed above the water and measured distance, the i th water level measure by the low-cost sensor W i LC (x) was obtained from the distance D i LC (x) measured by the low-cost level according to Equation (1): with h is the distance between the sensor and the 0 m water level and x the water level (measured by the reference sensor, cf. Figure 1 below), i the low-cost measure number for the level x (i Є [1;1000]) and Offset a constant used for the zero adjustment of the measuring system. The offset is mainly used to consider the distance of the sensors from the 'zero' water level. In theory, the zero adjustment could be done for a water level 0; however, the 0 m water level corresponds to approximately 2 m distance between the sensor and the water level and can be out of range. We have applied a conservative approach by calculating the offset for 1 m water level: Using another offset value corresponds to adding a constant to all the low-cost measures. We have carefully chosen the offset value in the range of the low-cost sensor. In the field, the offset value cannot be chosen and will depend on the water level at the time of the sensor installation: it is therefore important to verify that the installation is compatible with the sensor range.
When combining Equations (1) and (2): The true distance between the sensor and the water level D true (x) at the water level x is: The true distance D true (x) must be used when assessing the sensor performance because the distance h will not be the same in the field.
If the low-cost sensor is a pressure sensor installed in the bottom of the water column, the pressure must be converted into a water level. The pressure must be compensated with the atmospheric pressure sensor or using a vented tube to directly measure the differential pressure. In both cases, the differential pressure (hydrostaticatmospheric) can be written as DP i (x) ¼ P i hydro (x) À P i atm (x) and k is a conversion factor to obtain the pressure in mH2O. The water level W i LC (x) is given by Equation (5): In the same manner as previously, the Offset is calculated for a water level of 1 m and thus We also assessed the influence of air temperature and relative humidity on sensor function. Where the sensor does not include any compensation, we used these parameters to validate compensation equations from the literature. When the sensor already included a compensation, we assessed the performance of the environmental parameter measure by the sensor and the compensated measure.

Description and calibration of the reference and low-cost sensors tested
We used the platform to assess three low-cost sensors which rely on different measurement principles: (1) a laser-ranging sensor (VL53L0X; $3.5 USD), (2) an ultrasonic-ranging sensor (JSN-SR04 T; $4.7 USD), and (3) a pressure transducer (MS5803-01BA; $19.5 USD). The laser-ranging and ultrasonic sensors are non-contact and the pressure transducer requires submersion to function. The sensors employ different technologies and are widely used but not specifically to measure water level. All the sensors tested were waterproof or can be made so which is necessary for outdoor water level monitoring. These three sensors were benchmarked against the sensor used as reference: Pressure Level Transducer (PLS) from OTT (Table 3).
We used the pressure transducer PLS OTT as the reference. This sensor measures the water pressure and temperature (for pressure correction). A vented tube is used to compensate with atmospheric pressure: the sensor provides the differential pressure which can be converted into a height of water. After several years of measurements of water levels in the field and manual verifications, we have confirmed an accuracy of +2 mm in the range [0-2] m of water for this sensor. Considering that the measures used as reference are essential, we have double checked them with random manual readings of the water level during the experiments.
The VL53L0X is a laser-ranging sensor (λ ¼ 940 nm). The sensor uses the time of flight (Marioli et al. 1992), the time difference between the emission of a signal and its return to the sensor. The time difference is converted into a distance using Equation (7): The VL53L0X is theoretically not affected by environmental parameters because the speed of light c is a universal physical constant. The sensor may be affected by infrared at a wavelength around 940 nanometres. During the experiment, the sensor was used in optimal measuring conditions of a dark environment (within the PVC tube). The sensor has different ranging modes: all the tests have been done using the 'high accuracy' mode which provides the best accuracy with a longer measuring time (200 ms instead of 30 ms).
The JSN-SR04 T is an ultrasonic-ranging sensor (40 KHz) which also uses the time of flight. The distance is obtained using Equation (7), however in this case c is replaced by the speed of sound C s . To compensate for the influence of air temperature and air relative humidity on the speed of sound, we The MS5803-01BA is a pressure sensor, it provides a pressure and water temperature measure, and can be used for air or water pressure (the diaphragm is protected by a gel and a stainless-steel cap). The water temperature is used to compensate the pressure measured by the piezo-resistive sensor. A second pressure sensor is required to measure the atmospheric pressure because this sensor does not have a vented tube. Two sensors are thus needed to measure the differential pressure, which results in cumulative error for the water level.

RESULTS
Water level over a range of levels over time Figure 2 presents the water level during the whole experiment for the (a) laser-ranging VL53L0X, (b) the ultrasonic-ranging JSN-SR04 T, and (c) the pressure MS5803-01BA sensors. This figure gives an overall image of the performance of the sensor: differences of measure are visible when both plots are not superposed. These differences can be due to measurement errors from the low-cost sensors or because the sensor is out of range.
Figure 2(a) shows important differences between the laser-ranging sensor and the reference sensor. The smallest difference between sensors occurred at water levels around one metre (the level used to calibrate the offset between both measures). Across the measurement range, deviation from the reference sensor increased as water level increased or decreased from one metre, such that the low-cost laser-ranging sensor underestimated the minimum water level of 0 m by at least 40 mm (when considering the median of the 1,000 values) and overestimated the maximum water level of 1.85 m by at least 50 mm. The median errors are almost never below +20 mm. The plot shows an important variability of the 1,000 measures per measurement step: the precision of this sensor is 50 mm. We do not present further detailed results for this sensor because it is not compatible with our expectations (an accuracy of +20 mm). The data and associated plots are provided in the dataset.  The accuracy of the ultrasonic sensor is better (Figure 2(b)) than the laser-ranging sensor. The ultrasonic sensor has a limited range and cannot correctly measure the distance at closer range, i.e. blanking distance (high water level, around 1.780 m) and longer range (low water level around 0.050 m). The accuracy of the low-cost pressure transducer is also better than the low-cost laser-ranging sensor (Figure 2(c)). The pressure sensor also has a larger range than the ultrasonic-ranging sensor.

Range and accuracy of the sensors
To refine the analysis of the measurement errors, we have compared g W LC (x) the median of the 1,000 measures to the reference level x, for each water level step. Using Equation (4), the water level x is converted into D true (x), the true distance between the sensor and the water (Figure 3(a)). The accuracy of the sensor is +7 mm within the range [0.225-1.9] m and departs rapidly outside that range. This sensor appears to have a maximum measuring range of 1.9 m in our set-up instead of the 6 m claimed by the distributors. The low-cost pressure sensor has an accuracy ,+ 5 mm for the whole range (Figure 3(b)). The distance in the x-axis corresponds to the true distance: the distance between the low-cost sensor and the water. The corresponding water level is given in the top x-axis (in grey). (b) The water level corresponds to the differential pressure (hydrostaticatmospheric). Cyan or red boxplots represent measures when the water level is decreasing or increasing in the water-column, respectively. The y-axes are different on (a) and (b) to fit the error range.

Precision of the sensors
The boxplot of the 1,000 low-cost measures per measurement step shows the variability of the measures for the ultrasonic sensor (Figure 4(a)). The results show limited variability of the measures, and moreover all measures are within the expected accuracy (+20 mm). Within the range [0.225-1.907] m, the precision of the ultrasonic sensor is below 6 mm (median values).
The errors for the ultrasonic sensor do not change regularly with the distance measured and sudden increases of errors can be observed around 0.67 m and 1.26 m (Figure 4(a)). Such behaviour has been observed in all experiments of this sensor and does not seem related to the experiment itself or to environmental parameters.
The results for the low-cost pressure sensor MS5803-01BA also show very limited variability: the precision is below 3 mm for the whole range (Figure 4(b)). Moreover, within this range, all the measures have an accuracy of less than +5 mm. Error differs depending on whether the water level was rising or falling, especially at water levels .0.650 m.

Influence of air temperature and relative humidity
During the experiment, the air temperature stayed between [21-25]°C and the air relative humidity was always very close or equal to 100%, as the sensor was installed above the water in an indoor environment without wind. When considering ultrasonic measurement, the use of a constant speed of sound can lead to an error of more than 10 mm ( Figure 5). Adjusting the speed of sound for the correct temperature (and a constant humidity of 50%) reduces the error to less than 10 mm. The results show the importance of considering the temperature, and to a lesser extent of the relative humidity.
We further analysed the sensitivity of ultrasonic measures to a wider range of air temperatures and relative humidities. Figure 6 below shows how the air temperature and relative humidity affect the speed of sound and consequently the distance travelled by a sound wave during a specific time.  (8) with RH ¼ 50% (green). The distance in the x-axis corresponds to the distance between the low-cost sensor and the water. During the experiment, the air temperature was between 21 and 25°C and the air relative humidity was between 96 and 100%. Figure 6 | Sensitivity of the distance measured by the ultrasonic-ranging sensor (colour-scale on the left) for a range of air temperature [0-40]°C and a range of air relative humidity [0-100] %. The duration used (11,000 μs) is converted into a distance with the speed of sound depending on the air temperature and relative humidity. Both parameters affect the speed of sound (Equation (8)) and thus the conversion of the duration to a distance (Equation (7)). 11,000 μs corresponds to an ca. 1.9 m., the maximum range of the sensor, and given that longer duration will induce higher error. There is a limited influence of the relative humidity (the influence increases with the temperature): with a maximum difference of 23 mm at 40°C between RH ¼ 0% and RH ¼ 100%. The temperature, however, is an essential parameter which can lead to difference up to 130 mm ( Figure 6).
Regarding the pressure sensor MS5803-01BA which integrates a pressure compensation based on the water temperature, we have compared the water temperature difference between this sensor and the reference sensor: the difference remains 0.4°C. The water temperature sensor of the MS5803-01BA provides enough accuracy to correctly compensate the measured pressure.

Comparison of the performance of the sensors tested
During the laboratory experiment, all sensors recorded a total of more than 300,000 measures without fault or drift. Assuming that these sensors perform the same in the field, this corresponds to 52 days of measurement using the median of 20 measures every five minutes, or more than two years of a single measure every five minutes. This demonstrates the reliability of the sensors regarding the number of measures but does not inform long-term reliability in the field.
The laser-ranging sensor we tested is not appropriate for water level monitoring due to the significant errors of measurement (during the experiment, the median error was almost always .20 mm). The poor results of this sensor may be explained first by its low accuracy (+36 mm according to the manufacturer) and secondly because of the limited reflectivity of laser on the water surface (Liu et al. 2012). The importance of the reflective surface is confirmed by Adarsh et al. (2016) who compared the performance of the ultrasonic-ranging and the infrared-ranging techniques with different types of material.
Both the ultrasonic (JSN-SR04 T) and pressure (MS5803-01BA) sensors seem appropriate for water level monitoring in situations where an accuracy of +10 mm is expected, and the water level range is below 1.65 m. We have observed a maximum measurement distance of 1.9 m for the ultrasonic-ranging sensor. We have also observed that the pressure sensor range is at least equal to the water column depth (1.9 m) and potentially greater. The choice of the sensor may ultimately depend on other important parameters such as the location of the sensor (above or within the water), the cost (sensor þ enclosure þ logger), the need for additional monitoring (air temperature and relative humidity for the ultrasonic-ranging sensor), and maintenance requirements.
Both the ultrasonic-ranging and pressure sensors have precision of 7 and 5 mm, respectively. The precision below 6 mm and the fact that all the measures were within the expected accuracy (+20 mm) mean that when the sensor is used in the field, there is no need to take the median of a high number of measures. This characteristic (few measurements needed) is important for the development of the monitoring algorithm: fewer measures means a faster overall measurement time and thus less on-time. The ratio of awake time to sleeping time is very important for energy consumption when considering devices powered by batteries which is almost always the case for field monitoring.
During our experiment, we observed the following maximum measurement time: 200 ms for the VL53L0x, 250 ms for the JSN-SR04 T and 150 ms for the MS5803-01BA. This time includes the measurement itself, processing of the measure by the micro-controller and transfer (via serial) to the computer to be stored. All sensors have a very short measurement time which reduces battery consumption and provides a short response time (JCGM 2012) to any water level change. In practice, quick response to rising water levels make these sensors suitable for applications such as capturing peak flow rates or flood warning systems.
Ultrasonic sensor JSN-SR04T: best performance to price ratio With a cost under $10 USD, the ultrasonic-ranging JSN-SR04T is provided within a waterproof enclosure and is ready to use as is. The fast measuring time and its very low cost make it a monitoring solution appropriate for many operational uses. Examples include monitoring the establishment phase of newly constructed infrastructure (including monitoring the water level required for plant growth) and e-maintenance which integrates information and communication technologies (Muller et al. 2008). These cases often require an accuracy of 10-20 mm with the measures triggering actions such as a valve opening or an alert when the level reaches specific thresholds. The limited cost enables the deployment of monitoring systems in a large number of assets, and with a higher spatial resolution. When installing this sensor, it is important to consider the blanking distance (0.225 metres) which potentially makes the sensor unsuitable for monitoring in constrained spaces. The ultrasonic sensor used had one transducer which is used both for the emission and the reception of the acoustic wave, and the blanking distance corresponds to the time required for the transducer to switch from emission to reception mode. Sensors with two transducers (emission and reception) have a small to nil blanking distance and may be more suitable, but more expensive.
The JSN-SR04T sensor has a wider beam (70°angle) compared to more expensive models or to the laser-ranging sensor (25°beam angle). Due to its wide angle, the sensor must be used in locations where the water will be the first surface to reflect the sound wave (i.e. no obstacles surrounding the sensor such as flow control devices or vegetation). To avoid interference the sensor can be placed in a vertical PVC pipe to create a clear path to the water. Furthermore, one of the major benefits of the ultrasonic sensor is that it is not in contact with the water, and will not be fouled by sediment, debris or algal growth, and will therefore require very little maintenance in the field. The model we tested is robust and can be left in-place for a long period of several months or years enabling continuous monitoring, even during heavy rain events.
As the speed of sound is affected by the air temperature and to a lesser extent relative humidity, the measured distance (based on time of flight) needs to be corrected. We have shown that the correction based on temperature is required because the error can increase up to 130 mm with a 40°C difference. The need for correction based on the air relative humidity will depend on the desired accuracy because the impact of this parameter is much less than temperature: a humidity difference of 100% results in a 23 mm difference in water level. It is worth mentioning a sensor such as the CM2302 sensor (commonly named DHT22) from Aosong measures temperature and relative humidity for less than $3 USD. This sensor has been used during these experiments to correct the speed of sound (Equation (8) and Figure 5). No tests have been conducted to assess the influence of wind, but a study has shown that ultrasonic sensors are not affected by winds up to 120 km/h and perpendicular to the direction of measure (Carullo & Parvis 2001). Therefore, despite requiring an additional sensor to compensate for environmental fluctuation, the JSN-SR04 T ultrasonic sensor represents the best option for maximising performance at the lowest cost.
Pressure sensor MS5803-01BA: best accuracy Among the three sensors tested, the MS5803-01BA pressure sensor provided the best accuracy (+5 mm) and precision (3 mm) across the full range of water levels tested. The accuracy assessed during the experiment was better than the manufacturer states (cf . Table 3). However, the accuracy given by the manufacturer corresponds to the full range for water level up to 12 metres. We thus expect a larger range for this sensor, with a potentially larger error for water levels higher than two metres.
The pressure sensor showed different errors (i.e., deviation from the reference sensor) when water levels were falling compared to rising. Although the manufacturer provides no specific information, such non-symmetrical behaviour is caused by the hysteresis error common to piezoresistive pressure sensors. Such errors are often related to the sensor structure and the manufacturing quality (Chuan & Chen 2011).
The cost of the system will be more expensive than for the JSN-SR04 T because two sensors are required to measure the differential pressure and it is also necessary to build an enclosure for the sensor (when sold, only the diaphragm of the sensor is water resistant and supposed to be in contact with the water). One unique sensor could be considered if the atmospheric pressure is obtained from another source (such as a nearby weather station). Another possibility is to use a single atmospheric sensor for multiple closely-located water level sensors. In both cases, the error will increase depending on the accuracy of the data (weather station) and its distance to the measuring point.
The pressure sensor has the advantage that it does not need an additional sensor to monitor the environment as it is water-temperature compensated. Due to its position under water, the sensor is invisible from the surface and is better protected against any theft or vandalism. The contact with the water may cause fouling problems and require additional maintenance: a several-month field test is required to learn more on potential maintenance needs. However, the sensor may be used for operational applications in addition to those listed for the JSN-SR04T, e.g. in confined spaces such as pipes, manholes, or underground detention basins and infiltration trenches. For research purposes, the +5 mm accuracy is sufficient for most applications. Therefore, where greater accuracy is required and higher cost is merited, the MS5803-01BA pressure sensor is suitable.

Benefit and use of the testing platform
The testing platform has been successfully used to assess three different types of sensors for water level monitoring: laser-ranging, ultrasonic-ranging and pressure. The platform assesses the range of application, the accuracy, the precision, and the reliability (number of measures without any error) of the sensors. The design of the platform makes it possible to assess most of the sensor types inventoried by Morris & Langari (2012). The testing range of 0-1.85 m corresponds to most situations we commonly encountered when monitoring water level in pipes, streams, or stormwater control measures. It is however possible to extend the testing range by increasing the height of the PVC tube test well. The platform monitors environmental conditions such as the air temperature, relative humidity, and water temperature. If necessary, other sensors can be added and connected to the acquisition system (Arduino board): for example, light, water turbidity or parasite capacitances (for example generated by power lines).
We built an open-source code where most of the experimental parameters are adjustable such as: water level range, number of reference measures or low-cost measures, environmental condition measures, or number of measurement steps. The whole experiment is also automated because its duration is at least ten hours even with low-cost measures of less than 0.5 seconds. The long duration of the experiment is explained by the high number of measures, the reference sensor measurement time (around two seconds), the time to change the measurement level (pumping water) and for the water level to stabilise. The experiment is fully automated: the Arduino board communicates with the sensors, sends all the measures to the computer through a serial USB cable, and controls the pump direction and functioning time. The automation of the testing platform allows the user to assess the dynamic response of the sensor to a water level change; however, this was not necessary for these three sensors given their short measuring time (below 250 ms).

CONCLUSION
We have developed a platform (physical platform þ open-source code) to assess water level sensor performance: range, accuracy, precision, and their sensitivity to the environment (air temperature, air relative humidity and water temperature). The platform is suitable for a wide range of sensors, including contact and non-contact sensors. The proposed platform provides sufficient information to test the suitability of a sensor for a specific research or operational use. The platform also provides corrections and integration of raw measures required for a sensor to be implemented. The platform can be easily built and used to gather and share results of other low-cost sensors. Such platforms could answer the important question of trust regarding the reliability of low-cost sensors.
We have used the platform to assess three widely used low-cost sensors for water levels between 0.000 and 1.850 metres. Our results show that the laser-ranging sensor VL53L0X is not suited for application with a required accuracy of +20 mm. The ultrasonic-ranging sensor JSN-SR04 T offers the best performance to price ratio with an accuracy of +7 mm in the range [0.225-1.9] m. It is however very important to compensate the measurements with the air temperature, and to a lesser extent relative humidity. It is also important to install such sensors in a position with no obstacles. The pressure transducer MS5803-01BA offers the best performance: accuracy of +5 mm for water level up to 2 meters. Its range is wider (up to 12 m according to the manufacturer) but presumably with an accuracy .+ 5 mm. The sensor needs to be compensated for atmospheric pressure but not temperature or relative humidity.
Low-cost sensors are often provided with very little information on their performance and their use, therefore a thorough analysis of the performance of a low-cost sensor is a necessary step before the development of a monitoring system. Such assessment is also a first step to know better how to communicate with the sensors and how reliable the sensors are after several thousand measures. This overall assessment could build confidence and save time when developing monitoring systems for the water industry which rely on choosing the right sensor for each application. The protocol we have developed can also be used to create required calibration/correction functions. In the future, we plan to use the testing platform on other sensors, and hope to share and learn with other laboratories interested in such assessment and who are willing to develop a similar testing platform. Field testing will also provide further performance assessment in real conditions and education on maintenance requirements.