On-line water quality inspection system: the role of the wireless sensory network

There is an increasing dependence on freshwater sources for various human activities because of population growth and rising industrialization across the globe. Meanwhile, the safety of available freshwater is threatened by the massive generation of waste from increasing domestic and industrial activities. The need for continuous assessment of the quality of the environmental water available has become a crucial research concern. The conventional techniques commonly used are not sufficient to meet the expanding demand for real-time, rapid, low-cost, reliable, and sensitive water quality monitoring (WQM). The use of wireless sensor networks (WSN) has been proposed by various researchers as a sustainable substitute for the traditional processes of monitoring water quality. In this work, an array of the literature on the practical applications of the networks in the assessment of vital water quality parameters such as pH, turbidity, temperature, dissolved oxygen (DO), chlorine content, etc., were surveyed and analyzed. Various technologies such as machine learning, blockchain, internet of things (IoT), deep reconstruction model, etc., were incorporated with WSN for real-time monitoring of water quality, data acquisition, and reporting for a broad range of water bodies. The survey shows that the networks are comparatively affordable and allow remote, real-time, and sensitive measurement of these parameters with minimal human involvement. The use of a low-power wide area network (LPWAN) was also introduced to solve a major problem of power supply often associated with the use of WSN. Recent developments also showed the capacity of WSN to assess simultaneously multiple water quality parameters from several locations using unmanned aerial vehicles (UAV). However, the networks rely on established parameters to indicate a compromise in water quality, but in most cases, fail to identify which pollutant species are responsible.


Introduction
Clean water is significant to the sustainability of life in any given ecosystem. Drinking water quality (DWQ) occupies a prominent position in the well-being and conservation of human health and other biological habitats. It is, therefore, of utmost importance to continuously assess the water quality (WQ) used for industrial and household activities, circulation in the environment, agricultural purposes, human consumption, and other vital applications. In [1], monitoring was defined as the gathering of information at set locations and at regular intervals to make available data that may be employed in the definition of existing conditions, determine trends, etc., while WQ is a significant criterion for scaling water demand and supply [2]. In [3], water quality monitoring (WQM) was defined as the analysis of biological, physical, and chemical characteristics of water. This practice requires indexing of numerous parameters (some listed in table 1), which could be complicated, leading to a lot of unresolved issues concerning the yardsticks for scaling up the quality of water in general [3]. This complication comes from the complexity of parameters that affect WQ and the large variability of parameters employed in describing the status of the quality of water bodies. Hence, various all-encompassing attempts to describe the condition of WQ in simple terms without compromising its scientific significance are made [4,5].
Conventionally, many effective technologies such as UV-vis spectrometry, laser-induced breakdown spectroscopy (LIBS), atomic absorption/emission spectroscopy, and inductively coupled plasma optical emission spectrometry (ICP-OES) etc., have been used in the evaluation of WQ [18,19]. They require sampling and laboratory techniques, which could be time-consuming, resulting in a delay in detection and congruent response to contamination, and are expensive to run [20,21]. These techniques involve comparing experimentally generated parameters with existing standards. Some other less costly methods are also used to monitor environmental water, and each of them has its application merits and limitations [22]: 1. Artificial sampling with handy WQ monitoring devices followed by laboratory analysis. This strategy applies to only samplings on cross sections of rivers and lakes with a regularity of sampling that ranges from many times daily or several times in a month.
2. Automatic and continuous assessment of environmental water parameters by an automatic monitoring system (AMS) which consists of monitors and control centres, in addition to various monitoring substations. Data is remotely and automatically transmitted. The on-line environmental water parameters (EWP) were provided by each station. However, these systems are expensive and exert some unfriendly ecological pressure on the surrounding environment.
3. Environmental water assessment with remote sensing technology (RST) which detects the specifics of a spectrum of an electromagnetic wave, in a non-contacting strategy concerning the water body. After the processing of information from the illustrative spectra collected, its physiochemical properties are subsequently determined. Nonetheless, the accuracy of this sensing tool is low and difficult to carry out online monitoring.
4. Water quality monitoring (WQM) technology obtained by employing some aquatic organisms' sensitivity to the presence of toxic materials in water bodies and corresponding changes in the activities of diverse organisms, in different water bodies is measured and analysed. Subsequently, the qualitative assessment  [8,9] Biological oxygen demand (BOD) The presence of organic material or aerobic organism < 1 mg l −1 (after 5 days) [10] Chlorine concentration Chlorine pollution 1.0 to 4.0 mg l −1 . Electrical conductivity Amount of Impurity. Cleaner water is associated with lower conductivity. Conductivity is also directly related to TDS. 500-1000 μS cm −1 [11] pH Basicity and acidity of water 6.5-8.5 pH [12] oxidation-reduction potential (ORP) The propensity of a solution to lose or gain electrons. A positive ORP is indicative of water as an oxidizing agent, while a negative ORP specifies that water is a reducing agent.

Temperature
Indicates the microbial and Physico-chemical changes in the water passing through circulation systems.
- [13] Turbidity The presence of biological and chemical particles in water 0-5 NTU Free residual chloride Correlates with the absence of most disease-causing organisms, and hence measures the potability of water. 0.2-2.0 mg l −1 [14] Nitrates Presence of nitrates < 10 mg l −1 Total dissolved solids (TDS) The amount of organic and inorganic materials, dissolved in each water volume 500 ppm [15] Water level (WL) Indicates the difference between the fixed base water surface and the free water surface. Additionally, a reduction in this difference and water quality result in a decrease in water environmental capacity and a decline in water quality.
- [16] Ca 2+ concentration Water hardness - [17] Fouling thickness Surface water contamination 1 km [17] report of the WQ is obtained. Yet, these monitoring strategies fall below the high accuracy expected of environmental water monitoring (EWM).
Thus, WQM could be realized summarily through (1) microbial and physiochemical measurements [23]. In physiochemical measurement, parameters to be measured include pH, conductivity, turbidity, chlorine content, electrical conductivity, temperature, flow, and oxidation-reduction potential (ORP). The analysis of these parameters can be quick, on-line, and less expensive than the microbial measurement. The United States Environmental Protection Agency (USEPA) [24] conducted studies that indicate contaminants affect the parameters of water in definite ways which can be detected and monitored with the aid of proper water quality sensors. Up till now, commercially available products for measuring these parameters come with their application penalties such as cost of procurement and maintenance, bulky size, low accuracy, poor efficiency, and insufficiencies in meeting practical needs for specific applications.
Wireless sensor networks, integrated with some other technologies, such as blockchain, machine learning, the internet of things, drones and robots, low power wide area network (LPWAN) etc., have been exploited in recent times, as a veritable alternative for remote, real-time, low cost, and accurate monitoring of water quality. In this work, we considered up-to-date designs, implementations, and possible commercial scale-up of these technologies in the monitoring of water quality parameters, for diverse water bodies, including lakes, rivers, household drinking water, sewage water, etc. (a) A model of a WSN water distribution system [12], with permission from Springer Nature (b) a typical water quality detection pipeline using WSN. Keys: Tem: Temperature; Tur: Turbidity; Con: Concentration; WL: Water level.

Water quality indices (WQI)
Water quality indices are a tool to gauge the status of water quality for expected use, which is expressed as one dimensionless figure that indicates the quality of water in a simple form through the summation of selected measured parameters [25]. In WQM programs (figure 1), WQI is used as a tool to measure trends, highlight conditions of the environment, and assist the decisions of governments in the assessment of the effectiveness of regulatory programs [26,27]. It is therefore the most all-inclusive means of synthesizing and summarizing complex water parameters data into a composite index that is simple to comprehend and interpret [28] by even a layman. It was introduced in the 1960s and is categorized into four main groups which include (1) public indices, (2) specific indices, (3) design and planning indices, and (4) statistical indices [29]. The parameters used to consist of 70% chemical, 24% physical, and 6% biological. In table 1, the breakdown of the various parameters commonly used and their implications in WQM are presented.

Water quality inspection systems (WQIS) based on WSN
The level of growing pollution, directly connected to population growth, industrialization, and agricultural activities, with their associated consequences on water resources, requires the employment of water quality inspection systems which quantify and evaluates a given water body quality. Several models have long been employed by various countries to evaluate the WQI and are extensively discussed in the literature [2,6,25,26,[31][32][33][34][35]. Given the advantages and limitations of using WQI, advances in wireless sensing technology, information, and communication technologies (ICT), and artificial intelligence in recent times, this short review seeks to explore possible advancements from models to devices designed for automated water quality inspection system based on WSN (as demonstrated in figure 2), the parameter measured and possible industrial scale-up of such system. The theories and types of WSNs and their applications in environmental monitoring have been described in earlier published reports [36][37][38].

Instrumentation
Cloete et al [1] designed and developed a WSN-WQM system, to notify the user of the real-time (or on-line) WQP ( figure 3). A sensor node with pH, conductivity, temperature, ORP, and flow sensors was designed, and fabricated on a Vero-board, including signal conditioning circuits. ZigBee receiver and transmitter modules were employed for the transmission of data from the measuring nodes to the notification nodes. The microcontroller then transmitted the measurements from the measurement node that processes the raw sensor data into usable measurement values wirelessly to the notification node via the wireless XBee module. A notification node which consists of an LCD, microcontroller, and buzzer (that signals when a parameter is at an unsafe level) was implemented to display the different WQP. The results demonstrate that the system can read physiochemical parameters, and can effectively treat, transmit, and display the readings. However, each sensor generates a signal that necessitates conditioning of the signal to interface with the microcontroller making the system more complex instead of using built-in ADC microcontrollers.
A similar system was designed and implemented by Postolache and coworkers [39] for a distributed measurement system for WQM. The system consisted of multiparameter measurement functionalities, wireless data communication, and auto-associative neural networks based on advanced data processing sensors. The system was designed to monitor the temperature, turbidity, pH, and conductivity of water. The parameter sensors were linked to field point data conditioning and acquirement blocks. The processing of the data was communicated through numerical linearization and compensation of disturbance factors acquired by the sensor was executed by the field stations. Validation, reconstruction of data, the fusion of data, and signalling of possible contamination tasks were executed using a personal computer (PC). A general system for mobile communication (GSM) was used to transfer the data from the sensors to the PC.
Kong and Jiang [40] designed a wireless sensor networks (WSN, figure 4) system for monitoring of water environment which consists of (1) data monitoring nodes, (2) a data video base station and (3) a remote monitoring centre for monitoring of a large range of waters. To recognize the water body (for example river, lake, wetland, ocean, and reservoir), for each assessment, the WQM system was fitted with capacities to perceive, acquire, process, and transmit video information in key areas for diverse parameters of water environment like the temperature, turbidity, pH, dissolved oxygen, electric conductivity (EC), etc. The designed WQIS met the need for real-time remote assessment of the water environment and a promising application in other fields such as intelligent traffic, medical telemetry, industrial control, and so on. Another WQM system adapted for a complex and broad range of water body monitoring such as lakes, deep and shallow groundwaters, rivers, reservoirs, and swamps, for the temperature and pH assessment was designed by Jiang and coworkers [22]. The limits of accuracy and capacity to accept a large range of sensors make the system applicable for broader prospects. In aquaculture industries, the safety of aquatic produce and production are intimately linked with the WQ status. Hence, it is imperative to regularly monitor the WQ to understand per time the WQ and the developmental trend in the modern farming industry. Accordingly, Wang and co-workers [41] designed a universal long-distance WQM-WSN ZigBee-based system with simple architecture, that is made up of data acquisition, measurement and sharing layers. Real-time water quality parameters were observed remotely. The uniqueness of the work lies in the current and historical WQ tracking function of the low-power system. Results realized from the use of the system justified a stable and convenient WQM sensor. Other related works were designed and implemented by Niina Kotamäki [42], Nasirudi [43], Thessler [44], and coworkers.
Turbidity is a very significant indicator through which valuable information could be gotten quickly, at a comparatively low cost and real-time basis. Turbidity is caused by the suspension of biological and chemical particles in water and possesses both aesthetic and water safety implications for drinking water supplies. It does not reflect a direct threat to public health but does suggest the presence of pathogenic microorganisms and represents a significant indicator of harmful influence throughout the water supply system, from source to the point of discharge. In other words, high water turbidity indicates the presence of microbial pathogens, and high turbidity in filtered water implies insufficient pathogen removal, suggesting biofilm sloughing, oxide scales or entry of pollutants because of mains breaks [45]. On this note, Lambrou [46] designed and developed a low-cost, small-sized, lightweight, simple, and low-power turbidity system for the assessment of drinking water quality in households. The system operates on the principle that light intensity scattered by the suspended matter is directly related to the concentration of the suspended materials. Laboratory examination of the system has delivered satisfactory stability and precision. The sensor platform could also be used for other sensing purposes such as water temperature, chlorine concentration, pH, etc. Such a multiparameter monitoring system could then provide useful information relating to harmful agents and biological contaminants in household drinking water, to raise awareness and stimulate better handling of water. Subsequently, the same group conceptualized, designed, and implemented a cheap and universal in-pipe and real-time WQM tool for drinking water distribution layouts and consumer sites. The result from real sample analysis shows that the proposed system can detect some high-impact biological and chemical pollutants (e.g., E. coli bacteria and arsenic ions ) even in their trace amounts [21].
An ingenious work by Flynn and co-workers [47] titled DEPLOY project described how the state-of-the-art WSN technology could be used for real-time, continuous, time-saving, and cost-effective monitoring of River Lee (as a reference) in Ireland. Significant parameters such as pH, turbidity, river depth, DO and conductivity were monitored. The system consisted of a data collection station, and wireless technology through which data is collected for statistical analysis and interpretation by office experts. As a result, any threat to the safety of the water could be related to relevant personnel for appropriate water quality control actions. Although this project was a significant one, the requirement of expertise to interpret the data generated would still make it quite difficult for conventional applications.
Ijaradar and Chatterjee [48] developed an improved system that monitors the WQ in real time for residential homes. The system is made up of a Raspberry Pi 3 Model B, ADS1015 analogue to digital converter, and WQM sensors such as water temperature, turbidity, pH, and EC. The system is designed in a way that it receives the sensor data in analogue signals form. The ADS1015 ADC translates these signals into the digital format and sends it to a Raspberry Pi and displays the data and sends it to a cloud-based using a Wired/Wireless Channel. The system can trigger an alarm when any compromises are found in the water quality. This is significant in the prevention of outbreaks of diseases because of water pollution. Another cloud-based data storage for on-line remote monitoring of WQ for early warning was designed and implemented by Fleischmann et al [49] and Osman et al [11].
A related work by Rasin and Abdullah [50] represents a WSN which features a high-power transmission Zigbee-based technology coupled with a compatible transceiver and visual digital display of the analyzed result. Three sensor types; pH sensor, temperature sensor, and turbidity sensor based on phototransistor were employed. The base station consists of a Zigbee module which collects the data forwarded wirelessly from the sensor nodes. The data from the end device nodes are forwarded to the computer with the use of the RS 232 protocol and are displayed digitally using an in-built graphical user interface (GUI) on the base monitoring station. The GUI platform was developed using Borland C++ Builder programming that can interact with the hardware at the base station. The real values of temperature, pH and turbidity of water are shown in real-time.
A similar sensitive and more accurate device was proposed by Pasika and Gandla [51] to monitor several WQPs such as turbidity, pH, and temperature. Here, four sensors including turbidity, pH, ultrasonic DHT-11 microcontroller unit as the main module for data processing, and one data transmission ESP8266 Wi-Fi module (NodeMCU) were set up. The device is also designed in Embedded-C where the written code is stimulated using Arduino IDE. The data is collected by two sensors and transformed into analogue signals; using the on-chip ADC on the MCU, the sensor analogue signals are translated into the digital format for additional processing. The output of the other two sensors is connected directly to the digital pins of the MCU units. The sensor data processed by the MCU is transferred to the ThingSpeak server with the use of the Wi-Fi data communication module ESP8266 (NodeMCU) to the central server. Each parameter value was compared with the predefined equipment, and values of the sensor and error are determined.
Meghana et al [52] developed a WQM system that is equipped with suitable sensors to measure WQP such as pH, turbidity, dissolved solvents, and temperature. These sensors were connected to an Arduino board (ADC) for data processing and Raspberry Pi module 3B was used as a transmitting module that transmits on-line data in the designed system. The system is tested both indoors using tap water and outdoors using polluted water. For indoor testing observed, results show that the output produced is almost precise and accurate for all water parameters. The outdoor application was not as promising as the indoor usage due to the strong acidity and high turbidity of the real sample polluted water. The system is adaptable and can be used to measure other parameters  Zigbee, and Wi-Fi Cloud storage and transmission of water quality data collected from more than one source of water. [16] Solar powered WSN pH, temperature, TDS, and turbidity Zigbee, and GSM Solar powered low energy consuming WSN for reservoir water quality inspection [57] IoT and blockchain-mediated WSN EC and Cu 2+ GIS On-line detection of pollution sources on irrigation water and pathways. [62] DFRobot gravity-WSN pH and turbidity LoRaWAN Inspection of community and sanitation company treatment plant.
[58] multi-parametric WSN Chlorine, DO, pH and temperature and electrical conductivity (EC) Radia frequency (RF) River water quality inspection using Sutlej river, Bassi, Ludhiana in India as a reference. [63] unmanned aerial vehicles (UAV)-WSN Fouling thickness GSM Miniaturization of sensors, harvesting of energy data infusion, etc., using UAV for collection of sensing data from different locations. [17] Smart WQM-WSN pH, DO and temperature RF Smart WQM system in IoT for the monitoring of aquaculture pond.   oxidation-reduction potential (ORP), conductivity, pH, DO, temperature, and turbidity - Drinking WQM system that cuts water supply through pipes as soon as the contamination is detected. [12] Open-source WSN ORP, pH, Temperature and EC Cellular or wi-fi Intermittent and continuous monitoring of drinking water quality in building plumbing [74] Maximum power point tracking controller-WSN Monitors freshwater sources. [59] of water as well. In recent times, Das [53], Adamo [54] and coworkers detailed a similar report on real-time monitoring of river and sea water quality respectively. Another rare work was designed and implemented on the measurement of chlorine concentration among other parameters in water by Chung et al [55]. An MPC82G516A and PIC12F629 microcontrollers (8-bit), TB88-30 (Step up DC to DC converter) and nRF24L01 wireless transceiver module (2.4 Hz) were used to fabricate a low power consuming basic wireless node. These were extended by diverse firmware coding to 3 types of nodes, namely, the Sensor node (SN), Repeat Node (RN) and Main Nodes (MN). The Ion Sensitive Field Effect Transistor (ISFET) with a readout circuit, temperature sensor (DS18B20), and residual RC-24P Cl meter are assigned to each sensor node to evaluate the pH, temperature, and Cl − concentration in a water pool. The WQPs realized from the SN were transferred to the RN through the nRF24L01 wireless module. Through the RS-232 interface, the data was transferred to a PC from the MN. Similarly, Yang and coworkers [56] also implemented a sensor network consisting of a series of SN located across the areas of interest to monitor pathogens, physical properties, chemical analytes, etc. Here, data generated at each SN was transmitted through the acoustic wave to an uplink node.
Interestingly also, some African countries that have been less economically privileged have leveraged the use of WSN to address the rising water pollution in their continent. Lately, Gurusamy and Diriba [57] designed and implemented solar energy-powered WSN (figure 5) with a low-power-consuming Arduino Mega processor for monitoring of water quality of reservoirs situated at Bule Hora University (BHU) in Ethiopia. The sensor network measures the pH, temperature, turbidity, and total dissolved solids of the reservoir at different time intervals. The results realized showed that the network was stable and sensitive but attained very narrow reading ranges of the parameters measured. In Kenya, Mokua and team members [58] designed LoRa technology connectivity wireless sensor networks for monitoring pH and turbidity of community water and sanitation company treatment plant. Related work was designed by [59] for the assessment of water pH value, Ca 2+ concentration, EC, DO, F − content, NO 3 − presence, ORP, and temperature.
The contribution of other researchers in developing WSNs integrated with different technologies, the parameters studied, and the nature of the water bodies monitored are presented in table 2. One of the significant machine learning strategies used successfully, in the field of technology and environmental monitoring is deep learning (DL). It teaches a computer model how to carry out a classification task directly from images [60]. As a result, Jin and co-workers [61] proposed the use of a Deep Reconstruction Model (DRM) based on the Elman neural network (ENN) and the advantages of DL to perform the analysis of a nonlinear system (NLS). Based on Figure 6. (a) Fuzzy logic system in WQM, (b) Fuzzy inference system used to describe WQ. Reproduced from [12] with permission from Springer Nature. TU: turbidity. G: desirable, N: Acceptable; B: Unacceptable. the result realized, they concluded that the model proposed is efficient, and suitable for NLS with memory effects, such as the titration pH, distillation tower in the chemical industrial processes etc.
Real-time water quality monitoring systems using IoT (Internet of Things) can measure the quality of water parameter sensors such as pH, turbidity, and temperature, using different development boards: Arduino, Raspberry pi and many more [90]. These systems can keep a strict check on the WQ. However, in case of water contamination, the Arthur is alerted by a buzzer alarm. Components for building such systems are less expensive and can be used both in a field and indoors for monitoring river waters and tap drinking water. Based on this, Priya et al [91] described a modern advancement in the field of in-pipe real-time pollution detection systems based on IoT technology. The system monitors water supplied to the public/consumers through pipelines at regular time intervals. The analysis of the real-time data was done with fuzzy synthetic evaluation based on the [92] method, which is uploaded over the cloud/internet ( figure 6). On detection of contamination in the water, an alert/alarm is sent by the system to the consumers with effect to the WQP so that further flow of water is prevented in the affected region within the pipe using a solenoid. The unaffected/unpolluted regions within the network of distribution keep supplying quality water to the consumers in the meanwhile. Their results show the implemented system can analyze WQP in real-time and process successfully transmitted data to the internet and inform users about the safety of the water in any region. Similar works were reported by Geetha [93], Wibisono [17,94], and coworkers.
Recently, Lin and co-workers [62] integrated IoT and blockchain technology which combines with a directed acyclic graph (DAG) (figure 7) to configure WSN for the monitoring of EC and Cu 2+ pollution sources and pathways in upstream irrigation water using the WQ analysis simulation program (WASP) model.

Conclusion and future perspectives
The use of WSN presents a favourable sensing tool for monitoring and surveillance of the WQ of municipal water supplies. The utmost benefits lie in their employability in remote, real-time measurement of a broad range of water bodies and affordability. Nonetheless, these WSNs suffer from insufficient supply of resources such as memory, power, energy/power consumption and communication bandwidth. Therefore, the efficiencies and effectiveness of using the WSN in water quality monitoring applications would profit from the improvement of these resources. Another major setback is the capability of the sensors to indicate a compromise in water quality without specific identification of the responsible pollutant in most cases. Future work would hence involve integrating technologies that could make up for the operational gaps identified in using WSN. Techniques for power optimisation need to be examined to improve automation and the lifetime of sensor nodes. Integrating electrochemistry and WSN could also solve the problem of the specification of pollutants in water bodies.