IoT-Based Solutions to Monitor Water Level, Leakage, and Motor Control for Smart Water Tanks

: Today, a large portion of the human population around the globe has no access to freshwater for drinking, cooking, and other domestic applications. Water resources in numerous countries are becoming scarce due to over urbanization, rapid industrial growth, and current global warming. Water is often stored in the aboveground or underground tanks. In developing countries, these tanks are maintained manually, and in some cases, water is wasted due to human negligence. In addition, water could also leak out from tanks and supply pipes due to the decayed infrastructure. To address these issues, researchers worldwide turned to the Internet-of-Things (IoT) technology to efﬁciently monitor water levels, detect leakage, and auto reﬁll tanks whenever needed. Notably, this technology can also supply real-time feedback to end-users and other experts through a webpage or a smartphone. Literature reveals a plethora of review articles on smart water monitoring, including water quality, supply pipes leakage, and water waste recycling. However, none of the reviews focus on the IoT-based solution to monitor water level, detect water leakage, and auto control water pumps, especially at the induvial level that form a vast proportion of water consumers worldwide. To ﬁll this gap in the literature, this study presents a review of IoT-controlled water storage tanks (IoT-WST). Some important contributions of our work include surveying contemporary work on IoT-WST, elaborating current techniques and technologies in IoT-WST, targeting proper hardware, and selecting a secure IoT cloud server.

Fresh water, which has relatively low salt contents and other dissolved solids [32], is the main component in many human activities, including agriculture, industries, and domestic applications. Unfortunately, this small quantity is not entirely available to us because around 69% of freshwater is trapped in the glaciers and polar icecaps. Around 30% of fresh water exists as groundwater, i.e., water under the earth's surface. Collectively, around 1% of total freshwater is available for all forms of human consumption [30,32].
Research shows that worldwide, freshwater resources are rapidly diminishing [4,12,30,[32][33][34][35], causing tension among different nations. The primary reasons for this crisis are (i) uneven distribution of the water resources around the globe, (ii) rapid growth in urbanization, (iii) drastic increase in industrial activities, and (iv) a lack of awareness about water consumption. In addition, many countries around the world are facing droughts and flood-like conditions due to the global warming phenomenon. To overcome the freshwater shortage, some water-scarce countries (e.g., Saudi Arabia) are already receiving fresh water from the seawater through the desalination process, which requires energy, workforce, and funding.
Food and freshwater are linked, and both are necessary for survival. Agriculture activities consume a large portion of fresh water to produce crops, fruits, plants, etc. As stated in [36], the demand for food is expected to rise by more than 50% over the coming 30 years due to the continuous growth of the world's population.
To mitigate the effect of the water crisis, many initiatives are taking place worldwide to take care of our freshwater resources [37][38][39][40][41][42][43][44][45][46][47][48][49]. For instance, the water monitoring day was established in 2003 by the America Clean Water Foundation [50,51], aiming to create public awareness of water contamination. In addition, the World Health Organization (WHO) and the United States Environmental Protection Agency (USEPA) have constantly been updating their recommendations and guidelines on water-borne diseases and pollution [52][53][54]. The "World Water Council" report indicates that the global population may rise by 40 to 50% over the next 50 years [55][56][57]. This super growth, along with urbanization and industrialization, might increase the overall demand for water resulting in a strong impact on the world ecosystem.
Water pollution and the use of unsafe water result in death and disease and are, therefore, significant health concerns [54,55,58]. Fortunately, numerous research efforts are going on to improve water quality monitoring [59,60]. Due to this fact, the scope of our study has intentionally been confined to the IoT application in smart water tank-monitoring.
As already noted, global freshwater supplies are continuously diminishing. In the rural regions, humans rely on water obtained from tube wells, wells, ponds, and lakes. In such localities, water is seldomly stored in proper water storage tanks. Instead, it is simply collected as needed from the respective sources. Undoubtedly, water is wasted through excessive use in personal hygiene, washing clothes, dishes, vehicles, watering plants, and other ways. Providing relevant information and educating these and other communities on issues around the quality and availability of freshwater resources may prevent or at least reduce water wasting.
On the other hand, in urban areas, water is supplied by the local water bodies, e.g., municipal corporations. Such water bodies are generally entrusted by the local or federal government to provide water for domestic applications. In general, this demand is fulfilled using water from tube-wells, lakes, ponds, or rivers purified through the Reverse Osmosis (RO) plants (if the water quality is not sufficient for direct domestic usage) [59,60].
Water is usually stored in the overhead or underground tanks. In addition, larger organizations (e.g., universities, factories, and malls) also fill tanks from their private tube wells. The use of tube wells and over-pumping water from the underground resources lead to decreasing levels of fresh water, water pollution, and increased overall expenses associated with deeper drilling and pumping out of water. Proper water storage is a challenge in hilly terrains due to the road infrastructure. There may also exist no underground reserves, or it could be extremely deep in some desert-type regions, e.g., Saudi Arabia. In such cases, water is generally transported in the water tankers, which may incur considerable costs to the end-users and waste water during transportation.
Given the overall challenges in the fresh water supply crisis, preventing water wastage seems not only prudent but necessary. In this respect, researchers are continuously working on designing and developing smart systems to detect water leakage in the supply lines, control water theft, and monitor water storage tanks [31,51,61,62]. In these global efforts, the topic of IoT-WST has gained more attention [31,34,59,60,[63][64][65], and the following parameters are considered while designing a typical IoT-WST:

•
Automatic monitoring of water levels in tanks, • Automatic detection of water leakage from tanks and supply pipes in the proximity, • Automated tanks refilling while avoiding the dry run of motors or pumps, and • Providing access to the end-users to control and observe relevant activities remotely.
Li et al. [66] published a review paper on redefining the framework for smart systems water monitoring. Its main aim is to define what a smart water system is and develop a systematic framework. While supplying good insight into different layers of the smart system, this article is not focused on smart monitoring of water storage tanks (IoT-WST). Yuvaraj et al. [67] published a review paper on water leakage detection and monitoring. However, its scope is limited because it offers little information on water leakage monitoring and lacks comparative analysis. In addition, the review considered only articles discussing specifically water leakage detection in the main supply pipes.
Ali and Choi [68] published a review article on the wireless sensors network (WSN) based water monitoring. This article concentrated on contemporary methods developed to check water leakage in the underground pipelines, sinkholes produced by leakage, and the feasibility of WSN to check sinkholes and leakage. Though it supplies an in-depth analysis of these issues, the review offers nothing on IoT-WST.
In [69], the authors published a review on water monitoring systems utilizing IoT technologies. Though the main interest of the discussion was the possibility of reducing water wastage using IoT technology, the review only touched on the issues of water quality, level, and leakage control at a very abstract level. Sheltami et al. [70] published a survey focused on WSN-based monitoring for leakage in water supply pipelines. This article is well documented and provides analyses of different water leakage detection schemes, but its scope is also confined to only WSN-based schemes. It offers no insight into IoT-WST.
The Public Utilities Board Singapore [71] published a review article focused on managing the water distribution network through a smart water grid. It is undoubtedly well documented, and its scope is relatively broad. For example, it covers various aspects such as assets management, water quality, leakage detection, water conservation, and automated meter reading. However, while offering much in the way of critical analysis of these parameters, it covers nothing on IoT-WST. Finally, in [72], the authors composed a comprehensive review on IoT-based water quality monitoring in underground and overhead tanks.
Literature survey reveals ( Table 1) that there exists a plethora of review articles on smart water monitoring, including water quality monitoring, leakage monitoring in supply pipes, and recycling water waste, among other issues. However, it also shows that none of the recent reviews has focused on the IoT-based solution to monitor water level, detect water leakage, and auto-control water pumps, especially at the level of the induvial or private users who comprise a large portion of water consumers worldwide. To fill this research gap, this study presents a review of the IoT-controlled water storage tanks (IoT-WST). Some motivational factors of our study are as follows: Reviewing recent technologies and techniques, • Exploring existing software and hardware platforms for IoT-WST, and • Highlighting the cyber security threats.
The remaining of this article is structured as follows: Section 2 explains the background of the water storage tanks monitoring. Section 3 explains the research method and offers a critical survey of contemporary work on IoT-WST. Section 4 elaborates on some technologies and techniques commonly used while designing and developing IoT-WST. In Section 5, the authors offer specific details about the potential challenges, trends, and limitations of IoT-WST. Finally, Section 6 concludes this study. Table 2 has the list of acronyms utilized in this article. Table 1. Contemporary reviews on smart water monitoring.

Reference
Major Features Comments [66] Redefining framework for smart systems to monitor water Not focused on smart monitoring of water storage tanks [67] Water leakage detection in the main supply pipes Not focused on smart monitoring of water storage tanks [68] Feasibility of WSN to monitor sinkholes and leakage Not focused on smart monitoring of water storage tanks [69] Reducing water wastage using IoT technology; In addition, less coverage is also given to water quality, level, and leakage control Not focused on smart monitoring of water storage tanks [70] WSN based monitoring for leakage in water supply pipelines Not focused on smart monitoring of water storage tanks [71] Management of the water distribution network through smart water grid Not focused on smart monitoring of water storage tanks [72] IoT-based monitoring of water quality in the underground and overhead tanks.
Not focused on smart monitoring of water storage tanks

Background
This section briefly details some fundamental basics, which may offer convenience to readers of this article.

Traditional Monitoring
Most often, the water tank monitoring is performed manually [59,60,63,73]. For example, a consumer can refill a tank when it is empty and fix water leakage if any is detected. Though this method has been in use for a long time, it has some serious limitations. For instance, 24/7 h monitoring of tanks in person may not be feasible for individuals at private locations such as homes, schools, universities, organizations, mills, factories, etc. In fact, it is often the case that water overflows from tanks undetected. Moreover, the task of manually checking the water level in tanks if needed is tedious and often not impossible.

Off-line Automated Monitoring
As noted above, manual monitoring of water storage tanks may not be a comfortable experience, especially in the water-scarce regions such as Saudi Arabia [31,72,74]. Thus, researchers have devised off-line embedded systems to monitor water storage tanks [31,32,59,60]. In such approaches, researchers deploy a microprocessor-based system for monitoring tanks. A typical off-line tank monitoring system may include (1) sensors, (2) actuators, (3) processor(s), and (4) supportive electronic components. These units are briefed below: • Sensor: It can detect modifications in its surroundings and transfer collected data to relevant electronic modules (e.g., a microprocessor). Notably, a sensor is always supplemented with other electronic modules (e.g., analog-to-digital converter (ADC)) for proper signal conditioning [75]. • Actuator: it is a device (e.g., transistor, electromechanical relay, and thyristor), which is capable of causing machines or devices to run. • Processor: In embedded systems, dedicated microprocessors (also called microcontrollers) are utilized. In general, a microcontroller unit (MCU) is called a true computer on a single chip, which has all necessary peripherals (e.g., memory, timers/counters, digital and analog input/output (I/O) ports, ADC, and digital-to-analog converter (DAC)) on-chip. This unit can easily read sensors data, process, store, and update output devices (e.g., liquid crystal module (LCM)) if required, and transfer data to other devices and machines if needed. • Supportive electronic components: (e.g., power supply unit, buffers, resistors, and diodes) are always required to power up the target system, integrate sensors with I/O ports, etc.
To summarize, off-line automated monitoring systems are suitable for monitoring water storage tanks, but locally. They may not have the requisite electronic interface or modules to transfer sensor data to remote devices through wired or wireless communication channels. For this reason, their scope is limited to individual usage only.

WSN-Based Monitoring
To extend the capabilities of the off-line monitoring systems, researchers approached towards usage of the WSN technology [68,76,77]. In a typical WSN (Figure 1), a sensor node (an MCU-based kit) first reads in the sensors data (e.g., leakage) being installed on-site. After reconditioning and processing, the data is sent to the main station (also called a server) wirelessly using different wireless channels (e.g., Lora WAN, Xbee, Wi-Fi, Bluetooth, nRF24L01, or RF 433) [78]. On the reception site, the main station performs further analysis to find out hidden patterns and anomalies, if any. Finally, the processed data is stored, results are revised, and, if needed, feedback is initiated to the relevant authorities or endusers via an email, SMS, etc. In this scenario, the main station may also have full control over sensors and actuators being connected to each sensor node.
While resolving some of the limitations of off-line monitoring systems, this technology also has some limitations, such as low spatial resolution due to private network infrastructure, compromised security, energy requirements, storage issues, and high maintenance and installation costs.

Smart Monitoring
Due to the spatial limitations of WSN technology, sensor nodes are monitored through a local server. Thus, global access to individual nodes in such networks is impossible. To address this issue, researchers resorted to using IoT technology, i.e., smart monitoring. In such technology, each node can directly send data to an IoT cloud server [79], or nodes may also forward sensors data to a master node, subsequently transmitting it to the IoT cloud server for further processing, analysis, etc. Moreover, the concerned authority or end-user may also have direct access to each node and may thus control its functionality whenever needed.
IoT technology involves portable sensors, computing devices, and the internet and communication infrastructure to control things (e.g., motor, patient, and robot) from any corner of the world, ideally with no spatial limitations. Smart systems have potential applications in smart cities, municipal waste recycling, aquaculture, agriculture, health and care, education, flood monitoring, and other areas [51,80,81]. WSN is a subset of IoT [82][83][84]. Figure 2 illustrates the block diagram of a typical IoT-WST. In general, it comprises four basic units: (i) Sensors node unit (SNU), (ii) Gateway unit (GU), (iii) Cloud server unit (CSU), and (iv) User interface unit (UIU). Briefly, the SNU captures sensors data (e.g., water level and leakage), reconditions and processes it, local displays are updated accordingly and then sent to CSU through a Hotspot (local Wi-Fi), ethernet channel, or GSM/GPRS modem. The GU is responsible for the communication between SNU and CSU. Almost all internet service providers currently facilitate their customers through the hired cloud servers and other facilities whenever needed [79]. Today, third parties offer cloud servers for many IoT applications [79], e.g., Ubidots, Blynk, and Adafruit. IoT developers can more comfortably develop an extensive range of IoT products using commercial cloud servers for many useful applications, e.g., health, automobiles, water monitoring, and aquaculture. Some major highlights of this technology are as follows: 1.
Reduced Cost: As it uses the existing communication infrastructure of the internet, the overall cost for the system's development has been reduced, e.g., no personal communication network is generally required. 2.
Higher Spatial Resolution: As its backbone is based on the internet, its spatial resolution is ideally infinite. It implies that monitoring water storage tank is possible from any corner of the globe wherever access to the internet is possible.

4.
Lowered Energy Requirement: While shedding complex computations (heavy load) to cloud servers, sensors nodes could be in the relaxed mode, i.e., doing less work and staying mostly in the idle/sleeping modes. Therefore, a small battery could also be used to energize sensors nodes in the energy crisis sites.

5.
Real-time Feedback: Embedded systems centered around IoT technology can supply real-time feedback to its end-users via a short message service (SMS), tweeter, email, and Facebook.

Methodology
As shown in Figure 3, in conducting this survey, the authors followed the PRISMA guidelines [88].
We focused on four research repositories during the identification stage, namely Scopus, Web of Science, Google Scholar, and IEEE Xplore. We found a total of 284 documents. Our qualification criteria included the potential search strings "Smart water tank monitoring", "Smart water level and leakage monitoring", "Smart water pump control", "Internet-of-Things based water tanks", IoT for water tanks", and "IoT-based water tank monitoring". Furthermore, we only focused on the papers published after 1 January 2016. Out of these 284 documents, 123 were found on the Scopus and Google Scholar, 99 on the Web of Science, and 62 were from the IEEE Xplore. There were 39 documents common across these databases, which reduced our set to 206 documents. During the screening stage, the quality of the downloaded documents was decided based on the quality assessment criteria proposed by [90,91]. This way, we excluded further 37 documents and downloaded the remaining set of 169 articles through Google Scholar or from the individual journals' websites.
Among the downloaded articles, 53 and 67 were focused on WSN-based water monitoring and IoT-based water quality monitoring, respectively, so we excluded them from our study. The remaining 49 articles concerned specifically monitoring and controlling water leakage, pump, solenoid valve, and water levels. The selection included one book chapter, 11 conference papers, and 37 journal articles and was further filtered to create a pool of papers strongly focused on the underground and overhead storage tanks. As a result, the authors were left with 19 articles, including a book chapter, conference papers, and journal papers.

Smart Storage Tanks: Results and Discussion
Kumar et al. [92] published an article focused on developing a microgrid system to control water tanks at the town level. It aimed to reduce water wastage due to tanks overflowing and leakage and the workforce required to monitor water tanks manually. Herein, the tank-mounted unit powered by a solar panel reads water level in the tank via the Arduino Uno kit. This gadget is made of an 8-bit MCU (Atmega328P) surrounded by several peripherals such as the USB interface, ADC, input/output (I/O) pins, timers/counters, SPI (serial peripheral interface) module, etc.
To detect water level, the authors used an ultrasonic sensor (HC-SR04), which is a complete signal conditioning module. Next, they used a GSM/GPRS SIM900A shield plugged in the Arduino kit for transferring data to the ThingSpeak [79], which is a private IoT cloud server. It can store, analyze, visualize, and find hidden patterns in the acquired sensors data. While some limited resources are offered freely, IoT developers need to pay for the commercial activities if needed.
In addition, its water source unit automatically refills and controls the water level in the tank. The GSM/GPRS SIM900A plugged in Arduino Uno receives commands from end-user via smartphone having installed the IoT App. According to received commands, Arduino Uno turns the water pump on or off through an electromechanical relay. The authors used the Arduino IDE (integrated development environment) to test, simulate, and validate this system. In addition, they also used the ATOM and Ionic framework while developing a Mobile App. The authors developed an algorithm based on Bernoulli's principle to detect water leakage and its corresponding area. While leakage detection mode is active, a user could not consume water from the tank for six consecutive hours. During this mode, the concerned unit takes water level readings every 30 s and sends data to the ThingSpeak for further analysis and investigation.
Though this system is documented well, there is clearly room for further improvement, especially in hardware. For example, the authors could use a single relay unit instead of a readymade module having four such units. In addition, if both tank-mounted unit and water-source unit are in close range of each other, then one GSM/GPRS SIM900A gadget could be replaced with another suitable gadget such as the XBee device, Lora WAN, Bluetooth, nRF24L01, or RF433. This would undoubtedly reduce the system's overall cost because SIM900A relies on an active SIM card, and it uses the telephone company services for data communication. Table 3 offers a brief comparison of contemporary work on IoT-WST.   Nikeeta et al. [93] proposed an IoT-based water management system to reduce water wastage in residential buildings. The authors considered monitoring water level, leakage control, and auto refilling tank. It is centered around the Raspberry Pi 3 Model B+ kit [87]. This kit is based on a 64-bit Quad-core processor, @ 1.2 GHz. In addition, it is also abundant in peripherals such as HDMI port, CSI camera port, USB ports, 40 I/O pins, Wi-Fi/Bluetooth/ethernet, 1GB memory, and more. However, it does not offer any on-chip ADC unit; due to this reason, the authors used an eight-channel, 10-bit ADC chip (MCP3008) while acquiring the relevant sensors data.
To monitor water levels, the authors used a water sensor ( Figure 4). It has two types of metallic layers, i.e., power and sensors layers, isolated from each other and exposed to water. Touching these layers by the water body completes the circuit, and then voltage develops across a high ohmic resistor on this card. This change is read by Raspberry Pi via ADC chip to predict the water level in the tank. Data is then sent to a cloud server, not specified. However, to monitor water leakage in the tank, the authors installed two water flow sensors in the supply pipes of the water tank. The output of these sensors is read via an ADC by Raspberry Pi, and an alert is also generated if there is any significant difference. Though the block diagram of this system tips about the end-user interface module, it is not detailed explicitly. In addition, this article is composed at the abstract level, where some important technical details are also missing. It has the following limitations. Firstly, Raspberry Pi 3 Model B+ 260 (price 260 USD) is costly compared with other IoT kits such as Arduino Nano 33 IoT (price 14 USD) and NodeMCU ESP3266 (prices 24 USD); prices were taken from the Google chrome, dated: 15 September 2021. Secondly, it is clocked @1.2GHz, which is far beyond the requirements of this application. Thirdly, the water sensor ( Figure 4) used here is unreliable; its sensing part is exposed to water, due to which its metallic layers most often get rusty and erode. With this sensor, the resolution of water level is not as satisfactory as it could be obtained using an ultrasonic sensor.
Lade et al. [94] proposed an IoT-based water management system targeting water regulation in offices and buildings. In this study, both water level and tank auto refilling are monitored. This design is based on Arduino Uno, which works as follows: (1) Arduino Uno measures the water level in the target tank using an ultrasonic sensor; (2) after local processing, data is sent to an ESP8266 transceiver being interfaced with Arduino Uno. The ESP8266 is an SoC (System-on-Chip) having an embedded TCP/IP protocol stack necessary for an MCU while accessing Wi-Fi. In addition, it has four general-purpose I/O pins as well. It sends data to the webserver via a Wi-Fi router.
The cloud server compares this data with the preset tank's levels. If the water level is found below a lower threshold, the motor pump is turned on via Arduino Uno; otherwise, no action is taken. In case the motor is already on, the data is checked against an upper threshold. If it is found above the preset threshold, the motor is immediately turned off. Though the hardware used here is quite optimized, it has offered nothing to detect water leakage.
Lakshmi et al. [95] developed an android application for IoT monitoring water tanks. It allows the end-user to monitor the water level in the tank and control water pumps whenever required. This design is also based on Arduino Uno, supplemented with the NodeMCU (ESP8266). Note, the heart of NodeMCU is an ESP8266 transceiver centered around a 32-bit MCU, with numerous peripherals such as a Wi-Fi module, I/O pins, one ADC pin, etc. Figure 5 shows a typical ESP8266 transceiver and NodeMCU (ESP8266) module. In this system, Arduino Uno first measures water level through an ultrasonic sensor. After local processing, data is shifted to NodeMCU for uploading to the Blynk IoT platform [79] through a Wi-Fi router. The authors developed an android application (Blynk App) for end-users' smartphones to monitor water levels and control water pumps. While using Blynk App on smartphones, end-users can easily monitor water levels and turn the pump on and off whenever required. This system has a few limitations. Firstly, it has no provision to detect water leakage. Another drawback is its hardware redundancy. For example, Arduino Uno is an 8-bit MCU, and NodeMCU is based on 32-bit MCU; thus, one of these could be skipped without any loss of generality.
In [96], Parimala et al. proposed a solution to monitor water storage facilities based on IoT principles. In this study, only the water levels in tanks are monitored. Arduino Uno supplemented with GSM/GPRS SIM900A shield is the central part of this system. Uno first measures the level of water in the storage container (e.g., Tank) through an ultrasonic sensor via an ADC pin. Next, it processes this data locally and updates a local LCM. In case of any irregularity, it can also turn on the local buzzer. To update data on the web portal, it uses GSM/GPRS SIM900A. End-users can also inquire about water levels through a smartphone. This system was developed in Arduino IDE, and for the webpage, the designing authors used the unified modeling language (UML). It was also validated on the water in the bottle, tank, and pool. Though its architecture and method are well-explained, it is not the best solution for smart monitoring of water tanks. Authors need to incorporate modules for leakage detection and tank auto refill.
Durga et al. [97] published an article on automatic tank refilling using the IoT addressing the issues such as turning on the water pump when the main water supply and power (electricity) are both available. In addition, they also focused on controlling a situation in which tank filling is in progress when the main supply of water stops or electricity is cut off. The proposed measures may help resolve issues such as a DRY-RUN motor. If electricity is in cut off, a relevant notification is initiated to its end-users, allowing them to make an alternate arrangement if possible.
This system is energized by a power bank made of several dried DC batteries. First, Arduino Uno checks the water level in the tank through an ultrasonic sensor. If the water level is above the maximum threshold, no action is taken, and the status is updated on the local LCM and in ThingSpeak IoT platform via GSM/GPRS SIM900A. Otherwise, it first checks the availability of electricity and the presence of water in the main supply pipes using a water flow sensor. If both entities exist simultaneously, the system starts filling the tank; otherwise, it notifies end-users about this anomaly. In addition, this notification is also updated on ThingSpeak and the local LCM.
To summarize, the authors presented a workable idea to prevent the motor from running when the main supply has no water and notify the end-users through an SMS in case power is in cut off mode. However, this system does not consider water leakage.
Daadoo and Daraghmi [51] worked on smart water leakage detection in homes and buildings and monitored water levels and storage tanks auto-refill, which is centered around the Arduino Mega2560 kit [86]. This gadget is an advanced version of Arduino Uno. It is based on an 8-bit MCU, offering relatively more features. To communicate wirelessly between a smartphone and Arduino Mega2560, the authors employed the SIMCOM SIM900. They used US-020 (an ultrasonic sensor) while monitoring the water level in the overhead water tank. In addition, they also used the ULN2003 chip to control the solenoid valves.
To detect water leakage, the authors installed multiple water sensors along the water supply pipes running to the garden, living room, bathroom, master bathroom, kitchen, and main bathroom. To fill the water tank, they used a high-quality DC micro diaphragm pump. To monitor water leakage, level, and tank refill, they developed an android application for smartphones. The ATmega2560 reads the water level using an ultrasonic sensor. A preset threshold is used to decide when to turn on the motor to refill the tank and forward an alert to end-users. In case any water leakage is detected, the system shuts off the corresponding water supply or other venues through the solenoid valves. The event is also reported to end-users. Though this system demonstrated optimal results during experimentations, it has some limitations. For example, water sensors used for leakage detection are not reliable because of the reasons mentioned earlier. In addition, it does not monitor water leakage.
Jaiad and Ghayyib [98] developed an IoT system for monitoring water levels, tank auto refill, and water theft. In this system, the authors monitored refilling an overhead tank from an underground reservoir via an electric motor interfaced with an electromechanical relay. In addition, they also monitored water theft or significant leakage in supply pipes using water flow sensors. To monitor water levels at discrete levels, the authors installed four water sensors ( Figure 5) at different points in the tank. Similarly, they used two water flow sensors installed in main supply pipes to detect water supply cutoff, leakage, or water theft. All sensors are read by the Arduino Nano card [86] centered around ATmega328, an 8-bit MCU. While similar to Arduino Uno, this card is specifically customized for smallersize products. Data from Arduino Nano is transferred to the Raspberry Pi2 card [87], which is centered around a 32-bit CPU, i.e., 900 MHz BCM2836 Quad-core ARM CortexA7, with 1GB RAM, micro-SD card, USB, 40 I/O pins, etc. Raspberry Pi2 updates a local LCM and shifts data to the Adafruit IoT platform [49] through the GSM modem. Data is stored, analyzed, and visualized in this cloud server using the readymade visual widgets.
In case the water supply is shut off or water in the supply lines is reduced to a low level due to high leakage or illegal connection to pipes, the difference in the output of water flow sensors is detected by the Arduino Nano card. For water control, the authors used the solenoid valves. A major disadvantage of this system is its hardware redundancy. The authors involved two processor-based kits in conducting this simple task. Since data is analyzed in the Adafruit IoT platform, there is no need to involve Raspberry Pi2 [87].
Sowmya et al. [99] proposed an IoT system for monitoring water tanks. In brief, the authors used an ultrasonic sensor to gauge the water level in the tank. To read water levels, they used the Raspberry Pi3 Model B+ kit [87]. As mentioned earlier, this is a complete System-on-Chip (SoC) centered around a 64-bit microprocessor. Utilizing the system's built-in Wi-Fi, the sensors' data is transferred to the ThingSpeak IoT platform [79] via a local Wi-Fi network. Authors developed a dashboard in the ThingSpeak server to provide visual displays for the water level, accessible by end-users with the ThingSpeak App installed on their smartphones. Data on the dashboard is refreshed every two seconds. The article shares little in terms of technical detail and focuses mainly on the water level monitoring, offering no consideration of the leakage detection and tank auto refilling.
Pawaskar et al. [100] proposed a hybrid of GSM and a web-based solution for monitoring the water level in tanks. In this article, the authors used an 8-bit MCU (Atmel89C51), GSM SIM800, magnetic float sensors (Figure 6), water pump equipped with actuators, etc. To measure the water level at three discrete levels, the authors installed three magnetic float sensors at different positions in the water tank. As shown in Figure 6, the magnetic float sensor has a movable annular object, which can move towards the wiring-end when water in the tank arises. If water does not touch this object, then the switch remains in its closed state, and the two electrical wires show continuity; otherwise, the circuit remains open. While this sensor is robust against corrosion and biofilms (deposits such as fungi), its main flaw is poor resolution. For every discrete level in the tank, one such unit is needed. An ultrasonic sensor would be its best fit. While monitoring water levels in the tank and controlling the water pump, the authors developed a mobile application using the MIT App inventor [109]. This tool is essentially a web application, an IDE initially developed by Google and now maintained by the Mas-sachusetts Institute of Technology (MIT). In brief, this tool allows developing applications for smartphones using the web browser and a connected phone or emulator. The main limitations of this scheme involve not using the proper cloud services to analyze sensors' data and not monitoring the water leakage.
Gupta et al. [101] proposed an IoT-based system for monitoring and controlling water consumption in residential buildings, organizations, and corporations, where the target area is divided into different blocks (e.g., A, B, C, . . . , and Z). In each block, tanks are labeled according to building numbers, e.g., Building1, Building2. For each tank, the authors used the NodeMCU (ESP8266) and an ultrasonic sensor to monitor the water level and share data with the server. Every node is equipped with NodeMCU and local Wi-Fi.
To record, analyze, and visualize data, the authors developed numerous databases in the SQL (Structured query language) server. Water in each tank/building is controlled by a motor installed in the maintenance block. Each motor is actuated through an electromechanical relay. If the water in the tank falls below a predefined threshold, the server sends a command to the maintenance block to turn on the corresponding motor. The motor switches off when the respective tank is full. Though this is a good scheme, it has some limitations; the system does not detect water leakage from the tanks. In addition, the authors did not supply specific technical details, raising the question of how the system could be reimplemented if required.
Dissanayaka and Wickramaarachchi [102] proposed NodeMCU (ESP8266) based system for monitoring water tanks. While an ultrasonic sensor monitors the water level, the tank is auto refilled through NodeMCU interfaced with a motor through a relay module. For sending data to the cloud server, the authors utilized the built-in Wi-Fi function of NodeMCU and a local Wi-Fi router. The water level data, motor on and off status, and the volume of water in the tank are visualized in the Fusion-Chart package, which is accessed through the Firebase real-time databases and tools such as the CSS, HTML (Hypertext Markup Language), and JavaScript. The authors utilized the following Equation (1) to compute the water volume in a circular tank: with L Water = h Tank − L Empty . Here, V Water , πr 2 , r, L Water , h Tank , and L Empty represent the volume of water present in the tank, tank cross-sectional area, tank radius, current water level, tank height, and the total empty portion of the tank, respectively. The same Equation could also be used for the rectangular or other types of tanks but with slight modifications according to the tanks' structure. End-users can also monitor water tanks via the webpage, which is accessible through smartphones having connectivity to internet. This system did not consider the issue of water leakage. Natividad and Palaoag [103] proposed an IoT-based model emphasizing providing a low-cost and efficient system to improve water distribution for communities. Its overall model includes two stages: (i) client site and (ii) control room. In brief, authors in this model tried to monitor water level, auto-refill tanks, regulate water pressure in supply pipes to avoid leakage and burst, and give full access to the control room.
As presented in Table 3, the water level in tanks is gauged through the ultrasonic sensors, pressure in the supply pipes via a 5V analog pressure sensors, water in pipes is regulated through solenoid valves, and the tank is refilled via an electric motor actuated by electromechanical relay. On the client side, all sensors are looked after by Arduino Uno supplemented by a GSM SIM800 modem to report data to a control room server. The authors configured Raspberry Pi3 Model B+ as a server in the control room, equipped with an LED (Light Emitting Diode) monitor, USB mouse, keyboards, and internet/GSM capabilities.
First, Arduino Uno reads all sensors via its I/O ports and transfers data to the control room through a GSM modem. In addition, it can also refill the tank if the water level falls below a lower threshold. On the other hand, the server has also been equipped with the Fuzzy logic algorithm to make a better decision, e.g., refilling a tank, regulating water flow in the pipe, and sending alerts to the overseer or end-users. To summarize, this model is well-planned and provides a good solution to control and monitor water distribution in towns, organizations, corporations, etc. However, a significant limitation of this design is the inadequate leakage detection or control method. Authors only regulate water pressure in the supply pipes to avoid bursts and leakage.
Shah et al. [104] proposed an IoT-based system for monitoring water tanks using an android application. The NodeMCU first fetches water levels from the Firebase IoT platform [49] using a local Wi-Fi router. Next, it gauges the water level in the tank through an ultrasonic sensor. If the water level is below a preset threshold specified in the Firebase server, the ESP8266 turns the water pump on via an electromechanical relay. The water tank is automatically refilled according to the preset threshold set in the Firebase cloud server by end-users using smartphones. To update the parameters on the cloud platform, the authors used the MIT App Inventor to develop an android application for smartphones. While the end-user has full control over the water tank, this system has no provision for water leakage monitoring.
Gunde et al. [65] proposed an IoT system for monitoring water distribution in the campus setting. The main interest of their work is the control and monitoring of the overhead tanks through the IoT. The system programming, testing, and validation were conducted in the Python2 and Flask platforms. The authors also developed a dashboard to display the water level in the ThingSpeak IoT platform. In addition, end-users can watch the water level in the tank using their smartphones. This system functions as follows. First, Arduino Uno reads water levels through an ultrasonic sensor. If it is below a lower threshold, the motor turns on; otherwise, it stays off. Sensor's information is shifted to Raspberry Pi kit through the serial port, which uploads this data onto ThingSpeak IoT-Platform using a local Wi-Fi router. End-users can also receive SMS alerts and watch the water in the tank through the ThingSpeak App installed on their smartphones. In terms of its shortcomings, this system does not monitor water leakage detection and comes with a higher cost. The authors used two kits for this simple task-the Arduino Uno and Raspberry Pi-each centered around a processor. However, this redundancy could be removed to reduce the system's overall cost.
Malche and Maheshwary [105] proposed an IoT system to monitor smart villages' water levels. This system centered around the Arduino Uno R3, supplemented with an Arduino GSM shield. For data storage and analysis, the authors used a hybrid of the Carriots IoT platform [49] and the Freeboard, a type of dashboard offering numerous widgets for the visual presentation of sensors' data.
With Carriots, end-users can receive SMS, emails, or tweets. The system sends data to the Freeboard in the JSON format to visualize it according to the chosen widgets. The REST API was used to set up communication between Carriots and Freeboard. While the authors used a simple liquid level-sensor with limited range, they also suggest a submersible pressure transducer (e.g., APG series PT-500-P1 level transmitters) capable of measuring water levels as deep as 450 feet.
Wadekar et al. [106] presented a smart solution for water management in overhead tanks, especially in urban areas. This system is centered around the Launchpad, CC3200MOD Simple Link, based on a 32-bit RISC ARM processor. While capable of running at 80 MHz, this processor has many on-chip peripherals such as Wi-Fi module, I/O pins, ADC, UART (Universal Asynchronous Receiver Transmitter), and I2C (Interintegrated circuit). It is a suitable choice for many IoT applications.
The authors used four NPN transistors (BC547) configured in the switch mode to detect the water level in the tank through stranded wires tied to their base terminals. They inserted an electrical stranded wire tied to the positive terminal of a battery deep into the tank. In addition, they also installed four electrical stranded wires at different points in the tank, where each wire is bonded with the base terminal of a transistor. When the water level rises, the wires connected with transistor bases come in touch with positive voltage through the water as conducting media. This act triggers the concerned transistor to turn on. These states are displayed locally through four LEDs.
To visualize and store the data on the cloud, the authors used the Dweet.io IoT platform, with the JSOUP for API. In addition, they developed an android application for the smartphone to view the water level in the tank. Users have no control of the on/off motor switch, nor can they configure the water level. System programming was completed in the Energia IDE. In terms of its limitations, the system has no strategy for monitoring water leakage and can monitor only four discrete water levels in the tank. Most significantly, the electrical stranded wires used to detect water levels were undoubtedly a cost-effective short-term solution but may soon suffer from the biofilm effects and erosion due to the organic and inorganic materials present in water. In addition, the authors directly inserted a reference electrical wire tied to a positive battery terminal which may cause overconsumption of the battery energy.
Charles et al. [107] proposed an IoT-based system integrated with the LABVIEW software to monitor water levels in tanks for large areas.This system can monitor a number of tanks simultaneously. The authors used an ultrasonic sensor for each tank to detect water level and NodeMCU for transferring sensors data to the Google cloud server [49] via a local Wi-Fi router. In the Google IoT platform, data is stored and analyzed. In addition, each tank is equipped with a water pump and a solenoid valve. While controlling water level and refilling tanks, authors developed a separate station centered around the National instrument data acquisition card (NI DAQ (USB2009)). This card is interfaced with a desktop PC through the USB port. For this station, programming was performed in LABVIEW, a graphical programming media. The NI DAQ has many analog and digital I/O pins to which each tank's solenoid valve and water pump are connected.
First, NodeMCU reads the water level from the tank through an ultrasonic sensor, reconditions and updates data into the Google IoT platform. Next, the main station fetches data from the Google IoT platform and determines if any valve/motor needs to be served. While using LABVIEW and NI DAQ is a promising idea, the authors also introduced significant redundancy in the overall system hardware. Each tank is equipped with NodeMCU, a perfect choice for many standalone IoT applications because it has numerous futures such as the Tensilica 32-bit RISC CPU Xtensa LX106, ADC, DAC, digital I/O pins, SPI, I2C, flash memory, SRAM, USB interface, and the PCB antenna. Therefore, there is no need to control the valve and water pump using the NI DAQ card. Besides, they did not monitor water leakage and could not provide access to end-users, except via the main station only.
Asif et al. [108] proposed an IoT solution to monitor the household network of water. In this article, the authors monitored three parameters: the water level, the tank auto-refill, and water leakage. In addition, they also monitored the ho clean the tank was through a hybrid of LED and a light-dependent resistor (LDR) installed inside the tank. For leakage detection, they installed water flow sensors supplemented with NodeMCU at each branch of the water distribution system. In addition, they used an ultrasonic sensor to monitor water levels in the tank. Data is recorded into the ThingSpeak IoT platform using local Wi-Fi, and end-users can access it using smartphones. Water consumption and leakage detection are supervised using sensors data fusion and machine learning (ML) schemes. For example, data from water-flow sensors installed near the water tap and ultrasonic sensors could be used to predict water consumption.
While developing an ML scheme for leakage detection, authors first collect data from the sensors. Then, assuming no leakage occurred for some definite time, upload the data to the ThingSpeak IoT platform, and train the model to infer the decision-marking parameters. In this case, the authors used an implicit relationship between the water height in the tank and water flow in pipes. If leakage is found, the system informs the end-users via smartphones. To monitor water usage, data from sensors is collected and uploaded into the ThingSpeak. Full and empty tank status is also reported to end-users via mobile application.
In addition, data from the LED/LDR circuit is used to predict the tank dirtiness; status is reported to end-users.

Recent Technologies and Techniques
This section presents several well-known technologies and techniques commonly used in the IoT-WST.

Water Level Monitoring
Monitoring the water level in the tank is considered an essential parameter in smart monitoring of water storage tanks. As both cemented and portable tanks exist in different capacities and heights, precise water level measurement may be challenging due to the sensors' range limitations. As per contemporary literature [65,69,[101][102][103]107,109], some commonly used devices for level monitoring are a water sensor (Figure 4), magnetic float sensor (Figure 6), ultrasonic sensor (Figure 7a), and light detection and range (LIDAR) sensors (Figure 7b). While monitoring the water level in tanks, developers also involved discrete type sensors (e.g., water sensor, Figure 4) that are generally installed at different points inside a tank. As mentioned earlier, in this case, the spatial resolution of the water level is not granular. More sensors need to be installed at different points to enhance the resolution, which is likely an expensive task and may increase the overall burden of maintenance and product cost.
To resolve this issue, researchers involved the distance (proximity) sensors. Such sensors use different technologies such as infrared (IR) triangulation, laser, ultrasonic, LED-TOF (light-emitting diode-time-of-flight), and others. Notably, the choice of the sensor strongly depends on the model of the target application. These sensors offer a range of different properties, e.g., resolution, frequency, field-of-view (FOV), transmission-reception durations, installation, and costs. To detect objects in proximity, these sensors first send waves (e.g., laser, infrared, or sound waves) and then wait for the reception of waves bounced back by the target objects. On reception, the distance of the target objects is gauged based either on the intensity or time taken by the waves to hit objects and come back to the source. Figure 7a-c show typical models of the ultrasonic, TF-mini-LIDAR, and a fully integrated proximity sensor (VCNL36826S), respectively. Though each of these sensors can provide acceptable spatial resolution while monitoring water level, the range of LIDAR is relatively higher, as highlighted in Table 4. As LIDARs are costly, these devices are only recommended when the height of a water storage container is more than 4 m. To summarize, proximity/distance sensors are reliable tools for various applications requiring fast and accurate measurement, positioning, or discovery of solid or liquid matter.

Water Leakage Monitoring
In water-scarce countries, water is often stored in the overhead or underground tanks, filled through the water supply lines from a local municipality, tube wells, or bores. It is observed that water is often wasted from the tanks, supply lines, or tubes due to the aging infrastructure, misuse, or some other technical issues. In addition, water is also wasted through lack of attention and care, causing overflowing of water tanks. The following briefly explains some commonly used water leakage detection techniques:

•
Portable Sensors: In numerous studies [59,60,110], water sensors were used ( Figure 4) to detect water leakage. Generally, one sensor is sufficient for each potential point where water leakage is strongly expected to occur. As mentioned earlier, this type of sensor has two sets of parallel naked metallic layers, where one set is connected with a positive voltage terminal and the other one tied to the negative voltage terminal of the power supply. When its sensory part meets water, this event changes the analog output of this sensor.
Moreover, IoT developers [59,60,110] also utilized water moisture sensors ( Figure 8) while detecting water leakage. As shown in Figure 8, these are of two types. The one shown in Figure 8a is not sufficiently reliable because it may rust when its naked metallic layers are exposed to water. The second type (Figure 8b) is more reliable as its sensing unit has no direct exposure to water. Figure 8. (a,b) a typical YL-69 water sensor and a capacitive soil moisture sensor, respectively [86], Courtesy of the Shenzhen Haiwang Sensor Co., Ltd., China.

•
Water Flow Sensors: Figure 9 shows typical hall-effect-based flow sensors, which are used in many applications such as measuring the flow of water and oil, DIY coffee machines, water vending machines, etc. These sensors come in different sizes and ratings, per the system's requirements. The main components of a flow sensor include the hall-effect sensor, turbine wheel (also called rotor), and magnet. When water flows through the valve, it rotates the turbine that produces the magnetic field. This change in the magnetic field is sensed by the hall-effect sensor, producing square pulses.
To detect water leakage, developers use a set of two flow sensors that are installed at both starting and endpoints of the target pipe. To monitor these sensors, developers use IoT devices (e.g., BBC Micro-Bit, ESP32, NodeMCU, ESP8266, and Arduino Nano 33 IoT). These devices measure the quantity (liter per hour or cubic meter) of water flowing through flow sensors at both points and then communicate data to each other or a master unit using GSM module, Wi-Fi, Xbee, Bluetooth, LoraWAN, nRF24L01, RF334, or ethernet [64,100,111,112]. If both readings stay approximately the same, it implies no water leakage or theft. Otherwise, either water from the concerned pipe is illegally diverted, or some leakage occurs. To summarize, this technique seems workable because issues related to hidden water supply pipes (e.g., pipes buried in walls) could be monitored more conveniently. • Digital Signal Processing: In addition to the above-mentioned schemes, researchers also devised numerous digital signal processing-based techniques to detect water leakage [51,67,68,80,108]. Whenever an abrupt leakage occurs in the supply line, this drastic change produces a spike in a digital filter (e.g., Kalman filter). This spike is a sign of water leakage.
As highlighted in Section 3, leakage from the water tank could be monitored [50] first by suspending the water supply from the tank to all the sinks for a finite duration. During this period, the water level in the tank is sampled at regular intervals. In this case, any difference in two consecutive samples would be an important indicator of water leakage from concerned tanks. Though this is a workable idea, its drawback lies in blocking water supply to relevant consumers.

Tanks Auto Refilling
Automated refilling of water storage tanks is a feature of IoT-WST. As highlighted in Section 4.1, the water level in tanks is monitored using portable sensors generally interfaced with computing devices, e.g., NodeMCU, Arduino Uno, and ESP8266 Transceiver.

•
Dry-Run: This means the water pump or motor attempts to refill the tank, but water is not available in the source (e.g., supply line from local municipality). This state should be avoided because it may increase the electricity bills. • Electromechanical Relays: Relays are often utilized to energize water pumps or motors. As shown in Figure 10a, the layout of each device is printed on its casing, or the device may have a transparent casing through which designers may note its connection. For more details, readers are recommended to consult the technical specifications of target relays on its vendor's webpage or released documents. Figure 10. (a-c) Some typical electromechanical relay, SCRs, and TRIACs, respectively [75,113], Courtesy of the Zhejiang NCR Industrial Co., Ltd, China; and EASTRONIC THCHNOLOGY CO., LTD., China.
• Thyristors: As relays are electromechanical devices, their performance is defined in terms of switching. In addition, the metallic contact of inexpensive relays (except vacuum type relays) may also become damaged due to the electric arching.
To cope with these issues effectively, IoT developers should use thyristors (e.g., siliconcontrolled rectifier (SCR) and TRIAC), Figure 10b,c. As these devices are based on semiconductor technology, they should function optimally for a long time if appropriately utilized. Notably, controlling water pumps or motors using SCR/TRIAC is complex compared with relays (refer to the proper datasheet of each device before its application).

Challenges and Trends in IoT
Both software and hardware platforms have advanced over the past decades, creating a challenge for IoT developers to select appropriate media while implementing a target project. Extensive experience or a quick but comprehensive review of contemporary solutions and developments in this area may help resolve the difficulty.
Due to the latest advances in the semiconductor industry, our world is now dominated by electronic devices, e.g., portable sensors, tablet PC, cellphones, Wi-Fi, etc. In addition, electronic devices also significantly benefit from miniaturization and improvement in silicon technology, power consumption, portability, and reliability. As developing a hardware system involves cost, IoT developers should select the best choice for the target hardware so that the balance between cost and performance is not a compromise. In addition, software platforms have gone through significant advances, improvements, and modifications over the past decades. For example, new languages and software development platforms have been launched over the past several decades. The following elaborates a few typical challenges IoT developers are facing today.

S. No: Development Kits (Significant Features of Kit, Not Processor) Comments
Communication: Wi-Fi with on-board antenna; it supports Station/SoftAP/SoftAP + Station wireless network mode built-in security: IEEE 802.11 standard security features all supported, including WFA, WPA/WPA2, and WAPI; Secure boot; Flash encryption 1024-bit OTP, up to 768-bit for customers; Cryptographic hardware acceleration: AES, SHA-2, RSA, elliptic curve cryptography (ECC), random number generator (RNG).   A large number of contemporary development kits, e.g., Arduino Uno R3, Arduino Mega2560 [86], are centered around the 8-bit processor (more technically, these processors are called microcontrollers). These kits are more suitable for the less complex computational designs; they cannot be expected to run any AI or ML algorithms because they work at the lower frequency, e.g., 16MHz (see Table 5). In addition, most of these kits have no Wi-Fi, Bluetooth, and GSM/GPRS modules onboard or on-chip to shift data directly to the target cloud server if required.
To cope with these limitations, such kits are usually equipped with a suitable module such as the ESP8266 transceiver, GSM/GPRS module, Zbee, Bluetooth, and others. Moreover, such kits offer less memory, prompting developers to use flash memory or SD Cards to store valuable data. Notably, most of these kits are best suited for many embedded applications such as automobiles and home appliances and are abundant in numerous peripherals, including ADC, DAC, timer/counters, touch pins, PWM pins, UART, I2C, and SPI, among others. Though 16-bit processor-based kits are relatively better than 8-bit kits, they are not suitable for modern designs that inherit complex algorithms such as AI and ML.
There is a strong trend of using 32-bit processor-based electronic development kits in the latest IoT design and development. In the context of current IoT requirements, these kits are usually equipped with numerous onboard communication modules such as Wi-Fi, Bluetooth, low energy (BLE), LoraWAN, Zbee, or GSM/GPRS. Using these modules, these kits can send environmental data directly to the cloud server via a local gateway or cellular network. Figure 11c shows Arduino Due, which is centered around a 32-bit processor. Compared with Uno and Mega, this kit is extremely rich in peripherals such as digital I/O, PWM, ADC, DAC, UART, SPI, I2C, and memory, among others. In addition, it runs on 84MHz, which implies this device is suitable for the less complex computational AI/ML applications. This device has no module to send data directly to the internet, so it is equipped with an ESP8266 transceiver or a GSM/GPRS module. However, it is less attractive than its siblings (e.g., Arduino Nano 33 IoT (Figure 11d), now well-equipped with the needs and requirements of modern IoT designs.
The demand for IoT products increases exponentially due to its vast applications, e.g., smart homes, villages, and cities; medicine, agriculture, water monitoring, wearables, spying devices, vehicle tracking, and children monitoring. Numerous stakeholders are now competing, making their devices smarter, more affordable, reliable, and accessible to all customers. In this respect, the ESPRESSIF SYSTEMS (SHANGHAI) CO., LTD. [85] has launched many electronic devices and kits highly suitable for AI, ML, and IoT applications. For example, ESP8266 transceiver, NodeMCU (8266), NodeMCU (ESP32), ESP32SCAM, TTGO T-Call ESP32 with SIM800L GPRS Module, TTGO LoRa32 SX1276 Board, and ESP32 TTGO T-Beam V1.1 are just some of the products are based on the ESP devices.
As shown in Table 5, ESP devices are abundant in peripherals (e.g., ADC, DAC, UART, SPI, I2C, Touch pins, Wi-Fi, Bluetooth, BLE, timers, counters, and memory). The majority of the ESP chips have dual processor cores, which can operate at higher clock frequencies such as 80~240 MHz.
Most RESSIF technology-based products are well-suited for modern IoT, AI, and IoT applications. For example, the TTGO T-Call ESP32 with the SIM800L GPRS module has Wi-Fi, Bluetooth, BLE, and an onboard GSM/GPRS to send environmental data to cloud server either via Wi-Fi, Bluetooth, BLE, or cellular network using GSM/GPRS module (enabled with an active SIM). The TTGO LoRa32 SX1276 board can send data to other Lora-enabled devices over relatively long distances, which could not be achieved using a Wi-Fi router, Bluetooth, BLE, or Xbee modules. Similarly, the ESP32 TTGO T-Beam V1.1 board has an onboard GPS module, which could be utilized to track any target thing.
Most importantly, ESP32 based kits could be programmed wirelessly (i.e., over-the-air (OTA) programming). These kits can be used as clients or in the server mode supplying services to other similar devices. Moreover, the developers can easily make a network of these devices to share and collect data from the environment if necessary. Last but not least, the ESP products are highly optimized for energy consumption. Using software routines, developers can put these devices into the idle, sleeping, or deep sleeping mode whenever needed.
Recently, the BBC Micro:bit has gained enough considerations from hobbyists, developers, and scientists worldwide [114]. Similar to ESP products, this kit is also based on a 32-bit processor that runs at 64MHz. These kits are abundant in peripherals such as SRAM, Flash, I/Os, ADC, DAC, I2C, and MAG3110 3-axis magnetometer. No doubt, this silicon crab offers strong performance, but its relevant forum and communities seem limited compared with the Arduino products.
In addition to 32-bit devices, there are many 64-bit processor-based electronic development kits, such as Raspberry Pi 4 Model B [87]. No doubt, such boards are more suitable for the IoT, AI, or ML applications, where more computations and throughput are needed locally. Though Raspberry Pi kits are powerful enough, they are costly and require operating systems in the SD cards.
To conclude this section, the authors highly recommend 32-bit electronic development kits (equipped with Wi-Fi, Bluetooth, BLE, Xbee, Lora, or GSM/GPRS) for the design and development of IoT products.

Cloud Servers
In IoT designing, IoT cloud servers play a crucial role. Briefly, the main task of an IoT cloud server is to facilitate IoT developers in storing, analyzing, and visualizing sensors data. In addition, it may also provide complete control over the functionality of the IoT-enabled devices (e.g., water pumps and vehicles) from any corner of the globe. The following elaborates on this aspect of IoT designing.

•
Commercial IoT cloud server: Accompanying the current boom in the IoT-enabled products worldwide is a plethora of contemporary IoT cloud servers [79], such as ThingSpeak, SensorCloud, Blynk, Arduino cloud IoT, IBM IoT, Adafruit io, and others. In general, each platform can process, analyze, and store data. Moreover, most cloud servers have soft widgets for the visualization of sensors data in different formats. For example, in ThingSpeak and Blynk, developers can more comfortably use readymade widgets such as the LCM, buttons, switches, panels for live streaming video data, live tracking of GPS data on Google map, and others. Moreover, in some platforms (e.g., ThingSpeak), IoT developers can also apply ML or AI techniques to data to predict hidden patterns and features. • While commercially available IoT cloud servers are suitable for IoT designs, they have some limitations; thus, the IoT developers may feel reluctant to use them when developing IoT-enabled products. First, most of these platforms are not cost-free. While using limited resources, the developers may still need to pay the license fee for commercial activities. Second, any valuable data is also in the hands of a third party and may not be secured against hacking hazards. Third, any malfunction or seizure of such platforms may strongly affect the reputation and work of the IoT developers. Finally, there may also exist some unwanted delays in the communication.
For technical comparison and explicit details, readers are advised to consult the survey of IoT cloud servers [79], which provides instructive details. • Private IoT cloud server: In the context of hazards involved in using commercial IoT cloud servers, developers are highly encouraged to develop their own webservers if possible. Due to a large IoT community, developers can easily custom-design cloud servers for their products, thereby having easy access to relevant books, websites, and technical documents. For example, GitHub is the largest and highly advanced development platform globally [115]. Many companies and software developers build, ship, and maintain their software-related material using this platform. In addition, many IoT development IDEs, such as Arduino cloud IoT, provide sample codes for the webservers to develop electronic gadgets, such as Arduino Nano 33 IoT, ESP8266, and NodeMCU (8266), and other numerous well-known electronic gadgets.

Cyber Security
In general, the majority of the IoT-enabled embedded products (e.g., smart TV) are usually not secure against cyber assaults [116]. The Forescout Research Labs in 2020 published a comprehensive report on enterprise IoT security [117]. This report involved data from eight million IoT-enabled devices deployed across the government, financial services, manufacturing, healthcare, and retail sectors. All the information was gathered from the Device Cloud. The report indicates that: (i) medical devices, VoIP phones, networking equipment, and smart buildings are the riskiest IoT device groups. (ii) Around six of the top ten riskiest IoT device types fall into categories of networking equipment and medical devices. (iii) Windows-enabled workstations pose a major cybersecurity risk to corporations and organizations, where around 30% of managed devices in manufacturing and about 35% in healthcare run unsupported Windows versions.
To resist cybercriminals, the IoT gateways [118] need to be adapted for secure communication. These gateways perform critical tasks such as protocol translation, security, updating, device connectivity, management, data filtering, and processing. Since end-users use typical mobile Apps (e.g., Blynk) in many IoT applications to monitor and control IoT, security measures should also be considered in this context. Notably, using loose passwords and PINs (personal identification numbers) are weak shields against cyber attackers. Besides, some manufacturers of IoT gadgets also incorporate security measures at the hardware layer, which is invoked whenever secure communication is required [85].

Significant Limitations
As highlighted in Table 6, the IoT application for smart water tank monitoring faces numerous serious limitations [119][120][121][122][123][124][125][126]. The following briefly describes some of these challenges. • False Access Control: It is observed that all IoT-related devices having the same model are generally delivered to end customers with the same default password, such as 'admin' or 'admin123 . In addition, the default settings and firmware are often the same for all devices of the same model. It is also observed that most end-users do not even change these default passwords and settings, thus putting the IoT-enabled systems at risk. In addition, most IoT devices do not have deep layered security. In general, end-user can access these devices using an account or a password, neither of which are enough against seasonal cybercriminals. • Obsolete Software: Most IoT vendors generally do not provide updates to protect IoT-enabled products against cyberattacks. Besides, end-users also ignore updating the IoT-enabled products, which may cause a system breakdown and consequently monetary loss. To avoid these issues, IoT devices must be shipped with up-to-date firmware/software without any known weaknesses. In addition, there should exist update functionality for end-users or developers to fix any vulnerabilities found after device deployment. • Deficiency of Encryption: Whenever an IoT device performs communication in the plain text format, all valuable information exchanged with a target device or backend service could be acquired by a middleman. So, any person capable of obtaining a position on the network path between the IoT device and the terminal node may easily examine network traffic and obtain any sensitive data, e.g., login credentials. Moreover, if encryption is not done completely or is misconfigured, the attackers may gain access to IoT-enabled systems. In addition, encryption should also protect the sensitive data stored on a device (at rest). In this concern, usual flaws may also be the lack of encryption by credentials or storing API tokens in plain text on IoT devices. Other complications may be the usage of poor cryptographic techniques. • Intrusion Ignorance: After being compromised, the IoT devices often keep working as usual from the user's viewpoint. Notably, any power or additional bandwidth usage is generally not identified. It is also observed that most IoT devices do not inherit any alerting or logging functionality to inform end-users of security-related issues. In case IoT devices have these functionalities, the concerned hacker can overwrite or disable them when IoT devices are hacked; the end-user cannot take preventive measures to mitigate the effects of cyberattacks. • Application Weaknesses: To secure IoT devices, it is important to acknowledge vulnerabilities, if any, in the software in the first place. It is observed that software bugs can trigger malicious activity. Cybercriminals can run their own software on IoT devices and gain illegal access to the sensitive information stored on the concerned devices. Though avoiding software vulnerabilities altogether may not be possible, the developers can adopt best programming practices to escape application vulnerabilities, e.g., performing input validation consistently. • Vendor's Security Stance: Whenever software vulnerabilities are detected, it is for the sake of utmost reliability that the concerned vendor finds a proper patch to mitigate their effects. In this concern, the IoT vendors should offer their contact information so that end-users and developers can communicate if any bugs or security loopholes are found. Otherwise, the end-users and developers would not cease using IoT devices in the intended method, resulting in less secure IoT systems. To avoid any catastrophic situation, concerned vendors must cooperate with the end-users and developers, providing frequent updates on the security of the IoT devices and recommendations on how to securely resell or dispose of IoT devices so that the sensitive data is not passed on.

•
Deficiency of Reliable Execution Environment: Every IoT device is generally equipped with a dedicated microcontroller, which is a true computer on a single chip capable of running specific software programs. The cyber attacker may install any malicious programs. For instance, they can install a software routine performing a DDoS attack. While limiting the functionality of an IoT device and the software it can run, the potential for abuse of the device is limited. For instance, the concerned IoT device may be confined to connecting only to the vendor's cloud service. No doubt, this act of restriction may make it unproductive in a DDoS attack because such a device can no longer be able to connect target hosts arbitrarily.
The code that is typically signed with a cryptographic hash should be used to address this issue. As only the concerned vendor has the key to sign software, the IoT device will only run the vendor distributed software. The cybercriminal may no longer run their arbitrary code on the target device.

•
Inadequate Physical Security: Cyber attackers may open the IoT devices and can attack the hardware if they have access to these devices. For instance, hackers can bypass protective software if they can directly read the contents of memory components. After opening up IoT devices, hackers may read the device debugging contacts and perform more fatal tasks. The physical attack may have more impact if it uncovered the device key shared with all IoT devices of the same model; this act would compromise many IoT devices.

• User Interaction
IoT vendors should provide proper documentation and guidelines on deploying their products more securely in IoT-based systems. Users must change the default passwords to help prevent hackers from gaining access to their devices.

Conclusions
Over the past several decades, water resources have been gradually decreasing, becoming scarce in several places worldwide. To cope with this issue, different nations worldwide are now taking serious measures to mitigate the effects of the water crisis. In this respect, smart monitoring of water resources has gained tremendous attention within the research communities.
In advanced developed countries (e.g., USA, UAE, UK, and Singapore), mega organizations, corporations, and municipalities currently use mature, smart water monitoring systems, such as Libelium products. In general, such commercially available products are capable of monitoring water quality, detecting water leakage, and generating utility bills, among other things. No doubt, such products are well-suited for smart monitoring of fresh water. However, they are also expensive and, thus, not easily accessible by individuals living in developing countries. To mitigate the effects of the water crisis, the relevant communities in developing countries are involved in devising affordable and reliable internet-of-things (IoT) based solutions to monitor water resources.
In this context, the authors of this study have gathered helpful information about smart monitoring of water storage tanks, often used for water storage in rural and urban areas. The authors provided an overview of the water monitoring techniques, from traditional ways through the wireless sensors network (WSN) to IoT-based monitoring (smart monitoring). Next, they conducted a critical survey of the contemporary IoT-based monitoring of water storage tanks (IoT-WST). Here, each IoT-WST was critically analyzed along with its potential pros and cons. The authors also elaborated on recent technologies and techniques in the IoT-WST. Within this framework, they considered monitoring water level, water leakage, and auto refill of water storage tanks. Finally, the authors explicitly detail a number of current challenges and trends in IoT-relevant hardware, cloud servers, and cyber security. The discussion provided here offers a valuable contribution to the ongoing efforts to address and mitigate the effects of the water crisis.
For future work and directions, the authors suggest relevant research communities to enhance IoT cybersecurity, mitigate the effects of biofilms, introduce artificial intelligence and machine learning techniques, and optimize the overall system cost.