Water quality monitoring (WQM) systems seek to ensure high data precision, data accuracy, timely reporting, easy accessibility of data, and completeness. The conventional monitoring systems are inadequate when used to detect contaminants/pollutants in real time and cannot meet the stringent requirements of high precision for WQM systems. In this work, we employed the different types of wireless sensor nodes to monitor the water quality in real time. Our approach used an energy-efficient data transmission schedule and harvested energy using solar panels to prolong the node lifetime. The study took place at the Weija intake in the Greater Accra Region of Ghana. The Weija dam intake serves as a significant water source to the Weija treatment plant which supplies treated water to the people of Greater Accra and parts of Central regions of Ghana. Smart water sensors and smart water ion sensor devices from Libelium were deployed at the intake to measure physical and chemical parameters. The sensed data obtained at the central repository revealed a pH value of 7. Conductivity levels rose from 196 S/cm to 225 S/cm. Calcium levels rose to about 3.5 mg/L and dropped to about 0.16 mg/L. The temperature of the river was mainly around 35°C to 36°C. We observed fluoride levels between 1.24 mg/L and 1.9 mg/L. The oxygen content rose from the negative DO to reach 8 mg/L. These results showed a significant effect on plant and aquatic life.

1. Introduction

Monitoring and communicating water quality data in real-time is critical for promoting sustainable development. Rivers are vital resources that support the life of both humans and animals. Hence, their importance cannot be overlooked especially in developing countries where there are several reports of water-borne diseases [1, 2]. Water quality monitoring networks are required to monitor rivers efficiently. The goal is to alert stakeholders and the citizenry about changes in river water quality. Traditionally in Ghana, trained field officers are sent to the field to collect water samples for analysis in the lab. This approach is challenging, time-consuming and expensive, and may not yield the required temporal granularity that is needed [3, 4]. New devices capable of in situ measurements have been proposed to overcome some of the challenges associated with traditional methods of gathering samples [4, 5]. Examples of such devices included pH meter HANNA-pH 211, HACH-2100 P turbidity meter, and HACH-Dr 5000 spectrophotometer, which are used mostly to measure some of the physiochemical parameters of the water. These devices could not ensure reliable and timely data collection during the water quality monitoring process since they are not deployed permanently in the water but have to be taken to site when required and in most cases, this may be well after the event [6, 7].

A modern approach is to make the devices autonomous by equipping them with wireless transceivers and form them into a wireless sensor network (WSN). WSNs thus comprise of autonomous, self-configuring and battery-powered sensor nodes and base station nodes (or sinks) capable of measuring some physical phenomenon and transmitting the information acquired to a central office. The sensor devices, apart from sense, are capable of performing computations and communicating via different network communication protocols (such as ZigBee, WiFi, WiFiDirect, GSM, and WiMax) [3]. The sensor nodes are usually small, low-cost devices suitable for a variety of applications ranging from environmental to security applications which do not require any existing infrastructure to operate [8]. These sensors may be fixed at a permanent location or allowed to move within the environment to measure the parameters of interest.

The spatiotemporal characteristics of water may pose unique challenges for WSN deployment. In freshwater bodies, the sensor nodes deployed at different sampling locations from where the data is collected and preanalysed before transferring to a remote central office. Communication is achieved between the sensor node and the remote central office using a low-power radio transmitter in order to maximise the lifetime of the sensor nodes. The use of wireless sensor networks comes with advantages such as autonomy, reliability, robustness, and flexibility, speed, accuracy, and cost-effectiveness [9]. These advantages make WSN a preferred technology to monitor the presence of pollutants in river bodies and gather a substantial amount of information for policy implementation and managerial planning. In most deployments, the data gathered by the sensor nodes is sent through a gateway to the cloud or a database using an existing communication network. The sensed data from the sensors are made available on a web portal in real time, enabling stakeholders to intervene in the water quality management processes effectively.

In this paper, we demonstrate a practical solution to the water quality monitoring challenges in Ghana. Libelium wireless sensors were deployed at the intake to the Weija dam in Ghana to obtain continuous real-time data which is made available to the public via a web portal. The accuracy and precision of the parameters recorded by the smart sensor nodes are compared to the measurements obtained by the field personnel in the laboratory. The choice of using Libelium sensors in this project was influenced by (1) robust sensor construction (sensor modules are housed in a waterproof case); (2) high accuracy in sensor readings; (3) simple setup process and ease of use; (4) cost of sensors and maintenance warranty policy; (5) low energy consumption; (6) reliability; (7) online and offline support through webinars, product training, discussion forum, and technical inquiries through email; and (8) software compatibility with other systems such as Arduino sensor board. These meet the criteria set for selecting sensor devices for water quality monitoring [10]. The idea is to benchmark the performance of these sensors to enable us to compare to fibre optic sensors which will be designed and deployed in the future project.

The rest of the paper is organised as follows. Section 2 of the paper provides detailed information on real-time deployments on smart water quality monitoring in some parts of the world. Section 3 provides information on the materials and methods used and provides background information on water quality parameters, system deployment strategy, data storage, monitoring, and transmission. Section 4 presents WSN design experimentation, results, and discussions. Section 5 provides future directions. Finally, Section 6 concludes the paper.

Wireless sensor networks have been widely adopted to monitor different phenomena in the environment [1116]. For example, WSNs are used to monitor air quality [17], water quality [3], tracking endangered species [18], and monitoring animal habitat [19]. The adoption of WSNs allows the elimination of problems associated with conventional monitoring approaches. An application area that has received attention in recent years has been water quality monitoring. Freshwater sources have been subjected to various kinds of pollution globally. Many projects worldwide have been directed at monitoring and improving freshwater sources in many regions of the world including, Australia [20], Ireland [21], China [22], Fiji Islands [23], Portugal [24], and Kosovo [25]. In most of these projects, physical parameters were measured, and data collected over a communication infrastructure to a central repository.

In Australia [20], the authors deployed wireless sensor nodes to monitor coastal underground water resources in the Burdekin area, Queensland, Australia. The sensors were deployed in the field to collect real-time water quality data and the amount of water pumped from the area from April 4, 2007, to April 18, 2007. The distance between two nodes on the average was around 850 meters. The use of long-range communication caused end-to-end delays. Hence, the nodes perform retransmission of data packets for about six tries. To overcome this, the authors used a surge (that is, a multihop routing protocol), a reliable routing protocol to improve the connectivity between nodes. In River Lee in Ireland [21], the authors provided a water monitoring system called DEPLOY. The DEPLOY project connected five (5) different zones in the city of Cork to monitor the water quality using a multisensor system in 2009. GSM was used for data transmission from the wireless sensor network backbone to the central repository. In the Fiji Islands [23], the authors designed a smart WQM system based on Internet of Things (IoT) and remote sensing (RS) techniques to improve the traditional methods for measuring water quality parameters in the Fiji Islands. The sensor nodes transmit the sensed parameters via a GSM communication module. Sensed data are read and transferred continuously for an hour, and the system is made to sleep for 15 minutes for energy conservation. The authors further extended the lifespan of the batteries used by the sensor devices by setting idle modules to off mode. In Portugal [24], a WSN project that uses a Libelium Smart Water kit for remote water quality monitoring was implemented. The nodes are designed to use 802.15.4 radios to communicate to the Meshlium (i.e., this device serves as the gateway) via 3G or GPRS communication module. The sensor devices are equipped with 6600 mAh battery and a 2 W solar panel which improved the lifetime of the sensor devices, the used of the 3G communication module (Meshlium). In the River Sitnica [25], an intelligent water monitoring system is deployed to monitor water quality parameters in Kosovo to provide datasets to policymakers, water experts, and citizens. Measurements were taken every 7 or 10 minutes, or on-demand through a gateway node to a central monitoring node through a ZigBee protocol and GPRS.

Although there are attempts to implement and deploy sensor devices to monitor and measure water quality continuously in some parts of the world, factors such as cost, energy efficiency, hardware/software issues, and communication issues challenge the implementation of such projects in developing countries [26]. This implementation to the best of our knowledge serves as one of the first real-time deployments for monitoring rivers. A critical consideration for monitoring river bodies in real time is to obtain a large amount of data for trend analysis and scientific research studies. This work, therefore, is one that showcases an application of wireless sensor networks for real time and continuous monitoring of river bodies in Africa and makes data available for scientific discourse and decision-making.

Also, we presented a new data format different from the Libelium binary data format. To minimise the energy consumed by the nodes, we reprogrammed the devices to control the data transmission and harvested solar energy to power the sensor nodes throughout the project.

3. Methods and Materials

Polluted freshwater sources threaten the existence of aquatic life (both plants and fish), humans, and animals relying on the water bodies. Several factors affect the level of chemical concentrations of physiochemical parameters in freshwater. In this study, water quality sensor probes capable of measuring pH, calcium ion (Ca2+), conductivity, dissolved oxygen, fluoride ion (F-), nitrate ion (NO3-), oxidation-reduction potential, and temperature are used for detecting contaminants in a field experiment. The implementation details of the proposed approach for measuring water quality parameters are provided in this section. Detailed description of the architecture of the river water quality monitoring system, the system deployment strategy, data storage, monitoring, and transmission system are provided.

3.1. The Architecture of the River Water Quality Monitoring System (Network Architecture)

The network architecture in Figure 1 shows the deployment area, the communication infrastructure, and the monitoring station where the data collected are analysed.

The Libelium Waspmote (that is, the smart water kits and smart water ion kits) sensor nodes were used for the deployment. The network was designed using the star topology, as illustrated in Figure 2. Each sensor node communicates directly with the base station via the gateway node to reduce latency. The senor hardware architecture is composed of the sensing subsystem, the processing/computing subsystem, power subsystem, and communication subsystem, as shown in Figure 3. The sensing subsystem depends on the sensor probes to sense parameters from the region of interest.

The processing subsystem is composed of the data acquisition of raw data, data processing, and data analysis. The power subsystem supplies power and monitors the power consumption of the sensor node. The primary power source of the Waspmote Smart Water Sensor is a rechargeable battery. A solar panel is also attached to the power subsystem to harvest solar energy from the environment to recharge the node’s battery after depleting over time. The communication subsystem used is varied. The common types used by the smart water device include WIFI. The Libelium Waspmote sensor uses cellular communication modules such as 3G/4G, General Packet Radio Service (GPRS), long-range 802.15.4/ZigBee (868/900 MHz), and Wideband Code Division Multiple Access (WCDMA) connectivity to transmit data/information to the cloud. The 4G communication model features a GPS that enables researches to perform real-time monitoring and allows the use of a SIM card for GSM network communication.

3.2. System Deployment Strategy

The section presents the system deployment strategy and focuses on the sensor probes, the calibration process, and the cloud-based web portal design used for reporting and analysing the data obtained from the deployment environment.

3.2.1. Sensor Probes

The sensor probes measure the levels of concentration of contaminants and offer several advantages. These include the following: (1) real-time information on concentrations will provide an adequate solution to the ongoing questions to the management of freshwater sources in Ghana especially at a time that the various freshwater sources are being contaminated with mining activities; (2) reporting of higher or lower concentrations will inform decision-makers about treatment levels to obtain good-quality drinking water; (3) continuous and accurate information will be provided on hourly, daily, monthly, and yearly bases about the concentration loads of the freshwater sources; (4) trend analysis; (5) development of statistical models to support realistic estimation of concentrations over some time using discrete time-series information; (6) provision of new insights for scientific studies and analysis about the ecosystem health; and (7) early warning signal [28]. To better understand the choice of the physiochemical parameters used in this experiment, we provide brief descriptions of each of the parameters in Table 1.

3.2.2. Sensor Calibration

In WSN for WQM-based applications, data obtained from the sensor nodes affect data analysis and reporting. Therefore, the sensor nodes must be handled with much care from calibration to the deployment environment. Sensor calibration is performed to reduce errors, maintain consistency and accuracy in measurements, and to improve sensor performance [29]. Manufacturers calibrate industrial sensors for environmental applications, but for real-time monitoring applications, it is recommended that sensors are recalibrated before deployment to remove the errors in data readings. Sensors become faulty or erroneous due to the following factors: (1) subjection to heat; (2) cold; (3) humidity, and (4) shock during assembling, packaging, shipment, and storage. Wireless sensor devices also are likely to lose their sensitivity over time and hence, require regular recalibration to maintain their accuracy [30]. A well-calibrated sensor will, given an input, produce the same output independent of how many times the measurement is taken (i.e., precision). The sensor node’s precision is affected by noise and hysteresis.

The sensor probes are calibrated with a standard reference solution for stable sediment concentrations. Each of the probes was immersed in distilled or deionised water to clean any impurities before placing the probe in the reference solution to obtain the precise value of the cell constant. The pH sensor was calibrated to give accurate and precise pH readings. The buffer solutions were pH 4.0, 7.0, and 10.0. The pH calibration was performed at 25°C. The accuracy and precision of the probe were determined after some time to obtain the following standard pH values of 1.998, 2.099, and 2.244, respectively. A similar calibration process was undertaken to immerse all the other probes into their respective buffer solutions for some time to obtain new standard values as follows: conductivity (124 and 176), calcium (2.049, 2.430, and 3.981), and DO and ORP (2.796 and 0.00).

The sensor nodes deployed in the freshwater are affected by environmental conditions and interferences during communication which leads to noise. Interference or noise from signals affects accuracy and precision in measurements. It may be seen that hysteresis can lead to data measurement delays which may significantly affect data accuracy and precision. Hysteresis in temperature sensors, for example, may arise in an event where moisture penetrates inside the sensor node. Hysteresis may also arise if an amount of strain is applied to the sensor in freshwater monitoring [31]. For real-time water quality monitoring, wireless sensors perform continuous sensing and transfer the measured values to a storage location for analysis and reporting. Sensors with low signal-to-noise-ratio (SNR) do not support continuous water quality monitoring because such sensors have problems taking repeatable measurements. Also, when the sensor values estimated lags the changes in the river, it affects precision.

3.2.3. Cloud-Based Web Portal Design

The relevance of wireless sensor networks for water quality monitoring lies in their ability to provide up to the minute information to stakeholders. One effective way in which this can be achieved is using web portals and SMS alerts. We designed an intelligent web portal to collect, model, store, retrieve, manipulate, analyse, visualise, and share data and information obtained from the sensor devices in real time. The cloud-based web portal shown in Figure 4 is used to track the positions of the wireless sensor nodes. In smart river monitoring projects, massive amounts of data are generated from the sensing nodes.

The general architecture for the deployment is shown in Figure 5. The sensor nodes transmit data through a GSM/GPRS to the cloud. The Waspmote data frame is designed with a specified structure. The data frame is binary or ASCII, and it also defines frames based on the activity the frame performs (i.e., event or alarm). In this paper, the data frame to be transmitted is shown in Table 2. In the frame structure, each sensor has a unique identification number, the device ID, which is 8 bytes in length. The name of the parameter is stored in the field labelled parameter name which is 16 bytes in size. The sensor type field is a 3-byte field that describes the two kinds of sensor devices used: smart sensor unit and smart water ion. A 4-byte field is assigned to the measured value from the sensor node. The data is measured in real time; hence, we keep track of the date and time the measured value was received. The size of this field is between 3 and 10 bytes. The location information (that is, the sensor device has a GPS sensor on board to measure the latitude and longitude information) is stored in the location field, which is 4 bytes.

The data acquisition system has been designed to transmit water quality data to a monitoring centre via a 4G communication infrastructure. The data values received from the sensor devices are processed and analysed directly online. The connectivity status contains the codes for the 4G connectivity attempts. The system checks for the host, the port, and resource (i.e., the location of the sensor node, the probe ID, and the reading) for availability to establish a connection; it verifies the name of the access point (that is, the APN used is Vodafone Internet), the login credentials (user name and password), the host (that is, the server IP to which the HTTP request is sent with the probe readings), the port number, the connectivity status, and the HTTP status. When these verifications are completed, and a connection is available, readings are sent to the cloud; otherwise, the 4G communication module is put to deep sleep to save energy. When a sensor node is ready to send readings, and it loses the connection, the process is repeated until a 4G connectivity is established for data to be transferred successfully.

3.3. Data Storage, Monitoring, and Transmission (Communication)
3.3.1. Data Storage

Smart water sensors and ion sensors have been deployed at the intake to monitor physical and chemical parameter composition in the river body. The summary of data collected from September 30, 2018, to February 13, 2019, is presented in Table 3. The data obtained was stored in the cloud and retrieved for real-time analysis (see Figures 4 and 5). The pH, electrical conductivity, calcium, fluoride probes, and temperature of the sensor devices were programmed to transmit data packets every 30 minutes and the dissolved oxygen and the oxidation-reduction potential transmitted data packets every hour. The time interval was set to overcome communication delays and energy consumption issues. The data presented here is for a period of five (5) months from September. The data received from the probes are observed in real time from a web portal at a monitoring centre. There were some anomalies observed in the transmission of the data (see Table 4).

The data obtained from the Weija intake were observed to have an average delay of 3.22 minutes. This delay may be attributed to the distance between the sensor nodes and the base station, which is approximately 1500 meters. Other factors that may contribute to the delay include the send time, access time, and transmission time. Based on the results obtained, the average delay may be attributed to the send time, which is nondeterministic and the propagation time, which is dependent on distance.

In some sections of the data collected, due to the MAC protocol implementation, delays were observed. In Table 4, the data obtained from the conductivity sensor on some of the days in November 2018 and the month of January 2019 are recorded indicating the delay time. In some instances, over some seconds, the same data were sent either two or three times since the transmitter did not receive ACK from the base station, it forwarded the data value again after some seconds. For example, from Tables 4, 180.853 was sent after 18 seconds and 9 seconds, respectively, due to the propagation delay. In Table 5, the data obtained from the pH sensor in November 2018 is recorded. We realised that there were anomalies in the reading time, and there were indications of differences in time of receiving the data transmitted from the sensor nodes.

3.3.2. Biofouling

In water quality monitoring applications, the sensors are deployed in the freshwater source for several months and sometimes years due to the application requirements. The length of time the sensors stay immersed in the freshwater sources causes biofouling of the sensors, which affects the accuracy and data consistency, analysis, and reporting. Biofouling is the accumulation of unwanted plants, algae, microorganisms, and animals exposed on the surface, which forms around the sensor node [32]. After some months of deployment of the various sensors, there was data degrading owing to fouling of the wireless sensors (Figures 6 and 7).

The sensor nodes operating lifetime are decreased due to biofouling. Biofouling of the sensor devices generally introduces errors into the measured data values. Conventional methods for removing biofouling as such as wiper mechanisms, copper corrosion mechanisms, and chlorine evolution mechanisms are not suitable for removing fouling of sensors in this environment [3]. These existing techniques are costly and do not efficiently work for the type of sensors adopted for the monitoring process. From the initial deployment date, trends were observed in the river for variations. We observed the high levels of algae bloom and freshwater weeds which contributed to the fouling of the wireless sensor nodes. The sensors were cleaned using a white calico cloth and freshwater monthly in the absence of antifouling guards and housing to prevent biofouling from preventing further degradation in the measured data quality and data accuracy.

3.3.3. Sensor Cable Damage

In the experiment, the cable themselves were left unprotected while the sensor devices were placed in a protective case. The sensor probes were placed directly into the river. An unusual data was received from the second temperature sensor on January 04, 2019. The readings received on that day were 11.765 at 04 : 05 : 07. Then on January 07, 2019, at 16 : 45 : 08 GMT, the data read from the pH sensor was 5.525 and that same day at 17 : 17 : 28 GMT, a pH value of 1.993 was received. A site visits the following day showed that the sensor cables had been damaged, snipped possible by a wild fish or an alligator. This provides an indication of some of the challenges associated with deploying sensor networks in unsafe environments.

3.3.4. Sensor Device Security

Sensor devices deployed for environmental monitoring are usually deployed in open, unsecured areas; it is, therefore, essential to consider some factors when deploying these sensors. The deployment site was selected based on the following factors: (1) security of the sensor devices at the deployment area (that is, away from residents to prevent the devices from tampering or sabotage), (2) river structure (such as spillways, intakes, outlets, and reservoirs), (3) vegetation in the river (such as plants, shrubs, and trees), and (4) activities within the area (such as mining, farming, and fishing) [18]. The Weija intake is a restricted zone with security presence to prevent unauthorised persons from entering the site. The security presence at the intake also prevents illegal activities such as fishing and farming from taking place in and around the intake. The deployment site, therefore, is appropriate for experiments such as this because the safety of the sensor nodes is guaranteed, and the monitoring process is not interrupted throughout the deployment. The Weija intake serves as a significant water source to the Weija treatment plant of the Ghana Water Company Limited (GWCL) which supplies treated water to the people of Greater Accra and parts of Central regions of Ghana. This makes it convenient to install the sensor nodes to monitor the river water quality. Additional sensor nodes may be added when the project is extended. The Weija intake being a restricted zone prevents the operation of fishing and farming activities. Mountains and a large forest zone bound the river feeding into the Weija dam.

3.3.5. Data Transmission (Communication)

The smart water sensor board and the smart water ion sensors are low-powered devices designed to communicate through different radio modules (that is, XBee-PRO, XBee, XBee-PRO, LoRaWAN, Sigfox, WIFI PRO, and 4G (GSM/GPRS, GPS)) to transmit water quality data to a secured database server or the cloud in real time. 4G network transmits data based on the mobile phone network. 4G works better over long distances and covers a large geographical area. 4G is less expensive, easy to set up, and easily maintain. Some factors that affect the reliability of the data are the type of scheduling employed at the MAC layer. Some MAC protocols include Aloha, Slotted Aloha, CSMA/CS, and CSMA/CA. The Aloha works by determining which node will be transmitting data when the multichannel is free. The node is permitted to send data frames whenever it has data; hence, the time is continuous but not synchronised between all nodes in the network. This makes the system highly susceptible to collision. An acknowledgement frame is received when the transmission is successful, or else the node considers the transmission as unsuccessful hence more data frames are sent.

The successful transmission of a data frame or throughput of Aloha is , where is the throughput and is the mean of the Poisson distribution over transmission attempt. The maximum throughput of Pure Aloha is approximately 0.18 (18%) when is 1/2 is equal to the total transmitted frames. To mitigate the challenges of Pure Aloha, the Slotted Aloha was introduced. In Slotted Aloha, the time is divided into discrete time slots which correspond to the length of a data frame. Nodes are permitted to transmit data in the next time slot.

The throughput is maximum when , which corresponds to 37% of the total transmitted packets with 26% collision. In the Libelium Waspmote used in the application developed, the Slotted Aloha MAC protocol is implemented with a time slot of 30 minutes for each node placed in the Weija river. The nodes implemented ZigBee protocol, and therefore each node in the network knows the location of its neighbours, but communication is not permitted between them. All communication from the deployed sensor node is made with a central base station situated about 1500 meters from the nodes, and then forwarded to the cloud where remote processing and monitoring is done. In the duty cycle implemented, we consider the connected stationary network of 5 nodes with a single sink. In the initialisation stage, all nodes are assumed to be awake at deployment time. In the next working cycle, all nodes operate with a duty cycle of 0.5, which periodically turns on the radio to transmit or receive packets based on a wake-up schedule. The network assumes a star topology where all nodes transmit to the single sink.

A specific sleep/wake-up schedule is not assumed as nodes transmit to the sink in their scheduled time slots in a one-hop data communication. A sleeping node is switched to the active state when it has data to send in its time slot. The time slot has an impact on the time and energy efficiency of the duty cycle. Shorter time slot means the frequent switches, and that affects the overhead in the operations such as for opening or closing the radio connections. More extended time slot also means there will be longer times to connect with neighbouring nodes, and connection duration also lasts longer. The delay in packet delivery may be attributed to the following: send time, access time, transmission time, propagation time, reception time, and receive time of the message. Many data transmissions are likely to increase the amount of power consumed by each wireless sensor node; therefore, we reduced the number of transmissions to achieve minimum energy consumption by the nodes during the transmission () and reception () of data packets. The 4G module selected also supported the sending of SMS and email messages in the form of alerts to stakeholders and allowed users to perform HTTP and FTP requests. The 4G module can perform multisocket connections to TCP/IP and UDP/IP clients which serves as an advantage in the deployment country.

3.3.6. Energy

In WSN, a node’s communication system consumes more energy compared to sensing and local data processing [26]. Replacing the sensor node batteries in the deployment in the river is a difficult task, expensive, and inconvenient. Depleted batteries affect the project’s goal of achieving continuous monitoring for months and even years. The internal battery in most cases is unable to meet the energy budget; hence, in WSN for environmental applications such as WQM, the energy budget may be improved by designing algorithms and protocols that are capable of regulating and reducing the amount of energy consumed and the frequency of data transmission when the measured parameter is transmitted to the cloud. Also, the energy budget may be compensated by harvesting energy from ambient sources to extend the lifetime of the battery during its operation [33].

In the application domain, the possible ways to harvest energy to recharge the sensor nodes include harvesting energy from the flowing river (that is, kinetic energy), radio frequency (RF) sources (that is, from sun flares, lightning, stars in space, and electromagnetic waves), and harvesting energy from the sun using either internal or external solar panels. Apart from solar energy, all the other forms of energy harvesting are challenging to implement. It is crucial to consider the energy costs per the different modules of the sensor nodes and the different algorithms and protocols that run on the nodes. Some of the sources of energy consumption include sensor node sleep/wake-up scheduling, data sensing, signal-to-electrical conversion, and signal conditioning. Duty cycle, which is the scheduling of the sleep/wake-up modes of the sensor node, also contributes to energy consumption. In the sleep mode, all operations of the sensor node are shut down and resume when the node is awake [34].

In the event of collisions or subsequent failed attempt to transmit, which results in no acknowledgement received, the traffic control signals transmitted increase thereby increasing the energy consumed. The amount of energy harvested in solar-powered wireless sensor networks is proportional to the size of the solar panels and their conversion power. The amount of energy depleted during communication could either be energy loss during Transmission () or energy loss for Reception (). Energy can be harvested from river flow, but the flow should come with higher pressure (that is, turbulent) to generate power to charge the sensor nodes. Kinetic energy harvesting in rivers also requires that the sensor nodes be designed to use small turbines that move to generate electricity to charge the batteries directly.

Energy harvesting based on temperature gradient becomes a challenging technique to adopt because of variations in weather conditions in the subregion. The current smart water sensor nodes designed by Libelium allow users to harvest energy to augment the power stored in the batteries. Hence, we harvest solar energy to compliment to prolong the lifetime of the wireless sensor nodes and the lifetime of the overall sensor network (Figure 8). The highest power density a photovoltaic cell can provide on a bright sunny day is 15 mW/cm2 [27]. The hardware architecture followed the harvest-store-use energy harvesting architecture presented in [27]. To harvest energy, we mounted the solar panel on the protective case housing the sensor device, as shown in Figure 8. The Libelium wireless sensor node’s energy consumption is compared to other available commercial sensors and as indicated in Table 6. Libelium sensors consume 30 mA of energy to transmit and receive data packet compared to IMote2 and SunSpot that require 44 mA and 40 mA, respectively, for packet transmission and reception.

The sources of energy depletion in duty cycling could be attributed to the frequent switches between sleep and wake-up states. The frequent switches could introduce more collisions and the traffic control signals. This happens because when no acknowledgement is received or there are failed attempts to transmit, more packets are resent. The energy consumed when -bits of data is sent over a distance is obtained from

The energy consumed for receiving l-bits of data is illustrated in Equation 2.where and are the energy dissipated per bit in the transmitter circuitry and the energy dissipated in transmitting l-bits over a distance , respectively.

4. WSN Design Experimentation, Results, and Discussions

This section presents the experimental results and discusses the results.

4.1. Experimental Results

During the period of deployment, the data collected were observed over time. We noticed several challenges during the data collection and transfer phase: (1) equipment malfunctioning; (2) damage of water quality sensor probes; (3) untimely recharge of internet data by the service provider and interruptions in data transmission; and (4) data-value out-of-range. The challenges encountered in the data collection and transfer phase required researchers to perform data validation and reliability analysis. Data validation was performed to ascertain the quality and reliability of the data since errors will affect stakeholder’s decision and planning. Gaps and inconsistencies were observed in some of the values reported by some of the sensor probes.

4.2. Discussions

In this section, discussions and conclusions are provided. Figures 9-32 show the graphs obtained from the sensor readings for some of the days within the period of deployment. Although the deployment area is a reserved area, and activities such as fishing and farming were restricted, some fishing activities were illegally seen at certain times on the river. These fishermen used the freshwater weeds to trap fishes, and after their operation, they leave the weeds to float downstream.

The weeds cover sections (Figure 33) of the river resulting in habitat alteration and depletion of oxygen in the river. Apart from freshwater weeds, the presence of harmful algal blooms (HABs) was detected after a month of deployment especially when the dry season period was ushering in from November 16, 2018, to January 28, 2019 (see Figure 34). Between the two months, we observed that the oxygen content was low due probably to the presence of HABs and freshwater weeds. This had a severe effect on aquatic life. HAB domination over a long period of time was also due to the activities happening upstream. Farming activities along the river stretch also saw the presence of pesticides and other harmful chemicals detrimental to aquatic life flow gradually into the river. The results obtained from this study indicate how WSNs may be used to predict activities happening upstream enabling stakeholders to use these data to develop and design strategies and come out with environmental management programs and other interventions for the community, region, and the nation as a whole for individuals to exert positive attitudes towards our freshwater resources.

The results presented are based on the data obtained from three Waspmote sensor devices as shown in Table 5. pH may be defined as the logarithmic concentration of hydrogen (H+) and hydroxide (OH-) ions of a substance constituting . The pH values obtained ranged between 6.75 and 14, as can be observed from the graphs shown in Figures 9 and 10. It shows the variations in pH in the river at different times of the day. The pH values recorded above the pH value of 7 indicates that the Weija intake is more basic or alkaline and therefore supports aquatic animals much better.

The level of alkalinity of a river may be attributed to the location of the river as well as activities happening upstream. Other atmospheric factors contributed to the increase of pH over time, especially in the month of November 2018. Electrical conductivity is the ability of a medium to carry electrical energy. The electrical conductivity of water is directly proportional to the number of salt ions in the water. The temperature of the river, the geology of the area, climatic changes (e.g., from rainy to sunny seasons), and pollution from human waste or some industrial activities affects the conductivity levels in freshwater bodies.

Conductivity values ranging from 0 to 200micro S/cm are considered as low conductivity. Conductivity values ranging from 200 to 1000micro S/cm are considered within the midrange of conductivity levels, and values ranging between 1000 to 10000micro S/cm are considered as high conductivity values. The higher the river’s temperature, the higher the conductivity value. The conductivity sensors were calibrated at a room temperature of 30°C. Aquatic animals who live in freshwater sources do not require high levels of conductivity. High levels of conductivity indicated in Figure 11 and Figure 12 in November and December may also have led to the death of some aquatic animal such as fishes as shown in Figures 35 and 36.

Figure 31 shows that the temperature of the river rose to 37°C (also see Figures 15 and 16). This rise in temperatures was a result of the high levels of algae bloom in the river around that period, and that maybe the possible cause of conductivity levels rising to 196 S/cm in November 2018 (see Figure 11) to 225 S/cm in December 2018 as shown in Figure 12. In Figures 13 and 14, we plot the temperature readings, pH, and conductivity over November and December 2018 to show the periods in which the rise in temperature had impacted the levels of conductivity in the river under consideration (also see Figures 17 and 18). The pH values were scaled up by 150, and the temperature values were also scaled by 120 to obtain the plot shown in Figure 13. Although several factors affect the increasing levels of conductivity in river bodies, a study conducted by [36], revealed an essential property of rivers which is self-purification from pollution. Therefore, we observed that some points in December 2018, especially December 16, 2018, conductivity levels dropped to 205 S/cm, which may be attributed to the self-purification process probably around that time.

The geological structure (such as the type of soil, plantation, and weather conditions) at the Weija intake contributed to the presence of calcium in the river [37]. The study showed that calcium levels rose to about 3.5 mg/L in the month of November 2018 and dropped to about 0.16 mg/L in December 2018, as shown in Figure 20. The temperature sensor connected to this Waspmote sensor unit measured temperature of the river up to about 35°C in November 2018 and in December 2018 temperatures rose to about 36°C, as shown in Figure 23. Fluoride levels measured in November 2018 rose to about 1.24 mg/L, and in December 2018, the amount of fluoride in the river rose to about 1.9 mg/L, as shown in Figure 7. In Figures 25 and 26, the calcium, fluoride, and temperature readings from November to December 2018 are presented. Figures 29 and 30 show the ORP graphs. The ORP value declined due to the lower amount of oxygen content in that time of day (see Figures 31 and 6).

The amount of DO in a river determines the number and type of organisms that live in the river [38]. Fish, for example, depends on the amount of dissolved oxygen in the river body. The study revealed high levels of DO content in the river from October to November 13, 2018 (see Figures 27 and 28). These DO levels significantly dropped from November 13 to negative DO values. This was because of the high levels of algae bloom and other grasses that covered the surface of the river rendering less oxygen penetration into the river. This it is believed might have attributed to the death of aquatic species in the river (see Figures 35 and 36). However, in December, the oxygen content rose up from the negative DO to reach 8 mg/L. Temperatures recorded by the sensor connected to this Waspmote unit indicated that most of the time in November and December 2018, the river was warm recording temperatures between 32 and 37°C (Figures 7 and 32). Warmer temperatures decrease the oxygen content in the river. This also affects aquatic life [39].

5. Future Directions

This paper provides several vital opportunities to explore deeper into significant issues related to sensor-based water quality monitoring. For example, to conserve the energy of the sensor nodes, researchers in the future should be looking into designing models that can predict water quality data based on historical data to regulate the sensor’s energy consumption. Researchers in the future should also be interested in investigating the design of persuasive technology models (i.e., applying physiological principles to persuade people), data analysis models, and sensors that are capable of measuring both physical and chemical parameters. Monitoring water quality in real time in developing countries is vital, and this paper provides the initial steps.

5.1. Designing Prediction Models

Due to the energy consumption of nodes during data communication and the necessity to have continuous data during water quality monitoring, predictive models have been suggested. Predictive models reduce data communication while still producing highly accurate data. Water parameters that are monitored could produce either linear or nonlinear data. Linear data could be predicted using time series models, while nonlinear data could be predicted using neural networks or support vector machines [40]. Water quality data are usually a combination of both linear and nonlinear. Predicting combined linear data is more comfortable to implement with low complexities but are limited in predicting the nonlinear variations in the data. Examples of linear models include autoregressive (AR), autoregressive moving average (ARMA), autoregressive integrated moving average (ARIMA), and Grey Series Models.

ARMA models are for predicting slow-changing data while MA models are for data with sudden and sharp changes. Nonlinear models are somewhat challenging to implement but give better accuracy. Examples include neural networks, decision trees and rule learners, and genetic algorithms. The limitation of neural networks in WSNs is that while the data sets are mostly centralised, making them not suitable for distributed ADHOC deployments, they also require a longer time to train the models. Several WQM approaches use a combination of some linear and nonlinear models [41, 42]. Much work must be done to efficiently use time series models for near accurate predictions that could be used effectively in solving problems related to ADHOC wireless networks such as mobility and topology changes, energy limitations, routing, and ADHOC deployment.

5.2. Designing of Persuasive Technology Models

Water quality monitoring could be a useful tool in influencing the behaviour of people living at the banks of river bodies who use the water directly without further treatment. Persuasive technologies are a general class of technologies to apply physiological principles of persuasion such as credibility, trust, reciprocity, and authority to change intended users’ attitudes and behaviours [43]. Persuasion is with the intentional effort to change attitudes and behaviours using technologies from abstracted ideas such as water quality monitoring. It would be imperative if applications were developed that inform an intended audience about the water quality parameters and give alerts that suggest the changes in these qualities, especially when they go beyond the acceptable thresholds. Such an application will not only change people’s attitudes to the devices but also provide them with a sense of ownership and how they relate towards the water and the environment at large.

6. Conclusion

This paper focused on a real-time deployment of a wireless sensor network application for collecting water quality measurements for five months, September 2018 up to January 2019. In this project, we used smart sensor nodes from Libleium to measure the water quality parameters. The implementation provides a sustainable approach that monitors freshwater sources to support citizens in a particular locality where there is no access to clean potable water but rely on lakes, streams, rivers, and boreholes, enabling them to know the characteristics of the water they are drinking. The measured data value is transferred to cloud storage for analysis. We designed a web portal using a set of protocols to process the captured data. Compared to other real-time deployed systems across the world, the solution presented here is secured, uses efficient MAC layer protocol which enhances the transmission and reception time and implements a network layer protocol that takes care of the delay factor in the transmission process. At the network level, we design the setup in such a way that when a parameter is measured, and the communication channel is not available, we perform retransmission until the communication channel is made available. Each of the parameters measured is as follows: calcium ion (Ca2+), electrical conductivity, pH, dissolved oxygen, fluoride ion (F), nitrate ion (NO3-), oxidation-reduction potential (ORP), and temperature indicated significant fluctuations over time. These changes may be attributed to pollution from upstream, which are time varying. We plan to increase the number of sensor nodes taking into account sensor probes such as the turbidity sensor probe and total dissolved solid sensors since they are the parameters the stakeholders requested that we measure for them during the prototype phase.

Data Availability

The authors have data obtained for the experimentation but currently the data is not available for public use due to instructions from the Ghana Water Company whose permission under which the site used for the experiment was granted. Live data values are presented at the following web portal: Access codes may be granted if the Ghana Water Company grants us the permission to share this data.

Conflicts of Interest

The authors declare no conflict of interest.


The authors thank UG-Carnegie “Next Generation of Academics in Africa Project (BANGA Africa Corporation)”, the University of Ghana, for funding the project. We are grateful to them for the support provided to purchase the sensor nodes and other materials that made the implementation of this work successful.