Background

Ensuring the safety of water is a challenge due the excessive sources of pollutants, most of which are man-made. The main causes for water quality problems are over-exploitation of natural resources. The rapid pace of industrialization and greater emphasis on agricultural growth combined with latest advancements, agricultural fertilizers and non-enforcement of laws have led to water pollution to a large extent. The problem is sometimes aggravated due to the non-uniform distribution of rainfall. Individual practices also play an important role in determining the quality of water (Central Ground Water Board, 2017) .

Water quality is affected by both point and non-point sources of pollution, which include sewage discharge, discharge from industries, run-off from agricultural fields and urban run-off. Other sources of water contamination include floods and droughts and due to lack of awareness and education among users. The need for user involvement in maintaining water quality and looking at other aspects like hygiene, environment sanitation, storage and disposal are critical elements to maintain the quality of water resources.

Poor water quality spreads disease, causes death and hampers socio-economic progress. Around 5 million people die due to waterborne diseases around the world (Water Resource Information System of India, 2017). Fertilizers and pesticides used by farmers can be washed through the soil by rain, to end up in rivers. Industrial waste products are also washed into rivers and lakes. Such contaminations enter the food chain and accumulate until they reach toxic levels, eventually killing birds, fish and mammals. Chemical factories also dispose wastes in the water. Factories use water from rivers to power machinery or to cool down machinery. Raising the temperature of the water lowers the level of dissolved oxygen and upsets the balance of life in the water (Central Ground Water Board, 2017). All the above factors make water quality monitoring essential.

Water quality monitoring is defined as the collection of information at set locations and at regular intervals in order to provide data which may be used to define current conditions, establish trends, etc. (Niel et al., 2016; Muinul et al., 2014; Jianhua et al., 2015). Main objectives of online water quality monitoring include measurement of critical water quality parameters such as microbial, physical and chemical properties, to identify deviations in parameters and provide early warning identification of hazards. Also, the monitoring system provides real time analysis of data collected and suggest suitable remedial measures.

The aim of this paper is twofold. One is to provide a detailed survey of recent work carried out in the area of smart water quality monitoring in terms of application, communication technology used, types of sensors employed etc. Second, is to present a low cost, less complex smart water quality monitoring system using a controller with inbuilt Wi-Fi module to monitor parameters such as pH, turbidity and conductivity. The system also includes an alert facility, to inform the user on deviation of water quality parameters.

Related work

Figure 1 shows the general building blocks of smart online monitoring solutions considered in this section.

Fig. 1
figure 1

Block diagram of Smart water Quality monitoring

Three main subsystems identified include

  • Data management subsystem includes the application which accesses the data storage cloud and displays the same to the end user.

  • Data transmission subsystem consists of a wireless communication device along with build in security features, which transmits the data from the controller to data storage cloud.

  • Data collection subsystem consists of multi-parameter sensors and optional wireless communication device to transmit the sensor information to the controller. A controller gathers the data, processes the same.

Sensors form the bottom most part of the block diagram. Several sensors are available to monitor water quality parameters. These sensors are placed in the water to be tested which can be either stored water or running water. Sensors convert the physical parameter into equivalent measurable electrical quantity, which is given as input to controllers through an optional wireless communication device. Main function of the controller is to read the data from the sensor, optionally process it, and send the same to the application by using appropriate communication technology. Choice of the communication technology and the parameters to be monitored depends on the need of the application. Application includes the data management functions, data analysis and alert system based on the monitored parameters. This section further discusses the previous work carried out in each of the subsystems.

Application

Online smart water quality has been proposed for several applications in literature as shown in Table 1.

Table 1 Applications of smart water quality monitoring

Domestic water is intended for human consumption for drinking and cooking purposes. The Bureau of Indian Standards (Central Ground Water Board, 2017) provides details about acceptable limits of substances such as Aluminium, Ammonia, Iron, Zinc etc. Traditional water quality measurement involves manual collection of water at various locations, storing the samples in centralized location and subjecting the samples to laboratory analytical testing (Thinagaran et al., 2015; Vinod & Sushama, 2016; Pandian & Mala, 2015; Azedine et al., 2000; Offiong et al., 2014). Such approaches are not considered efficient due to the unavailability of real time water quality information, delayed detection of contaminants and not cost effective solution. Hence, the need for continuous online water quality monitoring in highlighted in (Vijayakumar & Ramya, 2015; Niel et al., 2016; Theofanis et al., 2014; Bhatt & Patoliya, 2016; Poonam et al., 2016; Xin et al., 2011; Xiuli et al., 2011; Sathish et al., 2016).

Smart water quality approaches have been considered for lake and sea water applications. For such applications, distributed wireless sensor networks are required to monitor the parameters over a larger area and send the data monitored to a centralized controller using wireless communication. Such applications normally monitor parameters such as chlorophyll (Francesco et al., 2015), dissolved oxygen concentration (Christie et al., 2014; Anthony et al., 2014) and temperature (Peng et al., 2009; Francesco et al., 2015; Christie et al., 2014).

Aquaculture centers require water quality monitoring and forecasting for healthy growth of aquatic creatures (Goib et al., 2015; Gerson et al., 2012; Xiuna et al., 2010). In (Gerson et al., 2012) authors have developed biosensors using Arduino microcontroller to monitor animal behavioral changes due to aquatic pollution. The abnormal behavior of animals can be considered as an indication of water contamination. In (Xiuna et al., 2010) authors have proposed a smart water quality monitoring system to forecast water quality using artificial neural networks. Extensive tests have been carried out for a period of 22 months at isolated local area network and the data has been transferred to internet using CDMA technology.

Water quality monitoring in distribution systems is challenging in the context of management of distributed wireless sensor networks (WSN). A water distribution network for monitoring chlorine concentration has been presented in (Eliades et al., 2014). Solar enabled distributed WSN has been proposed in (Ruan & Tang, 2011) for monitoring parameters such as pH, turbidity and oxygen density. Water at different sites is monitored in real-time using an architecture composed of solar cell enabled sensor nodes and base station. Flexibility, low carbon emission and low power consumption are the advantages of the method proposed in the paper. A combined system for water and air quality measurement is proposed in (Mitar et al., 2016) using additional sensors for measuring air temperature and relative humidity.

Parameters monitored

Based on extensive experimental evaluation carried out by US Environmental Protection Agency (USEPA) it has been concluded that chemical and biological contaminants used have an effect on many water parameters monitored including Turbidity (TU), Oxidation Reduction Potential (ORP), Electrical Conductivity (EC) and pH. Thus, by monitoring and detecting changes in the water parameters, it is feasible to infer the water quality (Theofanis et al., 2014).

A detailed list of work carried out to monitor water parameters is presented in Table 2. The pH of the water is one of the most important factors when investigating water quality, as it measures how basic or acidic the water is. Water with a pH of 11 or higher can cause irritation to the eyes, skin and mucous membrane. Acidic water (pH 4 and below) can also cause irritation due to its corrosive effect (Niel et al., 2016). Measurement of dissolved oxygen (DO) is important for aquaculture centers since this parameter determines whether or not a species can survive in the said water source. ORP is a measure of degree to which a substance is capable of oxidizing or reducing another substance. ORP is measured in milli volts (mv) using an ORP meter. Tap water and bottled water have a positive value of ORP. Turbidity refers to concentration of suspended particles in water. Conductivity gives an indication of the amount of impurities in the water, the cleaner the water, the less conductive it is. In many cases, conductivity is also directly associated with the total dissolved solids (TDS).

Table 2 Parameters monitored

Communication technology used

Wireless technology is used for communication between sensor to controller and from controller to data storage cloud as shown in Fig. 1. Different technology has been used in each of the communication scenario. Table 3 shows the frequently used wireless communication technology for information transfer.

Table 3 Wireless communication technology used

Communication between sensors and controller

Sensors are connected to the controller, either directly using UART protocol or remotely using Zigbee protocol. ZigBee is a technology of data transfer in wireless network. It has a low energy consumption and is designed for multichannel control systems, alarm system and lighting control. ZigBee builds on the physical layer and media access control defined in IEEE standard 802.15.4 for low-rate WPANs. In smart water quality systems, Zigbee protocol is used for communication between sensor nodes and the controller when the sensors are placed in remote location away from the controller. For in-pipe domestic monitoring, direct connection of sensors and controller is preferred.

In (Tomoaki et al., 2016) authors have developed a WSN system for water quality monitoring. Sensors are connected to the transmission module using UART. Communication with the outside of the sensor nodes is performed with the Internet connection using the 3G mobile network. Authors in (Theofanis et al., 2014) have proposed a water quality monitoring system for in-pipe monitoring and assessment of water quality on fly. Sensor nodes are installed in the pipes that supply water at consumer sites.

Communication between controller and data storage

Communication between controller and centralized data storage is carried out using long range communication standards such as 3G and Internet. Some the previous works aim at alerting the user in form of SMS about the water quality. Such systems (Peng et al., 2009; Xin et al., 2011; Liang, 2014; Wei et al., 2012) require additional SIM card for the GPRS module connected with the controller. The drawbacks of such systems are additional cost for SIM card operation. Also, large quantities of data storage and retrieval are not possible at the user premises. Recently, IoT enabled solutions are gaining importance. Authors in (Alessio et al., 2016) provide a survey on the wide range of applications possible with Internet of Things and Cloud computing.

IoT is a recent communication paradigm in which objects of everyday day life are equipped with microcontrollers, transceivers for digital communication, which will make the objects communicate with one another and the users, thus becoming an integral part of the Internet (Bushra & Mubashir, 2016; Biljana et al., 2017; Andrea et al., 2014). In (Vijayakumar & Ramya, 2015; Thinagaran et al., 2015; Mitar et al., 2016) an external Wi-Fi module is connected to the controller, which enables the controller to get connected to the nearest Wi-Fi hotspot and subsequently to the Internet cloud.

Controller used

Different controllers have been used in literature for smart water quality monitoring as listed in Table 4. Though each controller have its own salient features, most of the controllers used in literature work with external GPRS / Wi-Fi module for connectivity to the data storage or application.

Table 4 Controller Used

The proposed model in this paper uses TI CC3200, a controller with built in Wi-Fi module and dedicated ARM MCU for wireless communication purpose. TI CC3200 reduces the complexity and improves speed of operation compared with controllers with external Wi-Fi module (Texas instrument CC3200 Simple Link, 2017). A comparison of various microcontrollers and embedded boards used in the literature for smart water quality monitoring are provided in Table 7.

Sensors used

Several sensors are commercially available for water quality monitoring. Such sensors are used in (Thinagaran et al., 2015; Vinod & Sushama, 2016; Niel et al., 2016). Some of the works published in literature include fabricated sensors for improved usability. A fabricated buoy type sensor node is used for parameter monitoring in (Tomoaki et al., 2016). The fabricated sensor includes a solar cell, Li-ion battery, a power module and transmission module. A in-house fabricated TiO2 based thick film pH resistive sensor is used in (Mitar et al., 2016). This sensor module output can be directly connected to the microcontroller without additional signal processing electronics. In (Theofanis et al., 2014), authors have developed low cost, easy to use and accurate turbidity sensor for continuous in-pipe turbidity monitoring. In (Francesco et al., 2015), authors have presented a sea water probe for monitoring multiple parameters intended for sea water quality monitoring Table 5.

Table 5 Sensors used for water quality monitoring

Extensive data analysis and information processing has been presented in (Theofanis et al., 2014; Peng et al., 2009; Xiuna et al., 2010; Francesco et al., 2015; Azedine et al., 2000). A hierarchical routing algorithm to reduce the communication overhead and increase the life time of WSN suitable for river/lake water monitoring has been presented in (Haroon & Anthony, 2016).

In (Public Utilities Board Singapore (PUB), 2016), a review on Smart Water Grid system with integration of communication technologies (ICT) is provided. An integrated management model covering the entire water cycle from sources to tap for securing the stability, safety and efficiency of water has been discussed in (Woon et al., 2016).

Power consumption related issues

Power consumption is a major constraint for IoT applications, because the applications are most likely to operate on batteries. Communication of data is a major source of power consumption. For applications such as smart water quality monitoring, data communication occurs in two stages. One is the communication between sensors and the controller and other is the communication between controller and application. Table 6 shows several possible short distance communication protocols applicable (Al-Fuqaha et al., 2015; Ray, 2016). Possible protocols for communication between sensor nodes and controller are Zigbee, Blue tooth, BLE and LoRa. Wi-Fi is not suitable for communication between sensor nodes and the controller because the power dissipation is high (Shuker et al., 2016). As per our literature survey, all the works have used zigbee protocol for communication between sensor nodes and controller.

Table 6 Short distance communication protocols

The proposed work is aimed at domestic water quality monitoring. The sensors are assumed to be connected in-pipe. The controller and the sensors form a single module installed in the user premises. Therefore, the sensors are directly connected to controller. For applications such as lake, river and sea water monitoring, sensors and the controller are separated by considerable distance. Under such conditions, short range communication protocols (such as Zigbee), listed in Table 6 are used.

For communication between controller and the application, Wi-Fi is a compelling choice. With other short range protocols, the sensor nodes communicate with controller easily, but when trying to connect the system to the Internet some type of adapter that is able to communicate with both the sensors and the Internet is needed. This is additional hardware overhead. With Wi-Fi, the above problem does not arise, because there is an infrastructure that is already built and is in existence. The limitation of Wi-Fi is that, the standard was designed for laptops and PCs, where power requirement is completely different from battery operated smart objects. Hence, manufacturers have started developing low-power Wi-Fi devices. Power management and extended battery life are primary focus areas for embedded low-power Wi-Fi devices such as CC3200. In order to reduce power consumption, the microcontroller is operated in one of the four power modes, namely Hibernate, Low Power Deep Sleep mode, Sleep mode and Active mode (Texas instrument CC3200 Simple Link, 2017).

In (Thomas et al., 2016) authors have compared the power consumption of standalone microcontroller with Zigbee, Bluetooth Low Energy (BLE) modules and controller with inbuilt Wi-Fi device. From the experimental results, it has been found that Wi-Fi inbuilt device consumes less power compared to standalone microcontrollers. The reason is due to extra power consumption while establishing and deestablishing connection during transmission in standalone devices. In Wi-Fi inbuilt controller, the Wi-Fi module goes into sleep mode, while retaining the previous connections made. Therefore, each time the Wi-Fi module awakens, a new connection need not be established. This reduces the power consumption to a large extent. Table 7 shows a comparison of CC3200 with the microcontroller and embedded boards used in literature (Al-Fuqaha et al., 2015; Ray, 2016).

Table 7 Comparison of microcontrollers and Embedded Boards

Proposed system

Hardware design

The key parameters monitored in the proposed system are conductivity, turbidity, water level and pH. The block diagram of the proposed system is shown in Fig. 2.

Fig. 2
figure 2

Block diagram of the proposed system

A controller forms the central part of the IoT enabled water quality monitoring system. As seen from Table 4, it is observed that most of the IoT based solutions use a controller with external Wi-Fi. Such designs are not cost effective, power efficient and also result in complex circuitry. In this work, TI CC3200 is a single chip microcontroller with in-built Wi-Fi module and ARM Cortex M4 core, which can be connected to the nearest Wi-Fi hot spot for internet connectivity.

Sensors are directly interfaced to the controller since the proposed system is to monitor domestic water quality. The sensor parameters such as conductivity, turbidity, water level and pH are measured by placing the sensor into different solutions of water. The measured parameters can be viewed by using LCD. The data from the sensors are sent to the cloud using the controller. Threshold is set in the cloud based on the standards provided by WHO. Message is sent from cloud to the users mobile if the value exceeds the threshold. A mobile application has been developed in which values obtained by each sensor in the cloud can be viewed. This can be used by both the water quality monitoring authorities as well as users. A detailed circuit diagram of the proposed system is shown in Fig. 3.

Fig. 3
figure 3

Circuit diagram of the proposed system

Conductivity is the measure of solutions ability to carry current. This parameter is used to determine the salt content in the water. In the proposed design, YL-69 is used to measure the conductivity of the water. It consists of two electrodes, when placed in water a potential is generated which is proportional to conductivity. It is measured in seimens per cm. Acceptable range of conductivity is from 300 to 800 μ seimens per cm.

pH measures amount of acid or base in the solution. Three in 1 ph meter with inverting operating amplifier is used to measure pH. Inverting Op-amp is used to boost the voltage from mV to voltage range. pH sensor consists of two electrodes which is reference electrode and pH electrode also known as measuring electrode. When placed in the solution pH electrode develops a potential that is proportional to pH. The value ranges from 0 to 14. The acceptable range of pH for drinking water is 6.5 to 8.5.

Turbidity is a measure of cloudiness in the water. Opto electronic devices such as LDR and LED are used to measure the turbidity. Light is transmitted and reflected by suspended solids and reflected light is received by the sensors. An LDR is high resistance semiconductor. If light falling on the device is of high frequency, photons absorbed by the semiconductor gives the bound electrons enough energy to jump into the conduction band. In the proposed system distance between the LED and LDR is 9 cm. The resulting free electrons conduct electricity thereby lowering resistance.

Water level is sensed to determine the depth of the water in the tank. This is done using probe method. Three probes are used to indicate the level of the water such as high, low and medium.

Software design

The flow chart for sensor data updation in the cloud is shown in Fig. 4. Reading from the sensor is constantly updated in the cloud and also displayed in the LCD connected.. The programming is done using ENERGIA IDE.

Fig. 4
figure 4

Flow chart for sensor data updation

Data sent from the controller are stored in “Ubidots” cloud. “Ubidots” offers a platform for developers to capture data and turn it into useful information. The features include a real-time dashboard to analyze data or control devices and share the data through public links. Data stored in the cloud can be used for detailed analysis. The cloud is programmed to send alert SMS messages whenever the monitored parameter exceeds the threshold limit. The Table 8 presents a summary of useful features of Ubidots cloud platform (Ubidots, 2017).

Table 8 Summary of useful features of Ubidots cloud platform

The system is connected to the Ubidots cloud using the following steps:

  1. 1.

    Connect to the access point using ssid and password through mobile phone or personal computer.

  2. 2.

    The controller is then connected to the access point using Wi-Fi.

  3. 3.

    Login to cloud platform, where a token is generated

  4. 4.

    Use the token id in the program.

  5. 5.

    Data from the controller are loaded into the cloud.

  6. 6.

    Data can be viewed on the cloud platform.

Results and Discussion

Five parameters namely conductivity, pH, turbidity, temperature and water level are measured using the experimental setup. The setup is connected to the Ubidots platform. The measured results are compared with drinking water quality standards defined by WHO. Table 9 lists the safe limit for the parameters considered in this work.

Table 9 Safe limits for drinking water as per WHO standards

Figure 5 shows the graphical representation of parameters monitored and stored in the cloud over a period of time. Further, experiments were conducted by placing the sensors in the different solutions of water collected in the college premises. Table 10 shows the value of parameters measured for three different samples.

Fig. 5
figure 5

Graphical representation of parameters monitored

Table 10 Parameters measured with different water samples

Figure 6 shows the above results as seen from the Ubidots platform. Further, to demonstrate the working of the system, and the various options for data analysis, measured quantity of contaminants such as salt and soil are mixed with 350 ml of pipe water and testing is performed. The test results are tabulated in Tables 11 and 12 respectively.

Fig. 6
figure 6

Values stored in the Ubidots cloud

Table 11 Results of the parameters monitored by adding contaminants (soil)
Table 12 Results of the parameters monitored by adding contaminants (salt)

Figure 7 shows the dashboard with widgets to view the results of data collected in the cloud for results in Table 11.

Fig. 7
figure 7

Usage of Widgets for parameter monitoring

The other feature is creation of events, based on measured parameter values. The events stored can be programmed to automatically send SMS, email and other forms of alerts to the user whenever any parameter exceeds the threshold limit. Figure 8 shows a sample of events created for different parameters under consideration in this work Fig. 9 shows the alert SMS send to the mobile due to increased value of turbidity and conductivity.

Fig. 8
figure 8

Events created for alert

Fig. 9
figure 9

Message sent from cloud to smart phone

Conclusion and future work

The paper presents a detailed survey on the tools and techniques employed in existing smart water quality monitoring systems. Also, a low cost, less complex water quality monitoring system is proposed. The implementation enables sensor to provide online data to consumers. The experimental setup can be improved by incorporating algorithms for anomaly detections in water quality.