IoT Based Smart Water Quality Monitoring: Recent Techniques, Trends and Challenges for Domestic Applications

: Safe water is becoming a scarce resource, due to the combined effects of increased population, pollution, and climate changes. Water quality monitoring is thus paramount, especially for domestic water. Traditionally used laboratory-based testing approaches are manual, costly, time consuming, and lack real-time feedback. Recently developed systems utilizing wireless sensor network (WSN) technology have reported weaknesses in energy management, data security, and communication coverage. Due to the recent advances in Internet-of-Things (IoT) that can be applied in the development of more efﬁcient, secure, and cheaper systems with real-time capabilities, we present here a survey aimed at summarizing the current state of the art regarding IoT based smart water quality monitoring systems (IoT-WQMS) especially dedicated for domestic applications. In brief, this study probes into common water-quality monitoring (WQM) parameters, their safe-limits for drinking water, related smart sensors, critical review, and ratiﬁcation of contemporary IoT-WQMS via a proposed empirical metric, analysis, and discussion and, ﬁnally, design recommendations for an efﬁcient system. No doubt, this study will beneﬁt the developing ﬁeld of smart homes, ofﬁces, and cities.


Introduction
Water is essential for life on earth. Yet, numerous countries are facing shortages of freshwater [1][2][3]. This alarming issue strongly motivated them to utilize other available resources instead. For example, Gulf countries are acquiring freshwater from the sea through a tedious desalination process [4,5]. Increased costal industrialization and resulting water pollution, however, is making this process even more challenging. Other countries are processing rainwater to obtain freshwater [6]. However, lately climate change is affecting rainfalls, which is putting into jeopardy this option [7][8][9].
Countries where freshwater is more accessible are unfortunately not safe from water related issues [10][11][12]. Water pollution has been reported for years as a growing concern [13]. For example, the America Clean Water Foundation established the water monitoring day (called the EarthEcho Water Challenge) in 2003 [13,14]. Its main agenda is to spread public awareness regarding water pollution. Both the United States Environmental Protection Agency (USEPA) and World Health Organization (WHO) are constantly providing updates and recommendations on how to cope with the newly detected water contaminants and diseases [15][16][17][18].
On the top of pollution and studies pointing out to global-warming's impact on water resources [19][20][21], the World Water Council (WWC) is predicting a global population increase by 40% to 50% over the next 50 years [22]. This significant growth, in conjunction The rest of this article is structured as follows: Section 2 offers background knowledge to better understand the freshwater crisis. It also reminds important water quality index (WQI), and WHO safe limits for drinking water. Section 3 details water quality monitoring techniques, highlighting the evolution of water monitoring methods from traditional to smart water monitoring, including the related IoT technology and common WQM sensors. Section 4 offers a critical review of contemporary IoT-WQMS for domestic water. All systems have been evaluated via a newly developed empirical rubric, which is mainly based on the WHO standard-parameters of drinking water. Section 5 provides detailed discussion and analysis, with pros and cons of contemporary IoT-WQMS. Moreover, it offers a set of useful recommendations to design an efficient IoT-WQMS. Finally, Section 6 concludes this study. Table 1 shows the acronyms used in this article.

Background
This section provides details about the prominent water concerns (e.g., pollution), water quality, water quality index, safe limits for drinking water, and WQM sensors.

Water Background and Existing Conerns
There is a visual misconception that most of earth is made of water ( Figure 1). While 71% of earth surface is covered with water, this ratio is smaller as compared with its total volume [37,38]. Around 97% of total earth water is available in oceans, which is not directly useful for agriculture, humans, and plants due to heavy salt content [16]. Only the remaining 3% of total earth water exists in the form of freshwater [39]. Unfortunately, around 69% of it is also trapped in polar-icecaps and glaciers. In addition, approximately 30% of it is groundwater. Consequently, around 1% of freshwater is available for humans [37,38]. In addition to its scarcity, freshwater is today under paramount stress due to many challenges such as [40]: High consumption in urban areas; 2.
Heavy consumption in industrial applications; 3.
Used largely in agricultural activities; 4.
Affected by climatic changes due to global-warming phenomenon.
Combined with the uneven distribution of water around the world, a large human population does not have access to safe water. Therefore, thousands of humans die and get affected every year due water-borne diseases such as malaria, cholera, polio, dengue, and typhoid, etc. [41].

Seawater Desalination
Due to heavy salt contents, direct drinking of seawater may cause dehydration in humans, and it may thus become fatal if consumed for longer periods. In many water-scarce countries, freshwater is running short due to drastic urbanization and industrialization growth. However, to overcome this issue, such countries are now acquiring freshwater from seawater through a desalination process, e.g., reverse osmosis [4]. This process basically removes the dissolved salt contents and other minerals from seawater if any. For potable water, minerals are added to get water quality according to WHO/USEPA standards. Water desalination is a costly process, which needs considerable energy, manpower, and funds.

Groundwater Depletion
Groundwater exists beneath earth's surface, which is stored in and moves gradually through the geologic formations (called aquifers) of the sand, soil, gravel, and rocks [43,44]. Water can easily flow through spaces existing in such objects. However, the speed at which water flows from one point to another greatly relies on size of spaces and how well they are linked together.
The literature reveals groundwater exists everywhere around our globe, but its resources are distributed unevenly by nature [37,40]. Is the water table under the earth surface shallow or deep? May its level rise or fall? Answering these questions generally relies on many factors. For example, melting of snow/glaciers and heavy rainfalls generally causes the level of the water table to rise. On other hand, its level may fall due to over water pumping. The term water table means the depth by which voids and fractures in rocks or soil-pore spaces get fully saturated with water (Table 2) [43,44]. Though the water table gets recharged through rains and melting snow, glaciers, and icecaps, it also discharges naturally from the earth's surface at seeps and springs. In addition, water from water table is also withdrawn for the municipal, agriculture, and industrial usage through pumps, bores, and tube-wells. Notably, the level of water table is decreasing significantly in many countries such as India, Pakistan, Oman, and Saudi Arabia [40,43,45,46]. This issue occurs when water is withdrawn from water table at a rate higher than its recharging via precipitation. This act also results in land subsidence, higher pumping cost, water quality degradation, dry wells, and water reduction in lakes and streams as well. Notably, this issue could be mitigated to some extent if public awareness about water crisis is developed. For example, we can save water if we consume less water while taking bath, wash a full machine load of clothes, do not pollute water sources, turn off water taps properly, use a low flush toilet, time watering plants in gardens, use automatic sprinklers to water gardens, utilize rainwater (e.g., watering gardens), report water control agency if any damage to water supply is noticed, utilize wastewater after treatment, and timely repair of any water leakage.

Water Pollution
The liquid water is highly vulnerable to contamination because it can dissolve more substances than any other available liquid can [36]. Water pollution occurs when any harmful matter (e.g., chemical and microorganisms) contaminates a water body (e.g., pond, river). In fact, it deteriorates water quality and makes it toxic [36].

•
Groundwater Pollution: It happens when contaminants (e.g., pesticides, fertilizers, and industrial waste) enters an aquifer. An aquifer is typically made up of sand stones, gravel, or fractured rock [40]. This act makes the concerned aquifer unsafe for human usage. Notably, the removal of such contaminants from groundwater can be very costly and even more difficult, if not impossible. It is observed a polluted aquifer may stay unusable for a relatively long period, probably for thousands of years [40]. Groundwater can spread contamination farther from original polluting point. It happens because it can seep into oceans, lakes, and streams [16,43,44]. • Surface Water Pollution: The USEPA, in a recent survey, reported almost half of rivers and streams, and more than one-third of lakes, in the United States (US) are not suitable for drinking, fishing, or even swimming [16]. It is observed that nutrient pollution (e.g., nitrates and phosphates) is a major contaminant amongst well-known sources. No doubt, all animals and plants generally need such nutrients to grow properly, but its excessive usage in agricultural activities can pollute water resources.
In addition, surface water is also polluted by waste discharge from industries as well as municipal and individual dumps [16].
Moreover, water can also be contaminated by natural pollution. For example, it is contaminated with the minerals (e.g., manganese, calcium, iron, and arsenic) when it passes through the rocks. The major sources of natural pollution include animal waste, volcanoes, silt from the storms, floods, and algae blooms. Collectively, pollution from all sources can result in water contaminants such as pesticides, nutrients, suspended matter, organics, bacteria/virus, heavy metals, turbidity, synthetic chemicals, thermal pollution, petroleum hydrocarbons, and anti-fouling chemicals [32,36]. These pollutants may result in nutrient enrichment and eutrophication, increasing stress to the aquatic life, a decrease in the oxygen level and light availability to aquatic life, and alteration of habitats.

Water Quality
Contaminated water is harmful to humans and can degrade plants and aquatic life [16,32,36]. It may carry microorganisms such as bacteria, virus, and pathogens. According to the WHO [21,41] millions of people die every year due to water borne diseases. Literature indicates more pathogenic microorganisms may emerge and spread via water in the coming future [16]. It may happen because of high population growth, agricultural magnification, climate changes, and increased migration. Another reason as to why these microorganisms may emerge is their ability to develop resistance against disinfectants.
Water obtained from different sources is not mandatory to be pure and free from contagious microbes. For example, freshwater acquired from some sources (e.g., groundwater) may generally be fit for domestic applications. However, it could not be true for other sources such as water acquired from ponds, lakes, rivers, or rains. Due to this reason, it is necessary to monitor water quality continuously so that the spread of any damage to consumers could be prevented timely [19,32,47,48]. In general, water quality is defined as: "The water suitability for a particular application (e.g., drinking), which is based on its physical, chemical and biological characteristics" [20,31,32].

•
Monitoring water quality: Is water flowing out from the kitchen-tap good or bad for drinking? Addressing this query needs specialized scientific measurements to be performed on samples of target water to predict its suitability. In general, water quality is monitored by extracting a set of basic characteristic parameters (e.g., dissolved oxygen, turbidity, and salinity) from a sample and comparing them with USEPA/WHO recommended standards [20,31,32]. Finally, water quality acceptance is accomplished in accordance WHO/USEPA standards for the concerned application. • Online quality monitoring systems: Such systems first collect data regarding critical quality measuring parameters (e.g., physical, chemical, and microbial) of the target water using sensors. Then, these systems analyze the acquired data to detect any possible deviations in water-quality standards. In case an anomaly is detected, these systems may generate an early warning to consumers/authority. These systems can also suggest remedial measures to rectify detected issues if any [20,32]. In addition, they may also predict future trends in water quality using the machine learning (ML) techniques.

Water Quality Index (WQI)
Many stakeholders such as WHO/USEPA are continuously working on developing guidelines and standards related to water quality. Though the list of water quality monitoring (WQM) parameters is very large [16], a limited set of significant WQM parameters is generally utilized to monitor water quality [19,31,35,49,50]. On the basis of such parameters, a water quality index generates a single number expressing the overall quality of water acquired from a target locality at a specific time. The main objective of WQI is to transform complicated water quality data into some understandable form of information.
WQI has been controversial among researchers, which seems a bit logical because a single number alone may not portray the entire picture of water quality. It is because a large number of WQM parameters are generally ignored while computing it. In a broader sense, it basically offers a general idea about the overall water quality. Notably, the WHO generally recommends three common indices [18]: Drinking water quality index (DWQI): It involves all WHO recommended guidelines including microbes.

2.
Health water quality index (HWQI): It involves microbial and health related quality measuring parameters.

3.
Acceptability water quality index (AWQI): It involves quality measuring parameters needed for acceptability only.
In brief, HWQI involves parameters that may have adverse effects on human's health. It is more concerned with consumers' perception of water quality. Its main objective is to assess parameters related to water taste and odor. Notably, it is a relevant index, which involves both AWQI and HWQI. Note, these indices only give an overall picture of water quality, with no guarantee whether it is bad or good against a particular application [16].

Common WQI Parameters for Domestic Water
Communities living around globe use different sets of USEPA and WHO recommended WQM parameters to compute WQI of drinking water [19,32]. The following text highlights some WQI parameters commonly utilized by traditional laboratory-based methods while measuring water quality [19][20][21]: • Total coliform (TC): It includes bacteria usually present in soil, animal and human waste, etc. The fecal coliforms belong to class of TC, which are generally found in feces and guts of humans and animals. The membrane filtration, most probable number, multiple tube fermentation, and minimal medium ONPG methods are commonly used to measure TC. Its unit is the number of organisms/100 mL (milliliter). Coliform bacteria are usually harmless to humans, but its presence is a signal of disease-causing pathogens. Commonly observed symptoms include general flu-type symptoms (e.g., abdominal cramps, fever, and diarrhea) and gastrointestinal upset.

•
Fecal coliform (FC): It is a subgroup of total coliform. Its most common member is Escherichia coli (E-Coli). These are bacteria existing in waste and intestines of both cold-and warm-blooded humans and animals. FC are not pathogenic by themselves, but its presence means other pathogenic organisms may exist. The membrane filtration, most probable number, multiple tube fermentation, and minimal medium ONPG are common methods to measure FC. Its measuring unit is number of organisms per 100 mL. • Total dissolved solids (TDS): It represents remains of both organic and inorganic soluble solids present in water such as magnesium, calcium, sodium, potassium cations, etc. It is highly correlated with salinity because water becomes saline if it increases beyond a minimum threshold. Its major sources include pesticides, sewage treatment, fertilizer, flood water, etc. The gravimetric method is generally used to measure it in mg/L. • Total suspended solids (TSS): It represents the amount of remains of both organic and inorganic material suspended in water. It is correlated with light absorption in water. An increase in TSS may result in more light absorption, which will let water absorbs less oxygen. This act may have adverse effects on aquatic life. The gravimetric scheme is generally utilized to measure it in mg/L.
• Total solids (TS): It represents total amount of dissolved and suspended solids in water. In general, dissolved solids are sulfur, calcium, phosphorous, nitrate, iron, etc. Suspended solids may include silt and clay particles, plankton, algae, etc. It affects water clarity, and its excess can decrease passage of sunlight through water, which in turn affects photosynthesis process of aquatic plants. Due to this act, water will heat up and retain more heat, which may have adverse effects on aquatic life. High concentration of TS may make drinking water relatively indigestible, which may affect humans. In addition, extremely low or high TS may also affect the efficiency of industrial processes using such raw water and wastewater treatment plants. It is measured using gravimetric scheme in mg/L. Major sources of TS are municipal and industrial waste, fertilizers, soil erosion, and road runoff. • Total hardness (TH): It determines suitability of water for domestic or industrial applications. It is the concentration of magnesium and calcium present in water. It is generally measured using a titration method with an EDTA solution. Hardness is given in terms of equivalent quantity of calcium carbonate (CaCO 3 ) in mg/L or parts per million (PPM). Hardwater for humans is not harmful, instead it may be beneficial because it can fulfill the dietary needs of basic minerals such as magnesium and calcium. The major drawback of hardwater is formation of the calcium carbonate when heated. Heating leaves deposits on heating elements and pipes so their efficiency decays.

•
Dissolved oxygen (DO): It represents oxygen solubility in water. Oxygen in water is generally produced during photosynthesis process or absorbed from atmosphere. It plays an essential role for aquatic life. Its access in drinking water is good because it makes its taste relatively better, but it may corrode water pipes. In addition, it is highly important for aquatic life. For example, when its level falls below 5 mg/L, aquatic life goes under stress. An electric meter or Winkler titration scheme is generally utilized to measure it. • Electrical conductivity (EC): It represents water ability to conduct electric current. Though it is not involved directly, but it helps in measuring water ionic contents. This aspect is utilized to measure alkalinity, hardness, and some solids dissolved in water. Specific electrical methods are utilized to measure it. • Chloride (Cl): It is naturally available in water and measured though titration method in mg/L (i.e., milligram per liter). Its excess may not damage humans, but water taste may become saltier if it exceeds a minimum threshold, say 250 mg/L. In addition, excessive Cl may be harmful for agricultural activities. It increases electrical conductivity of water, due to which corrosiveness increases. In metallic pipes, it reacts with metal ions due to which soluble salts are formed. This act also raises the level of metals in water. • Temperature (T): It affects water's chemistry. At higher temperature, the rate of chemical reactions increases, e.g., more minerals from rocks surrounding water, especially groundwater, can dissolve at higher temperature. Due to this act, electrical conductivity will increase. It has great effect on aquatic life because it affects dissolved oxygen and rates of gasses transfer. It is often measured in Celsius. • Turbidity (Turb): It represents haziness or cloudiness of water, which is mainly caused by suspended particles invisible to our naked eyes, e.g., fine organic and inorganic matter, clay and silt, algae, or soluble colored organic compounds [51]. Its unit is the Nephelometric Turbidity Unit (NTU), which is measured using Nephelometer or Turbidity meter. It plays an important role in the overall water quality. Higher turbidity may cause higher risks in humans to develop gastrointestinal diseases.
Additionally, an increase in turbidity means less light for photosynthesis due to which aquatic life may be affected. It may increase water temperature because suspended particles can absorb more heat.
• Potential of hydrogen (pH): Water with pH of 7 is considered as neutral. However, a value from 0 to 6 indicates acidity, while a range from 8 to 14 means alkalinity. Water with pH values from 6.5 to 8.5 is generally safe for human drinking [16]. It is measured using pH electrodes and electrometry. Acidic water is naturally corrosive and soft. Drinking acidic water can cause serious diseases, e.g., diarrhea, kidney disease, vomiting, and liver disease. In addition, it can also leach metals from fixtures and pipes, due to which aesthetic issues may happen, e.g., laundry staining. Drinking alkaline water may also cause serious diseases, e.g., gastrointestinal issues. It may create aesthetic issues such as coffee having a bitter taste. In addition, it may cause deposits in the plumbing and degrade efficiency of electric water heater, heating elements in industry, etc. • Oxidation reduction potential (ORP): It is also known as the REDOX. It is measurement of a substance capability to either reduce or oxidize another substance. In general, an ORP meter is used to measure ORP in millivolt (mV). A positive reading means the substance is an oxidizer (i.e., acceptor of electrons), whereas a negative reading means it is a reducer (i.e., donors of electrons). To kill unwanted pathogens and bacteria in water, generally chlorine having a high ORP is added. Oxidation will attract electrons from cell membranes, bacteria's DNA, and proteins. In addition, oxygen also has high ORP due to which it can disinfect water.

•
Total chlorine (T-Cl): It represents the sum of free and combined chlorine. The levels of T-Cl need to be measured precisely. It is necessary to identify the amount of appropriate solutions, which need to be added to water in order to maintain the residual levels of free chlorine. Numerous municipalities intentionally add chlorine to water to help kill harmful microorganisms (e.g., viruses and bacteria) that could make us sick if ingested. • Free chlorine (F-Cl): It is also known as the free chlorine residual, chlorine residual, or residual chlorine. It indicates the level of water potability. It is the amount of residual chlorine (RC) present in water as a dissolved gas (Cl 2 ), hypochlorite ion (OCl − ), and/or hypochlorous acid (HOCl). A test kit capable to measure free-Cl will show the total amount of Cl 2 , OCL − , and HOCL. Its unit is mg/L. It is generally used to disinfect contaminated water. F-Cl in water is tested through pool test kits, digital colorimeters, or color-wheel test kits. Its presence in water means water is protected from recontamination during storage and free from most disease-causing pathogens.

•
Combined chlorine (C-Cl): It is also known as Chloramines. It represents residual chlorine in water, which is chemically combined with ammonia or organic amines generally found in polluted or natural water body. Ammonia is, sometimes, added deliberately to public water supply through a chloramination process. When free-Cl makes contact with different contaminants, it transforms into C-Cl (chloramines), which is less capable of disinfecting water. Chloramines may irritate the mucous membranes, cause red-eyes and eye-stinging, irritate respiratory systems, and reduce the disinfection power of free-Cl.
As shown in Table 2, most WQI parameters have strong correlation with each other. For example, DO decreases with a rise in temperature and vice versa. ORP gives an indication of FC [48]. Similarly, higher turbidity means higher level of TSS [35].

WHO/USEPA Safe Limits of Drinking Water
WQM parameters commonly used in contemporary IoT-WQMS include EC, pH, Turb, ORP, Free-Cl, RC, TDS, T, DO, sodium, fluoride, manganese, magnesium hardness, calcium hardness, and hydrogen sulfide [20]. Table 3 shows threshold limits of these parameters, which are recommended by WHO/USEPA for drinking water. For optimal values and corresponding effects, developers should consult detailed explanation in [16,17]. For safety, researchers and other stakeholders are advised to strictly adhere to WHO/USEPA safety guidelines of drinking water.

WQM Sensors
A sensor can detect events or changes in its environment and transfer the acquired information to other electronic devices such as embedded microprocessors [52]. WQM sensors are capable to detect chemical, physical, and biological properties of water. It is known WQI contains around 100 parameters related to water quality [18]. Among these parameters, WHO/USEPA recommends a small set of parameters to determine quality of drinking water [19][20][21]32]. This is logical because it is impossible for the commercial market to offer sensors against each parameter. Fortunately, most WQM parameters have a high correlation among themselves (Table 4) [18,19,32]. Based on this logic, commonly used WQM parameters in IoT-WQMS are turbidity (Turb), pH, free-Cl, oxidation reduction potential, dissolved oxygen, electrical conductivity, temperature (T), and E-Coli. Table 4 details some recommended WQM sensors for these parameters, which are available in market. In addition to individual sensors, multiparameter sensors' modules also exist in market [20,21].

Water Quality Monitoring Systems
This section presents an overview of water monitoring techniques from traditional to WSN to smart monitoring.

Evolution of Water Quality Monitoring Schemes
As mentioned earlier, maintaining water quality at a recommended level is highly demanded for humans. In this context, humans have been devising numerous water quality monitoring schemes, which are highlighted in the following text.

Traditional Water Quality Monitoring
In most developing countries, water quality is still monitored using traditional laboratory-based methods [19,21]. It comprises following steps:

•
Manually collecting samples from water source (e.g., lake); • Transporting samples to concerned laboratory; • Performing analysis to detect contamination and microbes if any; • Predicting overall water quality in context with WQI.
Though traditional schemes are still dominant in many developing countries, they have some limitations: (i) specialized equipment/tools/apparatus and expert personnel are generally required to assess water quality, (ii) results can be lost/exchanged with other samples' reports due human-error, (iii) equipment may be obsolete, (iv) developing a state-of-the-art facility and its subsequent maintenance is costly, (v) lack of predicting future-trends and real-time feedback, (vi) properties of water may deviate due to samples transportation delays and (vii), finally, data manipulation errors (e.g., round-off errors) may also occur. Most importantly, longer delays in generating the water quality reports may be disastrous if people keep on using pathogenic water. For example, microbiological analysis may take 24~48 h to quantify fecal coliform bacteria [21,41]. In case of longer delays in getting reports, the consumption of contaminated water may result in the loss of humans.

Enhanced Traditional Water Quality Monitoring
With advances in sensors technology, traditional water quality measuring techniques were slightly improved. In such systems, expert personnel started measuring some water parameters on-site using portable sensors [20]. Though this act relatively improved traditional methods, but majority of above-mentioned issues were still intact. For example, such schemes were still unable to offer real-time feedback about water quality, spatial resolution was limited because data was still collected manually, transport delays, etc. [19][20][21].

WSN-Based Water Quality Monitoring
With further advances in portable sensors, communication and computing technologies, researchers approached towards using WSN technology.
In brief, WSN-based water quality monitoring systems [19,33] work as follows: First, an embedded microprocessor-based gadget (also called node) reads specific water properties using portable sensors (e.g., pH) installed on-site. Next, it processes acquired data locally if required. After that, it transfers data to a main station (e.g., server computer) using a wireless communication media (e.g., ZigBee, Wi-Fi and LoRaWAN), where all required processing and analysis are then carried out. Finally, results are updated, and feedback is sent to relevant consumers and/or water authorities if needed.

WSN and Machine Learning (ML) Techniques Based Water Quality Monitoring
Though WSN greatly resolved some plights of previous systems, these systems inherit limitations, e.g., high energy requirements, compromised security, low communication speed, storage issues, high installation/maintenance costs, etc. In parallel, researchers also involved ML techniques to assess water quality using a small number of WQM parameters and predict about future trends [19,25,56,57]. No doubt, this act greatly enhanced efficiency of the WSN systems, but most of the aforementioned issues were still unresolved such as cost of infrastructure, spatial resolution, etc.

Smart Water Quality Monitoring
Finally, researchers resorted towards application of IoT technology. With IoT, water can be monitored in real time from any location of the world using a combination of portable sensors, digital computing devices, communication media (e.g., TCP/IP protocols), and internet services [58,59]. IoT-based water quality monitoring is also known as smart water quality monitoring [60][61][62][63][64][65][66][67]. These systems have been deployed to monitor water quality for domestic applications [21,68], water used in agriculture [69][70][71] and aquaculture [72][73][74][75], municipal waste recycle [70], etc. In addition, these systems monitor water quality in lakes [76][77][78][79][80], rivers [81], etc. In contrast with previous water monitoring systems, IoT-WQMS aesthetically resolved many issues. The following text highlights its major contributions: • Low-cost: This technology uses existing commercially available communication infrastructure; therefore, the overall cost of developing an IoT-WQMS is reduced. • Increased spatial-resolution: Since the backbone of IoT-technology is the Internet, ideally there should be no spatial limitations. • Low computational-cost: Heavy computational load is generally transferred to cloud servers, e.g., Ubidots IoT-Platform [82]. Due to this act, developers can use any ordinary processor-based node (e.g., NodeMCU (ESP8266) kit) instead of a hi-tech computing device, such as Raspberry Pi 4 Model-B, DE1 SoC FPGA board, etc. [52]. • Low energy-requirements: After shifting heavy computational load to cloud server, the local nodes must perform small tasks and stay mostly in sleeping mode. Due to this act, a small battery could easily operate Sensor's nodes in remote areas.

•
Provision of real-time feedback: These systems can easily provide real time feedback to both end-users and relevant water authority via an SMS, email, Twitter, Facebook, etc. • Improved water quality: Developers can easily integrate analytical tools (e.g., ML techniques) in a cloud server to infer some WQM parameters based on measured values of WQM parameters using sensors. In addition, future water trends could also be predicted using ML techniques [82].  These modules are detailed explicitly in following text.

A Typical IoT-WQMS Model
• SLM: It plays a critical role in the overall efficiency of an IoT-WQMS. It is because all other subsequent modules greatly rely on its output. Therefore, any malfunction (e.g., sensors biofouling) in this module may lead to inaccurate reporting of water quality [20]. Biofouling (called biological fouling) is unwanted accumulation of microorganisms (e.g., algae) on sensors' surface being submerged in water. In general, a typical SLM comprises three submodules: Sensors-module (SLM-SM), Digital-module (SLM-DM) and Communication-module (SLM-CM). Briefly, SLM-SM first reads data from WQM sensors (e.g., Ph). Next, SLM-DM processes data, updates local displays if any and transfers it to the SLM-CM that transfers data to a target cloud server (e.g., Ubidots IoT-Platform [82]) via a local Wi-Fi router or a GSM/GPRS modem. Note, many commercial kits offer SLM-SM, SLM-DM, and SLM-CM modules built-on the same printed circuit board (e.g., Arduino Nano 33-IoT). Otherwise, a communication shield (e.g., ESP8266 transceiver module or DTMF enabled SIM900 GPRS/GSM shield) could also be plugged in another microprocessor based electronic kit (e.g., Arduino Uno) if desired. • GWM: As SLM is responsible to transfer data to a GWM, i.e., a local gateway. A gateway allows communication between a device-to-cloud, device-to-device, or networkto-network. Though it may be costly, but for an optimal performance and strong security, developers are encouraged to use recently developed IoT-gateways [83]. These gateways are capable to perform numerous critical functions, e.g., protocol translation, device connectivity, security, updating, management, data filtering and processing, etc. In case a local gateway is not available, then developers may also use a DTMF-enabled SIM900 GPRS/GSM shield to transfer data to cloud server. • CSM: It provides a flexible, efficient, and scalable model to deliver services and infrastructure required to empower IoT-enabled devices and applications [82]. In this concern, many cloud services have already been available in market [82], e.g., Blynk-, Adafruit-, and Ubidots IoT-Platforms. Using these platforms, developers can easily store, visualize, and analyze sensors data. In addition, IoT-things (e.g., water-pump) could also be accessed and managed more comfortably. Cloud servers are capable to predict future trends in water quality and can inform end users via an alert (e.g., Twitter) in case any anomaly is detected. Notably, most of these cloud services are not cost free, and therefore, customers must need to pay for commercial activities if any. • UIM: Almost all contemporary cloud IoT-Platforms provide an interface to end-users. These platforms can send messages via an SMS, Facebook, Twitter, email, etc. In addition, these service providers also facilitate end users via their mobile apps, which can be installed easily on a smart phone. For example, with Arduino IoT cloud app [84] being installed on a smart phone, end-users can quickly connect, manage and control their own IoT-things (e.g., sensor) from any location of the globe.

Review of IoT-WQMS for Domestic Water
This section provides a review of contemporary work on IoT-WQMS for domestic water. The research methodology was as follows: First, authors downloaded a set of 140 articles using the Google chrome search engine, individual journals' websites, IEEE Xplore, and other sources. In this concern, different phrases and keywords were used for searching purpose, e.g., IoT-based water monitoring, IoT-based water quality monitoring systems, water quality review, water leakage survey, water leakage review, water quality survey, smart water monitoring systems, Internet-of-Things based water quality monitoring systems, Internet-of-Things based domestic water quality monitoring, etc.
Next, the authors manually inspected these articles on a one-by-one basis. It was observed that 9 articles were developed on general reports, 11 on pipes leakage detection, 10 on water-management (e.g., auto-reading of meters, bills generation, and water-grid monitoring), 5 on flood-level monitoring, 18 on water level monitoring in tanks, 15 on the agriculture and aquaculture, 14 on the auto-controlling water pump, 17 on water control in smart cities, 10 review/survey articles on water quality and leakage detection, and the rest were focused on quality monitoring of domestic water.
As detailed in Introduction section, authors have had acquired a set of 10 survey/review papers on the water monitoring, but almost all of these were not focused on smart monitoring of domestic water quality. Moreover, the papers being published on domestic water quality control were further filtered to pinpoint only those articles that were cited by contemporary works continuously. In this regard, some lower ranked conference and journal papers were excluded from this survey. Finally, authors decided to consider only 20 articles (3 conference papers and 17 journal articles) in this study.
As highlighted in Section 2.2.2, WHO/USEPA suggested three types of water quality indices, i.e., DWQI, AWQI, and HWQI. In general, these indices contain many parameters related to water quality. In traditional laboratory-based methods, generally many such parameters are used while monitoring water quality. However, it may not be feasible for IoT-WQMS, because currently so many WQM sensors are not available. As highlighted in Table 2, many WQM parameters have high correlation among themselves. Therefore, to benefit from this fact, most researchers [32,35,48,68] agreed upon on using most prominent WQM parameters in IoT-WQMS for domestic water. These parameters are as follows: Some relevant WQM parameters could also be inferred based on measured values of these five parameters using ML schemes. For example, ORP has strong correlation with the sanitizing power of free chlorine or any other reducing/oxidizing chemicals [85]. Measuring ORP is empirical, precise, and does not need any user interpretation. In addition, concentration of free chlorine can be inferred based on measured values of pH, T, and ORP [48]. Similarly, the amount of dissolved oxygen in water can be inferred from its correlation property with T [86]. Likewise, total suspended solids (TSS) and total dissolved solids in water could be inferred form measured value of turbidity [35]. Similarly, EC could be utilized to infer estimate of alkalinity, hardness, and some solids dissolved in water. Based on WQM parameters and analytical tools (e.g., ML techniques), authors propose the following empirical rubric: where λ represents the overall rating of a contemporary IoT-WQMS. The symbols x 0 , x 1 , x 2 , x 3 , x 4 , and α represent pH, Turb, ORP, T, EC, and ML tools, respectively. These are binary variables, i.e., a variable value is set to one if corresponding parameter is involved in IoT-WQMS or else zero. Since current literature reveals no Thump-rule to ratify contemporary IoT-WQMS with, therefore the authors assigned weights to variables used in Equation (1) empirically, which is entirely based on their importance. It seems expedient because all WQM parameters do not contribute equally when computing water quality. For example, turbidity (or TSS/TDS) and pH could be felt while looking at water appearance through a glass and/or drinking. We also assigned a higher weight to ORP, because it could not be felt when humans drink water containing pathogenic microorganism. Compared with T and EC, we assigned higher weight to because ML techniques are capable to infer other important parameters (e.g., DO, coliform bacteria, and salinity) based on measured values of few WQM parameters. No doubt, further improvement/modification in this rubric is possible, which we are planning to probe into in future work. The following text presents a comprehensive survey of contemporary work being published on IoT-WQMS for domestic water.
Ahmed et al. [19] published their work on water monitoring. In the first part, the authors present a comprehensive review on traditional laboratory and WSN-based water quality monitoring schemes. However, its second part proposed an IoT-WQMS for domestic water. This system comprises four basic modules: (i) sensing, (ii) coordinator, (iii) data processing and analysis, and (iv) storage and core analytics. The authors claimed for the usage of four sensors (Figure 3), but the sensing module shows only pH, turbidity, and temperature, and the sensor for TSS is thus missing from diagram. In the coordinator module, an Arduino kit collects data from sensors and transfers it to an on-site PC via a ZigBee device. For both modules, authors did not provide any hardware specifications (e.g., model). The third module takes in data from coordinator module and stores it locally into MySql-database.
Due to large data availability, data filtering and analysis were done to extract useful information and explore hidden trends. Finally, the fourth module preprocesses received data and transfers useful data to a cloud server vis REST web-services. This module applies various ML schemes (e.g., ANN and K-means clustering) to analyze data and determine a suitable application of water, e.g., drinking. They also claimed for an Application dashboard being developed in cloud. End users can view water quality via a desktop PC and/or smart phone. To summarize, its first part is much informative and has contribution, but the second one is just compiled at abstract level. For example, the proposed system has not been validated experimentally. In addition, they did not provide any technical details about sensors (e.g., model, range, and vendor). Due to these deficiencies, the second part may not be helpful to relevant community. Table 5 shows a summary of this approach. Geetha and Gouthami [32] published their work on real-time smart water quality monitoring. In the first part, they offered a review of IoT-based water monitoring schemes. In the second part, they proposed an IoT-WQMS to monitor quality of in-pipe domestic water. This system is focused on monitoring pH, temperature, turbidity, and electrical conductivity. In addition, they also monitored water level in a water tank. For pH, they used a three-in-one pH meter (no technical detailed provided). For conductivity, the sensor used was YL-69. The models for other sensors are not specified. Notably, authors did not use any ML techniques to improve predictability of water quality. Decisions are purely based on preset threshold values of these parameter in accordance with WHO standards.
In brief, this system functions as follows: First, the TI CC3200 Wi-Fi Launchpad reads sensors via its 12-bit ADC module. This card is based on a 32-bit powerful MCU (i.e., ARM Cortex M4 core) with a built-in Wi-Fi module. It is a suitable choice for analog signal conditioning, processing, logging, and transferring data to cloud. Its programming is done in the ENERGIA IDE. Next, it processes data and updates a local LCD. Then, it sends data to a local Wi-Fi router through its built-in Wi-Fi module. Finally, a local Wi-Fi router transfers data to Ubidots IoT-platform [87], where the authors had developed a dashboard. Ubidots is an excellent service, but it offers limited resources for free of cost and developers need to pay fee for commercial activities [82]. In Ubidots server, sensors data is compared with preset threshold values. If any WQM parameter has deviated from its nominal range, then an SMS is sent to the phone of the end-user.
This system is validated on water samples polluted manually with salt and soil. Experimental results are discussed. Though using few WQM parameters without machine learning techniques are not enough to properly predict water quality, it is still a better option, because it may avoid drinking of water containing high level of dirt, acidity, alkalinity, salinity, etc. A main drawback of this system lies in its conductivity sensor, i.e., YL-69 ( Figure 4). The bared metallic strips of this sensor have direct connection with water while measuring conductivity. It is fine for a short time, but these metals may get corroded if they remain submerged for longer. A similar issue also exists in Ref. [88]. Damor and Sharma [24] published an article on IoT-based water monitoring system. Its first part offers a review, but the second part proposes an IoT-WQMS. Only pH and turbidity were considered. In addition, the authors also used an Ultrasonic senor (HCSR04) to monitor water level in an overhead tank and control the water pump automatically. Using two WQM parameters does not fulfill the minimum requirement of WHO/USEPA standards of drinking water [19,21]. No machine learning techniques were utilized to infer other WQM parameters and make the overall decision relatively better.
Authors have used the Arduino Uno kit as a front-end interface. This card is centered around ATmega328 (8-bit MCU), which is relatively rich in peripherals (e.g., ADC, memory, digital I/O, I2C, and SPI) generally required for analog signal conditioning, processing, and logging. First, this gadget reads sensors via its 10-bit ADC module. Data is processed locally to extract useful information. Next, it serially shifts data to a NodeMCU. This card is based on ESP8266 SoC, which is produced by the Espressif Systems. ESP8266 is a low-cost Wi-Fi microchip, which has full TCP/IP stack and a powerful 32-bit MCU. Then, NodeMCU transfers data to the ThingSpeak IoT-Platform via a local Wi-Fi router. ThingSpeak service is cost free for limited resources only and developers have to pay if commercial activities are required [82]. In ThingSpeak, authors had developed a dashboard for the visual presentation of sensors data and water level in target tank. End users can check water quality and its level in respective tanks via the ThingSpeak app.
To summarize, the authors presented this article quite poorly. They provide no technical specifications about sensors (e.g., model). Experimental results were not discussed. A main drawback of this system is the usage of Arduino Uno and NodeMCU together. Since NodeMCU is based on ESP8266 SoC, which has all peripherals (e.g., ADC unit, digital I/O, timers/counters, memory, 32-bit CPU, and Wi-Fi module), therefore it alone is enough for analog signal conditioning, processing, logging, and transferring data to cloud server. Though NodeMCU has only one ADC module, but the designers could use a simple digital multiplexing chip to utilize this module for many analog inputs.
Simitha and Subodh [86] published their work on IoT/WSN-based water quality monitoring system for smart cities. As shown in Table 5, this system considered pH, turbidity, temperature, and dissolved oxygen. Instead of using a sensor to compute dissolved oxygen, authors utilized a table showing temperature correlation with dissolved oxygen. Authors utilized DS18B20 to measure water temperature. It is a waterproof temperature sensor with 12-bit built-in ADC module and one-wire digital communication interface. For pH, they used a complete module (Model: E201-C-9). This kit has a BNC connector, pH probe, and the requisite circuitry for signal conditioning of pH. The output of such sensors is generally sensitive to changes in temperature. The kit automatically rectifies this issue using output of DS18B20. Technical details (e.g., model) are not provided for the turbidity sensor. The circuit's simulation was done in Proteus IDE. Final testing and simulation of system were performed in Arduino IDE. Briefly, the system functions as follows: First, Arduino Uno kit reads data from sensors, conditions it if not already, processes data, updates a local LCD for end-users, and transfers data to a LoRa transmitter (i.e., SX1278 Ra-02 LoRa) via its serial peripheral interface (SPI). Next, the LoRa transmitter transfers data wirelessly to a LoRa receiver being interfaced with an ESP32 Wi-Fi kit. The LoRa module is based on LoRaWAN protocol, which is a low-power wide area network (LPWAN) wireless communication technology. Due to LoRa technology, distance between sensors and communication modules can be 3~8 km (for urban to rural area, respectively), which is much better than ZigBee, WiMAX, Wi-Fi, Bluetooth, etc. The same LoRa chip can be used as both transmitter and receiver. All received data parameters are updated in Serial-monitor console of Arduino IDE. Then, ESP32 kit access a local Wi-Fi router to transfer data to ThingSpeak IoT-platform for visual purposes. The ThingSpeak has communication with a Raspberry Pi card equipped with a local display. It seems the Raspberry Pi card and local display have been used for the control room, but the authors did not mention anything about this mystery. Users can check water quality via their smart phones. To summarize, overall presentation of article is fair. Its performance can be improved if ML techniques are also incorporated.
Ibrahim et al. [89] published a low-cost IoT-based solution to measure turbidity of domestic water in tanks equipped with water filters. In this study, authors developed an indigenous light detection unit to measure turbidity. For experimentations, they used a combination of an LDR (i.e., light dependent resistor) and an LED (i.e., light emitting diode) fixed inside a PVC (polyvinyl chloride) pipe. They recorded turbidity readings for two unique positions: 180 • and 90 • between LDR and LED. The measured output signal (voltage) from designed circuit versus TSS in target water-sample was analyzed and graphed in two setups: (i) in total darkness and (ii) in presence of ambient light. In addition, the authors also performed comparative analysis for the designed sensing-unit submerged into still-water and water flowing in pipe.
The complete IoT-based turbidity monitoring systems works as follows: The sensor is read by Arduino Intel Galileo Gen 2 board, which is based on a 32-bit MCU. Next, it sends data to an ESP826 Wi-Fi transceiver module plugged in a mini-PCI slot of a Galileo board, which transfers data to ThingSpeak IoT-Platform via a local Wi-Fi router. ESP826 Wi-Fi transceiver has an integrated TCP/IP protocols, which is customized for Wi-Fi networking solutions with two general purpose digital I/O pins only. Data in the cloud is recorded and all visual displays are updated. If turbidity is found higher than a preset threshold value, then motor is turned ON to flow out water from the concerned tank to a connected filter unit for the rectification purpose. Water from filter unit then flows back into same tank and turbidity sensors are read again. If turbidity is still high, then motor is kept ON. Otherwise, motor is turned OFF automatically. This way, the water tank is cleaned automatically.
Programing and simulations of this system were performed in Arduino IDE. Results are detailed explicitly. On average, this is a good notion for automatic monitoring of turbidity in water tanks equipped with a filter unit. However, some limitations of this system include its poor protection against conducting leads of LDR/LED ( Figure 5) or wiring not protected from environmental effects, e.g., alkaline water can corrode metals when contacted directly. Due to this fact, efficiency of sensors may be degraded if submerged in water or exposed to moisture for longer. In addition, LDR/LED surface could also be polluted with contamination in water because light emission/acceptance capabilities of these components could be affected. Lastly, the turbidity sensor unit needs a stable power supply, otherwise any fluctuation in supply voltage may affect efficiency of this unit. Carminati et al. [90] published an IoT-based solution to monitor chemical and biological stability in water supply systems ( Figure 6). In addition to measuring pH, temperature, pressure (PR), electrical conductivity, and flow rate (FR) ( Table 5) the authors emphasized monitoring slime deposits on the inner surface of pipes. Slime (correlated with turbidity) can deteriorate water quality and result in the sensors biofouling. In this study, they developed a sensing unit made up of some conventional sensors and a custom designed sensor (based on impedance) to monitor the inner-surface fouling of pipes. In addition, it is also capable to estimate the slime thickness and find its corresponding origin. Carminati et al. [90] published an IoT-based solution to monitor chemical and biological stability in water supply systems ( Figure 6). In addition to measuring pH, temperature, pressure (PR), electrical conductivity, and flow rate (FR) ( Table 5) the authors emphasized monitoring slime deposits on the inner surface of pipes. Slime (correlated with turbidity) can deteriorate water quality and result in the sensors biofouling. In this study, they developed a sensing unit made up of some conventional sensors and a custom designed sensor (based on impedance) to monitor the inner-surface fouling of pipes. In addition, it is also capable to estimate the slime thickness and find its corresponding origin. All sensors are technically detailed, along with calibration methods. Notably, authors explained all circuits, electronic components, communication devices, power generation via a turbine unit, and computing devices in explicit details. Editing and simulation of this system were done in Arduino IDE. In short, the whole system architecture is as follows: To energize entire circuitry, energy is generated from water flowing in pipe using turbine technology; the main components of this part are sealed lead-acid battery (6 V, 1200 mAh), ATmega328 (8-bit MCU), a current sensing chip (MAX4373), LCD, and a buck-boost Directcurrent/Direct-current (DC/DC) convertor.
Sensors are read by main board centered around ATmega2560 (8-bit MCU). For communication between different modules and/or units, they utilized LoRaWAN device (mDot by the Multitech) and GSM modem (M10 by the Quectel). Data through GSM modem is transferred to ThingSpeak IoT-Platform for analysis, detecting anomalies and generating alert messages to end-users if any fault is detected. Note, a GSM modem generally accepts a SIM card and functions like an ordinary cellphone for providing a data link to a remote network. For end-users, they use ThingSpeak app installed on a smart phone. The system was tested and validated in the laboratory and field. Though this system does not fulfil the minimum requirements of WHO standards of drinking water, it have other significant achievements. For example, it proposed an effective sensing unit to monitor slime deposits on inner surface of water supply pipes. In addition, it also highlighted a workable notion of utilizing a turbine to yield electrical energy.
Manoharan et al. [35] presented a water quality-analyzer system based on IoT technology. In this study, they tried to monitor pH, turbidity, temperature, and electrical conductivity. Sensors were not technically specified, except the temperature sensor (DS18B20). As shown in Figure 7, except DS18B20, which is interfaced with Arduino Uno, all other sensors are accompanied by their own signal conditioning kits. Programming was done in C-language, probably in Arduino IDE. The overall system functions as follows: First, Arduino Uno reads data from sensors, processes it, and updates results on a local LCD for users. Next, it transfers data to ESP8266 Wi-Fi transceiver through its serial communication interface. After that, ESP8266 transfers data to ThingSpeak IoT-Platform through a local Wi-Fi hotspot. In a cloud server, data is stored and graphs are updated.
In case any anomaly is detected, it sends an alert to the relevant authority. This system has been validated on water samples collected from rivers, lakes, and ponds. This article is also presented at an abstract level and no in-depth details are provided about the experimental setup. In addition, no machine learning algorithms are deployed to enhance system efficiency. A major limitation of this system lies in its electrical conductivity sensor whose metal layers (Figure 4) are not protected against corrosion due to contaminated water. Chowdury et al. [57] presented an IoT-based solution to monitor water quality. This study was intended to continuously monitor the quality of river water using a hybrid of WSN and IoT technology, with low-power consumption and minimum expenditures. They considered pH, turbidity, temperature, and oxidation reduction potential in experimentation. Except the temperature sensor (DS18B20), other sensors are not specified technically. In addition, authors did not specify IDE being used for coding, testing, and simulation. Big data analytics techniques were utilized to improve predictably of water quality and reveal future trends. Though this article is composed poorly, its main flow can be inferred from its diagrams, text and/or images.
The system is comprised of multiple nodes being installed at different locations alongside a river. For each node, Arduino Mega2560 reads sensors data, processes it, and updates a local LCD. Next, data is serially shifted to ESP8266 Wi-Fi module. This module transfers it to a remote PC through a local Wi-Fi router. In the remote PC, collected data is displayed in a visual format using the spark streaming-analysis through Spark MLlib, belief rule-based (BRB) system and deep learning neural-network models. In addition, data is also compared with recommended WHO standards. If any anomaly is detected, then an SMS alert is forwarded to the concerned authority. To summarize, this article has attempted to utilize artificial intelligence (AI) to enhance system decision about water quality. However, this article may not be of good use to readers due to its poor presentation.
Rao et al. [91] presented an IoT-based solution to monitor water level and quality in overhead tanks. Its main aim was to automatically refill tanks in remote areas and continuously check water quality. If water is dirty, then corresponding authority should be informed via a smart phone to clean tanks; location information is accessed via Google Maps. For measuring water quality, authors considered only pH and turbidity. Water level in tank is monitored through HC-SR04. The turbidity and pH sensors models are not specified, but their technical specifications are tabulated properly.
In brief, this system works as follows: First, a Raspberry Pi kit reads data from sensors. As stated before, Raspberry Pi kits are powerful minicomputers enriched in peripherals (e.g., ADC/DAC, memory, I/O ports, Wi-Fi, and timers/counters). Next, it processes sensors data and transfers it to a local Wi-Fi router for uploading to ThingSpeak IoT-Platform. In the cloud, data is recorded, graphs are updated, and water level and quality are checked according to preset threshold values. If water level is found above or below a specific threshold, then an alert is sent to clients who can control motor switching status through their smart phone. In addition, if turbidity is found above a preset threshold, then it means the water in tank got dirty because of mud, dry leaves, etc. To clean the tank, the concerned authority is also sent tank's location via Google Maps. This article is not well documented, e.g., missing of technical data, language, and IDE not specified. On average, this system can be used safely for tank cleaning purpose only, but for water quality two parameters are not considered enough according to WHO standards for drinking water.
Imran et al. [92] presented an IoT-based solution to monitor water level and quality in overhead tanks, in particular for offices and homes. In this study, authors monitored pH of water only, which is not enough to predict overall water quality. In addition, they also tried to monitor water level in tank and leakage of Liquified Petroleum Gas (LPG), if any. Authors did not provide any technical specifications about the sensors, except the LPG sensor (Model: MQ-6). In addition, authors did not detail their experimental setup. This system functions as follows: First, an electronic kit centered on an 8-bit MCU (PIC16F877 developed by the Microchip Inc.) reads data from sensors. After processing data and updating a local LCD, it utilizes its accompanying SIM900 GPRS modem to transfer data to a cloud server. End-users can use smart phones to monitor their water tanks. The overall paper presentation is poor. For example, in the abstract, the authors also claim for monitoring turbidity and dissolved oxygen, but in the results and diagram, only pH and MQ-6 are shown. Due to smaller number of WQM parameters, this system does not fulfil the minimum WHO standards (Table 5).
Gowthamy et al. [64] presented a low cost IoT-based solution to monitor quality, level, and quantity of water in overhead tanks. Only pH and turbidity were considered to monitor water quality. In addition, they also used a combination of ultrasonic sensor and a flow sensor to control water level and quantity in tanks, respectively. Technical specifications of sensors are not provided. The entire system is based on an Arduino Uno and ESP8266 Wi-Fi transceiver. Programming, testing, and simulation of this system were performed in Arduino IDE. No machine learning methods were utilized for better decision making. In short, this system works as follows: The Arduino Uno reads sensors, does some local processing, and shifts data to a cloud sever (not specified) via ESP8266 and a local Wi-Fi router. The cloud server is used to store data, visualize sensors data, and send an alert to end users via a smart phone in case any anomaly is detected. To summarize, this system is not well mature and should be consulted if auto-filling of tank and/or cleaning is desired only. For measuring drinking water quality, it is not suitable.
Priya et al. [68] published a real-time system to monitor water quality and detect contaminations in water distribution system, which is used to supply water from a main tank to consumers. In this concern, authors considered pH, turbidity, temperature, oxidation reduction potential, and electrical conductivity. Sensors' specifications are detailed thoroughly, but not models. The main architecture of this system (Figure 8) has three major parts: (i) water quality monitoring unit, (ii) central processing unit, and (iii) notification unit for administration office.
In brief, this system functions as follows: Water from the main tank is controlled via an automatic solenoid valve, which is supervised by a cloud server. Once the valve is open, water flows concurrently in all pipes towards customers houses. The sensors modules are embedded in each street pipe. For every street, data from relevant sensors is read by an Atmega328 MCU-based board. All nodes of the same street could share data with each other. Data to central processing unit (server) is transferred via a ZigBee device. Note, ZigBee device is based on the IEEE 802.15.4. This device is generally utilized for two-way communication between a control system and a sensor. Like Wi-Fi/Bluetooth, ZigBee has short-range of communication with connectivity up to 100 m (meters). The server then processes sensors data using Fuzzy logic to classify it as acceptable, rejected, or desirable. In case an anomaly is detected, the concerned street's water-supply is then blocked through a solenoid valve, and end-users and authority are informed about this act. The sever is interfaced with internet through an ethernet module. This unit also sends alerts to notification unit for administrative usage. End-users and/or the concerned authority can also check water quality via smart phones. Water quality report is sent/shown to end-users with their home number as well. Though this paper is highly focused on WSN concept and utilizes internet for smart phone applications only, it is a best kick-off for IoT-WQMS. Thiyagarajan et al. [93] presented an IoT-based solution to monitor water quality in residential tanks. This system involved pH and TDS. Sensors' specifications are not provided. In brief, this system functions as follows: First, Arduino Uno reads data from sensors. It transfers data serially to Raspberry Pi3 card. This card deploys K-means clustering algorithm to classify target water as lemonish, salty, muddy, tap, or drinking water. These different classes were used to train a stated algorithm. Raspberry Pi3 transfers data to a desktop PC, which transfers it to a cloud server through an ethernet port. Endusers can access the cloud via a smart phone to check water quality.
Notably, this paper is not well documented, e.g., authors did not specify IDE and languages being used in experimentation. In addition, it does not fulfill the minimum requirements of WHO drinking water; the authors deployed ML techniques to compensate this deficiency to some extent. However, a major limitation of this system is involvement of two processing devices. Arduino Uno is based on 8-bit ATmega328 MCU, whereas Raspberry Pi3 card is centered around a powerful 64-bit CPU. ATmega328 has built-in ADC module, whereas Raspberry Pi3 card is deprived of this feature. However, for cost minimization, a cheap ADC module can be interfaced easily with Raspberry Pi3.
Daigavane and Gaikwad [94] presented an IoT-based solution to monitor water quality and flow. In this study, authors considered temperature, turbidity, and pH. Authors briefed all sensors, but they did not provide their model numbers, except DS18B20. The turbidity and pH sensor are accompanied with their signal conditioning circuitries. The ATmega328 MCU, LCD, power supply circuitry, etc., are mounted on a single printed circuit board (PCB). All coding, testing, and simulations were done in Arduino IDE. The system was not validated in field. In brief, this system functions as follows: First, Arduino Uno based card reads data from sensors, processes it, updates a local LCD, and shifts data to ESP8266 Wi-Fi transceiver. The ESP8266, via a local Wi-Fi router, updates dashboard developed in Blynk IoT-Platform. Authorized end-users can check water quality via smart phones. The paper offers no in-depth details about technical specifications. In addition, the authors also did not involve any machine learning algorithm to enhance decision-making phase about water quality. Due to smaller number of WQM parameters, this system does not fulfill the minimum requirements set by WHO for drinking water (Table 5).
Prasad et al. [65] published a smart water quality monitoring system. Though, this system was intended primarily for oceans, but it has also been tested on tap water. This project is based on Libelium IoT-products [95]. Libelium products are reliable and effective solution for smart water monitoring around globe, e.g., in the Gulf of Kachchh. In this project, authors considered pH, temperature, electrical conductivity, and oxidation reduction potential. The system from Libelium contains all necessary items such as sensors, GSM module, MCU, etc. These products are highly optimized for low power operations. Both the cloud and a local PC are utilized for analytic analysis of data. To better predict water quality, ML schemes are also deployed. This system was tested on surface water, seawater, polluted creek-water, and tap water. In experimentations, the proposed system acquired readings from water samples at rate of one-hour (h) intervals, for a period of 12 h.
In brief, the entire system functions as follows: Sensors are first read by Waspmote MCU board through its built-in ADC module. Next, data is sent to both local PC and a cloud server via GSM module. This system has also ability to locally store data on a Secure digital card. Analysis was performed on a local machine and cloud services. To summarize, this work shows an exposure to Waspmote products, but it does not offer any detailed explanations of how data is analyzed using the machine-learning algorithms. Besides, technical specifications (e.g., CPU/MCU type) of Libelium products used herein are missing.
Pasika and Gandla [96] presented a low-cost IoT-WQMS. In this system, authors involved only pH and turbidity. In addition, they also monitored water level in an overhead tank and temperature and humidity of the atmosphere via a DHT-11 sensor. The system was tested and simulated in Arduino IDE. All components of system are well detailed, but models for some sensors (e.g., turbidity) were not mentioned. In brief, it works as follows: The sensors are first read by Arduino Mega2560. After processing sensors data, it sends processed data serially to NodeMCU, which forwards this data to ThingSpeak IoT-Platform via a local Wi-Fi router. Data is then processed, analyzed, and visualized in ThingSpeak, which is accessible by authorized end-users via smart phones. No machine learning schemes were used herein.
To summarize, this article is prepared well. Experimental results with snapshots were discussed explicitly. Due to two WQM parameters, this system may not be well suited according to WHO minimum criterion of drinking water. As shown in Figure 9, a major drawback of this system is over exploitation of hardware resources. For example, both Arduino Mega2560 and NodeMCU (8266) have MCU, ADC, memory, digital I/O pins, ADC modules, etc. Srivastava et al. [97] published a smart-phone-based system to monitor water quality with accesses to location information via the Google Maps app. In this study, authors involved pH, TDS, and temperature. Other important WQM parameters such as ORP, EC, and salinity were inferred from measured values of these parameters using statistical modeling techniques. The learning models (e.g., Artificial Neural Network) were trained on pH and TDS datasets and others measured parameters just mentioned. Instead of relying on the readymade commercial electronic kits, authors developed a front-end interface unit from standard parts such as a pH sensor (LMP01200), HC-05 Bluetooth module, EEPROM memory chips, and a dedicated 8-bit MCU. This module is responsible for reading sensors, local processing, and logging data. Interface between the Google-Firebase IoT-platform and front-end unit is a smart phone. In this concern, authors developed a dedicated application to carry out analysis in cloud.
Based on machine learning techniques, the measured and inferred WQM parameters were converted to a single WQI number, which is easy to interpret for understanding. In addition, the developed smart phone application is also capable to auto-calibrate sensitive parts for on-site application. End-users can get SMS, WhatsApp messages, and emails. The overall results of this system are satisfactory in comparison with contemporary work. However, one big bottleneck of this system may be the product cost if it must be installed at many points, e.g., in smart city. However, the overall system cost could be minimized if a SIM900 GSM/GPRS modem is utilized, instead of smart phones, for data transmission between cloud server and sensors module ( Figure 10). Bahgat et al. [98] presented an IoT-based solution to monitor water quality. In this study, authors monitored pH, turbidity, temperature, and Carbon-dioxide (CO 2 ) gas. All sensors were detailed briefly. The model of CO 2 sensor is MQ135, but models for other sensors are not specified. MQ135 is capable to detect gasses such as NH3, benzene, alcohol, smoke, and CO 2 on water surface. The system is centered around Arduino Pro Mini card, which is centered around ATmega328 (8-bit MCU) with numerous On-chip peripherals such as ADC, PWM, memory, I2C, SPI, etc. Though it is compatible with Arduino Uno, it has been customized for small size products.
For communication with cloud, they used ESP8266 Wi-Fi transceiver. For cloud services, they utilized Thinger.io, which is an open source IoT-platform offering a lifetime freemium account to customers for no cost. With this account, customers with few limitations can start learning and prototyping their projects. For commercial activities, premium server with full capacities could be utilized but it is not cost free. Authors simulated and tested entire system in Arduino IDE. For system validation, mud was gradually added into samples. For end-users, this system provides an LCD, PC, and smart phone interface. To brief, it functions as follows: First, Arduino Pro Mini reads data from sensors. After some local processing, it updates results on a local LCD. After that, it transfers data to ESP8266 Wi-Fi transceiver, which uploads data to Thinger.io via a local Wi-Fi router. Sensors' data is then processed, recorded, and visual aids are updated. The article is well-written but monitoring three WQM parameters without machine learning is not enough to predict water quality precisely.
Lambrou et al. [48] developed a low-cost real time solution to monitor contamination in distribution system of drinking water. No doubt, maintaining water quality in such systems is currently a big issue for most water control authorities (e.g., municipal) in developing countries. It is mainly because of availability of less funds, lack of manpower, aged infrastructure, etc. Authors tried to use commercial sensors, which are relatively cheap, reliable, long lasting, and resistant to biofouling issues to some extent. Main parameters included are pH, temperature, turbidity, electrical conductivity, and oxidation reduction potential (ORP). For pH and ORP, conventional glass-electrode type sensors were used. For turbidity, electrical conductivity, and temperature, they utilized solid state technology. Authors also devised some useful algorithms to fuse sensors data and infer results about overall water quality. These algorithms are tested with different concentration of E-Coli bacteria and heavy metals such as Arsenic (which is fatal for humans).
Experimental results are satisfactory while detecting these high impact impurities. For risk assessment and generating early warning alerts, authors developed two algorithms: (i) vector distance algorithm (VDA) and (ii) polygon area algorithm (PAA). Moreover, this system is capable of publishing results on a cloud server and informing end-users via an SMS, email, etc. The overall system comprises of a (i) central measurement node (PIC32 MCU based kit), (ii) control node (Raspberry Pi board), and (iii) notification node (PIC MCU based kit). The central measurement node collects data from sensors submerged in a water pipe.
Sensors are equipped with their own electronic kits for signal amplification, conditioning, etc. This unit assesses water quality using some specialized algorithms and transfers data to other nodes via USB and ZigBee modules. The control node stores data being received from central measurement node into a local database. It transfers data to a local Wi-Fi router through its ethernet module. The Wi-Fi routers transfers data to a web cloud service (Pachube open source) for analytic analysis and visualization. In addition, it sends emails and SMS alerts in case any anomaly is detected. Finally, notification node, which receives information from central measurement node, provides alerts to consumer via LEDs, LCD, and a buzzer about nearby tap water. Major contributions of this article are development of an effective turbidity sensor and analog signal conditioning circuitries for other sensors. To summarize, this article is well articulated in terms of technical details, experimental results, and discussion (Table 5).
Cho-Zin et al. [99] presented an IoT-based solution for water quality monitoring. The authors involved temperature, pH, turbidity, and CO 2 . In addition, they also monitored water level via an LV-MAXSONAR-EZ1 sensor; it is a Sonar. For temperature, CO 2 , and turbidity, authors used DS18B20, SKU: SEN0219, and SKE: SEN0189 sensors, respectively. However, the model for pH is not specified. The entire system is deployed on DE1-SoC FPGA Development Kit (Figure 11). This board offers a flexible hardware design-platform built around an Altera System-on-Chip (SoC) FPGA. Briefly, this SoC integrates a hard processor system (i.e., dual-core ARM cortex-A9 microprocessor, with 800 MHz clocking frequency), memory, and peripherals interfaces knotted with FPGA module through a high-bandwidth interconnect backbone. For coding and simulations, authors used Altera Quartus-II IDE. The control unit to read sensors and communicate with ZigBee transceiver was implemented in FPGA fabric using the Nios-II soft-core processor available in the Quartus-II Qsys Tools. The C-code running over the Nios-II CPU and VHDL codes were utilized to run control unit. Code to process WQM parameters and commands of the wireless transceiver modules were programmed in Nios-II Eclipse through C and VHDL languages. For data visualization, authors installed Grafana package on a desktop PC, with Linux operating system. Moreover, pin connections for all sensors and devices are detailed explicitly. For analog signal conditioning, an onboard ADC module is utilized. For wireless communication between a remote PC and this board, authors utilized ZigBee PRO S1 module. This is a radiofrequency module, which can provide robust communication in the peer-to-peer, point-to-point, and multipoint/star configurations. After powering this system, it was installed on the bank of a lake to monitor water quality, where data was collected over a period of 15 days. Data was transferred by FPGA board to a remote PC equipped with a ZigBee receiver module and located 86 m away from lake. Data was processed, stored, and analyzed to visualize probable trends in water quality. Authors did not discuss using ML schemes to enhance decision-making phase. Experimental results being illustrated on LiCliplse console-windows are satisfactory. To summarize, this system does not qualify the minimum WHO standards of drinking water. A major limitation of this design is overall cost of using an expensive DE1-SoC FPGA board. This card is utilized to read sensors and transfer data to a remote PC via an external ZigBee kit only. No doubt, this is not a big task to which such a powerful SoC should be assigned. This wastage of technical resources and the overall system cost could be optimized as follows: Firstly, developers should buy a simple FPGA chip and burn target bitstream file into its fabric via a chip-programmer. After that, it can be mounted onto a customized PCB along with supporting electronic circuitry. Secondly, a NodeMCU (EPS8266) module or Arduino Nano 33 IoT card should be utilized to better perform this task.

Discussion and Recommendations
Section 4 provided detailed survey of contemporary IoT-based solutions for water quality monitoring. In all articles, authors were focused on coming up with systems, which should be cheap, portable, low-power, IoT-enabled, real-time, and qualifying WHO/USEPA minimum standards of drinking water. Ironically, very few articles meet the criteria. Figure 12 shows the overall rating of each article based on the proposed empirical rubric given in Equation (1). Only three articles [48,68,97] fully satisfy this criterion, where authors considered minimum criterion of drinking water and used machine learning to enhance overall water quality index. The remaining articles could be either improved or used for other applications such as cleaning of water storage tanks.

Right Things in Right Place
After probing into the architecture of contemporary IoT-WQMS, it is observed most of these systems have not been consistent in technical parameters. The following text elaborates this issue in explicit details: WQM parameters: As detailed in Section 2, WHO/USEPA developed numerous standards and guidelines to compute WQI of water sample. Though these bodies recommended big lists of such parameters, the concerned water authorities (e.g., municipal) generally deploy a limited set of some useful parameters while computing water quality [19,31,35,49,50]. As mentioned before, WQI is a single number expressing the overall quality of water acquired from a target locality, at a specific time. Its main objective is to transform complicated water-quality data into useful and understandable information. In a broader sense, WQI offers a general idea about overall water quality. As shown in Table 2, most WQM parameters have strong correlation with each other. It implies monitoring all parameters may not be necessary while computing WQI for target water. It is logical because some WQM parameters could also be inferred from the measured values of other WQM parameters due to their inter-correlation. The following text exemplifies this fact:

•
Ref. [85] shows oxidation reduction potential has strong correlation with sanitizing power of free chlorine or any other reducing/oxidizing chemicals. Measuring ORP is empirical, precise, and does not need any user-interpretation. Table 6 shows correlation between ORP-levels and Coliform count in a 100 mL water sample. Similar, Table 7 shows ORP range versus water application. • Ref. [48] highlights free chlorine monitoring through amperometric sensors, which is not only expensive but highly sensitive to other parameters such as temperature, pH, water flow, and pressure. Due to this reason, it is advisable to infer concentration of free chlorine based on measured values of pH, temperature, and ORP. • Ref. [86] shows amount of dissolved oxygen in water could be inferred from its correlation property with temperature. • Ref. [35] talks about strong correlation of total suspended solids and total dissolved solids in water with turbidity. Table 6. ORP-levels versus Coliform bacteria [85]. 200  300  300  36  400  3  600  0   Table 7. ORP-ranges versus water applications [85].
WQM sensors: Sensors play a key role in the overall efficiency of IoT-WQMS. They measure different physical, chemical, and biological properties of water. At present, market offers two types of sensors: (i) sensors capable to measure single WQM parameter (e.g., pH) and (ii) sensors able to measure multiple WQM parameters (e.g., pH, turbidity, temperature, and ORP) [19][20][21]. The following are some useful suggestions:

•
To avoid the hassles of electronic circuit designing, developers should fetch WQM sensors being supplemented with required signal conditioning-circuitry. For example, the pH kit for Arduino Uno [100]. • For fast prototyping, multi-parameters WQM sensors units should be acquired from a reputable vendor such as the Libelium (Waspmote) products [55].

•
In case of continuous water quality monitoring, sensors are generally submerged into water for longer. If sensor's parts are directly exposed to water, then it may be damaged due to direct contact with organic and inorganic material [48]. In addition, some metallic materials also get rusty if exposed to water for too long. This process is called biofouling, which deteriorates the overall efficiency of IoT-WQMS. Hence, care must be taken while selecting sensors for a particular application [21,48].
Digital computing media: Multiple choices are available to product developers when selecting a digital computing media. It is usually required to read sensors data, process, update local displays if any, and transfer it to a cloud server via a local Wi-Fi hotspot or a GSM/GPRS based modem. As highlighted in Section 4, many authors have customdesigned PCB containing a dedicated MCU/CPU and other relevant electronic circuitry. Some authors also opted for the readymade MCU/CPU based kits for this job. Moreover, it is also observed that authors involved expensive FPGA based kits. In general, all these options are workable, but some have not been selected optimally due to which the hardware redundancy increased. The following text struggles to provide solution to this issue: • If its purpose is just reading sensors data, performing few computations, updating local displays (e.g., LCD) if any, and shifting data to the cloud server for complex analysis then, best option is to involve readymade electronic cards. If developers plan to perform complex analysis locally on digital computing media, then best option is to select a 32/64-bit fixed/float MCU/CPU based cards such as Raspberry Pi4 Model B, Intel Galileo Gen 2, TI CC3200 Wi-Fi Launchpad, etc. These are best options for digital signal/image processing. In addition, authors could also use System-on-Chip (SoC), but it may be time consuming and expensive option as well.
Wireless-communication media: If inter-communication among different sensors units is desired, then best option is LoRaWAM technology. This technology covers more areas with low power consumption as compared with ZigBee, Wi-Fi, Bluetooth, etc. If distance between target devices is long, then Internet could also be involved for which SIM900 GSM/GPRS modem is a workable silicon crab.
Cloud IoT-Platform: Literature shows a big list of contemporary cloud IoT-Platforms [82], most of which are open source and offer limited resources for cost free. For commercial activities, developers must pay a fee. These platforms can be used from simple to complex analysis on sensors data. For example, data can be stored for history, graphs, plots, spread sheets, visual aids, ML techniques, controlling things (e.g., a sensor), and sending alerts to end-users are some prominent features of these services. Considering review compiled in Section 4, common IoT-platforms include Blynk, Pachube, Thinger.io, Google firebase, Ubidot, ThingSpeak, Arduino, and Adafruit [82].
Though these cloud platforms greatly facilitate developers, they have some limitations: • Data security may be at risk because of 3rd party's involvement.

•
No guarantee for continuous service provision. Any time, anyone can quit from market, which will have a deadly impact on commercial activities. • Worries for raise in the services' cost for commercial activities.
Due to these facts, IoT-developers should custom-design their own cloud servers if feasible.

Redundancy
Software developers generally use code profiling techniques to speedup computational processes and optimize memory requirements. Similarly, hardware optimization is also necessary to avoid redundancy if any. This act would not only result in overall system's cost reduction but may also reduce overall energy consumption and space requirements.
The following text elaborates this issue:

•
Ref. [24]: In this article, authors utilized Arduino Uno and NodeMCU for simply reading sensors data and shifting it to a local Wi-Fi router. Arduino Uno is centered around an 8-bit ATmega328 fixed-point MCU, with many on-chip peripherals such as ADC,  PWM, UART, I2C, SPI,  Ref. [97]: In this article, authors utilized a smart phone to acquire data from an indigenous card through Bluetooth technology and then transfer it to cloud server using the same phone. The overall system cost could be optimized if a SIM900 GSM/GPRS modem is utilized, instead of a smart phone. • Ref. [99]: In this article, authors utilized a DE1-SoC FPGA board, which is a very expensive card and should only be used for hi-tech designs and prototyping. Unfortunately, this board is utilized for simply reading sensors data and transferring it to a remote PC via a ZigBee kit. This is not a complex task for which such a powerful silicon crab is deployed. To be honest, this is wastage of technical resources. To address this issue, developers could fetch a simple FPGA chip from a local market and burn target bitstream file into its fabric via a chip-programmer. After that, it can be mounted on a customized PCB along with supporting electronic circuitry. Alternatively, authors could also use Arduino Uno R3 or Arduino Mino Pro, etc. Notably, tentative costs of DE1-SoC FPGA board and Arduino Uno R3 are USD 249 and USD 23, respectively; prices were fetched from Google Chrome on 16th August 2020.

Machine Learning Techniques
As mentioned earlier, considering all WQM parameters while computing WQI may not be feasible. Moreover, the commercial market may also not offer sensor against each parameter. Fortunately, most of these parameters possess strong correlations among themselves (Table 2). It implies that it is feasible to use a small set of sensors to measure some parameters (e.g., pH, turbidity, and ORP) and then, based on the measured values of these measurements, infer other important parameters (e.g., free chlorine) using mathematical models. To resolve this issue, researchers approached towards machine learning [35,48,65,85,86]. ML is seen as a subset of artificial intelligence (AI). Based on sample data (called training data), ML algorithms build a mathematical model capable to make decisions or predictions without being clearly programmed to perform so [52]. For IoT-WQMS, supervised ML algorithms are well-suited. Though ML techniques greatly enhances the overall efficiency of IoT-WQMS, they have some limitations:

•
Additional demand for technical resources, e.g., memory, higher CPU throughput.

•
Greater the size of training data, the better the performance of ML algorithms.
There exist two options to address issue of additional resources. Firstly, developers should use a simple 8-bit MCU based card (e.g., NodeMCU (ESP8266)) and then shift acquired data to a cloud server for analytical analysis using ML algorithms. Secondly, they could also use a readymade kit based-on a powerful CPU/MCU, e.g., Raspberry Pi4 Model B, TI CC3200 Wi-Fi Launchpad, Arduino Intel Galileo board, or DE1 SoC FPGA board. However, to address second issue, developers could request local/international water-quality control authority to provide them with data for training purposes, if available.

Recommendations
Following are some useful suggestions and recommendations to design a secure and reliable IoT-WQMS: WQM parameters: Based on technical review of IoT-WQMS given in Section 4, most recommended WQM parameters [32,35,48]  Research consensus on these parameters is logical because they have high correlation with other parameters (Table 2) [19][20][21]. In addition, these parameters could better predict the overall water quality. For example, turbidity shows how much shady or cloudy target water is. Moreover, it is highly correlated with total suspended solid (TSS) [35]. When water is dirty, its turbidity is high. Hence, it could be used for example to clean underground/overhead tanks.
As stated earlier, ORP is highly correlated with sanitizing power of free chlorine or any other reducing/oxidizing chemicals in water [85]. It has a high correlation with presence of E-Coli bacteria. Temperature has great impact on overall water quality. It is because it affects pH, EC, DO, etc. Due to this fact, temperature measurement are necessary to compensate other parameters. In addition, it could also be used to infer other parameters such as DO [86]. EC is utilized to measure alkalinity, hardness, and some solids dissolved in water. Finally, pH measures acidity or alkalinity of water.
WQM sensors: As different manufacturers produced sensors for similar applications, therefore selection of appropriate sensors strongly impacts overall system efficiency. Range, response time, resolution, sensitivity, and reliability are some important considerations while choosing a sensor. For example, some sensors are designed in such a way when they are submerged in water, then their sensitive parts are auto cleaned when water flows with high pressure. On other hand, if same sensors are submerged in static water (e.g., overhead tank), then their sensitive parts may get contaminated due to reactions with water and contaminations [48].
Sensors-Node: It can read sensors data, recondition, process, update local displays if any, and transfer data to a master unit or a cloud server via a local Wi-Fi router or GSM/GPRS modem. If task assigned to it is simple and complex are intended to be performed in cloud, then developers should use commercial IoT cards, e.g., Arduino Nano 33 IoT card and NodeMCU. Such cards are cheap, power optimized, light weight, and easily accessible. If complex analysis are desired to be performed locally, then developers should involve commercial cards such as Raspberry Pi4 Model B (64-bit CPU), Intel Galileo Gen 2 (32-bit MCU), TI CC3200 Wi-Fi Launchpad (32-bit MCU), etc. If a local Wi-Fi router is not available, then SIM900 GSM/GPRS modem should be utilized. If SIM900 module falls expensive or the range of communication is within few kilometers, then LoRaWAN technology is best option as highlighted in Table 8 [31]. Communication in the line-of-site (LoS) is possible up to 10 kilometers (km). Gateway: For IoT objects to function reliably, all parts of the concerned IoT-based system should be secure. For instance, cyber criminals can hack any connected object such as smart TV, security camera, refrigerator, etc. Some security risks inherited in IoT devices from manufacturers' side are (i) insecure storage and data transfer, (ii) guessable, weak, or hard coded passwords, (iii) hardware issues, (iv) lack of a secure update mechanism and (v) unpatched and old embedded software and/or operating systems. Under such conditions, developers are advised to use IoT gateways [83].
Cloud IoT-Servers: There exists many public cloud IoT-servers [82], which can access and control things, store sensors data, perform analytic analysis, generate early warning alerts, and so forth. However, most of these are not cost free for commercial activities. In addition, data security may also be at higher risk due to third party involvement. Most importantly, services could also be ceased without any prior acknowledgment. Hence, authors are encouraged to custom develop cloud server if feasible to minimize risks.
Machine learning: Finally, authors advise developers to involve ML techniques for optimal results.

Conclusions
This study presented a review on IoT-based solution for quality monitoring of domestic water. Firstly, it introduces readers with the freshwater crisis, including its origin, pollution, depletion of underground water, and seawater desalination. It also details the water quality index recommended by WHO, commonly used water quality index parameters, and WHO recommended safe limits for drinking water. Secondly, it details evolution of water monitoring from traditional to smart water monitoring. For the sake of readers comfort, it briefly elaborates a typical IoT based water quality monitoring system. Thirdly, it presents a comprehensive survey of contemporary IoT-WQMS for domestic water. In this concern, many critical parameters (e.g., sensors, cloud service, user-interface, and gateway) are discussed and compared. In addition, each article is also rated using our proposed empirical rubric, which is based on WHO standards of drinking water. Fourthly, in-depth technical discussion and analysis are offered related to IoT-WQMS. Finally, authors also suggested a set of useful recommendations to design an efficient IoT-WQMS for domestic water.
To conclude, this study would surely benefit the research community interested in smart water monitoring, as well as engineers developing applications for smart environments (e.g., smart homes, offices, and cities).
As a future work, it will be interesting to explore optimal designing of smart wart quality monitoring system, exploring optimal portable sensors' technology, usage of secure and reliable IoT servers, and devising resilient schemes mitigating potential security breaches.