Water quality testing apparatus and light attenuation compensation method therefor, testing method, device, and storage medium
By encapsulating the detection light source and photodetector within the photosensitive chip, and controlling the light intensity in real time, combined with calibrating the light source and temperature compensation, the light decay problem of optical water quality detection devices is solved, achieving high-precision water quality detection.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- NANJING YIMU INTELLIGENT TECHNOLOGY CO LTD
- Filing Date
- 2025-06-04
- Publication Date
- 2026-07-02
AI Technical Summary
Optical water quality testing devices suffer from reduced accuracy due to light decay during use, necessitating light decay compensation to maintain stable light intensity.
A detection light source and a first photodetector are encapsulated within a photosensitive chip. The light intensity of the detection light source is controlled to remain constant by real-time detection of the light intensity signal. Combined with a calibration light source and temperature compensation, compensation for light decay and contamination of the transparent window structure is achieved.
To ensure that optical water quality testing devices maintain high detection accuracy under long-term use and temperature changes, eliminate the effects of light decay, and improve detection accuracy.
Smart Images

Figure CN2025099121_02072026_PF_FP_ABST
Abstract
Description
Water quality testing device and its light decay compensation, testing methods, equipment and storage media Technical Field
[0001] This invention relates to the field of water quality testing technology, and in particular to water quality testing devices, their light decay compensation, testing methods, equipment, and storage media. Background Technology
[0002] Optical water quality monitoring devices are primarily based on the principles of optical sensors. They utilize phenomena such as light absorption, scattering, and reflection in water to achieve real-time monitoring and assessment of water quality. Fluorescence spectroscopy, absorption spectroscopy, and Raman spectroscopy are commonly used optical detection techniques. These methods are based on the different response characteristics of different substances to specific wavelengths of light. By measuring changes in light intensity or spectral characteristics, parameters such as pollutants, dissolved oxygen, turbidity, and total organic carbon in the water can be quantitatively or qualitatively analyzed.
[0003] As optical water quality testing devices are used for a longer period of time and are affected by factors such as temperature, light decay will occur. That is, the light intensity emitted by the detection light source will decrease, which in turn will reduce the light intensity received by the photodetector, resulting in a decrease in the accuracy of the optical water quality testing device.
[0004] In order to obtain a constant light intensity output, it is necessary to compensate for light decay in the water quality detection device. Summary of the Invention
[0005] To achieve the above-mentioned objectives and other advantages of the present invention, a first objective of the present invention is to provide a method for light attenuation compensation in a water quality detection device. The light emitting part of the water quality detection device is configured with a detection light source and a first photodetector encapsulated in the same photosensitive chip, and includes the following steps:
[0006] Acquire the real-time detection signal of the light intensity of the detection light source by the first photodetector;
[0007] The light intensity of the detection light source is controlled to remain constant in real time based on the detection signal.
[0008] Furthermore, before the step of acquiring the real-time detection signal of the light intensity of the detection light source by the first photodetector, the method further includes:
[0009] A control signal is generated to drive the detection light source to emit light of a fixed wavelength.
[0010] Furthermore, the real-time detection signal is configured to be a signal formed by real-time reception and conversion of the light intensity of the detection light source.
[0011] Furthermore, the step of controlling the light intensity of the detection light source to remain constant in real time based on the detection signal includes:
[0012] Determine whether the detection signal has changed from the initial state, and change the control signal accordingly to maintain the light intensity signal unchanged.
[0013] Furthermore, the step of controlling the light intensity of the detection light source to remain constant in real time based on the detection signal includes:
[0014] The detection signal is compared with the control signal;
[0015] The intensity of the light emitted by the detection light source is adjusted according to the comparison results to maintain a constant light intensity signal.
[0016] The second objective of this invention is to provide a detection method for a water quality testing device. This method uses the aforementioned method to control the light intensity of the detection light source to be constant in real time. The light receiving unit of the water quality testing device is equipped with a second photodetector, and the water quality testing device is also equipped with a transparent window structure for holding the solution to be tested. The method includes the following steps:
[0017] The intensity of reflected light formed by the reflection from the window of the photosensitive chip is obtained by the first photodetector;
[0018] The intensity of transmitted light, detected by the second photodetector, after passing through the transparent window structure and being absorbed by the solution to be tested, is obtained.
[0019] The TOC content is calculated using the reflected light intensity and the transmitted light intensity.
[0020] Furthermore, the formula for calculating the TOC content is as follows:
[0021] K1 = I 2in / I1
[0022] Where C is the TOC content of the solution to be tested, I1 is the intensity of reflected light, and I 2out The transmitted light intensity is represented by k and K1, which are both calibration parameters. 2in The intensity of transmitted light before it passes through the photosensitive chip window and enters the transparent window structure.
[0023] Furthermore, the photosensitive chip also encapsulates a calibration light source, and the method further includes the following steps:
[0024] The detection light source is turned off, and the calibration light source is turned on;
[0025] Obtain the intensity of transmitted light detected by the second photodetector;
[0026] The pollution compensation value of the transparent window structure is determined by the intensity of transmitted light when the calibration light source is lit.
[0027] The optical path measurement results of the detection light source are compensated based on the pollution compensation value.
[0028] Further, the step of determining the contamination compensation value of the transparent window structure by means of the transmitted light intensity when the calibration light source is lit includes:
[0029] Calculate the change in transmitted light intensity over time when the calibration light source is lit.
[0030] Further, the step of compensating the optical path measurement results of the detection light source based on the pollution compensation value includes:
[0031] The change is then converted into the optical path measurement of the detection light source.
[0032] Furthermore, it also includes the following steps:
[0033] Acquire temperature data from the first photodetector and / or the second photodetector;
[0034] The actual light intensity of the first photodetector and / or the second photodetector is determined using the temperature data.
[0035] A third objective of this invention is to provide a water quality testing device, employing the aforementioned method, comprising a light emitting unit, a light receiving unit, a transparent window structure, and a control module. The light emitting unit is equipped with a detection light source and a first photodetector encapsulated within the same photosensitive chip. The photosensitive chip has a window. The light receiving unit is equipped with a second photodetector. The transparent window structure is used to hold the solution to be tested. The detection light source is used to emit detection light. The first photodetector is used to detect the intensity of reflected light formed by the reflection from the window of the photosensitive chip. The second photodetector is used to detect the intensity of transmitted light after passing through the transparent window structure and being absorbed by the solution to be tested. The control module is used to control the intensity of the detection light source to be constant in real time based on the intensity of the reflected light, and to calculate the TOC content using the intensity of the reflected light and the intensity of the transmitted light.
[0036] Furthermore, the transparent window structure includes two transparent windows and a water passage cavity, with the two transparent windows respectively disposed on the incident light side and the outgoing light side of the water passage cavity.
[0037] Furthermore, the light emitting unit is also equipped with a calibration light source encapsulated in the photosensitive chip. The control module controls the detection light source and the calibration light source to be lit alternately. When the calibration light source is lit, the control module determines the contamination compensation value of the transparent window by the transmitted light intensity detected by the second photodetector, so as to compensate for the optical path measurement results of the detection light source.
[0038] Furthermore, the wavelength of the detection light source is different from the wavelength of the calibration light source.
[0039] Furthermore, the wavelength of the detection light source is 254±10nm or 275nm±10nm, the wavelength of the calibration light source is not less than 860nm, and the response range of the first photodetector is 200-400nm.
[0040] Furthermore, it also includes a temperature measuring unit, which is used to detect the temperature of the first photodetector and / or the second photodetector.
[0041] Furthermore, the transparent window is a quartz sheet or a sapphire sheet, and the window on the photosensitive chip is a quartz window.
[0042] A fourth objective of the present invention is to provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described method.
[0043] A fifth objective of the present invention is to provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the above-described method.
[0044] Compared with the prior art, the beneficial effects of the present invention are:
[0045] This invention provides a water quality testing device, its light decay compensation, testing method, equipment, and storage medium. The light emitting part of the water quality testing device is equipped with a detection light source and a first photodetector encapsulated in the same photosensitive chip. The light decay compensation method includes the following steps: acquiring a real-time detection signal of the light intensity of the detection light source from the first photodetector; and controlling the light intensity of the detection light source to be constant in real time based on the detection signal. By controlling the light intensity of the detection light source in real time to stabilize it at a specific value, this invention ensures that the light intensity entering the water passage cavity is fixed and stable, eliminating the influence of light decay of the light source in the water quality testing device. This ensures that the water quality testing device still has high detection accuracy even under long-term use and under the influence of temperature and other factors. Attached Figure Description
[0046] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:
[0047] Figure 1 is a flowchart of the light decay compensation method for a water quality testing device;
[0048] Figure 2 is a schematic diagram of a water quality testing device;
[0049] Figure 3 is a schematic diagram of the light decay compensation principle of the water quality testing device.
[0050] Figure 4 is a schematic diagram of the light decay compensation principle of the water quality testing device.
[0051] Figure 5 is a schematic diagram of the water quality testing device (II).
[0052] Figure 6 is a schematic diagram of the water quality testing device.
[0053] Figure 7 is a flowchart of the detection method of the water quality testing device;
[0054] Figure 8 is a flowchart of the pollution compensation process;
[0055] Figure 9 is a flowchart of temperature compensation;
[0056] Figure 10 is a schematic diagram of a computer device;
[0057] Figure 11 is a schematic diagram of a computer-readable storage medium. Detailed Implementation
[0058] The present invention will now be further described with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. It should be noted that, without conflict, the various embodiments or technical features described below can be arbitrarily combined to form new embodiments.
[0059] Optical water quality testing devices are mainly based on the principle of optical sensors. They utilize phenomena such as light absorption, light scattering, and reflection in water to achieve real-time monitoring and judgment of water quality.
[0060] For example, optical water quality monitoring devices can measure turbidity, color, and the concentration of certain chemicals in water. These devices utilize optical principles, measuring the scattering and absorption of light in water to deduce water quality parameters. TOC sensors are one such example; they can quickly and accurately measure the total organic carbon content in a water sample, thereby assessing the degree of organic pollution in the water.
[0061] Taking scattering and transmission water quality testing as an example, this method primarily utilizes the scattering and absorption characteristics of light by suspended and colloidal particles in water to characterize water turbidity. The transmission method obtains turbidity values by measuring the intensity of transmitted light, while the scattering method obtains turbidity values by measuring the intensity of scattered light. When incident light passes through a water sample, suspended matter in the water absorbs and scatters the light, resulting in a decrease in transmitted light intensity and an increase in scattered light intensity. According to the Lambert-Beer law, the changes in transmitted and scattered light intensity with turbidity follow a specific mathematical relationship. By measuring the transmitted and scattered light intensities, the turbidity value of the water sample can be calculated.
[0062] Transmission spectroscopy (TSS) water quality testing is commonly used in drinking water quality testing, industrial wastewater treatment, environmental monitoring, and other fields requiring water quality analysis. By measuring the turbidity of a water sample, the cleanliness of the water can be assessed, the content of suspended solids can be determined, and appropriate treatment measures can be taken. In drinking water quality testing, TSS can detect microorganisms, organic matter, and inorganic matter in the water, ensuring the safety of drinking water. In industrial wastewater treatment, TSS can monitor the concentration of suspended solids in wastewater, guiding wastewater treatment and discharge. In environmental monitoring, TSS can assess the degree of water pollution, providing a scientific basis for environmental protection.
[0063] This invention uses the optical water quality detection device as an example of a TOC sensor for illustration, and should not be construed as a limitation on the type of water quality detection device.
[0064] TOC sensors are primarily based on ultraviolet (UV) absorption. Specifically, many organic compounds dissolved in water absorb UV light of specific wavelengths (e.g., 254 nm). Therefore, by measuring the degree of UV absorption by these organic compounds, the total amount of organic pollutants in the water can be indirectly measured. Furthermore, for more accurate measurements, some TOC sensors employ dual-beam technology, simultaneously using UV and infrared light (e.g., 850 nm) to automatically compensate for light path attenuation and turbidity effects, ensuring stable and reliable measurements.
[0065] Because optical water quality testing devices require a light source in actual use, usually LEDs or other components to emit light, these light sources will inevitably experience light decay, i.e., light loss, depending on the usage time and the influence of temperature and other factors.
[0066] When light decay occurs, the intensity of the light emitted by the detection light source will decrease, which in turn will reduce the intensity of the light received by the photodetector, thus reducing the accuracy of the water quality detection device.
[0067] In order to obtain a constant light intensity output, it is necessary to compensate for light decay in the water quality detection device.
[0068] Example 1
[0069] A method for light attenuation compensation in a water quality testing device, as shown in Figures 2, 5, and 6, includes a detection light source 21 and a first photodetector 22 encapsulated within the same photosensitive chip 2, as shown in Figure 1, comprising the following steps:
[0070] S100: Obtain the real-time detection signal of the light intensity of the detection light source by the first photodetector.
[0071] Unlike traditional solutions where the light source and the first photodetector are two separate units, the detection light source 21 and the first photodetector 22 in this invention are a single chip, packaged within the same device, effectively reducing environmental interference and the impact on chip consistency. The photosensitive chip 2 uses a quartz window, which can effectively transmit ultraviolet light, etc.
[0072] The example of a TOC sensor used in this water quality testing device should not be interpreted as a limitation on the type of water quality testing device. TOC sensors are primarily based on ultraviolet (UV) absorption. Specifically, many organic compounds dissolved in water absorb UV light of specific wavelengths (e.g., 254 nm).
[0073] As shown in Figure 2, the ultraviolet light emitted by the detection light source 21 within the same photosensitive chip 2 serves as the incident light I. After passing through the window on the photosensitive chip 2, the incident light I is split into two: reflected light I1 and transmitted light I2. 2in The reflected light I1 is a light source reflected back to the first circuit board 1 from the window on the photosensitive chip 2. This light is collected by the first photodetector 22 and used for light attenuation compensation, water quality detection, etc.
[0074] S110. Control the light intensity of the detection light source to be constant in real time according to the detection signal.
[0075] In actual use, the light emitted by the detection light source 21 in the photosensitive chip 2 will change with factors such as temperature and time. The first photodetector 22 in the photosensitive chip 2 collects the light intensity change of the detection light source 21 in real time and controls the light intensity of the detection light source 21 in real time to stabilize it at a specific value. This ensures that the light intensity entering the water passage cavity 4 is fixed and stable, thereby ensuring the measurement accuracy of the water quality detection device.
[0076] In some embodiments, as shown in Figures 2-6, before the step of obtaining the real-time detection signal of the light intensity of the detection light source by the first photodetector, the method further includes:
[0077] A control signal is generated to drive the detection light source to emit light of a fixed wavelength.
[0078] The MCU (microcontroller unit) on the first circuit board 1 generates control signals to drive the detection light source 21 (LED in Figures 3 and 4) in the photosensitive chip 2 to emit ultraviolet light of a fixed wavelength as incident light, for example, ultraviolet light of 254±10nm or 275nm±10nm as incident light. After passing through the window on the photosensitive chip 2, the incident light I is split into two, namely reflected light I1 and transmitted light I2. 2inThe reflected light I1 is a light source reflected back to the first circuit board 1 from the window on the photosensitive chip 2. This light is collected by the first photodetector 22 (PD in Figures 3 and 4) and used for light attenuation compensation, water quality detection, etc. The first photodetector 22 in the photosensitive chip 2 is made of SiC material and has a response range of 200-400nm, which can effectively remove the influence of interference light beyond 400nm.
[0079] In some embodiments, the real-time detection signal is configured to be a signal formed by real-time reception and conversion of the light intensity of the detection light source.
[0080] Continuing with reference to Figures 2-6, in the initial state, a precise digital signal is output based on the initial voltage value of the MCU. To achieve automatic control of the detection light source 21 of the TOC sensor, the digital signal output by the MCU needs to be converted into an analog signal based on a standard quantity (or reference quantity). The MCU sends a drive digital signal to the DAC, which then converts it into an analog signal. Specifically, the input terminal of the digital-to-analog converter (DAC) is connected to the output terminal of the MCU. The DAC receives the digital signal from the MCU and performs the conversion. To obtain a more accurate conversion result, the DAC can input a reference voltage VREF through a pin, and the DAC outputs a voltage referenced to an external reference voltage.
[0081] It should be noted that in Figures 3 and 4, the dashed lines with arrows represent light rays, the solid lines with arrows represent electrical signals, and the solid lines without arrows represent wires.
[0082] The analog signal obtained by the DAC is used to control the current on the MOSFET (Metal-Oxide-Semiconductor Field-Effect Transistor) via a comparator. To obtain the required voltage, the output voltage of the DAC needs to be divided to turn on the detection light source 21 of the TOC sensor.
[0083] In one embodiment, as shown in FIG3, when the light source 21 changes its emission, the signal change received by the first photodetector 22 is processed by the operational amplifier and fed back to the MCU.
[0084] In another embodiment, as shown in FIG4, when the light source 21 emits light in a change, the signal change received by the first photodetector 22 is processed by the operational amplifier and fed back to the comparator.
[0085] In some embodiments, the step of controlling the light intensity of the detection light source to be constant in real time according to the detection signal includes:
[0086] Determine whether the detection signal has changed from the initial state, and change the control signal accordingly to maintain the light intensity signal unchanged.
[0087] Specifically, if the detection signal changes from the initial state, the control signal is changed to maintain the light intensity signal unchanged;
[0088] If the detection signal has not changed from the initial state, then the control signal remains unchanged.
[0089] In one embodiment, as shown in Figure 3, when the voltage signal of the control current sent by the MCU remains unchanged, if the state of the detection light source 21 is affected by certain factors such as temperature aging, and the light intensity changes, the output signal of the amplifier will also change accordingly. When the MCU detects the signal change, it immediately responds and changes the drive signal of the control current, i.e., the aforementioned control signal, so that the amplifier signal value read back by the MCU returns to its original initial state value. That is, it is considered that the light intensity of the detection light source 21 of the water quality detection device remains unchanged, thereby eliminating the light decay of the light emitting part of the water quality detection device, and thus eliminating the light decay of the water quality detection device.
[0090] In some embodiments, the step of controlling the light intensity of the detection light source to be constant in real time according to the detection signal includes:
[0091] The detection signal is compared with the control signal;
[0092] The intensity of the light emitted by the detection light source is adjusted according to the comparison results to maintain a constant light intensity signal.
[0093] In another implementation, as shown in Figure 4, when the voltage signal of the control current sent by the MCU remains unchanged, if the state of the detection light source 21 is affected by certain factors such as temperature aging, and the light intensity changes, the output voltage signal of the amplifier will change accordingly. Since it is connected to the feedback terminal of the comparator, the output signal of the comparator will also be adjusted to control the conduction state of the MOS transistor, so that the voltage signal after the magnitude of the induced photocurrent on the first photodetector 22 is amplified by the amplifier remains consistent with the magnitude of the MCU control signal. That is, the magnitude of the voltage signal sent by the MCU determines the magnitude of the voltage signal after the induced current signal on the first photodetector 22 is converted. It is considered that the light intensity of the detection light source 21 of the water quality detection device remains unchanged, thereby eliminating the light decay of the light emitting part of the water quality detection device and thus eliminating the light decay of the water quality detection device.
[0094] This embodiment provides a method for compensating for light decay in a water quality testing device. The water quality testing device is equipped with an inertial measurement unit and a rotatable washing drum. The inertial measurement unit is installed inside the washing drum. The method includes the following steps: acquiring measurement information from the inertial measurement unit; and monitoring the operating status of the washing drum using the measurement information. The solution provided in this embodiment can effectively and quickly eliminate light decay in the water quality testing device, ensuring that the performance of the water quality testing device does not degrade with increasing operating time. This guarantees that the water quality testing device still has high detection accuracy even under long-term use and also improves the service life of the water quality testing device.
[0095] Example 2
[0096] A detection method for a water quality testing device employs the light decay compensation method provided in Example 1 to control the light intensity of the detection light source to be constant in real time. A detailed description of the light decay compensation method provided in Example 1 can be found in the corresponding description in the above method embodiments, and will not be repeated here. As shown in Figures 2, 5, and 6, the light receiving unit of the water quality testing device is equipped with a second photodetector 6, and the water quality testing device is also equipped with a transparent window structure for holding the solution to be tested, as shown in Figure 7. The method includes the following steps:
[0097] S200: Obtain the intensity of reflected light formed by the reflection from the window of the photosensitive chip, detected by the first photodetector;
[0098] As shown in Figure 2, the MCU on the first circuit board 1 generates a control signal to drive the detection light source 21 in the photosensitive chip 2 to emit ultraviolet light of a fixed wavelength as incident light, for example, emitting ultraviolet light of 254±10nm or 275nm±10nm as incident light. After passing through the window on the photosensitive chip 2, the incident light I is split into two, namely reflected light I1 and transmitted light I2. 2in The reflected light I1 is the light source reflected back to the first circuit board 1 from the window on the photosensitive chip 2. This light is collected by the first photodetector 22 and used for light attenuation compensation, water quality detection, etc. The intensity of the reflected light is recorded as I1. The first photodetector 22 in the photosensitive chip 2 is made of SiC material and has a response range of 200-400nm, which can effectively remove the influence of interference light beyond 400nm.
[0099] S210. Obtain the intensity of transmitted light detected by the second photodetector after it passes through the transparent window structure and is absorbed by the solution to be tested.
[0100] As shown in Figure 2, the transmitted light I2(I 2in The light source, which passes through the window on the photosensitive chip 2 and enters the solution to be tested within the transparent window structure, is collected by the second photodetector 6 on the second circuit board 5. This portion of the light source serves as the measurement branch, and the transmitted light intensity is denoted as I.2out This embodiment eliminates the cuvette and employs a transparent window structure, which reduces internal stray light and facilitates assembly and sealing.
[0101] S220. Calculate the TOC content using the reflected light intensity and the transmitted light intensity, i.e., by analyzing and comparing the changes in light intensity before and after I2, which is to analyze I... 2in with I 2out Or I1 and I 2out It can measure the TOC concentration of the solution being tested.
[0102] In some embodiments, the formula for calculating the TOC content can be obtained according to the Lamb-Beer law model:
[0103] K1 = I 2in / I1
[0104] Where C is the TOC content of the solution to be tested, I1 is the intensity of reflected light, and I 2out The transmitted light intensity is represented by k and K1, which are both calibration parameters. 2in This refers to the intensity of transmitted light before it passes through the photosensitive chip window and enters the transparent window structure. Optionally, the parameters k and K1 are determined through prior production calibration.
[0105] In practical use, the transmitted light I2(I 2in The light attenuation compensation method provided in Example 1 is used for real-time control to maintain constant light intensity, which will not change with changes in factors such as temperature, humidity, and usage time, thus keeping the incident light stable and making the measurement results accurate.
[0106] Organic pollution in water can be divided into two categories: natural organic matter (NOM) and synthetic organic matter (SOC). Natural organic compounds refer to substances produced by the decomposition of plants and animals during natural cycles, including humus, microbial secretions, dissolved animal tissues, and animal waste; they are also known as oxygen-consuming organic matter or traditional organic matter. Synthetic organic matter is mostly toxic organic pollutants, including carcinogenic, mutagenic, and teratogenic organic pollutants.
[0107] Traditional organic matter, also known as metabolites from the natural environment, includes aquatic organisms and their secretions, such as humus. Typical traditional organic matter comprises no more than 20 types. In natural water bodies, traditional organic matter generally refers to organic humus. Most of these organic substances are in the form of colloidal particles, some are in true solutions, and some are in suspension.
[0108] Humus is formed from the chemical and biological degradation of plant and animal remains, as well as from the synthesis by microorganisms. Humus is a type of hydrophilic, acidic, polydisperse substance with a molecular weight ranging from several hundred to tens of thousands.
[0109] Oxygen-consuming organic matter includes proteins, fats, amino acids, carbohydrates, etc.
[0110] Algal organic matter is the general term for the secretions of algae and the decomposition products of algal corpses.
[0111] Non-dissolved organic matter, particulate organic matter in water mainly includes particles wrapped by macromolecular organic matter, biological particulate organic matter, and oil emulsions.
[0112] Toxic organic pollution, namely synthetic organic compounds (SOCs), is difficult to degrade, has a certain residual level in the environment, and has bioaccumulation, three-way effects (mutagenic, teratogenic, and carcinogenic) and toxicity.
[0113] In summary, the selection of wavelength for water quality sensor detection is a crucial factor. In practical applications, an appropriate wavelength should be chosen based on specific circumstances to ensure the accuracy and reliability of the measurement results. Based on this, calibration can be performed using a calibration light source to compensate for the influence of contamination on the transparent window structure of the water quality detection device. It should be noted that, to ensure the accuracy of contamination compensation, a calibration light source that does not respond to water contamination should be selected based on the actual usage scenario; for example, a light source with a wavelength of 860nm could be chosen as the calibration light source.
[0114] In some embodiments, as shown in FIG6, the photosensitive chip 2 also encapsulates a calibration light source 23, that is, the detection light source 21, the first photodetector 22 and the calibration light source 23 are a chip and encapsulated in the same device. The window of the photosensitive chip 2 adopts a quartz window, and the light intensity of the detection light source 21 and the calibration light source 23 is detected through the first photodetector 22.
[0115] When the transparent window structure of the water quality testing device becomes contaminated, the light intensity received by the second photodetector 6 of the light receiving unit will change for the same area to be tested. Contamination compensation for the transparent window structure of the water quality testing device is achieved by controlling the alternating illumination of the detection light source 21 and the calibration light source 23. Specifically, when the detection light source 21 is illuminated, the working principle is the same as the light decay compensation method provided in Embodiment 1 and the detection method provided in this embodiment; when the calibration light source 23 is illuminated, its change over time can reflect the contamination status of the quartz plate 3 on the transparent window structure. Converting this change into the optical path measurement of the detection light source 21, this method can compensate for the contamination of the transparent window structure of the water quality testing device. Specifically, as shown in Figure 8, the method further includes the following steps:
[0116] S230: Control the detection light source to turn off, and control the calibration light source to turn on;
[0117] Taking a TOC sensor as an example, the wavelength of the detection light source is 254±10nm or 275nm±10nm. To ensure the accuracy of pollution compensation, a calibration light source that does not respond to water pollution needs to be selected based on the actual usage scenario. Preferably, the wavelength of the calibration light source is not lower than 860nm, for example, a light source with a wavelength of 900nm is selected as the calibration light source. This wavelength of light can effectively avoid interference from dissolved substances in the water when penetrating the water sample. This is because at this wavelength, most dissolved substances have weak absorption and scattering effects on light, thus ensuring the accuracy of pollution compensation. In addition, light with a wavelength of 860nm also has good penetrating power, allowing it to penetrate deep into the water sample.
[0118] After the control detection light source 21 is turned off and the calibration light source 23 is turned on, the change of the calibration light source 23 over time can reflect the contamination status of the quartz plate 3 on the transparent window structure.
[0119] S240, Obtain the intensity of transmitted light detected by the second photodetector 6;
[0120] The light emitted by the calibration light source 23 passes through the window on the photosensitive chip 2 and then enters the test solution in the transparent window structure. This part of the light source is collected by the second photodetector 6 on the second circuit board 5 and serves as the calibration branch.
[0121] S250. Determine the pollution compensation value of the transparent window structure by the intensity of transmitted light when the calibration light source is lit.
[0122] Because the light emitted by the calibration light source 23 can effectively penetrate the water sample, avoiding interference from dissolved substances in the water, a more accurate pollution compensation value can be obtained.
[0123] S260. The measurement results of the optical path of the detection light source are compensated according to the pollution compensation value to eliminate the influence of pollution on the transparent window structure of the water quality detection device and improve the accuracy of the water quality detection device.
[0124] In one embodiment, the step of determining the contamination compensation value of the transparent window structure by the intensity of transmitted light when the calibration light source is lit includes:
[0125] Calculate the change in transmitted light intensity over time when the calibration light source is lit.
[0126] Accordingly, the step of compensating the optical path measurement results of the detection light source based on the pollution compensation value includes:
[0127] The change is then converted into the value of the detection light source.
[0128] Optionally, this change can be directly used as a light intensity compensation value caused by contamination of the transparent window structure, and this value can be directly compensated into the detection light source.
[0129] Optionally, the pollution compensation value corresponding to the change can also be obtained by matching the correspondence between the change and the pollution compensation value. The correspondence between the change and the pollution compensation value can be obtained by conducting a pollution test on the quartz plate 3 with the transparent window structure before the water quality testing device leaves the factory. Of course, this correspondence can also be obtained in other ways, and this embodiment does not impose specific limitations.
[0130] As shown in Figure 5, the detection light source 21 and the first photodetector 22 are a single chip packaged within the same device, effectively reducing environmental interference and the impact on chip consistency. The photosensitive chip 2 uses a quartz window, which can effectively transmit ultraviolet light, etc. The first photodetector 22 is mainly affected by the detection light source 21, so an independent temperature measurement unit, such as an NTC temperature measurement unit, can be added to it to perform temperature compensation and ensure the accuracy of the system.
[0131] As shown in Figure 6, the photosensitive chip 2 also encapsulates a calibration light source 23. That is, the detection light source 21, the first photodetector 22, and the calibration light source 23 are all housed in a single chip within the same device. The first photodetector 22 detects the light intensity of the detection light source 21 and the calibration light source 23. The first photodetector 22 is primarily affected by the detection light source 21 and the calibration light source 23. An independent temperature measurement unit, such as an NTC temperature measurement unit, can be added to it to compensate for temperature fluctuations and ensure the accuracy of the system.
[0132] In Figures 5 and 6, the light emitted by the detection light source 21 and the calibration light source 23 passes through the window on the photosensitive chip 2 and enters the solution to be tested in the transparent window structure. This part of the light source is collected by the second photodetector 6 on the second circuit board 5. The second photodetector 6 is mainly affected by the working environment. An independent temperature measurement unit, such as an NTC temperature measurement unit, can be added to it to perform temperature compensation and ensure the accuracy of the system.
[0133] In summary, because the first photodetector 22 and the second photodetector 6 operate in different environments, they need to be temperature compensated separately to ensure the accuracy of the system.
[0134] In some embodiments, as shown in FIG9, the steps further include:
[0135] S270. Obtain the temperature data of the first photodetector and / or the second photodetector; specifically, measure the temperature using the respective temperature measurement units of the first photodetector and the second photodetector to obtain their temperature data.
[0136] S280. Determine the actual light intensity of the first photodetector and / or the second photodetector using the temperature data.
[0137] Optionally, the actual light intensity corresponding to the temperature data can be calculated based on the linear relationship between temperature and light intensity. This linear relationship can be expressed as L = k*T + b, where L is the light intensity, T is the temperature, and b is a parameter. The linear relationship between temperature and light intensity can be obtained by conducting temperature tests on the first photodetector and / or the second photodetector before the water quality testing device leaves the factory. Of course, this relationship can also be obtained in other ways, and this embodiment does not impose specific limitations.
[0138] This embodiment provides a detection method for a water quality testing device. It employs the light decay compensation method provided in Embodiment 1 to control the light intensity of the detection light source to be constant in real time. The light receiving unit of the water quality testing device is equipped with a second photodetector, and the device also has a transparent window structure for holding the solution to be tested. The detection method includes the following steps: acquiring the intensity of reflected light formed by the reflection of the photosensitive chip window detected by the first photodetector; acquiring the intensity of transmitted light that passes through the transparent window structure and is absorbed by the solution to be tested, detected by the second photodetector; and calculating the TOC content using the reflected light intensity and the transmitted light intensity. This embodiment not only effectively and quickly eliminates light decay in the water quality testing device, but also provides more accurate TOC values. The detection method is simple and convenient for practical implementation, and the measured values will not change due to factors such as light source fluctuations over time, temperature variations, contamination of the transparent window structure, or temperature-dependent effects on the photodetector.
[0139] Example 3
[0140] Based on the same concept, this embodiment also provides a water quality detection device, which applies the light attenuation compensation method provided in Embodiment 1 and the detection method provided in Embodiment 2. For detailed descriptions of the light attenuation compensation method provided in Embodiment 1 and the detection method provided in Embodiment 2, please refer to the corresponding descriptions in Embodiments 1 and 2, and will not be repeated here. In some embodiments, the water quality detection device can be applied as a TOC sensor, while in other embodiments it can be applied as other optical sensors that utilize light sources for spectral sampling and analysis.
[0141] It is understood that the water quality testing device provided in this embodiment includes hardware structures and / or software modules corresponding to each function in order to achieve the above functions.
[0142] As shown in Figures 2, 5, and 6, a water quality testing device includes a light emitting unit, a light receiving unit, a transparent window structure, and a control module. The light emitting unit is equipped with a detection light source 21 and a first photodetector 22 encapsulated within the same photosensitive chip 2. The photosensitive chip 2 has a window. The light receiving unit is equipped with a second photodetector 6. The transparent window structure is used to hold the solution to be tested. The detection light source 21 is used to emit detection light. The first photodetector 22 is used to detect the intensity of reflected light formed by the reflection from the window of the photosensitive chip 2. The second photodetector 6 is used to detect the intensity of transmitted light after passing through the transparent window structure and being absorbed by the solution to be tested. The control module is used to control the light intensity of the detection light source to be constant in real time according to the intensity of the reflected light, and to calculate the TOC content through the intensity of the reflected light and the intensity of the transmitted light.
[0143] Unlike traditional solutions where the light source and the first photodetector are two separate units, the detection light source 21 and the first photodetector 22 in this invention are a single chip packaged inside the same device, effectively reducing environmental interference and the impact of chip consistency.
[0144] As shown in Figure 2, the ultraviolet light emitted by the detection light source 21 within the same photosensitive chip 2 serves as the incident light I. After passing through the window on the photosensitive chip 2, the incident light I is split into two: reflected light I1 and transmitted light I2. 2in The reflected light I1 is a light source reflected back to the first circuit board 1 from the window on the photosensitive chip 2. This light is collected by the first photodetector 22 and used for light attenuation compensation, water quality detection, etc.
[0145] Transmitted light I2(I 2in The light source, which passes through the window on the photosensitive chip 2 and enters the solution to be tested within the transparent window structure, is collected by the second photodetector 6 on the second circuit board 5. This portion of the light source serves as the measurement branch, and the transmitted light intensity is denoted as I. 2out This embodiment eliminates the cuvette and employs a transparent window structure, which reduces internal stray light and facilitates assembly and sealing.
[0146] In actual use, the light emitted by the detection light source 21 in the photosensitive chip 2 will change with factors such as temperature and time. The first photodetector 22 in the photosensitive chip 2 collects the light intensity change of the detection light source 21 in real time and controls the light intensity of the detection light source 21 in real time to stabilize it at a specific value. This ensures that the light intensity entering the water passage cavity 4 is fixed and stable, thereby ensuring the measurement accuracy of the water quality detection device.
[0147] The TOC content is calculated using the reflected light intensity and the transmitted light intensity, i.e., by analyzing and comparing the changes in light intensity before and after I2, which is equivalent to analyzing I... 2in with I 2outOr I1 and I 2out It can measure the TOC concentration of the solution being tested.
[0148] In some embodiments, as shown in Figures 3 and 4, the control module includes an MCU, a DAC, a comparator, a MOSFET, a voltage divider resistor, an amplifier, etc.
[0149] The MCU on the first circuit board 1 generates a control signal to drive the detection light source 21 (LED in Figures 3 and 4) in the photosensitive chip 2 to emit ultraviolet light of a fixed wavelength as incident light. For example, it emits ultraviolet light of 254±10nm or 275nm±10nm as incident light. After passing through the window on the photosensitive chip 2, the incident light I is split into two, namely reflected light I1 and transmitted light I2. 2in The reflected light I1 is a light source reflected back to the first circuit board 1 from the window on the photosensitive chip 2. This light is collected by the first photodetector 22 (PD in Figures 3 and 4) and used for light attenuation compensation, water quality detection, etc. The first photodetector 22 in the photosensitive chip 2 is made of SiC material and has a response range of 200-400nm, which can effectively remove the influence of interference light beyond 400nm.
[0150] Initially, the MCU outputs a precise digital signal based on its initial voltage value. To achieve automatic control of the detection light source 21 of the TOC sensor, the digital signal output by the MCU needs to be converted into an analog signal based on a standard (or reference) quantity. The MCU sends a drive digital signal to the DAC, which then converts it into an analog signal. Specifically, the input of the digital-to-analog converter (DAC) is connected to the output of the MCU. The DAC receives the digital signal from the MCU and performs the conversion. To obtain a more accurate conversion result, the DAC can input a reference voltage VREF through a pin, and the DAC outputs a voltage referenced to an external reference voltage.
[0151] It should be noted that in Figures 3 and 4, the dashed lines with arrows represent light rays, the solid lines with arrows represent electrical signals, and the solid lines without arrows represent wires.
[0152] The analog signal obtained by the DAC is used to control the current on the MOSFET via a comparator. To obtain the required voltage, the output voltage of the DAC needs to be divided to turn on the detection light source 21 of the TOC sensor.
[0153] In one embodiment, as shown in Figure 3, when the light emission of the detection light source 21 changes, the signal change received by the first photodetector 22 is processed by the operational amplifier and fed back to the MCU. When the voltage signal of the control current issued by the MCU remains unchanged, if the state of the detection light source 21 is affected by certain factors such as temperature aging, and the light intensity changes, the output signal of the amplifier will also change accordingly. When the MCU detects this signal change, it immediately responds and changes the drive signal of the control current, i.e., the aforementioned control signal, so that the amplifier signal value read back by the MCU returns to its original initial value. That is, it is considered that the light intensity of the detection light source 21 of the water quality detection device remains unchanged, thereby eliminating the light decay of the light emitting part of the water quality detection device, and thus eliminating the light decay of the water quality detection device.
[0154] In another implementation, as shown in Figure 4, when the light emission of the detection light source 21 changes, the signal received by the first photodetector 22 changes and is processed by the operational amplifier and fed back to the comparator. When the voltage signal of the control current sent by the MCU remains unchanged, if the state of the detection light source 21 is affected by certain factors such as temperature aging, and the light intensity changes, the output voltage signal of the amplifier will change accordingly. Since it is connected to the feedback terminal of the comparator, the output signal of the comparator will also be adjusted to control the conduction state of the MOS transistor, so that the voltage signal after the magnitude of the induced photocurrent on the first photodetector 22 is amplified by the amplifier is consistent with the magnitude of the MCU control signal. That is, the magnitude of the voltage signal sent by the MCU determines the magnitude of the voltage signal after the induced current signal on the first photodetector 22 is converted. Therefore, it is considered that the light intensity of the detection light source 21 of the water quality detection device remains unchanged, thereby eliminating the light decay of the light emitting part of the water quality detection device and thus eliminating the light decay of the water quality detection device.
[0155] In some embodiments, the transparent window structure includes two transparent windows and a water-passing cavity. The two transparent windows are respectively disposed on the incident light side and the outgoing light side of the water-passing cavity. In Figures 2, 5, and 6, the arrow at the bottom of the water-passing cavity 4 indicates the water inlet, and the arrow at the top of the water-passing cavity 4 indicates the water outlet. The water sample enters the water-passing cavity 4 through the water inlet and then flows out through the water outlet. Further, the transparent window is a quartz sheet or a sapphire sheet. The window on the photosensitive chip uses a quartz window, which can effectively transmit ultraviolet light, etc. Quartz sheets have high smoothness and are not prone to scaling. It should be noted that the transparent window material includes, but is not limited to, JGS1, JGS2, sapphire, etc.
[0156] This embodiment removes the cuvette and adopts a transparent window structure, which can reduce internal stray light and facilitate assembly and sealing.
[0157] The selection of wavelength for water quality sensors is a crucial factor. In practical applications, an appropriate wavelength should be chosen based on specific circumstances to ensure the accuracy and reliability of the measurement results. Based on this, calibration can be performed using a calibration light source to compensate for the influence of contamination on the transparent window structure of the water quality detection device. It should be noted that, to ensure the accuracy of contamination compensation, a calibration light source that does not respond to water contamination should be selected based on the actual usage scenario; for example, a light source with a wavelength of 860nm could be chosen as the calibration light source.
[0158] As shown in Figure 6, the light emitting unit is also equipped with a calibration light source 23 encapsulated within the photosensitive chip 2. That is, the detection light source 21, the first photodetector 22, and the calibration light source 23 are all housed in a single chip within the same device. The first photodetector 22 detects the light intensity of the detection light source 21 and the calibration light source 23. The control module controls the detection light source and the calibration light source to be lit alternately. When the calibration light source is lit, the control module determines the contamination compensation value of the transparent window based on the transmitted light intensity detected by the second photodetector, thereby compensating for the optical path measurement results of the detection light source.
[0159] Furthermore, the wavelength of the detection light source is different from the wavelength of the calibration light source. Preferably, the wavelength of the detection light source is 254±10nm or 275nm±10nm, the wavelength of the calibration light source is not less than 860nm, and the response range of the first photodetector is 200-400nm.
[0160] Taking a TOC sensor as an example, the wavelength of the detection light source is 254±10nm or 275nm±10nm. To ensure the accuracy of pollution compensation, a calibration light source that does not respond to water pollution needs to be selected based on the actual usage scenario. Preferably, the wavelength of the calibration light source is not lower than 860nm, for example, a light source with a wavelength of 900nm is selected as the calibration light source. Light of this wavelength can effectively avoid interference from dissolved substances in the water when penetrating the water sample. This is because at this wavelength, most dissolved substances have weak absorption and scattering effects on light, thus ensuring the accuracy of pollution compensation. In addition, light with a wavelength of 860nm also has good penetrating power and can penetrate the water sample.
[0161] As shown in Figure 5, the detection light source 21 and the first photodetector 22 are a single chip packaged inside the same device. The first photodetector 22 is mainly affected by the detection light source 21. An independent temperature measurement unit, such as an NTC temperature measurement unit, can be added to it to compensate for its temperature and ensure the accuracy of the system.
[0162] As shown in Figure 6, the photosensitive chip 2 also encapsulates a calibration light source 23. That is, the detection light source 21, the first photodetector 22, and the calibration light source 23 are all encapsulated in the same chip. The first photodetector 22 is used to detect the light intensity of the detection light source 21 and the calibration light source 23. The first photodetector 22 is mainly affected by the detection light source 21 and the calibration light source 23. An independent temperature measurement unit, such as an NTC temperature measurement unit, can be added to it to compensate for the temperature and ensure the accuracy of the system.
[0163] In Figures 5 and 6, the light emitted by the detection light source 21 and the calibration light source 23 passes through the window on the photosensitive chip 2 and enters the solution to be tested in the transparent window structure. This part of the light source is collected by the second photodetector 6 on the second circuit board 5. The second photodetector 6 is mainly affected by the working environment. An independent temperature measurement unit, such as an NTC temperature measurement unit, can be added to it to perform temperature compensation and ensure the accuracy of the system.
[0164] In summary, because the first photodetector 22 and the second photodetector 6 operate in different environments, they need to be temperature compensated separately to ensure the accuracy of the system.
[0165] In some embodiments, a temperature measuring unit is further included, which is used to detect the temperature of the first photodetector and / or the second photodetector, and the control module determines the actual light intensity of the first photodetector and / or the second photodetector based on the temperature measured by the temperature measuring unit. Optionally, the temperature measuring unit may be an NTC temperature measuring unit or the like.
[0166] The water quality testing device in this embodiment may include the following process:
[0167] A real-time detection signal acquisition module is used to acquire the real-time detection signal of the light intensity of the detection light source by the first photodetector;
[0168] A constant light intensity control module is used to control the light intensity of the detection light source to be constant in real time based on the detection signal.
[0169] Based on the technical solution of the above embodiments, optionally, before the step of obtaining the real-time detection signal of the light intensity of the detection light source by the first photodetector, the method further includes:
[0170] A control signal is generated to drive the detection light source to emit light of a fixed wavelength.
[0171] Based on the technical solution of the above embodiments, optionally, the real-time detection signal is configured to be a signal formed by real-time reception and conversion of the light intensity of the detection light source.
[0172] Based on the technical solution of the above embodiments, optionally, the step of controlling the light intensity of the detection light source to be constant in real time according to the detection signal includes:
[0173] Determine whether the detection signal has changed from the initial state, and change the control signal accordingly to maintain the light intensity signal unchanged.
[0174] Based on the technical solution of the above embodiments, optionally, the step of controlling the light intensity of the detection light source to be constant in real time according to the detection signal includes:
[0175] The detection signal is compared with the control signal;
[0176] The intensity of the light emitted by the detection light source is adjusted according to the comparison results to maintain a constant light intensity signal.
[0177] The water quality testing device in this embodiment may also include the following process:
[0178] A reflected light intensity acquisition module is used to acquire the reflected light intensity detected by the first photodetector and formed by the reflection of the photosensitive chip window.
[0179] The transmitted light intensity acquisition module is used to acquire the transmitted light intensity detected by the second photodetector after it passes through the transparent window structure and is absorbed by the solution to be tested.
[0180] The TOC content calculation module is used to calculate the TOC content based on the reflected light intensity and the transmitted light intensity. Optionally, based on the technical solution of the above embodiment, the TOC content calculation formula is:
[0181] K1 = I 2in / I1
[0182] Where C is the TOC content of the solution to be tested, I1 is the intensity of reflected light, and I 2out The transmitted light intensity is represented by k and K1, which are both calibration parameters. 2in The intensity of transmitted light before it passes through the photosensitive chip window and enters the transparent window structure.
[0183] Based on the technical solution of the above embodiments, optionally, the photosensitive chip further encapsulates a calibration light source, and the method further includes the following steps:
[0184] The detection light source is turned off, and the calibration light source is turned on;
[0185] Obtain the intensity of transmitted light detected by the second photodetector;
[0186] The pollution compensation value of the transparent window structure is determined by the intensity of transmitted light when the calibration light source is lit.
[0187] The optical path measurement results of the detection light source are compensated based on the pollution compensation value.
[0188] Based on the technical solution of the above embodiments, optionally, the step of determining the pollution compensation value of the transparent window structure by the transmitted light intensity when the calibration light source is lit includes:
[0189] Calculate the change in transmitted light intensity over time when the calibration light source is lit.
[0190] Based on the technical solution of the above embodiments, optionally, the step of compensating the optical path measurement result of the detection light source according to the pollution compensation value includes:
[0191] The change is then converted into the optical path measurement of the detection light source.
[0192] Optionally, based on the technical solution of the above embodiments, the method further includes the following steps:
[0193] Acquire temperature data from the first photodetector and / or the second photodetector;
[0194] The actual light intensity of the first photodetector and / or the second photodetector is determined using the temperature data.
[0195] This embodiment provides a water quality testing device, including a light emitting unit, a light receiving unit, a transparent window structure, and a control module. The light emitting unit is equipped with a detection light source and a first photodetector encapsulated within the same photosensitive chip. The photosensitive chip has a window. The light receiving unit is equipped with a second photodetector. The transparent window structure is used to hold the solution to be tested. The detection light source is used to emit detection light. The first photodetector is used to detect the intensity of reflected light formed by the reflection from the window of the photosensitive chip. The second photodetector is used to detect the intensity of transmitted light after passing through the transparent window structure and being absorbed by the solution to be tested. The control module is used to control the light intensity of the detection light source to be constant in real time based on the intensity of the reflected light, and to calculate the TOC content using the intensity of the reflected light and the intensity of the transmitted light. This embodiment can not only effectively and quickly eliminate light decay in water quality testing devices, but also detects more accurate TOC values. The detection method is simple and convenient for practical implementation, and the measured values will not change due to factors such as light source fluctuations over time, temperature fluctuations, contamination of the transparent window structure, or temperature-dependent effects on the photodetector.
[0196] Example 4
[0197] A computer device 700, as shown in FIG10, includes a memory 710, a processor 720, and a computer program 730 stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of a light attenuation compensation method and / or a detection method for a water quality detection device. For a detailed description of the method, please refer to the corresponding description in the above method embodiments, which will not be repeated here.
[0198] Example 5
[0199] A computer-readable storage medium, as shown in Figure 11, stores a computer program thereon. When executed by a processor, the computer program implements the steps of a light attenuation compensation method and / or detection method for a water quality detection device. For a detailed description of the method, please refer to the corresponding description in the above method embodiments, which will not be repeated here.
[0200] The number of devices and processing scale described herein are for the purpose of simplifying the description of the invention. Applications, modifications, and variations of the invention will be readily apparent to those skilled in the art.
[0201] Although embodiments of the present invention have been disclosed above, they are not limited to the applications listed in the specification and embodiments. They can be applied to various fields suitable for the present invention. For those skilled in the art, other modifications can be easily made. Therefore, without departing from the general concept defined by the claims and their equivalents, the present invention is not limited to the specific details and illustrations shown and described herein.
[0202] Those skilled in the art will also know that, besides implementing the controller in the form of purely computer-readable program code, the same functions can be achieved by logically programming the method steps, making the controller take the form of logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers (PLCs), and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the devices included within it for implementing various functions can also be considered structures within that hardware component. Alternatively, the devices for implementing various functions can be considered as both software units implementing the method and structures within a hardware component.
Claims
1. A light attenuation compensation method for a water quality detection device, characterized by, The light-emitting part of the water quality testing device is equipped with a detection light source and a first photodetector encapsulated in the same photosensitive chip, and includes the following steps: Acquire the real-time detection signal of the light intensity of the detection light source by the first photodetector; The light intensity of the detection light source is controlled to remain constant in real time based on the detection signal.
2. The light attenuation compensation method of a water quality detection device according to claim 1, characterized in that, Before the step of acquiring the real-time detection signal of the light intensity of the detection light source by the first photodetector, the method further includes: A control signal is generated to drive the detection light source to emit light of a fixed wavelength.
3. The light attenuation compensation method of a water quality detection device according to claim 1, characterized in that: The real-time detection signal is configured to be a signal formed by real-time reception and conversion of the light intensity of the detection light source.
4. The light attenuation compensation method of a water quality detection device according to claim 2, wherein, The step of controlling the light intensity of the detection light source to be constant in real time according to the detection signal includes: Determine whether the detection signal has changed from the initial state, and change the control signal accordingly to maintain the light intensity signal unchanged.
5. The light attenuation compensation method of a water quality detection device according to claim 2, wherein, The step of controlling the light intensity of the detection light source to be constant in real time according to the detection signal includes: The detection signal is compared with the control signal; The intensity of the light emitted by the detection light source is adjusted according to the comparison results to maintain a constant light intensity signal.
6. A detection method of a water quality detection device, the method for controlling the constant light intensity of the detection light source in real time by using any one of the methods according to claims 1 to 5, characterized in that, The water quality testing device is equipped with a second photodetector in its light receiving section, and also has a transparent window structure for holding the solution to be tested, comprising the following steps: The intensity of reflected light generated by the reflection from the window of the photosensitive chip is obtained by the first photodetector; The intensity of transmitted light, detected by the second photodetector, after passing through the transparent window structure and being absorbed by the solution to be tested, is obtained. The TOC content is calculated using the reflected light intensity and the transmitted light intensity.
7. The detection method of the water quality testing device as described in claim 6, characterized in that, The TOC content calculation formula is: K1 = I 2in / I1 Wherein, C is the TOC content of the solution to be measured, I1 is the reflected light intensity, I 2out is the transmitted light intensity, k and K1 both represent calibration parameters, I 2in is the transmitted light intensity before the light passes through the light-sensitive chip window and enters the transparent window structure.
8. The method of claim 6, wherein the water quality detection device is a water quality detection device according to any one of claims 1 to 7. The photosensitive chip also encapsulates a calibration light source, and the method further includes the following steps: The detection light source is turned off, and the calibration light source is turned on; Obtain the intensity of transmitted light detected by the second photodetector; The pollution compensation value of the transparent window structure is determined by the intensity of transmitted light when the calibration light source is lit. The measurement results of the detection light source optical path are compensated based on the pollution compensation value.
9. The method of claim 8, wherein the water quality detection device is a water quality detection device according to any one of claims 1 to 7. The step of determining the contamination compensation value of the transparent window structure by the intensity of transmitted light when the calibration light source is lit includes: Calculate the change in transmitted light intensity over time when the calibration light source is lit.
10. The method of claim 9, wherein the water quality detection device is a water quality detection device according to any one of claims 1 to 8. The step of compensating the measurement results of the detection light source optical path based on the pollution compensation value includes: The change is then converted into the optical path measurement of the detection light source.
11. The method of claim 6, wherein the water quality detection device is a water quality detection device according to any one of claims 1 to 10. It also includes the following steps: Acquire temperature data from the first photodetector and / or the second photodetector; The actual light intensity of the first photodetector and / or the second photodetector is determined using the temperature data.
12. A water quality detection device, applying the method according to any one of claims 1 to 11, characterized in that: The device includes a light emitting unit, a light receiving unit, a transparent window structure, and a control module. The light emitting unit is equipped with a detection light source and a first photodetector encapsulated within the same photosensitive chip. The photosensitive chip has a window. The light receiving unit is equipped with a second photodetector. The transparent window structure is used to hold the solution to be tested. The detection light source is used to emit detection light. The first photodetector is used to detect the intensity of reflected light formed by the reflection from the window of the photosensitive chip. The second photodetector is used to detect the intensity of transmitted light after passing through the transparent window structure and being absorbed by the solution to be tested. The control module is used to control the intensity of the detection light source to be constant in real time based on the intensity of the reflected light, and to calculate the TOC content based on the intensity of the reflected light and the intensity of the transmitted light.
13. The water quality detection device of claim 12, wherein: The transparent window structure includes two transparent windows and a water passage cavity, with the two transparent windows respectively disposed on the incident light side and the outgoing light side of the water passage cavity.
14. The water quality detection device of claim 13, wherein: The light emitting unit is also equipped with a calibration light source encapsulated in the photosensitive chip. The control module controls the detection light source and the calibration light source to be lit alternately. When the calibration light source is lit, the control module determines the pollution compensation value of the transparent window by the transmitted light intensity detected by the second photodetector, so as to compensate for the optical path measurement results of the detection light source.
15. The water quality detection device of claim 14, wherein: The wavelength of the detection light source is different from the wavelength of the calibration light source.
16. The water quality detection device of claim 15, wherein: The wavelength of the detection light source is 254±10nm or 275nm±10nm, the wavelength of the calibration light source is not less than 860nm, and the response range of the first photodetector is 200-400nm.
17. The water quality detection device of claim 12, wherein: It also includes a temperature measuring unit, which is used to detect the temperature of the first photodetector and / or the second photodetector.
18. The water quality detection device of claim 13, wherein: The transparent window is a quartz sheet or a sapphire sheet, and the window on the photosensitive chip is a quartz window.
19. A computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the computer program comprises the steps of: When the processor executes the computer program, it implements the steps of the method as described in any one of claims 1 to 11.
20. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 11.