Submitted:
08 October 2024
Posted:
09 October 2024
You are already at the latest version
Abstract
Keywords:
1. Introduction
2. Related Work
Automatic Water Level Monitoring Systems
Energy Consumption Optimization in Water Systems
Water Quality Monitoring
Wireless Sensor Networks for Water Monitoring
IoT Solutions for Rural and Urban Environments
3. Real-Time Monitoring of Water Architecture
3.1. Brief System Description
3.2. Devices
3.3. Components
3.4. Water Tank and Cistern System Description
- Measure and publish the cistern and water tank’s water level on the Internet in real-time; with this data, we can promptly know if we should save water to the maximum and use the washing machine and other services.
- Measure and publish the flow or pressure of the pipe that fills the cistern on the Internet and calculate the cistern’s filling time.
- Measure and publish the water quality supplied by the piped water on the Internet. With this data, chlorination of the water is possible.
3.5. Design of Sensors Monitoring Cistern and Water Tank - Electronic Circuit Diagrams
- Cistern Sensor Node
- Tank Sensor Node
- Cistern Sensor Node: this diagram shows that communication via MQTT is bidirectional since this node publishes and subscribes to the corresponding topics.
- Tank Sensor Node: this diagram shows that the communication through MQTT is unidirectional because this node publishes in the corresponding topic.
- Raspberry Pi 4: this single board computer was configured to implement it as an MQTT broker using mosquitto; it was also programmed using Node-RED, where the topics were configured to receive and send data through MQTT, a dashboard was configured to display the data, Similarly, using Node-RED, a dashboard was programmed to display the time of use of the raspberry pi 4, the amount of available memory, and finally a database was configured to show the data transmitted in real-time with the option to download the data in a tabular file format to be viewed in a spreadsheet.
3.5.1. Cistern Sensor Node Electronic Circuit Diagram
- Micro-controller2 NodeMCU V1.0: It is responsible for controlling each of the components of the architecture of the cistern sensor node; this control is done through the input and output pins; these pins were configured in the programming that was implemented in the Arduino IDE in programming each pin was established depending on the component to configure, the communication protocols and the network was established by which the data is transmitted through MQTT.
-
Ultrasonic Waterproof Sensor (JSN-SR04T-2.0): this sensor is responsible for sensing the water level in the tank; this consists of 4 pins that were configured in the programming.
- Pin 5v of the sensor to 5 volts of the micro (red wire)
- Pin gnd of the sensor to the gnd of the micro (black wire)
- Pin Trig from the sensor to pin D7 of the micro (orange wire)
- Pin echo of the sensor to pin D8 of the micro (blue wire)
-
Water Flow Sensor (YF-S201)3: This sensor is responsible for measuring the water pressure falling from the water intake to the cistern; it consists of 3 pins configured in the micro-controller programming.
- Pin 5v from the sensor to 5 volts from micro (red wire)
- Sensor gnd pin to micro-controller gnd (black wire)
- Sensor signal pin to micro-controller pin D4 (yellow wire)
-
Relay Module is responsible for activating or deactivating the submersible water pump, labeled with the number (5) in the diagram. This pump changes from active to deactivated depending on the water level values delivered from the cistern and the water tank.
- Pin 5v from the sensor to 5 volts from micro (red wire)
- Sensor gnd pin to microphone gnd (black wire)
- Signal pin of the module to the D6 pin of the micro (purple wire).
-
The Submersible water pump is the actuator of the whole architecture since it supplies water to the tank in case it is needed, or if not, it does not pump water in its cistern does not have water. These conditions were established in the node-network programming in the single-board computer (Raspberry Pi).
- Red wire to the NO connector of the Relay module
- Black wire to the negative pole of the battery (6), and the positive pole of the battery is connected to connector C of the relay module to close the circuit.
- Battery (9v). This battery helps us close the circuit of the submersible water pump since it changes state from on to off and vice versa. A commercial battery was used, and a battery clip was adapted.
-
Sensor TDS meter v1,0. This gives us an estimate of how dirty the water is; we mention a forecast because it is needed to complement a thermometer that does not deliver the water temperature to provide a more accurate value.
- Pin 5v of the sensor to 5 volts of the micro (red wire).
- Pin gnd of the sensor to gnd of the micro (black wire)
- Pin A of the sensor to pin A0 of the microphone (blue wire).
3.5.2. Tank Sensor Node Electronic Circuit Diagram
- Wemos D1 mini: Device that is responsible for controlling each of the components of the architecture of the tank sensor node; this control is done through the input and output pins; these pins were configured in the programming that was implemented in the Arduino IDE. In the programming, each pin was set depending on the component to be configured, the communication protocols, and the network through which the data is transmitted via MQTT was established.
-
Ultrasonic waterproof sensor (JSN-SR04T-2.0): This sensor is responsible for sensing the water level in the tank. It consists of four pins that were configured in the programming.
- Pin 5v of the sensor to 5 volts of the micro (red cable).
- Pin gnd of the sensor to the gnd of the micro (black wire).
- Pin Trig from the sensor to pin D7 of the micro (orange wire).
- Pin echo from the sensor to pin D8 of the mic (blue wire).
3.5.3. Flows and Dashboard in Node-RED
- Distance or water level in the water tank.
- Distance or water level in the cistern.
- Flow rate or water pressure coming from the tap water.
- Water quality.
- Submersible water pump.
4. Experimental Results
4.1. Physical Scale Model
4.2. Dashboard and Meters/Gauges
4.3. Database and Graphs
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
Abbreviations
| IoT | Internet of Things |
| MQTT | Message Queuing Telemetry Transport |
| ppm | Parts per million |
| TDS | Total Dissolved Solids |
Appendix A
Appendix A.1
| 1 | MQTT stands for Message Queuing Telemetry Transport. It is a lightweight messaging protocol for use in cases where clients need a small code footprint, are connected to unreliable networks, or have limited bandwidth resources. |
| 2 | For writing purposes, the micro-controller will be called micro. |
| 3 | This sensor requires a PULL-UP resistor to be set since it generates interruptions. |
| 4 | InfluxDB is an open-source time series database developed by the company InfluxData. InfluxDB manages all types of time series data in a single, purpose-built database (https://www.influxdata.com/). |
References
- Jan, F.; Min-Allah, N.; Saeed, S.; Iqbal, S.Z.; Ahmed, R. IoT-based solutions to monitor water level, leakage, and motor control for smart water tanks. Water 2022, 14, 309. [Google Scholar] [CrossRef]
- Malche, T.; Maheshwary, P. Internet of things (IoT) based water level monitoring system for smart village. Proceedings of International Conference on Communication and Networks: ComNet 2016. Springer, 2017, pp. 305–312.
- Durga, S.N.; Ramakrishna, M.; Dayanandam, G. Autonomous water tank filling system using IoT. Int. J. Comput. Sci. Eng 2018, 6, 123–141. [Google Scholar] [CrossRef]
- Ali, H.; Choi, J.h. A Review of Underground Pipeline Leakage and Sinkhole Monitoring Methods Based on Wireless Sensor Networking. Sustainability 2019, 11. [Google Scholar] [CrossRef]
- Kurniawan, E.; Sularno, H.; SW, A.A.I.; others. Monitoring Water Levels in Fresh Water Tank Using The Concept of IoT (Internet of Think). PROSIDING POLITEKNIK ILMU PELAYARAN MAKASSAR 2020, 1, 120–126. [Google Scholar] [CrossRef]
- Jayalakshmi, S. IoT-enabled smart water tank monitoring system with android application control. i-manager’s Journal on Instrumentation and Control Engineering 2023, 11, 37. [Google Scholar] [CrossRef]
- Singh, H.K.H.; Kamaludin, H.; Hamid, I.R.A.; Safar, N.Z.M.; Abdullah, N. IoT-Based water tank level monitoring system using ultrasonic sensor. AIP Conference Proceedings 2023, 2608, 020009. [Google Scholar] [CrossRef]
- Zhukovskyy, V.; Printz, D.; Zhukovska, N.; Hubach, M.; Rajab, H. IoT based Intelligent Information-Analytical System Architecture for Water Tank Monitoring. 2021 International Conference on Information Technology (ICIT), 2021, pp. 924–928. [CrossRef]
- Cheng, W.Z.; Cheng, R.G.; Chou, S.Y. Power-saving for IoT-enabled water dispenser system. 2019 42nd International Conference on Telecommunications and Signal Processing (TSP). IEEE, 2019, pp. 736–739.
- Gunde, S.; Chikaraddi, A.; Baligar, V. IoT based flow control system using Raspberry PI. 2017 International Conference on Energy, Communication, Data Analytics and Soft Computing (ICECDS). IEEE, 2017, pp. 1386–1390.
- Monsef, H.; Naghashzadegan, M.; Farmani, R.; Jamali, A. Pressure management in water distribution systems in order to reduce energy consumption and background leakage. Journal of Water Supply: Research and Technology—AQUA 2018, 67, 397–403. [Google Scholar] [CrossRef]
- Yauri, R.; Rios, M.; Lezama, J. Water quality monitoring of Peruvian Amazon based in the Internet of Things. 2017 IEEE XXIV International Conference on Electronics, Electrical Engineering and Computing (INTERCON). IEEE, 2017, pp. 1–4.
- Jan, F.; Min-Allah, N.; Düştegör, D. Iot based smart water quality monitoring: Recent techniques, trends and challenges for domestic applications. Water 2021, 13, 1729. [Google Scholar] [CrossRef]
- Pujar, P.M.; Kenchannavar, H.H.; Kulkarni, U. Wireless sensor network based water monitoring systems: A survey. 2016 2nd International Conference on Applied and Theoretical Computing and Communication Technology (iCATccT). IEEE, 2016, pp. 155–159.
- Lambrou, T.P.; Anastasiou, C.C.; Panayiotou, C.G.; Polycarpou, M.M. A Low-Cost Sensor Network for Real-Time Monitoring and Contamination Detection in Drinking Water Distribution Systems. IEEE Sensors Journal 2014, 14, 2765–2772. [Google Scholar] [CrossRef]
- Irianto, K.D. Residential Water Tanks with IoT: A Solution for Household Water Consumption Monitoring. Asian Journal of Research in Computer Science 2022, 14, 238–247. [Google Scholar] [CrossRef]
- Zhukovskyy, V.; Printz, D.; Zhukovska, N. Human-Computer Interaction in IoT System for Water Tank Monitoring and Controlling. 2023 IEEE 18th International Conference on Computer Science and Information Technologies (CSIT), 2023, pp. 1–5. [CrossRef]























| Items and brief details |
|---|
| 2 Water Level Sensors (Ultrasonic Sensor JSN-SR04T-2.0) |
| 1 Water Flow Sensor (Flow meter YF-SF01 3/4" Hall Effect) |
| 1 Water Quality Sensor (TDS Meter V1.0) |
| 1 Submersible Water Pump 70-120L/H |
| 1 Raspberry Pi 4 Model-B 8GB RAM Raspbian bulleye version |
| 1 WeMos D1 mini ESP8266 WiFi |
| 1 Relay 5V DC SRD-5VDC-SL-C |
| 1 NodeMCU v2 ESP8266 WiFi |
| 1 Case with fan for Raspberry Pi 4 |
| 2 Protoboards |
| 1 MicroSD XDHC 32GB class 10 |
| 1 MicroSD USB adapter |
| 1 9v battery |
| 1 WiFi Access Point |
| 1 Laptop |
| MM and MF jumpers |
| Modem Software |
| Node-RED |
| Arduino IDE |
| Node JS |
| Mosquitto MQTT |
| Database: Influxdb |
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 (http://creativecommons.org/licenses/by/4.0/).