Management of Water Treatment Systems Automatically via the Internet of Things ()
1. Introduction
Water quality is critical for determining the state of water in a water source and ensuring its safe use. Whether it is natural surface water sources such as rivers, canals, swamps, marshes, lakes, and seas, or surface water sources that humans have drilled to obtain water sources such as dams, weirs, reservoirs, and canals, these water sources are important to life for consumption—consumption use of the household sector, as well as driving the economy, agriculture, and industry as well as a variety of national activities such as using it as a major transportation corridor and ensuring the livelihood of people in each river basin. The value of water is regarded as a national resource, and citizens of the country must work together to keep the water quality in the water source from deteriorating. In order to have the resources necessary to sustain life and the nation in the present and future. The wastewater treatment system employs a variety of techniques. Each approach has its own set of features, as well as benefits and drawbacks, but the goal of treatment is to treat sewage-related effluent sewage tainted with fat. Wastewater is generated by the use of water in various structures [1] [2]. The automatic water treatment system was invented by Thais and differs from other systems in the following ways: 1) removes up to 90% of oil and grease. 2) Removes as much as 70% of suspended solids. 3) Cut BOD and COD in their insoluble form by up to 50%. 4) Add more oxygen to the water. 5) The smart water treatment system, also known as automatic control, eliminates the need for employees to regulate the water valve. Reduce the number of people working on the wastewater treatment system. 6) The machine and water quality are monitored using a 4G monitoring system, which reduces maintenance time and costs. Allows consumers to examine the machine’s performance and water quality in real time on their mobile phone at any time. Furthermore, the quality features of the water before it is introduced into the treatment system must be considered while selecting water treatment systems. In order to get water quality that fulfills the criteria for use, including maintenance of the treatment area and system. As a result, the water treatment system is dependent on the quality of the water after it has passed through the treatment system as well as the planned use of the water.
Overall, this research will explain the water treatment in Section II and Section III will present the control system, validation and experimental results in Section IV and conclusions will be summarized.
2. Electrochemical Cell Principle
Electrochemical cell principle cell electrolyte it is made up of a source of direct current. At least two electrodes and an electrolyte solution are required. A reaction with electron transfer or an oxidation-reduction reaction occurs when an electric current is released into a metal-electrode reactor of an electrode produced by oxidation at the anode of a metal such as iron or aluminum corroding and dissolving the metal in water [3] [4]. The water reduction reaction occurs at the cathode at the same time. Hydrogen gas (H2) and hydroxide ions (OH) will separate from the water. The water turns alkaline over time. Because of the increasing concentration of hydroxide in the water, ferrous (Fe2+) and ferric (Fe3+) ions precipitate to generate ferrous hydroxide (Fe(OH)2(s)) and ferric hydroxide (Fe(OH)3(s)).
This allows wastewater to be treated by creating a redox reaction that reduces molecule adhesion stability using electricity. Impurities in the water condense into a floatable sediment that can be swept away from the water’s surface. Electric flotation is the name for this method. (Electrocoagulation) or precipitate in wastewater, as well as pollutants [5]. The anode’s oxidation electrode and the cathode’s reduction electrode are the two electrodes.
Reactions that take place at the anode are referred to as oxidation reactions.
(1)
Reduction reactions are those that occur at the cathode.
(2)
The reaction in the electrolytic cell is represented in Figure 1 as follows.
Anode is a type of anode that is (Oxidation)
(3)
(4)
The cathode (Reduction)
(5)
reaction of redox
(6)
Furthermore, in the electrolytic precipitation process, the electrodes the majority of metal ions are utilized to eliminate contaminants from the environment. Aluminum or steel are the most commonly utilized materials. This is due to the fact that the ions produced might be utilised in wastewater treatment [6] [7]. Aluminum sheets, for example, can be used alone or in combination with steel in wastewater treatment. However, the effectiveness of the precipitation is a factor.
The aqueous medium determines the mechanism of the electric precipitation process qualities of conductivity and other characteristics. During the electrolytic precipitation process, variables such as pH, temperature, particle size, chemical content, and ionization mechanism are controlled by the electrode type. When aluminum is employed as the electrode, it is reacted at the anode in an electrolytic precipitation process. As well as the cathode terminal, which is as follows.
At the anode:
(7)
(8)
At the cathode:
(9)
At a solution:
(10)
When iron is utilized as the electrode, an electrolytic precipitation reaction occurs at the anode. As well as the cathode terminal, which is as follows.
At the anode:
(11)
(12)
At the cathode:
(13)
At a solution:
(14)
If there is oxygen dissolved in a solution,
(15)
(16)
3. Control System
The capacity to apply the three control conditions of proportional, integral, and derivative influence on the controller output to execute the right and optimal control is a defining feature of the PID controller [8] [9]. The right-hand block diagram depicts the concepts of construction and application of these phrases. Displays the PID controller, which determines the error value in real-time. The difference between the desired setpoints is
and the measurable process variable display style text
: display style
and make the necessary corrections based on the proportion, one, and derivative terms [10]. By modifying the control variables over time, the controller seeks to eliminate mistakes
i.e. changing the value of the control valve to one determined by the weighted total of the control conditions (Figure 2).
In industrial processes, the PID controller, or any derivative of it, is the most used controller. The name is an acronym for the three control actions it performs: proportional (P), integral (I), and derivative (D) [11]. It’s not required to include all of the actions in the controller all of the time. Instead, several combinations such as P, PI, PD and PID as well as DPID, can be used. The PID controller’s control signal is made up of three elements and is frequently represented as follows:
(17)
where
denotes the difference between the system’s reference input and output variables. This error signal is a controller input variable, while variable u is the controller output signal (t). To create a digital version of the PID controller, however, integral and derivative components have to be discretized. The simplest method for discretizing an integral is to use bringing it to a conclusion, and arriving at a commonly utilized controller developing a digital version for use with MATLAB, based on Equation (18).
(18)
The gains that achieved the maximum synchronism of control parameters were 0.02 for Kp, 0.3 for Ki, and 0.05 for Kd, according to experiments done using a controller in an The System of Water Distribution (TSWD) experimental bench. To collect data, a sample time of 180 milliseconds was used.
3.1. Software Development
The design is controlled by the C++ programming language, which automates the operation of the water treatment system through the interface. It establishes a working procedure that is consistent and linked to the pumping of water and the measurement of water parameters. Length of treatment The Dissolved Oxygen (DO) sensor can be programmed to send commands to it. To control the water pump, plug the Arduino ESP8266 microcontroller board into the Arduino’s output connector. It keeps track of the water qualities while the software is running. Controlling additional devices as well as the duration of water treatment in each period. Visual Studio Code is used to write in three languages: HTML, CSS, and JavaScript (Figure 3).
Writing software for IoT systems is currently done through the firebase medium, which is real-time (real-time) and can capture data. Firebase is an online database service used in applications. In this domain, most applications necessitate the use of a database. Firebase’s API isn’t built on any one language. REST APIs (HTTP protocols,) can be used to request data (GET) or transmit data (SEND) if a library for that language is available (PUT).
3.2. Microcontroller Control System
The microcontroller is in charge of the entire system. It uses an Arduino ESP8266 board to communicate between input and output. It starts with the Arduino ESP8266 board, which collects both pH and alkalinity data from the sensor. When NodeMCU receives all three values from Board Arduino ESP8266 and then transmits them to the database, it sends them to the database. Through web apps, providing real-time findings and preliminary water quality analyses (Figure 4).
3.3. Hardware Design
The researcher has specifically selected hardware and software materials and equipment to enable the electrolysis process when managing the water treatment automation system. The Internet of Things can command and report outcomes in real-time in performing research trials, should be suited for experimentation and consistent with programming and assessing the performance of the automated water treatment system management, including:
1) Microcontroller ESP8266 module;
2) LCD 16 × 2 with backlight of the LCD screen;
3) Camera;
4) Breaker and Power System;
5) Pump 1 Hp;
Figure 4. Microcontroller control system.
6) Concrete pond structure, size (W × L × H) 80 × 200 × 60 cm (Figure 5 and Figure 6).
This system’s pump station is a 1-horsepower motor pump set (CMB) with a single-phase induction motor (220 V). A frequency converter and inverter are used to turn on the CMB. When used in conjunction with an automatic control system, it provides for the maintenance of pre-set and constant working pressures, as well as the adjustment of the pump station’s operation to regular variations in demand that occur on occasion. This way, excessive pressure and unnecessary energy costs can be avoided.
4. Discussion and Results
4.1. Experimental
Treatment of sewage it can be broken down into the following sections:
1) Primary Treatment and Primary Treatment, Sand, gravel, and big solids separation treatment ,waste water or out of liquid Coarse Screen, Fine Screen, Grit Chamber, Primary Sedimentation Tank, and Skimming Devices are among the tools employed. Removes 50% to 70% of suspended particles and 25% to 40% of organic materials assessed as BOD.
2) Secondary Treatment, this is the process of treating wastewater that has already undergone primary and initial treatment. However, the remaining wastewater
Figure 5. Water treatment control system.
(a) (b)
Figure 6. Water treatment system management. (a) Electrode; (b) sewage treatment.
contains tiny floating particulates as well as dissolved and insoluble organic materials. Biological treatment is another term for secondary therapy. It is based on the notion of growing microorganisms in a controlled environment. To improve the effluent quality by increasing the effectiveness of consuming organic matter quicker than it occurs normally and separating the sediment from the wastewater using a sedimentation tank.
3) Advanced Treatment, it’s the procedure of eliminating nutrients such as nitrogen and phosphorus, paints, precipitated suspensions, and other contaminants that haven’t been removed by secondary treatment. This is to increase the water quality so that it can be recycled.
4.2. Results
The initial system and the transfer function G(s) after adding self-turning PID control are both simulated, with the input signal set as a unit step signal. Figure 7 and Figure 8 depict the system response curves, respectively. Table 1 shows the system transient response indicators before and after optimization, as seen in Figure 7 and Figure 8.
The centrifugal pump utilized in the test has a rated flow rate of Q = 5 m3/h and an electrical frequency of f = 50 Hz. The frequency converter’s working frequency is set to f1 = 46.7 Hz and data is gathered every 15 seconds for a total of 10 times. Table 2 shows the outcomes of the data collection.
Figure 7. The system step response curve.
Figure 8. The system step response with turning PID control.
Table 2. Collection of test results (1).
The curve fitting is done based on the data in Table 2. At a constant frequency, the curves of theoretical flow and actually collected flow can be formed, as shown in Figure 9.
The curve fitting is done based on the data in Table 3. As shown in Figure 10, the curves of predicted flow and actually collected flow can be obtained at a configurable frequency.
Figure 9. Flow curve fitting with a constant frequency.
Figure 10. Fitting a flow curve with a variable frequency.
Table 3. Collection of test results (2).
5. Conclusions
The rising time and peak time of the centrifugal pump flow control system after adding the self-tuning PID controller are both large, according to the data analysis in Table 1. The system’s adjusted output response curve is rather mild, with the maximum overshoot decreased by 82.50 percent and the system’s stability substantially enhanced. At a fixed frequency, the theoretical flow rates of the pump are always greater than the actual flow rates, as shown in Table 2. The theoretical flow rate of the pump is constantly maintained at around 3.85 m3/h, with a fluctuation range of less than 0.28 percent as acquisition time increases. The maximum and lower limits of the working frequency of the constant frequency are selected to achieve accurate control of the pump flow, as shown in Table 3. The theoretical and actual flow of the pump both rise in direct proportion as the frequency increases. This demonstrates that the developed adaptive control approach can effectively increase the working efficiency under the condition of frequency conversion. Figure 10, fitting a variable frequency flow curve. The maximum and lower limits of the working frequency of the constant frequency are selected to achieve accurate control of the pump flow both rising as the frequency increases.
Farmers interested in establishing an automated plant water system should focus on learning to develop a body of knowledge. Using readily available sensors and processors, they are ready to change their traditional agricultural transformation model to one that is more intelligent. Beginning to learn from the components of the equipment required to transform their own agricultural. Assigning a set of operating instructions to the device installation of a water system suited for automatic watering, as well as the operation of the IoT system. Data transmission protocol settings for internet connections Notifications on social media are simple and quick. For precision and efficiency, industry standard sensors are used.
Overall, using an IoT system to regulate the water treatment system improves efficiency. Pickup is flexible, and it can be controlled and monitored at all times.
Acknowledgements
The authors would like to express and deep appreciation to the Valaya Alongkorn Rajabhat University in Pathumthani, Thailand, for assisting with the completion of this study.