Using IoT for Cistern and Water Tank Level Monitoring
Abstract
:1. Introduction
2. Related Work
2.1. Automatic Water Level Monitoring Systems
2.2. Energy Consumption Optimization in Water Systems
2.3. Water Quality Monitoring
2.4. Wireless Sensor Networks for Water Monitoring
2.5. IoT Solutions for Rural and Urban Environments
3. 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; with these data, we can promptly know if we should save water to the maximum or 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 these 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 be implemented 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, and 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 and the amount of available memory, and finally, a database was configured to show the data transmitted 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
- Microcontroller (NodeMCU V1.0) (for writing purposes, this is referred to as the microcontroller): It controls all sensors and actuators in the system. Its input and output pins were configured through the Arduino IDE programming environment. The MQTT protocol over the local network establishes communication with the sensors and actuators.
- Ultrasonic waterproof sensor (JSN-SR04T-2.0): This is used to measure the water level in the water tank. This sensor sends a signal that bounces off the water’s surface, allowing it to calculate the distance and, therefore, the volume of water. The connection of this sensor to the NodeMCU includes the following:
- 5V pin to the 5V pin of the microcontroller.
- Ground pin (GND) to GND of the microcontroller.
- Trigger pin (Trig) to the D7 pin of the microcontroller.
- Echo pin to pin D8 of the microcontroller.
- Water flow sensor (YF-S201) (this sensor requires a PULL-UP resistor to be set since it generates interruptions): It measures the pressure of the water entering the tank from the main supply. The pressure measurement is crucial for estimating the filling time of the cistern. The connection to the microcontroller includes the following:
- 5V pin to the 5V pin of the microcontroller.
- Ground (GND) pin to the microcontroller’s GND.
- Signal pin to the D4 pin of the microcontroller.
- Relay module: It activates or deactivates the submersible pump, depending on the water levels in the cistern and tank. The pump turns on when the tank level is below 50% and turns off when it is full. The relay connections are as follows:
- 5V pin to the 5V pin of the microcontroller.
- Ground (GND) pin to GND of the microcontroller.
- Signal pin to pin D6 of the microcontroller.
- Submersible water pump: It transfers water from the cistern to the upper tank. The relay module controls the activation of the pump. The connections are as follows:
- Positive wire to the NO terminal of the relay.
- Negative wire to the negative terminal of the 9V battery.
- 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: It measures the amount of dissolved solids in the water, expressed in parts per million (ppm), which estimates water quality. The sensor configuration includes the following:
- 5V pin to the 5V pin of the microcontroller.
- Ground (GND) pin to the microcontroller’s GND.
- Signal pin to the A0 pin of the microcontroller.
3.5.2. Tank Sensor Node Electronic Circuit Diagram
- Wemos D1 mini: This device acts as the main controller of the tank node. This component is responsible for receiving and processing the data from the connected sensors, sending this information to a Raspberry Pi4 server through the MQTT protocol. The programming environment used to configure the microcontroller was Arduino IDE, where the necessary input and output pins were assigned for each component.
- Ultrasonic waterproof sensor (JSN-SR04T-2.0): This ultrasonic sensor measures the water level in the tank. It sends ultrasonic waves that bounce off the water’s surface, allowing it to calculate the distance between the sensor and the water. The sensor connections to the microcontroller include the following:
- 5V pin connected to the 5V pin of the microcontroller.
- Ground pin (GND) connected to the microcontroller’s GND.
- Trigger pin (Trig) connected to the D7 pin of the microcontroller.
- Echo pin (Echo) connected to the D8 pin of the microcontroller.
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.
3.5.4. Mathematical Models of the Water Level, Flow, and Quality
- h is the height of water in the tank,
- H is the total height of the tank,
- d is the distance the sensor measures from the top of the tank to the water surface.
- Q is the instantaneous flow rate,
- f denotes the frequency of the pulses generated by the water flow,
- k is a sensor constant given in the sensor manual.
- TDS is the dissolved solids concentration in parts per million (ppm),
- C is the conductivity measured in S/cm,
- k is a conversion constant.
4. Experimental Results
4.1. Physical Scale Model
4.2. Dashboard and Meters/Gauges
4.2.1. Dashboard Showing Values
4.2.2. Usability Study
Categories and Questions
- Features and Functionality
- 1.
- Are the main monitoring functions (water level, flow, and quality) easy to understand and use?
- 2.
- Do you consider that all the necessary functionalities are present in the dashboards? Is any crucial information missing?
- Homepage/Starting Page
- 3.
- When accessing the page, can you identify the four main metrics (cistern level, tank level, water flow, and water quality)?
- 4.
- Is it intuitive to understand the purpose of each dashboard from a first glance?
- Navigation
- 5.
- Is it easy to navigate between the different dashboards (if necessary) or understand how to view them together?
- 6.
- Can you quickly access the information for each metric without getting confused or lost?
- Search
- 7.
- Would you like to be able to filter or search for historical data in the dashboards (e.g., time intervals or critical events)?
- 8.
- If you used a search function, was it easy to find the specific data you need?
- Control and Feedback
- 9.
- Does the system respond clearly when interacting with graphs or dashboard settings?
- 10.
- Do you receive sufficient visual feedback when you act, such as updating data or changing the display?
- Errors
- 11.
- If an error occurs (such as a data connection failure), does the system inform you and tell you how to resolve it?
- 12.
- Have you experienced loading problems or data display failures? If so, does the system respond appropriately?
- Content and Text
- 13.
- Are the data presented on each dashboard straightforward and easy to interpret?
- 14.
- Are the text and labels on the graphs descriptive enough to understand water levels, flow, and quality without additional help?
- Help
- 15.
- Can you easily find the help you need if you have questions about interpreting a graph or data?
- 16.
- Would you like additional explanations or guidance on how to use the dashboards effectively?
- Performance
- 17.
- Does the page load quickly for all four dashboards simultaneously?
- 18.
- Are there any delays or performance problems when refreshing data or switching views?
4.3. Database and Graphs
5. Discussion
6. Conclusions
Author Contributions
Funding
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 |
WSN | Wireless Sensor Networks |
Appendix A
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. In Proceedings of the International Conference on Communication and Networks (ComNet 2016), Thiruvananthapuram, India, 21–23 July 2016; Springer: Singapore, 2017; pp. 305–312. [Google Scholar]
- 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, 4007. [Google Scholar] [CrossRef]
- Kurniawan, E.; Sularno, H.; SW, A.A.I. Monitoring Water Levels in Fresh Water Tank Using The Concept of IoT (Internet of Think). Pros. Politek. Ilmu Pelayaran Makassar 2020, 1, 120–126. [Google Scholar] [CrossRef]
- Jayalakshmi, S. IoT-enabled smart water tank monitoring system with android application control. i-Manag. J. Instrum. Control. Eng. 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 Conf. Proc. 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. In Proceedings of the 2021 International Conference on Information Technology (ICIT), Amman, Jordan, 14–15 July 2021; pp. 924–928. [Google Scholar] [CrossRef]
- Cheng, W.Z.; Cheng, R.G.; Chou, S.Y. Power-saving for IoT-enabled water dispenser system. In Proceedings of the IEEE 2019 42nd International Conference on Telecommunications and Signal Processing (TSP), Budapest, Hungary, 1–3 July 2019; pp. 736–739. [Google Scholar]
- Gunde, S.; Chikaraddi, A.; Baligar, V. IoT based flow control system using Raspberry PI. In Proceedings of the IEEE 2017 International Conference on Energy, Communication, Data Analytics and Soft Computing (ICECDS), Chennai, India, 1–2 August 2017; pp. 1386–1390. [Google Scholar]
- Monsef, H.; Naghashzadegan, M.; Farmani, R.; Jamali, A. Pressure management in water distribution systems in order to reduce energy consumption and background leakage. J. Water Supply Res. Technol. AQUA 2018, 67, 397–403. [Google Scholar] [CrossRef]
- 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. In Proceedings of the IEEE 2016 2nd International Conference on Applied and Theoretical Computing and Communication Technology (iCATccT), Bengaluru, India, 21–23 July 2016; pp. 155–159. [Google Scholar]
- 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 Sens. J. 2014, 14, 2765–2772. [Google Scholar] [CrossRef]
- Irianto, K.D. Residential Water Tanks with IoT: A Solution for Household Water Consumption Monitoring. Asian J. Res. Comput. Sci. 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. In Proceedings of the 2023 IEEE 18th International Conference on Computer Science and Information Technologies (CSIT), Lviv, Ukraine, 19–21 October 2023; pp. 1–5. [Google Scholar] [CrossRef]
- Dolfi, M.; Colzi, I.; Morosi, S.; Masi, E.; Mancuso, S.; Del Re, E.; Francini, F.; Magliacani, R. Plant electrical activity analysis for ozone pollution critical level detection. In Proceedings of the 2015 23rd European Signal Processing Conference (EUSIPCO), Nice, France, 31 August–4 September 2015; pp. 2431–2435. [Google Scholar] [CrossRef]
- Morosi, S.; Dolfi, M.; Del Re, E.; Masi, E.; Colzi, I.; Mancuso, S.; Francini, F.; Magliacani, R.; Valgimigli, A.; Masini, L. A WSN for ground-level ozone monitoring based on plant electrical activity analysis. In Proceedings of the 2015 International Wireless Communications and Mobile Computing Conference (IWCMC), Dubrovnik, Croatia, 24–28 August 2015; pp. 715–720. [Google Scholar] [CrossRef]
- UXM; Turner, N. A Guide to Carrying Out Usability Reviews. 2011. Available online: https://www.uxforthemasses.com/usability-reviews/ (accessed on 19 August 2024).
- Nielsen, J.; Landauer, T.K. A mathematical model of the finding of usability problems. In Proceedings of the the INTERACT ’93 and CHI ’93 Conference on Human Factors in Computing Systems, Amsterdam The Netherlands, 24–29 April 1993; pp. 206–213. [Google Scholar] [CrossRef]
- Moran, K. Qualitative Usability Testing: Study Guide. 2013. Available online: https://www.nngroup.com/articles/qual-usability-testing-study-guide/ (accessed on 19 August 2024).
Criteria | Existing Solutions | References | Proposed System |
---|---|---|---|
Accuracy | Most existing systems use ultrasonic or embedded sensors to monitor water levels, with accuracies suitable for domestic applications. | Jan et al. focused on improving water use efficiency and accuracy [1]. Malche and Maheshwary: monitoring system connecting sensors [2]. Singh et al.: water level monitoring system using ultrasonic sensors to reduce wastage with accuracy [7]. | Our system uses ultrasonic sensors for almost instantaneous monitoring, similar to other studies. This proposal does not improve accuracy but adds new monitoring parameters, such as water quality, which provides a complete view of the domestic water system. |
Energy efficiency | Some studies optimize energy consumption, such as using a Raspberry Pi and reducing the use of pumps. These works use communication protocols such as HTTP, LoraWAN, and MQTT. | Gunde et al.: Raspberry Pi-based water flow control system to minimize energy consumption [10]. Cheng et al.: water-dispensing system that optimizes energy consumption [9]. Monsef et al.: proposed an algorithm to control the pressure-reducing valve in distribution networks, optimizing energy consumption [11]. | We use MQTT to reduce energy consumption by optimizing communications and data collection processes. MQTT is a lightweight communication protocol that improves power consumption by reducing communication overhead and facilitating efficient data transmission in low-power networks. |
Cost–benefit ratio | Some studies focus on low-cost solutions for rural or urban areas, such as wireless sensor networks. | Ali and Choi used WSN as a low-cost solution for leak and sinkhole detection [4]. Lambrou et al. used a low-cost sensor network for real-time contamination detection in drinking water [14]. Irianto et al. proposed a water consumption monitoring system that measures consumption by sending data to the cloud [15]. | We use accessible and open-source hardware (Raspberry Pi, NodeMCU), which reduces implementation costs while maintaining a good cost–benefit ratio. |
Scalability | Current solutions vary in their ability to scale to larger networks (e.g., wireless sensor networks in rural environments). | Zhukovskyy et al.: integrating an online information platform for scalability [16]. Durga et al.: water tank to improve large-scale water distribution [3]. Jayalakshmi: monitoring system to facilitate scalability in urban and rural environments [6]. | Our system is easily scalable due to its use of standard components and integration with widely available IoT technologies. This allows for deployment in both individual homes and neighborhoods. |
Items and Brief Details |
---|
Two water level sensors (Ultrasonic Sensor JSN-SR04T-2.0) |
One water flow sensor (Flow meter YF-SF01 3/4″ Hall Effect) |
One water quality sensor (TDS Meter V1.0) |
One submersible water pump 70-120L/H |
One Raspberry Pi 4 Model-B 8GB RAM Raspbian bulleye version |
One WeMos D1 mini ESP8266 WiFi |
One Relay 5V DC SRD-5VDC-SL-C |
One NodeMCU v2 ESP8266 WiFi |
One case with fan for Raspberry Pi 4 |
Two protoboards |
One MicroSD XDHC 32GB class 10 |
One MicroSD USB adapter |
One 9v battery |
One WiFi access point |
One laptop |
MM and MF jumpers |
Modem software |
Node-RED |
Arduino IDE |
Node JS |
Mosquitto MQTT |
Database: Influxdb |
Question | Excellent (%) | Good (%) | Moderate (%) | Poor (%) | Very Poor (%) | N/A (%) |
---|---|---|---|---|---|---|
1 | 47 | 47 | 6 | 0 | 0 | 0 |
2 | 47 | 33 | 20 | 0 | 0 | 0 |
3 | 40 | 37 | 23 | 0 | 0 | 0 |
4 | 53 | 27 | 17 | 0 | 0 | 0 |
5 | 30 | 57 | 13 | 0 | 0 | 0 |
6 | 47 | 30 | 23 | 0 | 0 | 0 |
7 | 27 | 53 | 20 | 0 | 0 | 0 |
8 | 33 | 50 | 17 | 0 | 0 | 0 |
9 | 40 | 33 | 27 | 0 | 0 | 0 |
10 | 23 | 50 | 23 | 4 | 0 | 0 |
11 | 20 | 33 | 40 | 5 | 0 | 2 |
12 | 33 | 33 | 27 | 5 | 0 | 2 |
13 | 43 | 47 | 10 | 6 | 0 | 0 |
14 | 30 | 47 | 17 | 6 | 0 | 0 |
15 | 40 | 33 | 23 | 6 | 0 | 0 |
16 | 33 | 53 | 7 | 7 | 0 | 0 |
17 | 40 | 43 | 13 | 0 | 4 | 0 |
18 | 27 | 43 | 17 | 10 | 0 | 3 |
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. Published by MDPI on behalf of the International Institute of Knowledge Innovation and Invention. 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/).
Share and Cite
Wister, M.A.; Leon, E.; Alejandro-Carrillo, A.; Pancardo, P.; Hernandez-Nolasco, J.A. Using IoT for Cistern and Water Tank Level Monitoring. Appl. Syst. Innov. 2024, 7, 112. https://doi.org/10.3390/asi7060112
Wister MA, Leon E, Alejandro-Carrillo A, Pancardo P, Hernandez-Nolasco JA. Using IoT for Cistern and Water Tank Level Monitoring. Applied System Innovation. 2024; 7(6):112. https://doi.org/10.3390/asi7060112
Chicago/Turabian StyleWister, Miguel A., Ernesto Leon, Alejandro Alejandro-Carrillo, Pablo Pancardo, and Jose A. Hernandez-Nolasco. 2024. "Using IoT for Cistern and Water Tank Level Monitoring" Applied System Innovation 7, no. 6: 112. https://doi.org/10.3390/asi7060112
APA StyleWister, M. A., Leon, E., Alejandro-Carrillo, A., Pancardo, P., & Hernandez-Nolasco, J. A. (2024). Using IoT for Cistern and Water Tank Level Monitoring. Applied System Innovation, 7(6), 112. https://doi.org/10.3390/asi7060112