Efficient Approach for Monitoring and Controlling Water Parameters Utilizing Integrated Treatment Based on WSNs

Research works of Wireless Sensor Networks (WSNs) applications and its constraints solutions occupy wide area around the world and attract many researchers. In this paper, an important one of environmental WSN applications is presented that is the water monitoring applications. An efficient approach for monitoring and controlling water parameters in real-time is im-plemented utilizing merging between WSN and designed simple workstation. For implementation simplicity, two water parameters (pH and temperature) are monitored and controlled in the proposed approach. Most of past work of water monitoring presented different proposed monitoring scenarios for different water parameters only. This research work utilizes the concept of interactive WSN nodes. The interactive nodes interact with the monitored water parameters to control its value. In the base station, the collected data is analyzed and the real-time value of the monitored parameters appears on the designed Graphic User Interface (GUI). The GUI is designed using the Matlab program. Through the GUI, the operator can switch the control between automatic and manual. ZigBee module is used for implementing the wireless communications between the nodes and the workstation. Due to the cost and simplicity, two sensors only are used in the proposed approach. Different real-time experiments are performed to test and measure the effective-ness and performance of the presented approach. These experiments reveal that the presented approach is effective for water treatment and efficient more than the past proposed water monitoring scenarios.


Introduction
Network technologies became an important part of our world, whether wired or wireless networks. Networks are used in our daily life, industry, education and other fields. Wireless networks provide flexible wireless connection via wireless channels utilizing RF waves in open space. It has evolved significantly in recent years. They are based on radio waves to transmit electrical signals following different wireless standards such as Bluetooth, ZigBee and Wi-Fi [1]. There are many problems solutions have been achieved based on the wireless networks and overcoming wired networks problems facing. Wireless networks have many advantages such as it do not need infrastructure, low cost, high power efficiency, sending data to a remote location, and it provides fairly reliable communication without expensive connectors. Wireless networks are used in many fields as they can help to overcome the constraints of wired networks and have additional benefit of mobility and design flexibility [2]. There are many types of wireless networks include, WBAN, WPAN, WLAN, WMAN, and WWAN. These networks are classified according to its range where they can send and receive data via different distance through various wireless communication standards such as Bluetooth, Wi-Fi, ZigBee, WiMax, etc. [3]. In recent years, wireless network technology had great development and was used with embedded systems to implement a set of specific tasks. The result of this development was the emergency of Wireless Sensor Networks (WSNs). WSNs are capable of implementing many of the essential needs for humans, as they have the potential of being used in different applications [4].
WSNs are an attractive technology for smart buildings, industrial automation, and operation control applications. WSNs are also used in a wide range of applications such as military, industrial, environmental and healthcare applications. WSNs can be designed to meet the specific needs of a particular application. There are many researchers who presented WSN utilization in different fields, such as [5] [6] [7] [8]. WSNs were used in military applications in [9] [10] [11] [12]. Different scenarios of WSN application in industry control were discussed in [13] [14] [15] [16]. The environmental monitoring application is the most attractive field of WSN utilization where different physical parameters can be monitored by WSNs. In nature and wild environments, we always find a big role for WSNs. WSNs are used to determine the changes in natural phenomena and detect events. Environmental applications such as volcano monitoring, fire detection, flood detection and water quality monitoring were discussed in [17]- [27]. This paper focuses on water quality monitoring using wireless sensors to monitor different water parameters. In previous research, the utilization of WSNs for water monitoring scenarios was only limited to monitoring only. In this research, closed loop WSN is proposed to monitor and control water quality. The proposed interactive system can work automatically according to pre-programmed rules or through human decisions to control water parameters values manually.
It is known that water has three characteristics: Chemical, physical and bio- logical. Each of these characteristics contains many parameters that must be within certain values according to the use of water as discussed in [28]- [33]. We propose this system to overcome the traditional method which was based on taking the sample of water and analysis it in the lab. Because this method leads to a time lag that makes the sample results do not reflect the real water. The proposal system can monitor and control water parameters in real time through a set of sensors put in water forming a treatment unit based on WSNs.
The rest of this paper is organized as follows: Section 2 the discusses related work and background regarding WSNs and the previous work in water monitoring using WSNs. Section 3 presents the methodology of the proposed system. Section 4 discusses the proposal system results. Section 5 contains the conclusion.

Related Work
This section is divided to two parts: the first part presents the background of WSN while the second part presents a group of previous work about water monitoring where a number of researchers have been interested in this field because of its great importance in many different applications

Background of WSNs
Wireless sensor networks (WSNs) are object-oriented networks because these networks are designed for a specific purpose. WSNs consist of a group of devices called nodes and these nodes connect together wirelessly. Nodes work on collecting information about natural phenomena and objects then send the information to sink or base station to analyze, observe the information, and take the correct decision. The sink is a controller that works on monitor nodes status.
Collect data from all nodes are then sent to the base station, and in some application, the sink is able to take a decision according to a stored algorithm. The area monitored by WSN is called the service area. The service area is divided into a group of areas called coverage area. The coverage area is the maximum area a node is capable of covering and capturing the event from [34]. Figure 1 gives us the structure of WSNs.

Node Components
The node consists of four main units: the sensing unit, the processing unit, the   [8]. Figure 2 shows the components of the node.
• The sensing unit: The sensing unit is the sensing part in the node which contains the sensor.
The sensor detects and converts the physical parameter to an electrical signal that reflects the physical parameter value which reflects the data being monitored.
• The processing unit: The processing unit in the controller works on processing the data which cames from the sensing unit then passes it to the communication unit or stores it in the memory according to the stored algorithm.
• The communication unit: The communication unit is a transmitter and receiver module such as ZigBee module that sends and receives the data from and to the base station.
• The power unit: The power unit provides energy to all units.
The previously discussed components of the node are the most popular components used in WSNs, so this node may be called the traditional node. The traditional node is based on sensing and monitoring natural phenomena and sending data to the monitoring center only. This node cannot interact or change natural phenomena parameters like temperature, pressure, humidity, etc. In our proposed system, the node is different from the traditional node. The node in the proposed system can interact and change the value of water parameters through signals sent from the monitoring center or algorithm stored in the processing unit. This algorithm can take actions and control operations in the system when the values of parameters reach the threshold. So in the proposed system, the node is called an interactive node. Figure 3 shows the components of an interactive node and Figure 4 shows an illustration of the proposed system.

WSN Topology
WSNs are used in a large geographic area so it uses two types of network topologies: single-hop and multi-hop. Each type issues according to the area monitored by the network where each node has a specific range to send signals. The node should consume low power in the transmitter to keep energy. If the range is suitable for each node to send and receive the data from and to the base station the single-hop network topology is used, otherwise, multi-hop network topology is used [34]. Figure 5 shows the topology of WSNs.
• Single hop: In this type, all nodes send and receive data to and from the base station directly. This type does not allow data exchange between nodes. This type is used in a small geographic area. This type is easy in configuration and each node connects directly to the base station.
• Multi-hop: This type allows data exchange between nodes as this type used in large areas where nodes are not able to connect directly to the base station or sink. So in this type, we have nodes called aggregation nodes or heads that have different roles.
The head is the boss of a group of nodes that works on collecting data from these nodes and sending it to the base station or sink. Every head is responsible for a specific monitor area.

WSN Applications
WSNs are widely deployed in different applications because of its many advantages. WSNs do not require an infrastructure and are used in different environments that are difficult to reach using traditional methods. Figure 6 shows the different applications of WSNs [7].
Environmental applications are among the most important WSNs applications that depend on environmental phenomena monitoring. Environmental monitoring means taking a sample of the natural parameters involved in the environment to observe and analyze the environment [35]. Systems used in environmental monitoring are able to be employed in many applications like agriculture, air pollution, water quality, forests, etc. [36]. WSNs in these applications are able to predict dangerous events to enable the responsible authorities to take the necessary precautions against these events. Figure 7 gives us different environmental applications [8].
This paper focuses on water monitoring and proposes a system for monitoring and control of water parameters for water used in different application such as drinking, agriculture, industrial, etc.

Previous Related Works
A number of researchers were interested in the field of monitoring water parameters because of its importance in many different applications such as [37]- [47]. Table 1 shows a number of water parameters monitored by previous various scenarios.
In the following, we present an example of scenarios presented by researchers in various researches.
In [45], the authors presented a design for a water monitoring system in real time. The system consists of one node that contains more than one sensor, a microcontroller PIC32MX220F032B and a ZigBee module that sends the data to the monitoring center. The system monitors flow, temperature, pH, conductivity and potential oxidation-reduction in the water. Each parameter is monitored      using a special sensor. The sensors collect the data and pass it through signal conditionings then pass it to the microcontroller where the data is processed and sent to the monitoring center through the ZigBee module. The center monitoring receives the data through the ZigBee module and passes it to another microcontroller then displayed on an LCD. In the case that one of the parameters moves to the unsafe area; a warning will occur through the alarms. Figure 8 shows the block diagram of the sender and receiver parts employed in the monitoring system. In [46], the authors presented a system for water parameters monitoring based on the Internet of Things. The system is monitoring four water parameters: pH, water level, turbidity, and conductivity. The sensors measure the values of these parameters and pass it to the controller. The values are displayed on an LCD and sent through a Wi-Fi module to the cloud. The values when reaching the threshold, an alert message is sent to the responsible person on the smartphone to take a suitable decision. Figure 9 shows the block diagram of the proposed system.

Description of the Proposed Approach
This section explains the methodology and operation of the proposed approach. The proposed system is divided into two parts: hardware and software. The proposed system is an integrated processing system that is able to monitor and control water parameters by employing WSN.

Hardware Design
The hardware of the proposed system includes two main parts: the interactive node and the base station. Firstly, the interactive node consists of three main units: the first unit is the sensing unit which contains a pH sensor (SKU: SEN0161) and a temperature sensor (water proof) where their specifications are discussed in [48] [49]. The second unit is an Arduino Uno controller and its specifications are discussed in [50]. The third unit is a communication unit where this unit is divided into two modules: the first in the node while the second in the base station. The communication unit in this system is a ZigBee module and its specifications are discussed in [51]. Secondly, the base station consists of a ZigBee module and a PC that uses a GUI window built using MATLAB program 2017. Figure 10 shows the block diagram of the proposed system.

Software Content Description
The software in the proposed system is divided into two parts which include, the algorithm which stored on the Arduino and the Graphic User Interface (GUI) on the MATLAB program. Figure 11 gives us the flow chart for the Arduino algorithm. GUI is the window that displays the data which is sent from the node.
The operator monitors the data which appear on the GUI. Through the GUI, the operator can control the values of parameters by a group of control switches in the GUI. Figure 12 shows the design of the GUI. Also, Figure 13 gives us a block diagram that describes the GUI operation.

Advantages of the Proposed Approach
Through looking at all previous research works, it has been found that they only monitor the parameters and lack the possibility of controlling those parameters in real-time. All previous researches were interested in monitoring the status of water parameters and sending the reports to the responsible person to take a suitable decision. In some researches, an alert occurs when the water parameters reach beyond the threshold.
In the presented research paper, the proposed system is able to monitor and control water parameters in real-time. The proposed system has the ability of controlling the water parameters through the operator who monitors the water parameters. The operator is able to operate the control systems in the water parameters through a GUI which displays the values of these parameters. Also, the proposed system is able to operate the control systems in the water parameters automatically when the values of the parameters reach beyond the threshold according to the algorithm stored in the microcontroller. The proposed system is considered a treatment unit for water parameters. The proposed system is suitable for different applications of water usage such as drinking, agriculture, and industry because the proposed system has the flexibility to be used in different applications. We only need to change the threshold for the parameter values according to the application of water usage. Table 2 gives us the threshold for some parameters which may be monitored and controlled for water used in drinking and agriculture [28] [52].
There are several experiments are performed on the proposed approach for water parameters control as shown in section 4. These experiments reveal that the superiority of the proposed approach than the traditional water monitoring methods and the presented approaches in the past related works [39]- [44].
Two sensors only for pH and temperature are used in this approach for reducing the cost and simple implementing. The number of sensors is not defects in the proposed approach. These sensors are just examples, the proposed approach can work with more sensors. Also, the GUI can monitor and observe many parameters not two only; it needs only simple reprogramming and redesign the GUI.

Operation Method
This section shows the operation method for the proposed system which is divided into two parts: monitoring part and control part.

Monitoring Part
The system is monitoring the water through sensing the parameters using sensors in the sensing unit. The sensing unit collects the data through the pH sensor and temperature sensor. After that, the sensing unit works on conditioning the data signal then passes it to the processing unit. The processing unit, the Arduino Uno, works on processing the data according to the algorithm stored on it then passes the data to the communication unit. The communication unit is a ZigBee module that works in this part as a sender forward the captured data to The base station receives the data through the ZigBee module that works in this part as a receiver. The ZigBee module receives the data and passes it to a PC device through the interface between them. The PC device displays the data on a GUI MATLAB 2017 where the data is observed and analyzed by the operator. Figure 14 shows the block diagram of the monitoring part.

Control Part
The system in this part works on the control the water parameters through in- in it. Figure 15 shows the block diagram of the control part.

Experimental Results
In this section, there are several experiments have been performed to evaluate and test the performance of the proposed approach in the monitoring and control processes. In the following, the results of different practical experiments have been showed and described.
The experiments of the proposed system evaluation can be divided into two four steps: • Firstly, Monitoring process is tested for two water parameters (pH and Temperature) and its threshold values as shown in Figure 16 and Figure 17. • Secondly, the control process in the pH parameter value is tested as shown in Figure 18.     for pH and temperature as determined by the algorithm. So in the GUI, there are messages that show that these values are abnormal (abnormal pH, abnormal Temp). When the operator sees these messages, he operates the control system, if the operator is late in taking the decision, the control system will operate automatically. Figure 18(a), Figure 18(b) display the monitoring of the pH and temperature, and the control of the pH parameter through operating the control system by using the control switch. At the beginning, in Figure 18(a), the pH value = 7.33, but after operating the control system to add a material which increases the pH value in water through pressing the pH control ON in the GUI. The curve of pH temporarily increases to pH value = 11.65. Figure 18(b) shows after a period of time after adding the material which reduces the pH value in water, and the curve of the pH is reduced to pH value = 6.05.
These results show that the system is able to both monitor and control the pH parameter at the same time and in real-time. Figure 19(a), Figure 19(b) display the monitoring values for pH and temperature, and the control of the temperature parameter through operating the control system by the control switch. At the beginning, in Figure 19(a), the temp value = 25.23, but after operating the control system to add a material which reduces the temperature in water through pressing on temperature control ON in the GUI, the curve of the temperature is reduced and the temp value = 20.05. Figure 19(b) shows after a period of time after adding the material which increases the temperature in water, and the curve of temperature is increased and the temp value = 24.51.
These results show the system is able to both monitor and control the temperature parameter at the same time and in real-time.  and temp = 25.44. These results show that the proposed system is able to both monitor and control water quality parameters in the real-time.

Conclusion
In