High-Precision Monitoring System for Turbidity of Drinking Water by Using Scattering Method

To enhance the accuracy of water-quality turbidity detection and address the challenges associated with drinking water safety, this study proposes a high-precision turbidity sensor detection approach. However, in practical water-quality monitoring, the design of the water-quality turbidity-monitoring system encounters difficulties arising from air bubbles in the water affecting beam refraction, excessive beam scattering angles impacting detection accuracy, and the need for precise water-quality turbidity measurements. To tackle these issues, this study presents a novel design comprising a pressurized air-removing device and an innovative mechanical structure, effectively eliminating difficult-to-remove air bubbles in the water channel. Furthermore, a lens with calibration is devised to effectively address the problem of excessive beam scattering angles. Based on the 90° scattering method, the designed sensor achieves an impressive detection limit of 0.001 nephelometric turbidity unit (NTU) and a concentration range of 0–100 NTU. The results demonstrate a significant improvement in the accuracy and interference reduction ability of the sensor designed in this study. The developed high-precision turbidity sensor offers promising potential for advancing water-quality monitoring technologies and ensuring safe drinking water for the public.

with the challenge of detecting and ensuring the quality of their drinking water due to these concerns [4], [5], [6].
In water-quality monitoring, the turbidity parameter is a critical indicator that measures the conformity of water-quality to standards and provides an essential foundation for evaluating the effectiveness of water treatment [7].The World Health Organization (WHO) mandates that the turbidity level of drinking water must not exceed 1 nephelometric turbidity unit (NTU).Below 4 NTU, turbidity can be detected only using instruments, but above 4 NTU, the suspended matter becomes visible.Large municipal water supplies should consistently produce water with no visible turbidity and should achieve 0.5 NTU and an average of 0.2 NTU or less after purification [8].Therefore, high-precision turbidity monitoring is of great significance for human health and a high standard of living [9].
Conventional turbidity-monitoring methods for waterquality, such as nephelometry [9], [10], rely on a large number of test papers and can be prone to errors due to the improper sample collection that may compromise the sample's integrity.Moreover, the titration process requires the use of various chemical reagents, leading to a wastage of manpower and material resources, and an increased likelihood of inaccuracies.Additionally, these methods are often affected by feedback delay, limiting real-time monitoring capabilities [11].
Spectrophotometry is a simple and effective method for measuring water-quality [12], but a commercial spectrophotometer for monitoring water-quality continuously is expensive and has inaccurate parameters [13], which is not suitable for drinking water-quality turbidity monitoring.
In recent years, there has been a proliferation of new turbidity detection devices, including portable smartphone turbidimeters [14], fluorescence spectroscopy detection [15], [16], [17], and Internet of Things (IoT)-based turbidity detection [18], [19].These devices hold great potential for high sensitivity, noncontact, and online water-quality monitoring.However, the instruments used in fluorescence spectroscopy tend to be costly and pose challenges in mitigating errors caused by environmental factors.They exhibit high sensitivity to environmental variables, making data processing a complex task.
As a commonly used turbidity detection method, the optical scattering method offers several advantages, including nondestructive assessment of water-quality, high sensitivity, wide measurement range, real-time continuous monitoring, and relatively simple and fast operation.These makes it widely used in water-quality monitoring and treatment, environmental protection, industrial process control, and other fields.The optical scattering method has emerged as a replacement for the conventional turbidity analysis method [20], which is designed and measured according to the ISO7027 standard [21].In this system, a beam of infrared ray is directed through the sample cell containing the target sample to be measured.A sensor positioned vertically to the emitted light measures the intensity of light scattered by suspended particles in the sample.The measured value is subsequently converted into turbidity using a microcomputer processor [7], enabling highprecision detection.Therefore, this system utilizes the optical scattering method for accurate turbidity measurement.
However, the 90 • scattering method faces the following three issues.
1) Expensive Equipment: Turbidity meters capable of measuring 0.005 NTU can cost tens of thousands of dollars.2) Presence of Bubbles: The scattering, position, and quantity of bubbles can introduce inaccuracies in the measurement results of the scattering method and severely interfere with data acquisition.3) Scattered Beam: Pronounced scattering beam and uneven particle diameter.To achieve high-precision water-quality monitoring sensors and effectively address the challenges in precise turbidity monitoring for drinking water, this research focuses on real water quality as the subject of investigation and proposes a comprehensive solution.
First, a differential pressure bubble removal device is devised to tackle the issue of bubbles present in the actual water flow, which affects the refraction of the infrared beam.This device seamlessly integrates the bubble removal mechanism with the measuring instrument, effectively reducing bubble interference and enhancing system stability.
Second, to mitigate the impact of light-emitting diode (LED) point light source scattering, a lens device combining single and double lenses is designed.The lens device aims to minimize scattering effects, resulting in more accurate measurements.It effectively addresses the problem of low accuracy and instability caused by the large scattering angle of the LED point light source.
Third, to enhance the accuracy of the water-turbidity monitoring system presented in this study, a constant current source is introduced to the infrared diode to ensure a stable light source.High-precision resistance is utilized to meet the accuracy requirements of detection.
Finally, to improve the accuracy of turbidity measurement, a 90 • scattering method is employed as the detection technique.Extensive interference experiments involving various variables are conducted to validate the accuracy and stability of turbidity detection.
The rest of this article is structured as follows.Section II reviews related work.The principle of turbidity sensors and interference reduction is described in Section III.Section IV discusses the design of the sensor structure.The experimental evaluation, analysis, and results are presented in Section V, followed by the conclusion in Section VI.

II. RELATED WORK
Many scholars have conducted research on turbiditymonitoring systems for water-quality.Tai et al. [22] devised a turbidity sensor for the distributed measurement system (DMS), which utilized a smart transducer interface module (STIM), transducer electronic data sheet (TEDS), and STIM self-identification technology, applying for 0-100 NTU.Nevertheless, no reasonable solution has been put forward for eliminating bubbles in the waterway and ambient light in actual measurement, which affects the accuracy of measurement.Therefore, it does not meet the requirements of measurement.
Yang et al. [23] have adopted a single-photon detection technique (SPDT) featuring high sensitivity to formulate the rapid turbidity measurement system.Wang et al. [24] used time-correlated single-photon counting (TCSPC) to create the time-varying turbidimeter.Both of them have the advantages of high sensitivity and short response time, but low resolution.
Regarding turbidity detection, distributed optical fiber sensing technology can be employed in specific cases [25].For instance, an optical fiber can be deployed in a water body to monitor the turbidity of suspended particulate matter by analyzing the changes in the scattered signal detected by the optical fiber sensor.This approach enables real-time monitoring of water body turbidity, making it applicable to water-quality monitoring, environmental monitoring, and water treatment.However, the practical implementation of distributed fiberoptic sensing technology for turbidity measurement requires calibration and verification to ensure accurate and reliable results.Consequently, due to the complexity and cost associated with this technique, it may not be the most common or widely used method of turbidity detection.
The sensors used by David and other researchers were cheaper than previous commercial sensors.Gillett and Marchiori [26] indicated the feasibility of using a low-cost sensor.It is possible to make low-cost handheld meters, but the drawback is that a large standard deviation is caused by ambient light and bubbles in the waterway.Azman et al. [27] used a light-dependent resistor (LDR) as a receiver, which resulted in a cost reduction.Similarly, other research in the field of low cost has been involved [28], [29], [30].However, they were not engaged in studying time-varying flowing water testing, exploring high-precision turbidity sensors, or solving some interventions in practical measurement.Hence, the sensors mentioned cannot be applied to the detection of drinking water quality.
Azil et al. [31] proposed a turbidity measurement system that uses a charge-coupled device (CCD) linear sensor to measure transmitted and forward scattered light faster.The results show that employing forward scattered light measurement can yield a higher dynamic range compared to transmitted light measurement, which provides a new research idea for turbidity measurement.However, the overall scheme design of the turbidity measurement system has not been mentioned.
The optical scattering method has experienced rapid development in the field of turbidity water-quality detection due to its convenience, high precision, and sensitivity.Lambrou et al. [32] proposed a turbidity sensor network design for real-time monitoring of drinking water pipe networks using the ratio method.They utilized transmitted light intensity to detect water turbidity and introduced 90 • scattered light to enhance detection accuracy.The design was tested and achieved an accuracy level of 0.1 NTU.
Fay and Nattestad [33] employed paired emitter-detector diode (PEDD) technology for water-quality turbidity detection, surpassing conventional photodiodes in terms of spectral sensitivity, cost, power usage, detection limit, and physical arrangement.Their study utilized analytical-grade calibration and demonstrated superior performance.
Jiang et al. [34] developed a turbidity sensor for deep-sea applications, employing a light-scattering path and a watertight mechanical structure.This design achieved a detection limit of 0.0036 NTU within the 0-20 NTU range.However, existing work lacks high-precision detection of flowing water.To address the need for high-precision turbidity detection in drinking water, the present study aims to design a highprecision turbidity detection sensor to effectively overcome this issue.

III. SENSOR DETECTION AND ANTI-INTERFERENCE PRINCIPLE
To achieve high-precision turbidity monitoring and address interference issues, this study focuses on actual drinking water as the experimental object.The overall structure of the turbidity-monitoring system, as depicted in Fig. 1, is designed in-house.To tackle challenges such as significant beam scattering and the influence of uneven particle sizes, a lens combining single and double lenses is devised for beam correction within the custom-designed water-quality detection structure.This lens design aims to improve the accuracy of turbidity measurement.Air bubbles present in the liquid can interfere with the propagation path and characteristics of light, thereby affecting the accuracy of turbidity measurement.To mitigate the impact of air bubbles in the water channel, a differential pressure air bubble-removal device is employed to effectively  eliminate them.Sections III-A-III-C explain the principle of turbidity detection, the principle of lens calibration, and the principle of differential pressure air bubble-removal device.

A. Detection Principle
The optical property of turbidity refers to the interaction between the incident light and suspended particles in water, namely, a scattering phenomenon that occurs when the incident light enters inhomogeneous media [35].The scattering phenomenon is shown in Fig. 2 when the incident light AO irradiates the water to be measured, particles in the water to be measured interact with the incident light AO.The particles absorb the energy of the incident light AO, radiate to the surroundings as a new light source, and then reradiate light energy in all directions, thus the scattering of incident light is formed.The turbidity value can be measured according to the change in light intensity between the scattered light OB and the incident light AO.
When a photoelectric sensor is placed on the light path of the scattered light OB, the international standard ISO7027-2016 [21] specifies that the angle of turbidity measured by the scattering method should be 90 • ± 2.5 • .a > 90 • is a backward scattering, a < 90 • is a forward scattering, and a = 90 • is a turbidity measurement.The scattered light measured at a = 90 • is not sensitive to the particle diameter and is less affected by stray lights.Therefore, the water-quality turbiditymonitoring system developed in this study uses a = 90 • scattered light.

B. Principle of Lens Calibration
The infrared LED serves as a point light source, emitting radiant light that consists of more than just the 90 • scattered light used in turbidity measurement.The reflection of most of the light can also interfere with accurate turbidity measurements.To address this issue and achieve high-precision turbidity detection, this study proposes the design of a lens configuration that improves the conditional LED point light source.
Fig. 3 illustrates the placement of the point light source at the focal point of a convex lens.The emitted light from the LED passes through the convex lens, resulting in parallel light beams and an increased amount of scattered light.
In this study, a two-piece lens configuration is employed at the receiving terminal.When the scattered light enters the lens, it undergoes two refractions, leading to a change in the width of the light.By utilizing a two-piece lens, the scattered light can be efficiently captured by the photosensitive surface of the turbidity sensor, maximizing the light reception capacity of the entire turbidity-monitoring system and improving accuracy.It should be noted that a single lens is not suitable for this purpose as it would cause light convergence, resulting in strong light intensity.Collecting signals with a single lens can easily lead to saturation of the collected values.

C. Principle of Differential Pressure Bubble Removal
There are two main methods to eliminate air bubbles in the water channel: 1) designing an air-removal device based on structural characteristics and 2) utilizing pressurized water flow to eliminate air bubbles in the water channel.Designing a bubble-removal device solely based on structural characteristics may not be ideal for eliminating tiny bubbles effectively.On the other hand, relying on pressurized water flow to remove bubbles can also have some impacts on the detection accuracy to a certain extent.In the actual design, this study changes the structural design and uses the differential pressure air bubbleremoval method to increase the pressure of the system through the difference in flow velocity between the front and rear.Considering the fluid mechanics and system requirements, the water inlet is designed as a conical shape to distribute the flow evenly, prevent vortex and turbulence, and facilitate stable water flow.At the same time, an air release valve is placed at the water inlet to remove air bubbles in the water channel, which ensures the elimination of air bubbles in the water channel and makes the method of removing air bubbles more effective and fast.Fig. 4 is a schematic of the differential pressure air bubble-removal structure.
The differential pressure air bubble-removal device is utilized for eliminating air bubbles during the turbidity detection process.The operating principle involves utilizing the preset differential pressure within the device to remove air bubbles from the measurement chamber.The following outlines the general operation process of the differential pressure air bubble-removal device.
1) Begin by connecting the air-release valve.The pressure at the air-release valve is low, and it remains closed during normal operation.The air-release valve is fully opened only when cleaning the device or draining the water from it.2) Start the water pump and open the water outlet valve.
The fluid to be tested enters the differential pressure air bubble-removal device through the device's inlet.As the water fills the measurement chamber, the opening and closing of the valve can be adjusted to regulate the pressure within the measurement chamber.3) Based on the relationship between flow velocity and pressure, it can be determined that once a flow velocity difference occurs, a certain pressure will be generated within the measurement chamber.This pressure facilitates the easy transportation of air bubbles present in the water channel toward the air-release valve.When the air-release valve detects the presence of air bubbles, they are instantaneously eliminated, completing the turbidity measurement process.
IV. STRUCTURAL DESIGN To achieve high-precision turbidity detection, it is essential to design an appropriate structure, select suitable devices for a stable light source, and implement an analog-to-digital converter (ADC) circuit capable of achieving high-precision reception.This section will cover the following topics: the sensor layout, device selection and design, emitting light source design, and receiving light source design.The integration of these key elements is vital for ensuring reliable and highprecision turbidity detection in the system.

A. Sensor Layout
In the presented study, a 3-D diagram of the mechanical structure is designed to ensure appropriate flow direction and proper placement of components for measuring sampled water.The internal structure of the turbidity system is illustrated in Fig. 5, while Fig. 6 depicts the external structure of the turbidity system.The structural design of the turbiditymonitoring system takes into account three main aspects: 1) to complete the effective conversion of the lens to the light; 2) to eliminate the effects of ambient light; and 3) to address the issue of eliminating water bubbles in actual measurements.By considering these aspects, the structural design of the turbidity-monitoring system aims to enhance the system's performance and accuracy, enabling effective turbidity detection in various water-quality monitoring scenarios.
The structure, designed using Solidworks, incorporates a fully enclosed measuring section.The device is coated in black to absorb the effects of reflected light, effectively eliminating any interference from ambient light.This design ensures a controlled and isolated environment for accurate turbidity measurements, enhancing the reliability and precision of the turbidity-monitoring system.

B. Device Selection and Design
Based on the ISO7027 standard [21] and literature [36], research indicates that employing a near-infrared light source with a wavelength of 860 ± 30 nm offers advantages in reducing interference caused by colored samples that absorb light.For this purpose, three near-infrared LEDs, namely SFH4550, SFH4551, and SFH4851 from OSRAM, were selected for comparison due to their ready availability as light sources.
Table I presents the comparison data under the condition of a driving current of 100 mA and a temperature of 25 • C. Based on the relationship between radiant intensity and narrow emission angle, the SFH4550 chip from OSRAM Company was chosen as the emission source, with its emission center at 850 nm, 2000 mW/SR radiant intensity, and ±3 • emission angle.
For light intensity sensing, a Si photodiode S2387-33R is adopted.To enhance the performance of the emitting source SFH4550, the Si photodiode S2387-33R is chosen as the optical signal-receiving source in this study.The Si photodiode S2387-33R is selected because its peak sensitivity falls within the LED emission range of 800-900 nm, and it has a response time of 1.8 µs.Additionally, its large effective area contributes to its suitability for application.

C. Emitting Light Source Design
To achieve high-precision and stable turbidity detection, the design of an optical emitting circuit plays a crucial role.The stability of the emitted light intensity directly influences the reliability of the final test results.Therefore, a meticulous driving circuit for the emission light source is designed to ensure consistent and stable illumination intensity throughout the turbidity measurement process.
The driving circuit exhibits key characteristics, including high input resistance, low output resistance, voltage following, and current stability.These attributes enable the circuit to function as an effective buffer, providing isolation, and enhancing load capacity and voltage by following the practical turbiditytesting system.By determining the optimal driving current parameters, the circuit ensures a consistent and stable emission light intensity throughout the turbidity measurements.
The driving circuit design for the emission light source is illustrated in Fig. 7, in which U 1 is an operational amplifier and Q 1 is an NPN transistor.It enables a driving current range of 0-100 mA, which corresponds to an input direct current (DC) voltage range of 0-2 V.By adjusting the input voltage, the current intensity can be altered, thereby affecting the luminous intensity of the LED and the resulting illumination intensity.During the actual system debugging process, the illumination intensity can be varied by adjusting the LED voltage value to determine the optimal parameters for the system.Through the meticulous design of the driving circuit for the emission light source, the stability and precision of the emitted light are guaranteed, thereby significantly enhancing the accuracy and reliability of turbidity detection.The carefully engineered driving circuit ensures consistent and reliable illumination intensity, which is essential for obtaining precise and repeatable turbidity measurements in various environmental conditions.

D. Receiving Light Source Design
The design of the receiving circuit is of paramount importance as it directly influences the accuracy of the turbidity measurement.In this the Si photodiode converts the collected changes in scattered light intensity into weak electrical signals that require amplification.To address this issue, a trans-impedance amplifier (TIA) is employed in the present study.The TIA topology features a feedback resistance between the output end and the inverting input end, optionally using an operational amplifier.Serving as the front-end circuit for the Si photodiode, the TIA facilitates current-to-voltage conversion through resistance gain and provides enhanced bandwidth.
The circuit diagram of the TIA amplifier is depicted in Fig. 8, in which D 1 is the S2387-33R chip and U 3 is the LTC2422 chip.It employs a T-type feedback network to control the output voltage through the feedback resistor R 3 .To mitigate issues caused by excessive resistance of a single resistor, negative feedback capacitor C 2 can be used to reduce output signal noise.The TIA amplifier in Fig. 8 can both amplify and attenuate signals, thereby expanding the signaldetection range.The gain can be adjusted by R 3 , and the amplified voltage is the product of the current and resistance.Proper adjustment of R 3 is crucial to finding the most suitable gain.
The AD8638 from Analog Devices Inc. (ADI) was selected as the amplifier (U 2 in Fig. 8) due to its excellent features.With a typical mismatch voltage of only 3 µV, a mismatch drift of 0.01 µV/ • C, and a peak noise of 1.2 µV (0.1-10 Hz), the AD8638's nearly zero drift is ideal for systems that demand minimal error sources.
The collected electrical signals are then converted into digital signals through ADC analog conversion.Although the microcontroller is equipped with ADC analog conversion, it only has a 12-bit ADC converter, which falls short of the turbidity accuracy standard of 0.001 NTU accuracy.Consequently, the system opts for ADI's LTC2422 chip (see Fig. 8), which features a 20-bit ADC, in line with measure- ment standards, providing ultrahigh sensitivity and resolution without any delay and ensuring stable conversion within a single cycle.This chip significantly contributes to achieving the desired high sensitivity and precision in the turbiditymonitoring system.

A. Turbidity-Monitoring System Stability
Stability in the context of the water-quality turbiditymonitoring system refers to its ability to maintain consistent performance and accuracy during prolonged operation.The collected light intensity sensing value serves as the foundation for ensuring measurement accuracy and is a prerequisite for system calibration.The stability test of the turbiditymonitoring system primarily focuses on examining the stability of the static water test.The static water test involves filling the device with water and conducting measurements after a certain period of standing time.The entire flow test process is depicted in Fig. 9, where Fig. 9(a) represents the flowchart of the waterway, and Fig. 9(b) shows the actual test setup.
To verify the stability of the turbidity-monitoring system, we selected 20 000 samples of still water with a turbidity level of 0 NTU.The collection frequency was set at 1 sample/s, resulting in approximately 5 h of monitoring.This extensive monitoring period is sufficient to demonstrate the system's stability.By analyzing the sampling data, the changes in light intensity values collected by the turbidity sensor over time are depicted in Fig. 10.The horizontal axis represents the time markers, indicating the progression of time, while the vertical axis represents the analog to digital (AD) light intensity values collected by the turbidity sensor.From Fig. 10, the following observations can be made: 1) the turbidity-monitoring system shows consistent and stable readings while detecting still pure water, exhibiting minimal fluctuations and 2) the AD sampling value, which reflects the light intensity value, remains steady around 144 000, indicating a turbidity value of 0 NTU.
Based on these findings, it can be concluded that the turbidity-monitoring system demonstrates excellent stability, which serves as a crucial prerequisite for system calibration.

B. Turbidity Calibration
After completing the stability test of the turbiditymonitoring system, the calibration process is essential to ensure accurate measurements.Given that the system is designed for applications involving drinking water or other scenarios requiring high-precision detection, a segmental calibration approach is adopted.Specifically, for the calibration of turbidity solutions in the 0-1 NTU range, a resolution of 0.1 NTU is selected.Calibration is performed with a resolution of 1 NTU in the range of 1-10 NTU and with a resolution of 5 NTU in the range of 10-20 NTU.The resolution of the system is then calculated by determining the change in the acquired light intensity value during the calibration process.
Table II presents the corresponding relationship between the turbidity standard solution and the parameters collected by the sensor during the calibration process.
By adopting segmental calibration and establishing a precise relationship between the turbidity standard solutions and sensor parameters, the turbidity-monitoring system can achieve accurate and reliable turbidity measurements across different turbidity levels.This ensures that the system performs effectively in various real-world water-quality monitoring applications, providing valuable data for ensuring the safety and quality of drinking water and other water-related activities.
Data in Table II were fitted using MATLAB software, and the results are presented in Fig. 11.The horizontal axis represents the AD sampling values, while the vertical axis represents the turbidity standard liquid values.The relationship of the fitting curve is as follows: The value of x ranges from 143 934 to 3 477 266.The R-squared value achieved an impressive level of 0.9997, indicating an exceptionally strong and robust fit of the regression model to the observed data.By calculating the resolution for each measurement, we obtain an average value of approximately 0.00003 NTU.The change in light intensity collected by the turbidity sensor is 1, corresponding to a turbidity range of 0.00003 NTU.This level of accuracy is less than one in a thousand, making it crucial for high-precision applications in fields such as waterworks and medical systems.

C. Interference Resistance Experiment
To verify the anti-interference ability of the turbiditymonitoring system and its adaptability to different test environments after calibration, the system conducted antiinterference experiments by controlling variables such as different flow rates, temperatures, and turbidity levels.
1) Flow Rates Interference Experiments: An interference experiment was conducted to investigate the effect of different flow rates on turbidity detection.The system used 0.5 NTU and 25 • C as the experimental conditions and varied the water flow rates using a flow control device.The system selected water flow rates in the range of 0-75 L/h, with intervals of 5 L/h for testing.The experimental data obtained are shown in Table III.The fitting results of the tests in Table III are depicted in Fig. 12.  From Fig. 12, it can be observed that when the water flow rate is less than 50 L/h, the system exhibits minimal error and good stability.However, as the water flow exceeds 50 L/h, the stability of the system deteriorates, and the detection value gradually deviates from the standard value.The increased water flow rate leads to higher refraction frequency of the beam in the water or difficulty in processing microbubbles, resulting in parameter fluctuations.Consequently, it is recommended to maintain the water flow rate of the system below 50 L/h during practical applications.
2) Temperature Interference Experiments: Considering the variations in temperature across different environments, the system conducted temperature interference experiments on turbidity detection to determine whether the system is affected by temperature.Under the experimental conditions of a water flow rate of 20 L/h and a turbidity solution of 0.5 NTU, experiments were carried out using turbidity solutions at intervals of 5 • C from 5 • C to 50 • C, and the experimental data are shown in Table IV.
Table IV illustrates that turbidity detection is not significantly affected by temperature changes, indicating that the  system can adapt to a wide range of working environments with varying temperatures.
3) Turbidity Detection Limit: The system employs different turbidity solutions to determine the upper limit of detection.Under the experimental conditions of a temperature of 25 • C and a water flow rate of 20 L/h, turbidity solutions ranging from 0 to 190 NTU were used for detection at intervals of 10 NTU each time.The experimental data obtained are shown in Table V. Fig. 13 displays the fitting results of the different turbidity solutions.
From Fig. 13, it is evident that the system's fitting results are linear when the turbidity is below 100 NTU.However, when the turbidity exceeds 100 NTU, the system's error increases, and the detection data is lower than the actual data.The scattering method is more effective for detecting low-turbidity solutions.Therefore, the turbidity detection of this system should be limited to less than 100 NTU.For drinking water detection or situations where high-precision detection is required, a limit of 100 NTU is adequate.If the water-quality solution contains mud or is heavily polluted, exceeding 100 NTU, the system will issue a serious warning to indicate that the water-quality is severely polluted, and its usage should be prohibited.

D. Lens Testing Experiment
To assess the actual impact of lens calibration on system accuracy improvement and error reduction, this experiment employed various turbidity solutions ranging from 0 to 50 NTU.It aimed to investigate the influence of lens Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.calibration compared to no-lens calibration on the experimental outcomes.For the no-lens calibration experiments, a flat mirror was utilized as it did not alter the optical path during calibration.The experiment was carried out under controlled conditions, maintaining a temperature of 25 • C and a water flow rate of 20 L/h.Table VI outlines the scenarios for the 0-50 NTU turbidity standard solution, comparing the use of lens calibration against the flat lens approach.
Fig. 14 illustrates a broken line diagram depicting the absolute error with and without lens calibration.The test results from Table VI and Fig. 14 reveal that the root mean square error (RMSE) with lens calibration is 0.0134, and the absolute average error is 0.0118.However, the RMSE without lens calibration is 0.3680, and the absolute average error is 0.3561.This clearly demonstrates that the error without lens calibration is significantly higher than that with lens calibration.The utilization of lens calibration effectively improves the accuracy of the system and greatly enhances its overall precision.

E. Bubble-Removal Experiment
To ensure the effectiveness of bubble removal in the system, the study employs the control variable method to verify the bubble-removal effect.The control group designed in this study consists of two sets of experiments conducted under the same experimental conditions, with a water flow rate of 20 L/h, a turbidity solution of 0.5 NTU, and a temperature of 25 • C. The first group involves adjusting the pressure difference of the water outlet valve and operating the air-release valve, while the second group entails fully opening the valve without using the air-release valve.
Fig. 15 illustrates the relationship between the light intensity value collected by the turbidity sensor and the time variation of 1000 consecutive samples in both groups of experiments.Fig. 15(a) depicts the turbidity values collected after employing the air release valve, with the turbidity value fluctuation not exceeding 0.01 NTU.Conversely, Fig. 15(b) displays irregular data.The control variable method is employed to validate the effect of air bubble removal.As the only difference between the two groups of experiments lies in the adjustment of the valve and the air bubble-removal device, the adjustment of the valve determines the presence or absence of air bubbles in the device.Therefore, it can be concluded that the bubble-removal device has a remarkable effect, significantly improving the detection accuracy of the system.

F. Comparative Testing Experiment
To verify the performance of the turbidity-monitoring system in real-life scenarios, a comparison was conducted between the test data obtained from a commercial turbidity instrument at a water-quality testing center and the data collected by the turbidity-monitoring system.The comparison data are presented in Table VII.It is evident from Table VII that the accuracy of the commercial turbidity sensor is only 0.01 NTU, and due to the lack of calibration, the error is relatively high when conducting high-precision turbidity detection.Furthermore, a long-term stability test was conducted on both the commercial turbidity sensor and the turbiditymonitoring system, both of which were connected to the user's drinking water source.The sampling frequency was set at 40 000 times with a sampling interval of 1 s.The results are depicted in Fig. 16, where the red curve represents the data from the turbidity-monitoring system, and the blue line represents the data from the commercial turbidity instrument.
From Fig. 16, it is evident that the system effectively removes air bubbles, and the beam calibration through the lens minimizes errors, resulting in accuracy levels that are about ten times higher than those of commercial sensors.Moreover, through long-term stability comparisons, it is evident that the turbidity measurement values obtained by the system exhibit a consistent trend with those from commercial turbidity instruments.This demonstrates that the water-quality turbidity-monitoring system possesses robust stability for testing running water.

VI. CONCLUSION
Real-time turbidity detection provides an effective solution for addressing issues related to drinking water safety and highprecision detection in medical systems.This study aims to tackle challenges arising from beam scattering, water channel bubbles affecting beam refraction, and the demand for precise measurement accuracy during the turbidity detection process.The main innovations of this research are as follows: 1) the design of a combination of lenses for beam correction in the turbidity-monitoring system, effectively eliminating stray light caused by beam scattering that could otherwise impact detection results; 2) the development of a differential pressure bubble-removal device and a novel mechanical structure to address the interference of air bubbles and ambient light during turbidity detection; and 3) the design of a constant light source driving current and light source receiving circuit to significantly enhance the accuracy and sensitivity of turbidity detection.Experimental results show that the turbidity-monitoring system designed in this study achieves the highest precision of 0.001 NTU, with an error of approximately ±1%.
The water-quality turbidity-monitoring system set up in this study is applicable in the range of 0-100 NTU.Once the turbidity concentration exceeds this limit, an alarm function activates to indicate that the current water-quality has significantly surpassed the standard, and the turbidity-monitoring system cannot continue operation.Future research could focus on incorporating scattering and transmission conversion devices to facilitate the measurement of different turbidity levels.Additionally, the inclusion of cleaning facilities, such as ultrasonic technology, can further enhance the system's capabilities.

Fig. 4 .
Fig. 4. Schematic of differential pressure air bubble removal within the measuring chamber.

15 .
Light intensity and time variation of turbidity acquisition.(a) Result of the regulating valve.(b) Result of the no regulating valve.

TABLE I COMPARISON
OF SFH4550, SFH4551, AND SFH4851 Fig.7.Emitting light source driver circuit.

TABLE II CORRESPONDING
TABLE OF LIGHT INTENSITY VALUES COLLECTED BY TURBIDITY STANDARD SOLUTION AND TURBIDITY SENSOR Fig. 11.0-20 NTU fit line.

TABLE VI LENS
CALIBRATION TEST DATA Fig. 14.Comparison of absolute errors in lens calibration tests.

TABLE VII COMPARISON
OF SENSOR DATA IN THIS STUDY WITH COMMERCIAL SENSOR DATA Fig. 16.Comparison of sensor data in this study with commercial sensors.