1. Introduction
The global water shortage and climate change call for urgent innovation in water resource management. This study presents a smart approach that combines the ESP32 microcontroller, manufactured by Espressif Systems, a company based in Shanghai, China, with MicroPython programming (version 1.20.0) for the monitoring of wastewater and potable water. The design of a modular and open-source system offers an adaptable and efficient solution ideal for implementation in various contexts, including remote areas without access to the electrical grid.
The concept of smart water-management systems has been extensively described in academic articles [
1]. In this review, it is concluded that the predominant applications are related to distribution processes, use of the water and water management systems, but a total absence of applications intended for wastewater and effluent reuse processes has been found.
Nowadays, there are powerful, low-cost platforms with low energy consumption for developing real-time telemetry devices based on IoT communication. After analyzing different options, we highlighted the ESP32 card, known for its open hardware nature and programmed with MicroPython [
2], which enables adaptation to diverse applications and need, leveraging its energy efficiency. This card can be connected to low-power IoT communications such as LoraWan [
3] and NBiOT [
4], and it is essential to highlight how these technologies contribute to more sustainable and efficient water resource management. These low-power communication platforms are vital for real-time data transmission from remote locations, enabling a rapid response to changing conditions and potential environmental risks. The present document outlines the design methodology and field tests that support the validity of this technology.
2. Materials, Design and Methods
This section describes provides an overview of the system’s architecture, highlighting the integration of hardware and software components tailored for efficient data acquisition and communication.
2.1. Datalogger Design
Figure 1 shows the PCB (Printed Circuit Board) designed and installed in the system. It incorporates the components described in
Table 1, and offers versatility, with analog and digital inputs for a variety of sensors and devices. Field communications use the Modbus RTU protocol via RS-485 for data collection from the sensors, while data transmission to the control center uses LoRaWAN or NB-IoT depending on availability and coverage needs.
2.2. Data Communication
At the heart of our communication infrastructure, we selected LoRaWAN and NB-IoT for their remarkably low energy consumption. LoRaWAN stands out as the more efficient of the two, making it our preferred choice. This technology is characterized by not incurring periodic subscription costs, making it exceptionally suitable for applications where cost-effectiveness is crucial. On the other hand, NB-IoT, with its advantages in terms of range and signal penetration in dense urban environments, serves as an alternative in places where LoRaWAN does not offer optimal coverage.
2.3. Custom Component Design and Manufacturing
Utilizing CAD software, specifically SolidWorks 2017 SP 3.0, we designed and optimized models for supports and casings, which were then manufactured using 3D printing (
Figure 2). This approach provided us the flexibility to customize the assembly of our system to the specific needs of each project, from creating a robust protective case for the datalogger to manufacturing tailor-made supports for the ultrasonic sensor. Moreover, the accessible nature of 3D printing means that any user with access to a 3D printer can independently reproduce these designs, facilitating project expansion and collaboration.
3. Implementation and Testing
3.1. Ultrasonic Sensor, Materials and Datalogger
Figure 3 shows a comparison result between the ultrasonic sensor JSN-SR04T and a commercial radar-type sensor; we found that the results were very similar. There were variations of about 1%, which can be attributed to the placement of the sensors. The ultrasonic sensor was located at a slightly different point than the radar-type sensor, in an area with a slight incline.
The integration of components manufactured with 3D printing (
Figure 4) proved successful, resulting in robust parts that contribute to the integrity and durability of the datalogger. The adaptability of the printed design allowed for optimization in the installation of the ultrasonic sensor, ensuring its optimal alignment and functionality.
3.2. Communication
The deployment of three dataloggers in the “La Séquia” canal provided diversified information to assess the system’s consistency across different communication scenarios. Two of these devices employed LoRaWAN technology, and the remaining one used NB-IoT, thus offering a direct comparison of the performance of these platforms in a consistent operational environment. The results showed that both technologies ensure reliable and efficient data transmission. LoRaWAN, in particular, stood out for its exceptional energy efficiency. NB-IoT, on the other hand, proved to be a robust solution in scenarios where the LoRaWAN signal was not ideal or a higher data-sending frequency was required, providing an effective alternative without significant interruptions in data communication. This set of tests provides a solid foundation for the validation of the system’s architecture, confirmed by the stability and integrity of the collected information. The reliability and sustained performance of the system, even in the face of environmental and operational variables, indicate its suitability for widespread application in water resource management.
4. Conclusions
This analysis highlights the importance of adopting open and accessible technologies in water resource management. The combination of ESP32, MicroPython and low-cost communications offers an efficient and autonomous solution for water monitoring. The successful implementation in Manresa serves as a reference for future large-scale applications, promoting more sustainable and autonomous water management.
Author Contributions
Conceptualization and methodology, M.L. and J.L.G.; software and validation, M.L., J.L.G., T.E. and S.G.; formal analysis, M.L.; investigation, M.L. and J.L.G.; resources, S.G.; data curation, C.D.; writing—original draft preparation, M.L.; writing—review and editing, T.E.; visualization, J.C.; supervision, M.L.; project administration, S.G.; funding acquisition, S.G. All authors have read and agreed to the published version of the manuscript.
Funding
This research was funded by the Agència Catalana de l’Aigua (ACA), under the agreement “Conveni de Col·laboració entre l’Agència Catalana de l’Aigua i la Mancomunitat de Municipis del Bages per al Sanejament pel qual es defineix el marc d’atribució de recursos procedents del Cànon de l’Aigua per finançar les despeses d’explotació, de reposició i d’inversió dels sistemes públics de sanejament en alta” with the expedient number CV22000912 and the agreement number 2023/5/1279.
Institutional Review Board Statement
Not applicable.
Informed Consent Statement
Not applicable.
Data Availability Statement
No new data were created or analyzed in this study. Data sharing is not applicable to this article.
Conflicts of Interest
The authors declare no conflicts of interest. Authors Marina Lloys, Josep Lluis Guixà, Claudia Dragoste, Jordi Cots, and Sergi Grau were employed by the company Company Aigües de Manresa, S.A. The authors also declare that this study received funding from the Agència Catalana de l’Aigua (ACA). The funder was not involved in the study design, data collection, analysis, interpretation of data, writing of the article, or the decision to submit it for publication.
References
- Soares Ascenção, É.; Melo Marinangelo, F.; Meschini Almeida, C.F.; Kagan, N.; Dias, E.M. Applications of Smart Water Management Systems: A Literature Review. Water 2023, 15, 3492. [Google Scholar] [CrossRef]
- Beaudoin, L.; Avanthey, N.; Villard, C. Porting ardupilot to esp32: Towards a universal open-source architecture for agile and easily replicable multi-domains mapping robots. Int. Arch. Photogramm. Remote Sens. Spat. Inf. Sci. 2020, 43, 933–939. [Google Scholar] [CrossRef]
- Ragnoli, M.; Barile, G.; Leoni, A.; Ferri, G.; Stornelli, V. An Autonomous Low-Power LoRa-Based Flood-Monitoring System. Low Power 2020, 10, 15. [Google Scholar] [CrossRef]
- Mekki, K.; Bajic, E.; Chaxel, F.; Meyer, F. A comparative study of LPWAN technologies for large-scale IoT deployment. ICT Express 2019, 5, 1–7. [Google Scholar] [CrossRef]
- Kumar, A.K.; Sarangi, A.; Singh, D.K.; Dash, S.; Mani, I. Evaluation of Ultrasonic Sensor for Flow Measurement in Open Channel. J. Sci. Ind. Res. (JSIR) 2023, 82, 1091–1099. [Google Scholar]
| Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).