Open Sensing System for Long Term, Low Cost Water Quality Monitoring

Water is a major preoccupation for our generation since it is crucial in keeping a healthy ecosystem and supporting biodiversity. The state of aquatic systems and water bodies needs to be continuously monitored to make informed decisions and trigger sanitation when necessary. However, observing and tracking the evolution of many water bodies without disturbing and polluting the biotopes is expensive, not scalable, and thus, infeasible. This article presents a way to make sustainable measurements using a new low-cost, open-source, and autonomous monitoring system deployable in a broad network. The smart buoy is deployed and controlled by a central unit that uses lab-graded sensors to measure ambient factors. The custom electronic board offers sustainable electronics integration emphasizing power path and network connectivity. The smart buoy showed an average power consumption of 1.8 mA and a cost of 932 euros per device. Currently, five spots have been monitored, which allowed the understanding of why biological events, such as a massive fish death, occurred. The system is easily expandable and can be used in various applications to increase the knowledge of the underwater ecosystem.


I. INTRODUCTION
Water is the most vital resource of life. Even if it is the most abundant resource on Earth (75%), freshwater is less than 3%, and more than 65% of it is locked up in ice caps and glaciers, melting faster than ever due to the actual climate changes. Pollution is a primary concern for water quality. It comes from many sources, including agricultural runoff, sewage, and industrial waste. Pollution can contaminate drinking water and make it harmful for human consumption. It also harms aquatic ecosystems and reduces the quality of life for people who rely on them. Water quality is also threatened by overuse. This can happen when water is withdrawn from rivers and aquifers faster than it can be replenished or when too much water is used for irrigation, leading to soil salt build-up. Water is essential for life, and water quality is critical to support healthy ecosystems and sustain the economies based on them.
Consequently, the optimal utilization of water resources and reliable monitoring of water quality is important, especially in the context of a possible future water shortage crisis. Unfortunately, there is still a need for more effective water quality monitoring systems that can provide data over an extended period and cover vast areas with minimum running costs.
There are many ways to monitor water quality, but some methods are more effective than others. Classic methods rely on manual sampling and lab analysis, which offers the detection of an extensive range of substances but consumes resources. This is often combined with tools to monitor physical and chemical parameters but with manual sampling involving human supervision. For example, the EXO2 is a multiparameter water quality sonde with seven sensor ports offering a dynamic range of smart sensors from chlorophyll from algae to fluorescent dissolved organic matter (fDOM). The sonde provides comprehensive multiparameter water quality data, with the SmartQC software ensuring proper calibrations. However, this solution is expensive and time-consuming while the ecosystems are dynamic. Thus it is not conceivable on a large scale. Another way to monitor water quality is to use remote sensing techniques, such as satellites, to detect changes in water quality. Nevertheless, current techniques for assessing water quality do not have enough spatial and temporal coverage. Moreover, specific measurement equipment is expensive, rarely wireless, and low power. This makes it hard to update, improve, and maintain the different devices. Hence, a significant contribution would consist in developing an autonomous, low-cost, wireless system that can monitor several water quality parameters while the measurements could be observed remotely.
In the context of the Smartwater project, we have developed an economically and energetically efficient smart buoy to monitor surface water bodies in Brussels and to asses in a sustainable way the quality of the aquatic ecosystems of Brussels. The collected data helps to identify those water bodies where action is required. The open-source system focuses on inexpensive and readily available components to reach a wider community. With large community support, the devices will easily be updated, improved, and maintained [1]. The system relies on sensors to detect a range of physical and chemical parameters and to spot substances that may be present in the water. The smart buoy can operate autonomously with minimal human supervision in remote, unmonitored water bodies. Our strong focus on low-power enables long-term operation, which is critical when many robots are deployed. The system contains multiple sensors. The current sensors measure water temperature, pH, dissolved oxygen (DO), electric conductivity (EC), and turbidity. A user interface is provided for data visualization and control. The system has been used to monitor the water quality of different water bodies in Brussels for several months. The data collected by the system has been used to identify trends in water quality and detect pollution events.

II. LITERATURE REVIEW
A previous study analyzed the Pandurucan river in San Jose, California [2]. The river was believed to be degrading. However, there was no substantial evidence of the water quality, and no scientific study had been carried out to investigate the characteristic of the water and its possible sources of contamination. The methodology consisted of taking samples manually every month. This method is work-intensive but could assess ten different water quality measurement parameters each time. The inconvenience is that the results are analyzed over multiple months and that if a major event occurs, resulting in biological alterations, one could only notice it one month after.
The first step toward autonomous monitoring is using sensors in a stationary environment. It is commonly used in hydroponics, aquaculture, and freshwater systems to monitor water's amount of nutrients, salts, and impurities. For example, the more free electrolyte the liquid contains, the higher the electrical EC. A significant advantage is that action can be delivered immediately after measuring. An example is an aquatic farm, which measures amounts of DO in the water [3], [4]. This shrimp farm located in Taiwan incorporated reaction mechanisms to increase shrimp survival. When the oxygen levels are too low, aerators or alarms are activated, and feeders are suspended. Another system relies on a station located on the river bank, taking hyperspectral images [5]. Now, one can see that taking images in the center of a lake or other aquatic bodies will be impractical, and it is an expensive tool that requires much processing, and, thus, energy.
Besides stationary measurement techniques, moving monitoring devices are increasingly used in environmental pollution studies. Another system relies on a drone to take a sample from water bodies [6]. However, the device only offers a flight time of 16 min if flight conditions are met, after which the sample has to be tested. As in [2], the authors take samples one by one every month. This is not an adequate solution for every application. To monitor aquatic bodies adequately, more recurrent or continuous measurements are required. That is why a nearly 5-m long solar-powered surface vehicle was developed [7]. It can navigate autonomously and continuously collect key water quality parameters and greenhouse gas emissions through a water column while the vehicle moves. Such a measurement system is not conceivable for universal deployment since the vehicle can work autonomously for 24 h maximum, after which the batteries must be charged or replaced. Other mobile water monitoring systems include satellites and other platforms, such as airplanes, to measure the amount of radiation reflected from the water's surface at various wavelengths [8]. These reflections can be used directly or indirectly to detect water quality indicators, such as total suspended solids (TSS), chlorophyll-a concentration, turbidity, temperature, and pH. Of course, the weather is a critical constraining factor, but this kind of solution can cover larger areas.
The last kind of water quality monitoring device addresses underwater measurements [9] (Fig. 1c). A quick way of measuring deepwater is by pumping water into the robot, which then analyzes it before throwing the water back out. Other systems rely on underwater drones to obtain vertical water quality profiles and collect underwater images [10], [11]. This was done to monitor water quality and local ecosystems' consequences of implementing large-scale floating solar panels. Autonomous underwater vehicles (AUVs) are typically deployed from a surface vessel and can operate independently from that vessel for several hours to several days. Static methods (Fig. 1a) involve reduced costs and high accuracy but, in most cases, consume much power. Moving devices (Fig. 1b) such as boats and planes and underwater robots cannot navigate over long periods unwatched. Those devices are often used for several hours before a charge is needed. Using satellites is not always feasible because it depends on the weather. In addition, covered areas may require much processing, and real-time imaging is often impossible. Ideally, those devices' advantages should be mixed, developing a remote, real-time, and low-power solution.
Deploying many low-cost static devices into a wireless network could be adequate. However, wireless sensor networks (WSN) introduce many problems to address, such as energy availability, which is critical when defining a network's lifetime. Other issues include the consideration of the right network to be employed (taking energy problems and cost into consideration), the lack of alternative power solutions, energy optimization techniques for efficient resource allocation and a sustainable network operation, choice of communication technology, the application runtime environment, and simplicity in setting up and configuring the application. Converging to an optimal solution implies carefully evaluating several deployments and runtime under different operational conditions. This is mainly due to the cost of the devices, and their technology readiness levels (TRL) [12], [13].
Open-source technologies are publicly accessible and free to use and distribute. The proposed open-source technologies include both hardware and software. The advantages of using open-source technologies include that they are usually more cost-effective than proprietary technologies and allow for more collaboration and innovation. Open-source technologies also tend to be more reliable than proprietary technologies since the code is open to scrutiny by anyone. In addition, with an engaged community, the technology can be spread much more effectively and at a lower cost, which is one of the key factors in such water quality monitoring networks.
We have developed a low-cost, autonomous, wireless, water-quality monitoring buoy to overcome the previously mentioned problems on scalability, power efficiency, cost, and more. The smart buoy takes measurements every 10 min. The data are remotely accessible; thus, issues can rapidly be noticed. Furthermore, the design can be easily adapted to match the target application.
The rest of this article is organized as follows: Sections III-A, III-B, III-C, and III-D describe the sensing principles, including the indicator definitions, the electronics, including the main printed circuit board (PCB) and peripherals, the communication system and the mechanical design, which includes the design constraints, requirements, and extensions. Results are discussed in Section IV. The results include a costand-performance analysis, energy harvesting considerations, deployments in field conditions, and measurement accuracy analysis. Finally, Section V concludes this article.

III. MATERIALS AND METHODS
This section discusses water quality definition and the sensing principles, the architecture, the electronics, and the communication, and networking infrastructure of the proposed system. First, a detailed review of open-source electronics and some ultra-low power design principles are given. Finally, some considerations concerning mechanical design and environment are discussed. Herein, possible extensions and design constraints concerning waterproofness, ergonomy, and maintenance are detailed.

A. WATER QUALITY MEASUREMENT
Water quality is described by the physical, chemical, and biological characteristics of water (Fig. 2). It is a measure of the condition of water relative to the requirements of one or more biotic species and or to any human need or purpose. The most common standards used to assess water quality relate to health of ecosystems, safety of human contact, and drinking water. The physical quality of water affects the aesthetic quality of water in the context of appearance, color, taste, foam, smell, EC, turbidity, total dissolved solids, and temperature. Besides that, the chemical quality of water is used to determine the concentration of the dissolved chemicals and is crucial to ascertain its health and condition. Finally, the microbiological quality of water describes the occurrence of invisible organisms in water, such as bacteria and viruses. The microbes are contaminants that cause devastating effects on the health of humans when the water containing these microbes is ingested. Measuring each parameter is in most of the cases unnecessary. One way to track the status and changes of these dynamic systems is through indicators. An indicator represents the state or trend of specific environmental conditions over a given area and a specified period. For example, for the National Aquatic Resource Surveys (NARS), biological, chemical, and physical indicators were chosen to assess biological integrity, trophic state, recreational suitability, and key stressors impacting quality. Although there are more indicators and stressors, these are among the most representative nationally. Monitoring the temperature, EC, turbidity, and DO level in conjunction with the pH deliver enough information on whether sanitation is required or, for example, if public access should be granted [14].

1) SENSING
The smart buoy is designed to capture and transmit the data of the sensors Fig. 3. Therefore, the sensors have a key role in our design. Five sensors regarding water quality can be attached to our buoy and submerged in water. Four of them come from Atlas-Scientific, a company specializing in water monitoringand environmental robotics with a laboratory-grade accuracy. Those sensors will sense the following chemical indicators.
3) EC. 4) DO. 5) Turbidity. Regarding the parameters that will be measured, we have exclusively chosen physicochemical sensors due to the lower cost, size, and power consumption. Chemical reactions (Oand H+) inducing a voltage are measured to measure the pH and the DO. The temperature and the EC can be measured by considering electrical impedance, and the turbidity can be measured using an optical sensor.

2) SENSOR-SPECIFIC ELECTRONICS
Each of the Atlas-Scientific probes has a correspondent embedded circuit attached. These boards process the different voltages into readable data. Unfortunately, some of the sensors described before can be disturbed because of the proximity of the other sensors. To overcome this issue, electrical isolators are necessary, but more on this in the next Section III-B4. Table 1 resumes the characteristics of the sensors and their appropriate circuit and isolator.Note that for the items marked with "*" the consumption is defined using a compatible circuit board and isolator board, and that the items marked with "**" the consumption is defined only using a compatible circuit board.

B. OPEN-SOURCE HARDWARE
After the sensing parameters and methods have been defined, an embedded system has been designed in order to control the sensors, among other functions. The developed open-source hardware can be divided into three different parts: the electronics that acquire data from the sensors, process it, and send it over the network, the network structure, and its features that provide a connection between the smart buoys and the web application, and finally, the mechanical structure that must be adapted to the environmental conditions. These parts are discussed in the following sections to make the replication and the chain of decisions clear.

1) ELECTRONICS
All the electronics are contained inside a single PCB. The PCB is a regular FR4, two-layered PCB and has a radius of 105 mm. All PCB components are placed on the top layer for assembly convenience except for the buzzer and the reed switch.
The PCB depicted in Fig. 4(a) is divided into five regions: 1) computing, 2) sensors, 3) communication, 4) power, and 5) auxiliary components. Each area is highlighted in Fig. 4(a). The first area contains the computing part and an ESP32 WROOM microcontroller. The ESP32 provides dualmode Bluetooth and WiFi communication and includes an Xtensa dual-core, 32-bit CPU operating at 240 MHz. It is an ultra-low-power device that offers many possible peripheral interfaces. This low-cost wireless microcontroller has a large community supporting its development. Nevertheless, the microcontroller has insufficient IO ports for our application. The MCP23017 from Microchip solves this issue by offering 16 additional GPIO ports controlled over an I2C bus.
Next, four sensors plugin via four-pins JSTs. The previous four sensors are all communicating through the same I2C bus. The fifth sensor (turbidity) can also be plugged in but requires only a three-pin JST since it outputs an analog signal. Note that each connector can be powered independently from the other. Finally, there is the possibility to plug a GPS NEO-6M and a nine-axis sensor module MPU-9250 into the center as breakout boards. A high-level schematic is depicted in Fig 5. Centrally situated, the following region is about communication. Three different protocols are used to communicate within the board: 1) USB, 2) UART, and 3) I2C. The USB communication is converted into UART thanks to the CP2102 single-chip USB to UART bridge from Silicon Labs and is exclusively used to program and debug the ESP32 microcontroller. In addition, an RS232 line driver based on the MAX3232 is present on the board. On the other side, BLE, WiFi, and LoRa make it possible to communicate with the outside. The RFM95W is a breakout board that performs the LoRa modulation. The board contains an SX1276 LoRa module from Semtech. The module can handle +5 to +20 dBm and consumes approximately 100-mA peak during +20-dBm transmission and 30 mA during active radio listening. In Section III-C1, we detailed the network aspect more.

2) ULTRA LOW-POWER DESIGN CONSIDERATIONS
Power management has been carefully designed. Energy storage has been studied first, and LiPo batteries have been selected. The Ni-Cd battery type was discarded due to the high toxicity characteristic of Cadmium. Compared to Li-Ion batteries, Ni-MH cells have no measurable memory effect. Li-Ion cells are negatively impacted by age and tend to be more expensive than LiPo batteries. In addition, LiPo cells also benefit from lower profiles and more robust behavior. These batteries operate in the suitable voltage range without needing multiple cells, which eases the design of the battery management system (BMS). Otherwise, cell balancing is needed. This means that the BMS has to monitor and regulate different voltages in the battery, which hinders design and maintenance. Since no substantial capacity is required, single cells batteries are suitable for low-power applications. This is also a cheaper solution.
Lithium-ion polymer batteries tend to have a low selfdischarge rate. They can be manufactured in various sizes and capacities. The maximum allowed charging rate is 1 A due to the PCB track width, the size of the fuse, and the USB protocol regulations, which will never exceed the maximum charge rate of C/2. A higher charging rate is not mandatory.  Nevertheless, if a faster charge is required, the battery can be extracted from the buoy to charge them properly using a LiPo charger. Section IV-A investigates this application's ideal battery capacity. Table 3 depicts the characteristics of some commonly used batteries. Thanks to the MCP73871, the board can be connected with a USB micro cable to charge the battery at a maximum rate of 1 Ah during fast-charge (500 mAh normally). In addition, the IC also features a loadsharing system and a voltage-proportional current control, which is essential for solar powering.
Nevertheless, the MCP73871 battery charge controller IC has no adapted internal regulator. Thus, an LTC3624 from Analog Devices is used to transform the battery voltage into a constant 3.3 V. The switching step-down regulator shows efficiency of 90% a 2-A rated output current and a quiescent current of 3.5 μA. Each sensor can be individually powered thanks to multiple AP2280-controlled slew rates and high-side load switches (ON/OFF nodes in Fig. 6). They have a wide input voltage range while consuming a 4-nA quiescent current. The downside is that they have a resistance value (R DS(on) ) of 80 m , which can be power-consuming. However, this will not significantly impact our system since the sensors are up and running only a small fraction of the time (25 s every 10 min). Each communication channel and signal path can be switched ON or OFFwith the help of TMUX1112 multiplexers. Furthermore, the whole USB region is disabled if no micro USB is connected to reduce power consumption (the dotted region in Fig. 6). The last point that has to be discussed concerning power is the ON/OFFmechanism of the smart buoy. As discussed, the LTC3624 is the voltage regulator that will deliver power to the whole board except the USB port, which is only active when a USB cable is plugged in. In order to activate and deactivate the powering system, a button and a reed switch are accessible on the PCB. The reed switch allows activating the buoy with a magnet when the lid is closed. In order to sustain an ON or OFFstate, the MAX16054 latched ON/OFFcontroller from Maxim Integrated is used. It is a single switch debouncer that requires a supply current of 7 μA. A buzzer produces sound for a short moment to detect the device's start-up, and a short green led strip lights up while Bluetooth coupling is available. After which, the system goes into a deep sleep. Finally, in order to detect when the buoy will exhaust its energy storage, a battery-level reading system is available.

3) MODULARITY
The PCB is modular. Some external components can be attached to it to add features like localization and actuation. The smart buoy, for example, can welcome three motors to move in different directions or to anchor the vessel. Fig. 7 depicts a smart buoy that disposes of an anchoring mechanism. When the vessel needs to stay in a particular spot, the buoy can lower its anchor to stop the vessel. The connectors offer PWM and direction pins to control the required external H-bridge motor drivers or electronic speed controllers. As mentioned earlier, a breakout board for the IMU and GPS can be placed on the PCB. In addition, two rangers or other I2C compatible sensors, and two limit switches, can be connected to the PCB.

4) INTERFERENCE SOURCES
Several methods have been used to guarantee signal integrity, isolating the electronic boards from external interferences. For example, as many devices are on the same I2C bus, additional multiplexers are provided to disable some lines, reduce traffic congestion, and offer electrical isolation to prevent leakages. Those lines are, of course, pulled up. Next, some problems may affect the sensors. The pH electrode, for example, is a passive device that detects a current generated from hydrogen ion activity. Unfortunately, this weak electrical signal can easily be disrupted, resulting in incorrect readings, and slowly damaging the pH probe over time. In this case, EZO inline voltage isolators based on the ADM3260 isolator IC are used on the pH and DO probes. Finally, to grant ESD protection for the USB line, USBLC6 diodes from ST-Electronics are used, combining very low capacitance and leakage current (3.5 pF and 150 nA).

C. COMMUNICATION
The sensors sense their parameters and send the information using an I2C bus to the microcontroller. The microcontroller encodes the data and sends it through LoRa to a gateway. The gateway (connected to the Internet) sends the decoded data to a server. The data can then be accessed remotely. Other than that, the smart buoy has multiple technologies on board to communicate. First, in order to give orders, like calibration, a Bluetooth link is available. This allows for instantaneous measurements, calibration procedures, network tests, etc. Second, WiFi is also available and can be used to perform firmware over-the-air (FOTA). However, this feature is still unavailable in the current code version. The last connectivity system consists of LoRa radio. The LoRa communication system is a long-range wireless communication system that uses lowpower, long-range radios to communicate over long distances. The system is designed for use in rural and remote areas where conventional communication systems are unavailable. It uses a spread spectrum modulation technique to transmit data over long distances using very little power, which is particularly convenient for battery-powered systems.

1) NETWORK
The network architecture can be described as smart buoys connected to gateways in a star of star topology (Fig. 8). Each water quality parameter is assessed by a smart buoy, which sends the data to a gateway. The seven first deployed gateways are Sentrius RG1xx LoRaWAN Gateways from Lairdconnect. Those gateways are reliable, robust, secure, and easy to interface with. The other gateways are made using LoPys and PyGates to reduce costs. These homemade gateway works using the same parameters and still offer a range of approximately 2 km. Of course, this varies a lot depending on the environment. With the deployed gateways and using ChirpStack, a proprietary network is formed. The Chirp-Stack open-source LoRaWAN network server stack provides open-source components for LoRaWAN networks, allowing management of end devices and analysis of the extracted data using a single platform. It is also possible to use a public network such as The Things Network, which is very active in Brussels. The advantage is that one can use the network in the whole city and not be burdened by setting up (Internet access required) and paying for any gateway.

D. MECHANICAL DESIGN
The smart buoy's shell consists of a body that can host five sensors and contains the electronics, the battery, and silica gel. On top, a lid is placed, which prevents water from leaking inside thanks to a rubber o-ring. The whole body fits into a belt fastened to a buoy ( Fig. 9(a)). Due to the environmental

TABLE 4. Overview of Common 3D Filament Materials and Corresponding Characteristics
conditions, particular precautions are discussed regarding the choice of printing material, ergonomy, connections, and processing methods.

1) CONSTRAINTS AND REQUIREMENTS
Some design constraints must be considered to meet particular needs that may arise in different applications. These constraints include degradation due to environmental-specific parameters, ease of replication, waterproofness, ergonomy, and maintenance. First, the environment that the smart buoy must monitor has to be accounted for. For example, buoy will stay outdoors (Brussels) and partially submerged in water. Therefore, the shell has to withstand those environmental factors. Thus, it is crucial to understand the climatic situation of the Belgian capital. The winter is generally not very harsh, with average maximum temperatures around 6, and the summer is generally mild, with average maximum temperatures close to 23 • C. The average yearly temperature in Brussels is 10.4 • C. Brussels is used to rain, with more than one day out of two rain falling on the Belgian capital. The critical periods for the buoy and the sensors are during high humidity, ultraviolet (UV) intensive, and freezing temperatures. However, water rarely freezes, and Brussels is not known for its sunshine. Therefore, the biggest concern is humidity.
The shell is 3-D printed. It is an easy and affordable way of producing prototypes. However, the material choice is crucial due to the previously mentioned environmental factors. Table 4 compares widely available 3-D-print materials.PLA and ABS were discarded. PLA is soluble in many chemicals, is challenging to postprocess, and has low water resistance. Conversely, ABS is more robust than PLA but is still not resistant to UV light. PET-G seemed to be an excellent choice. It is very convenient because it is well suited for printing large parts. The downside is that postprocessing and smoothing become difficult since it is highly chemical resistant. Even if Nylon is a durable material, it was discarded due to its high hygroscopic characteristic. Since PC has, like Nylon, a tendency to absorb moisture and PP is not UV resistant, the only available material was ASA. ASA is a capricious material to print; however, it combines all characteristics for outdoor/partially submerged use. UV light and moisture have a low impact on the material. Processing ASA with acetone will make it watertight. Since this is an open-source project, and a particular focus has been put on affordability and reproducibility, the smart buoy is designed to be printed with limited components (top and body). The printing needs no support and can be done in one day on a standard 3-D printer.
The robot floats thanks to the buoy attached to it Figs. 10. The buoy is made of eight PVC pipe corners, glued and sealed together to form a circular and watertight shape. The normal force must trend upward in an equilibrium state for the system to float. Therefore, the force that can be derived using the submerged volume of the buoy must be larger than the force caused by the buoy's weight. The Archimedes law specifies that the normal force N is given by the buoyancy (FB) and the weight (FW) as ( With ρ being the density of water, V is the volume of the robot, and g is the acceleration due to gravity. The mass of the robot is referred to as m. The density of freshwater typically lies around 1 kg/L, and the total mass of the robot, including the buoy, is equal to 1.78 kg. The volume is approximately 4.10 −3 m 3 resulting in an up-trending normal force of 17.42 N. All the parts of the smart buoys were weighted individually and are represented in Table 5. The major design concern is water penetration. To overcome this problem, acetone is used. Letting the parts rest for 75 min in acetone vapors will melt the different ASA layers with each other, filling up all the micro holes that could cause water to drain into the robot. To avoid water penetrating through the holes to plug the sensors, IP68 cable glands showed reliable performances ( Fig. 11(a)). Besides all these precautions, condensation can form inside the device when the temperature rises. To protect the electronics, humidity patches in the form of silica gel are placed inside. The original Prusa i3 MK3S+ and MINI printers were used to print all the different parts. The PrusaSlicer application offers various features that can be tweaked. The perimeter, for example (how many threads will form the printed wall), is set to 3, and the first and last five layers are filled at 100%. The infill is set to 40% in a gyroid pattern. This showed robust behavior. After printing, several empty robot shells were deployed in ponds and rivers, which floated and came back without water penetration. Nevertheless, many precautions must be taken to print parts using ASA filament. The nozzle and the heated bed must be heated, respectively, at 260 • C and 110 • C. Also, the ambient temperature needs to be around 40 • C. Otherwise, the print has tendencies to curl up (warping) or not to stick on the previously printed layer (see Fig. 11(b)). A thermally isolated printing chamber is required. This allows for preheating the printing environment. The temperature is monitored as exceeding 50 • C would weaken the PET-G parts of the printer, damaging the whole printer.

2) MAINTANANCE
The water quality monitoring smart buoy must be regularly maintained to ensure accurate and reliable measurements. In addition, maintenance is required when data drift is noticed, showing the sensors clogging up (Fig. 12(a)). Nevertheless, it is recommended to clean the buoy each time it is taken out of the water when the battery is empty, for example. The cleaning can be done using a silk cloth, a smooth brush, and clean water ( Fig. 12(b)). Besides the maintenance, performing a calibration of the sensors is also recommended. Following the manufacturer's recommendations, this should be done every six months, but it is recommended after each cleaning session. Naturally, robots from which the electrolyte has been replaced, for example, require calibration. The calibration procedure is done by pairing a device with the buoy via Bluetooth, calibrating the sensors (multiple point calibration depending on the sensor), and performing a reading in a test solution (Fig. 12(c)).

IV. RESULTS
This section provides a comprehensive review of the designed smart buoy. It begins with a resource management analysis, including power consumption. Next, the possibility of using an energy harvesting device is analyzed to determine its potential as a means of generating sustainable energy. After the mechanical characteristics are studied regarding strength, decay, cost, and waterproofness. This is followed by an evaluation of accuracy and actual deployment state, including data observations.

A. ELECTRICAL PERFORMANCES
The buoys are not equipped with an energy harvester at the moment. Therefore, the monitoring smart buoy will operate autonomously until the battery is empty. Because deploying and redeeming robots is time-consuming, power usage has been optimized. Thanks to the battery lifetime model, estimation could be done to determine how long a smart buoy could monitor an environment without replacing the battery [16]. Next, using the energy flow model, battery capacity could be optimized [17]. Finally, this will be followed by test implementation. The battery lifetime model of the smart buoy is a function of the battery capacity and the discharge rate. It estimates how long a battery will last under normal conditions of use. The power model of this application is as The lifetime (L(t i )) in hours can be calculated by dividing the battery capacity (C bat ) by the average power consumption of the device, which is made up of the power consumption during wake-up (P device ) and the power consumption during deep sleep (P dsdevice ). In addition, the battery is subject to a small leakage current represented by a safety factor (SF bat ). As in many Internet of Things (IoT) applications, data are acquired periodically and sent to a gateway or other node. The rest of the time, the whole board enters a deep sleep. One can thus distinguish a periodic traffic pattern as follows.
2) The sensors are measuring the different parameters.
3) Data are transmitted. 4) Device disconnects and returns to a deep sleep state. The different phases can easily be discerned using the different measurements depicted in Figs. 13. and 14. This helps identify errors and power-intensive parts and check if everything goes as planned (microcontroller, protocol, sleep mode, packet transmission). Power consumption could be measured with the Power Profiler Kit II (PPK) from Nordic Semiconductors. The PPK can measure and optionally supply currents from 200 nA to 1 A. Several measurements were made to depict the typical power usage with various sample rates (from 1 Hz to 10 KHz). Fig. 13(a)-(b) show the current consumption, the battery level, and the power usage measured with a sampling frequency of 1 Hz. During the device's wake-up (every 10 min), peak consumption is measured. Fig. 13(c) zooms on the current consumption while the smart buoy is sensing. A plateau of 40 mA is formed with several peaks. Fig. 14 shows the results of a test that was conducted with a sampling frequency of 1 kHz. The whole wake-up routine is shown in the example code Algorithm 1 and can be followed in Fig. 14. The microcontroller wakes from a deep sleep, and the Lora connection is joined. After which, the pH, and, thus, the temperature load switch is activated. A 1500-ms delay is introduced for the sensors to boot up. Since the temperature is needed to offer proper compensation, it is sampled first. Setting the temperature for compensation always uses much current, as shown by the wider peak that rises at 5.2 s (Fig. 14). After which, the pH is read ten times in a row with 1-s spacing. After a delay of 100 ms, the DO and EC sensors are enabled. After a 1500-ms delay, the temperature compensation setting is settled for the oxygen sensor. Afterward, DO is measured five times with a spacing of 600 ms. The EC sensor undergoes the same routine as the DO sensor. Finally, the turbidity is being read. This data is then encoded and sent OFF, waiting for a response. After this, the system goes into deep sleep again.
After a depth analysis of the traffic pattern, other tests were performed to measure overall average power consumption. Relatively high current consumption of ca. 70 μA was measured during deep sleep. After removing the RTC and using the internal clock of the ESP32, the average power consumption lowered to 14.5 μA. The measurements were also performed over longer periods of time. The results can be found in Table 6. Note that the power increases when sensors are put into water. Inserting the measured values in (2) with an 8000-mAh battery results in 182 days or approximately six months of life. The latest smart buoys have currently been deployed for two months without interruption.

1) ENERGY HARVESTING
The method to prolong the smart buoys lifetime involves using photovoltaic solar energy. Unfortunately, the voltage and current of solar panels vary constantly depending on available sunlight. That causes instability of the battery chargers, which leads them to rapidly turn ON and OFFas they try to draw more or much less current from the panel than possible to keep the voltage from collapsing. Thanks to the voltage proportional charge control (VPCC) of the MCP73871 discussed earlier, the voltage can be set above the battery charge voltage point (4.5 V). In addition, a large capacitor (4700 μF) and a Schottky diode will further prevent the sudden voltage drops from affecting the rate or causing damage by preventing the capacitor from draining back into the panel.
To analyze the amount of energy required by the harvester to power the system, described in Fig. 15, an energy flow model was used consisting of an energy harvester device connected to an energy buffer, here a battery that powers a sensor device connected to a wireless network [17] (3) To deliver enough power to the system to function theoretically indefinitely, the initial energy stored in the buffer (E (t=0) BUF ), plus the energy harvested from the environment ( t τ =0 P SCV (τ )dτ ), must be greater or equal to the required energy from the device to operate (E DEV (t )).
Four FIT0333 solar panels from DFrobots were placed in series on the smart buoy ( Fig. 16(a)) since they are rated at 1.5 V with a 250-mA output current, resulting in a 6-V nominal voltage. The smart buoy was placed outdoors for 12 days. The average amount of harvested energy is 239.8 mW. This will vary depending on the weather and the moment of the year but reflects what can be expected during summer in Brussels. Fig. 16(b) depicts the harvested energy over two days. The buoy was near a wall, which shadowed the panels from 4 P.M. to noon, resulting in high peaks when the sun was shining straight. With this energy, the buoy could monitor indefinitely without running out of power. The solar panels are, for this application, overkill but can become handy when using more power-intensive extensions, such as motors. The efficiency of the solar panels, the weather, and the energy conversion efficiency were much better than what was expected. It is recommended to clean the robot every six months to ensure accurate measurements. However, this can vary depending on the state of the water wherein the smart buoy is placed. Using such panels is then not necessary. On the other hand, it offers the possibility of reducing the battery's capacity.

B. MECHANICAL PERFORMANCES
Most of the smart buoys could still operate after being submerged in water for a prolonged time. The main components (motors, electronics, and sensors) were not damaged by water. The smart buoy did not need to be recalibrated after being submerged. However, the smart buoy's sensors needed to be cleaned. The cleaning was done using a soft cloth to wipe down the sensors. Currently, the smart buoy's shells showed to be able to operate for two months. In order to estimate the lifetime of the shell, a more prolonged analysis is required. Nevertheless, in some cases, the robots leaked due to holders that broke, as detailed in Section IV-F.

C. COST
Determining the cost it takes to produce a smart buoy is crucial. Costs needs to be small in order to be able to deploy a large number of smart buoys. Table 7 depicts the main components of the smart buoy and their prices. Some additional costs regarding electricity and workmanship are not considered because manufacturing time and price can vary significantly. Furthermore, some expenses have to be made depending on the application. For example, one gateway is needed per area if a private network is set up. However, if only one smart buoy is present in each area, this cost can rapidly stack up. The total price of a single unit comes back to 923.24 euros.Note that for the items marked with "*", two EZO isolator boards are required for the pH and dissolved oxygen sensors, and that for the items marked with "**" one EZO carrier board is required for each Atlas-Scientific sensor.

D. DEPLOYMENT
In Brussels, different kinds of water bodies exist, like ponds, a canal, sewers, and swamps. Therefore, five smart buoys were deployed in different locations to test them in different locations (see Fig. 17). These locations include Bruxelles Royal Yacht Club (BRYC) on the Brussels canal ( Fig. 18(b)), the Brussels sewer museum, and Wiels swamps ( Fig. 18(a)), Leybeek ponds, and the pond of the Tournay-Solvay parc. Between the 19th and 20th of May, a massive number of dead fishes were found floating on the surface water of the Brussels canal (Fig. 18(c)). Luckily the smart buoys were monitoring those waters, which helped understand the phenomenon to reduce the risk of this happening again. On those dates, high   temperatures ( Fig. 19(a)) and sudden drop of DO (Fig. 19(c)) levels could be noticed. Temperature is a physical parameter that affects the equilibrium of the aquatic environment. The temperature changes the water density, and, thus, the speed at which water flows. An increase in temperature decreases the amount of oxygen dissolved in water. This can lead to anoxia. The increase in the water temperature can enhance the growth of bacteria, which can spread diseases in the aquatic ecosystem [18], [19]. Also, wastewater was poured into the canal that day. This accentuated the issue. The measured data of the different parameters are depicted in Fig. 19. A solution could have been to open locks or to forbid the pouring of wastewater when such levels are reached.

1) OBSERVATIONS
Several issues have been observed during the deployment phase, such as broken parts, data drift, and sensors clogging up. These issues were addressed and are shortly described in the two following sections. Besides those issues, an interesting event occurred from which data could be analyzed.
At the beginning of the deployment, two smart buoys disappeared, probably stolen. To overcome this issue, the smart buoys were camouflaged with a net and put further away into the ponds where they were situated. Since then, no smart buoys were stolen ( Fig. 18(a)).

E. MEASUREMENTS 1) ACCURACY
To estimate the accuracy of the sensors, a comparison was made between one monitoring smart buoy and a YSI EXO2 sonde. Five water samples were taken, of which each parameter was measured five times. With the results, the average error of those measurements using the EXO2 readings as a reference could be measured. The results are depicted in Fig. 20.
The temperature sensor performed the best with a 2% relative error, followed by the pH and EC and DO sensors with an average of 6%, 6%, and 11.5% relative error. Finally, the turbidity sensor performed the least. This is comprehensible since a calibration procedure has not been incorporated yet, and the sensor is not protected from external light sources. Fig. 21(a) shows a turbidity measurement in the Brussels canal. The readings are not yet converted because it is easier to spot the drift. The sensor is in an unclean environment, which can drastically alter the results in only one month. One can notice a downtrend, meaning less light is caught by the sensor  because the sensor is becoming dirty. Fig. 21(b) shows the robot's state when coming back from the Brussels canal.

F. EXTENSIONS
Besides the modularity of the PCB, the smart buoy can benefit from extensions. First, additional sensors or actuators can be plugged in. Furthermore, some extensions are particularly convenient for some applications. The smart buoy, for example, has been deployed in the sewers of Brussels (Fig. 22(a)  and (b)).
The smart buoy was used to analyze the sewers of Brussels during the "CRIME SENNE. NO ZENNE TO WASTE" exhibition. Because the flow of the sewer has a high velocity, a large PVC was installed (Fig. 22(a)), preventing the smart buoy from being damaged. Nevertheless, the readings were not accurate anymore after one week of deployment. To solve this problem, a hydrocyclone can be attached to the smart buoy (Fig. 22(c) and (d)). The water flows into the hydrocyclone, and due to the shape, a centrifugal force is  applied, pushing the heavier particles away from the sensor. This avoids dirt from clogging the sensors.
Optical turbidity sensors are used to measure the clarity of a liquid. The light source used to measure the turbidity is located inside the sensor. Hiding the sensor from external light sources helps to ensure accurate measurements. As shown in Fig. 23(a), several designs were printed. The shield offering the best protection is the last one in Fig. 23(a) and is represented in 3-D in Fig. 23(b). Fig. 24 displays two turbidity measurements in the same water sample. One sensor is protected with the radiation shield, the other not. The sensor without a radiation shield is influenced by external light sources such that the turbidity varies a lot, despite the liquid staying in the same conditions. Fig. 24 shows the effect of the radiation shield. The curve is flattened, which is more representative of the actual state of the water. Another benefit the radiation shield offers is that it prevents big junks from getting stuck in the sensor. The pH sensor cannot be screwed directly onto the cable glands and has a long body that weakens the sensor and allows leaks to form. To prevent this, a sensor holder is designed which reinforces the connection (Fig. 25(a)). The last extension concerns electronics. Inside the smart buoy, all the electronics can move freely. In order to prevent components from touching each other, a PCB holder is designed. The holder also keeps components in strategic places, such as the antenna and the led strip, which must be placed on top (Fig. 25(c)).

V. CONCLUSION
This article presents a new low-cost, open-source, and autonomous water-quality monitoring system that can track the evolution of many water bodies without disturbing or polluting the biotopes. The smart buoy takes measurements every 10 min and can be produced easily (due to the open-source aspect) and massively (due to the low-cost aspect). Moreover, the results are remotely accessible; thus, issues can rapidly be noticed. Furthermore, the design can be adapted to match the required application. The system is expandable and can be used in various applications to increase our knowledge of the underwater ecosystem. This technology can be reproduced and reach a large community thanks to these characteristics. The ultimate goal is to help spot and sanitize where needed aquatic biotopes that we have mistreated for too long. The smart buoy has been deployed in the context of the Smart-Water project. It is a collaborative (ULB, VUB, Brussels Environment, Brussels Marina, Brussels sewer museum, etc.) and citizen project. It invites everyone to monitor the water quality of ponds and rivers in Brussels, and, thus, contribute to its improvement. This article describes the sensing principles, including the indicator definitions. Then describes the electronics, including the main PCB and peripherals. This is followed by the mechanical design, which includes the design constraints, requirements, and extensions. The results include a cost-and-performance analysis, energy harvesting considerations, deployments in field conditions, and measurement accuracy analysis.
One smart buoy costs 932 euros and can be deployed for six months (depending on the battery size, an average of 1.83 mAh) without energy harvesting devices. The tested solar panels performed very well, averaging 239.8 mWh, while the smart buoy requires approximately 6 mWh. The smart buoy is fully functional but will benefit from regular updates from the SmartWater project and the emerging community. Some improvements include changing from sensor boards. The EZO sensor boards are not meant to be soldered by hand. Those are very fragile; manipulating them falsifies the results and even causes irreversible damage in some cases. The next smart buoy version will welcome two PCBs instead of one to overcome this issue. The extra PCB will be populated with the isolator-and EOM boards (smaller, more affordable, and better characteristics). The shell's resistance will be further analyzed to estimate its lifetime, and an adapted solar installation will be proposed.