Web based Water Turbidity Monitoring and Automated Filtration System: IoT Application in Water Management

Received Jan 30, 2018 Revised Mar 10, 2018 Accepted Mar 18, 2018 Water supplied to residential areas is prone to contaminants due to pipe residues and silt, and therefore resulted in cloudiness, unfavorable taste, and odor in water. Turbidity, a measure of water cloudiness, is one of the important factors for assessing water quality. This paper proposes a low-cost turbidity system based on a light detection unit to measure the cloudiness in water. The automated system uses Intel Galileo 2 as the microprocessor and a server for a web-based monitoring system. The turbidity detection unit consists of a Light Dependent Resistor (LDR) and a Light Emitting Diode (LED) inside a polyvinyl chloride (PVC) pipe. Turbidity readings were recorded for two different positionings; 90° and 180° between the detector (LDR) and the incident light (LED). Once the turbidity level reached a threshold level, the system will trigger the filtration process to clean the water. The voltage output captured from the designed system versus total suspended solid (TSS) in sample water is graphed and analyzed in two different conditions; in total darkness and in the present of ambient light. This paper also discusses and compares the results from the above-mentioned conditions when the system is submerged in still and flowing water. It was found that the trends of the plotted graph decline when the total suspended solid increased for both 90° and 180° detector turbidimeter in all conditions which imitate the trends of a commercial turbidimeter. By taking the consideration of the above findings, the design can be recommended for a low-cost real-time web-based monitoring system of the water quality in an IOT environment. Keyword:


INTRODUCTION
Water is essential for all living things and can be considered as one of the basic needs for human being. Water comprises from 75% body weight in infants to 55% in elderly and is essential for regulating cellular homeostasis of human biology [1]. Water quality standards described the parameters set which indicates whether the water is safe for human consumptions. The standards are important because they affect major environmental, social and economic values of society and if water supplied to us is not up to the stipulated standards, it means the water is harmful to human being. In Malaysia, the drinking water quality standard is conforming to National Standard for Drinking Water Quality (Second Version, January 2004) issued by the Engineering Services Division, Ministry of Health Malaysia which was adopted from the World Health Organization (WHO) guidelines for drinking water quality [2].
Nowadays, we can get clean water straight from facets at home, delivered from a water treatment plant to our homes, via water distribution systems. Along the distributions pipe however, water could catch unwanted substances e.g. rust and metals from the wall of old distribution pipes, silt and mud from damaged pipes and sediments during pipes repairing process etc [1]. Usually, the clean water is stored in tanks before consumptions which increase the possibilities of unwanted substances accumulate in the tank. The condition will encourage biofilm, bacteria, fungi and viruses to build up in the water tanks and degrade the quality of water that was originally safe for consumption. Degrade and contaminate water usually has one of these symptoms; bad odor, bad taste, cloudy look due to sediments. Although, it is encouraged that consumers do a periodic checks of home internal plumbing system and storage tanks but this tasks are very tedious and sometimes dangerous.
Turbidity is the measure of water visibility at which the amount of light level that can pass through the water. Turbidity measures the Total Suspended Solid (TSS) in water. Nephelometry refers to the process of aiming a beam of light at a sample of liquid and measuring the intensity of light scattered at 90° to the beam [8]. This method of measuring turbidity is recognized by Environmental Protection Agency (EPA) called Method 180.1. Another method called the attenuation method measures the loss of light between a light source and detector directly across from it at 180° [10]. In developing turbidity sensor, these two methods are often considered.
There are many filtration systems used to eliminate unwanted substances. The common method is to place filtration bottles or columns at water inlet or at the faucet for drinking. The composition of water filter consists of layers of sand and gravel graded to ensure effective filtration. When water flows through this filter, particles that are removed by the sand clog the surface and reduce the flow rate of water filtered. Filtration system needs maintenance such as backwashing where the water filter is cleaned using water that is flowed back to the filter itself. The technique consists of reversing the flow of water so that it enters from the bottom of the filter bed, lifts and rinses the bed, then exits through the top of the filter tank [1]. Filters are usually made of materials such as granular carbon, sand, garnet, anthracite, zeolite, granular manganese dioxide, and greensand.
The motivation behind this project is to create a water turbidity sensing system that can monitor the turbidity condition and automatically filter the water once a threshold level is reached. In other words, the system must have an integrated monitoring system where the condition of the water is monitored periodically to ensure the quality of water is in check. Furthermore, the integrated monitoring system could allow users to check water conditions easily through the internet.
Current trends in water quality monitoring system are focused on continuous sensing, multiple sensors, automated control and wireless data acquisition mechanism. For instance, work done by [2] uses ultrasonic and water sensors where the system transmits data by integrating a wireless gateway within a consumer network. In [2], an ATmega328P controller board is used to submit data to a dedicated cloud server. The server hosts data analytics that manage the entire water monitoring system, which means it collects the water monitoring data, stores the data in the database for analyzing and then relaying data to the web-based dashboard.Clearly, it is essential to have reliable internetworking between the microcontroller and server to establish good wireless data acquisition system for any wireless water monitoring system. A real-time wireless system for monitoring water using ZigBee 802.15.4 was also studied. The system in [3] consists of multiple sensors and wireless communications network comprises of ZigBee 802.15.4, 74HC14 inverter and Global Standard for Mobile Communication (GSM) technology. The system can monitor quality of water by utilizing water level sensor, turbidity sensor, temprerature sensor, pH sensor and dissolved oxygen sensor. In terms of microcontroller input and output communications, this system is more complicated than in [2] because of the algorithms and analytics done in order to monitors the overall quality water parameters which includes, water level, temperature and pH of the water. The system stores acquired information in a database and this information can be accessed through web-based monitoring services globally using GSM. Moreover, via GSM technology used, the system in [3] has an advantage in terms of wireless coverage over [2] because it still able to submit measured data from sensors in the absent of internet connection.
Meanwhile in [4], a low-cost autonomous water quality monitoring system was established by utilizing Arduino Mega 2560 (microcontroller) as the sensor node. This microcontroller is used to acquire and process sensor data which include pH, light, temperature, electrical conductivity, dissolved oxygen and oxidation reduction potential sensor. The system also used a personal computer (PC) to receive data from the sensor node via Universal Serial Bus (USB). The acquired data is then stored in MySQL database for analysis.The work in [4], demonstrate a practical processing system by using PC as the main processor and standard database to stored data. While the system can monitor many sensors simultaneously and expand into a bigger system by adding more sensor nodes, the communication between sensor node and microprocessor is not wireless. Hence, the expansion of this system will also increase the overall cost of the water monitoring system.  Figure 2. The web based monitoring automated water filtration system architecture and components

RESEARCH METHOD
The algorithm flow chart of the program is illustrated in Figure 3. In short, the system will establish networking using the ESP8266 Wi-Fi Transceiver module, read data from sensor node and log the data to the cloud via Thingspeak.io middleware. In order to connect the Intel Galileo Gen 2 to the Wi-Fi network, a set of "AT COMMAND" is send to the ESP8266 via a serial communication of the Intel Galileo Gen 2 board. Then, the SSID for the Wi-Fi network which includes the password for the Wi-Fi is set in the coding. Therefore, when the code is executed, ESP8266 will scan for this SSID and connect to it automatically. To send the data to Thingspeak.io, an account for this system need to be created and an application program interface (API) key for this water filtration system will be given to the user. This API key is used in the coding to send a GET request to Thingspeak.io, for example, "GET /update?key=PF63C1ADNZXHCCIU" to update the sensor data. Data obtained from the Thingspeak.io can also be visualized in Web-Gui application such as Freeboard.io using JavaScript Object Notation (JSON) format.
The measured data is then compared with the threshold value. The turbidity sensor at this point has already been submerged inside the tank and water will flow passing through the PVC pipe where the turbidity measurement takes place. The turbidity level of water will be calculated from the value of light intensity of LED obtain by LDR when the water passes through it. The hypothesis is the higher the level of water turbidity passes through the passage between LDR and LED, the lower the value of the light incident.
A threshold turbidity value, which was obtained from previous experiments in [10], was set in the program to control the pump at the water tank. When the measured value reaches the threshold value, it means that the water is cloudy and the pump will start pumping out the water out of the tank to start the filtration process. While the filtration process is in progress, the turbidity sensor can update continuously turbidity values of the filtered water inside the tank. The system will stop when the water turbidity reading is below the stipulated threshold value indicating the filtration process has finished.
The turbidity sensor was constructed using PVC pipes, LDR and LED. The sensitivity of turbidity sensor is affected by the angle of light incident on LDR [7][8][9], hence we conducted experiments to characterize the LDR absorption due to this effect. The LED and LDR were positioned inside the PVC pipe to create 180° and 90° incident angles as shown in Figure 4(a) and Figure 4(b). The sensors were then submerged into a plastic container that represents the water tank. Silt was gradually added into the water in order to increase turbidity and to test sensing capability of the designed sensor.     [11]. The turbidity values calculated indicate that turbidity increases as the silt added to the water increases shown. Despite of differences in the light of incident angle i.e., 180° and 90°, the LDR-LED turbidity sensor has similar descending when trend which means the both configuration can be used to detect turbidity correctly. It appears in Figure 6, the plot of 90° is nearly similar to the commercial turbidity sensor in both setups i.e., in the present of ambience light and in total darkness. It can be inferred that this position would have better light incident absorption than the 180° positioning. There were no significant differences in the measured values by the sensor in the two studied conditions. This also means that the designed sensor is robust enough and can also work under the presence of light.  These data were captured from the board and were logged into the cloud without any problem. The data also has been displayed and visualized in a Web-Gui shown in Figure 8. When the turbidity level of water increased, the data in the Web-Gui show changes almost instantaneously. The monitoring system of a water tank can be accessed from anywhere in the world through the Web -Gui HTTP link as long as there are an internet connection and the system are active. A database based on Web-SQL will be added to the system where the information from the sensor will be stored for system analyzing or maintaining. The turbidity sensor circuit designed will be improved to increase its sensitivity.