Water quality detection circuit and water quality analyzer
By using a microcontroller-controlled water quality detection circuit, combined with light source and ambient light compensation technology, the problems of time-consuming and laborious chlorophyll a detection and ambient light interference have been solved, achieving automation and high precision in chlorophyll a detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-29
- Publication Date
- 2026-04-14
AI Technical Summary
Existing chlorophyll a detection methods require manual operation, which is time-consuming, labor-intensive, and not conducive to long-term automatic observation. Furthermore, ambient light interference affects the detection accuracy.
The water quality detection circuit, controlled by a microcontroller, includes a constant current drive circuit for the light source, a light source feedback circuit, and a fluorescence detection circuit. By compensating for light source intensity and ambient light, and combining transimpedance amplification, in-phase amplification, integration, and filtering, the signal-to-noise ratio of the fluorescence signal is improved.
This achieved stable light source intensity, reduced ambient light interference, improved the accuracy and stability of chlorophyll detection, and ensured the accuracy and stability of sampling results.
Smart Images

Figure CN116297354B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of analytical testing technology, specifically relating to a water quality detection circuit and a water quality analyzer. Background Technology
[0002] Chlorophyll a is one of the most commonly used indicators reflecting phytoplankton biomass in aquatic bodies and is also an important parameter for eutrophication. Water quality monitoring technical specifications stipulate that chlorophyll a in lakes and reservoirs is a routine monitoring item. Traditional chlorophyll a monitoring methods mainly rely on the determination of chlorophyll a in the "Methods for Monitoring and Analysis of Water and Wastewater" (Fourth Edition). This method requires manual operation, is time-consuming and labor-intensive, and is not conducive to long-term automated observation. The fluorescence method for measuring chlorophyll in water is simple to operate, facilitates data collection, and can achieve automated online analysis.
[0003] The principle of fluorescence measurement is as follows: fluorescence generation is actually an energy radiation process caused by the excitation of molecules. Excited molecules release the absorbed energy in the form of light, which is called fluorescence. Fluorescence intensity is determined by multiple factors, including the concentration of chlorophyll a, absorption coefficient, fluorescence efficiency, excitation light intensity, sample optical path difference, and photoelectric conversion coefficient. Fluorescence intensity is directly proportional to the concentration of chlorophyll a; the concentration of chlorophyll a in the water sample can be calculated from the detected fluorescence intensity. Furthermore, the fluorescence produced by chlorophyll is in the 660-750nm wavelength range, and ambient light such as sunlight and artificial light also includes this wavelength, which can affect the detection results. Therefore, effectively improving detection accuracy is a pressing problem that needs to be solved. Summary of the Invention
[0004] Based on the aforementioned shortcomings and deficiencies in the prior art, one of the objectives of this invention is to at least solve one or more of the aforementioned problems in the prior art. In other words, one of the objectives of this invention is to provide a water quality detection circuit and water quality analyzer that meet one or more of the aforementioned requirements.
[0005] To achieve the above-mentioned objectives, the present invention adopts the following technical solution:
[0006] A water quality detection circuit for detecting chlorophyll in water, comprising:
[0007] Microcontroller;
[0008] The light source control circuit unit includes a light source constant current drive circuit module and a light source. The light source constant current drive circuit module is used to drive the light source.
[0009] A light source feedback circuit unit is used to feed back the intensity change of the light source to the microcontroller; the microcontroller adjusts the driving voltage of the light source according to the feedback intensity change of the light source so that the luminous intensity of the light source is within the target range.
[0010] The fluorescence detection circuit unit is used to detect the fluorescence generated after the light source illuminates the sample and to perform ambient light compensation in order to obtain the chlorophyll concentration.
[0011] As a preferred embodiment, the fluorescence detection circuit unit includes a transimpedance amplifier module, an ambient light compensation circuit module, a non-inverting amplifier circuit module, an integrating circuit module, a filtering circuit module, and an ADC acquisition circuit module. The transimpedance amplifier module is used to convert fluorescence and ambient light signals into voltage signals; the ambient light compensation circuit module is used to compensate the voltage signal for ambient light to cancel the low-frequency, DC voltage signal of the ambient light and obtain the fluorescence signal; the non-inverting amplifier circuit module is used to amplify the fluorescence signal; the integrating circuit module is used to integrate the amplified fluorescence signal; the filtering circuit module is used to filter the integrated fluorescence signal; and the ADC acquisition circuit module is used to acquire the filtered fluorescence signal to obtain the fluorescence voltage signal and output it to the microcontroller to obtain the chlorophyll concentration.
[0012] As a preferred embodiment, the transimpedance amplifier module includes a photodetector D3, a resistor R16, an operational amplifier U8, and a feedback capacitor C24. The negative terminal of the photodetector D3 is connected to the inverting input of the operational amplifier U8, and the positive terminal of the photodetector D3 is connected to the non-inverting input of the operational amplifier U8 through the negative power supply. The resistor R16 and the feedback capacitor C24 are connected in parallel and are respectively connected to the inverting input and the output terminal of the operational amplifier U8.
[0013] Among them, resistor R16 and operational amplifier U8 form a transimpedance amplifier; operational amplifier U8 is powered by a power supply.
[0014] As a preferred embodiment, the ambient light compensation circuit module includes an analog switch U12A, resistors R30, R31, and R33, and an operational amplifier U15. The opening or closing of the analog switch U12A is controlled by a microcontroller. The analog switch U12A is connected to the output terminal of the operational amplifier U8 and the resistor R31. The resistor R31 is also connected to the non-inverting input of the operational amplifier U15. The inverting input of the operational amplifier U15 is connected to the negative terminal of the power supply through the resistor R33. The output terminal of the operational amplifier U15 is connected to the photodetector D3 through the resistor R30.
[0015] The operational amplifier U15 is powered by a power supply.
[0016] As a preferred embodiment, the non-inverting amplifier circuit module includes resistors R17, R18, and R19, and operational amplifier U9. Resistor R18 is connected to the output terminal of operational amplifier U8 and the non-inverting terminal of operational amplifier U9, respectively. Resistor R17 is connected to the non-inverting terminal and the output terminal of operational amplifier U9, respectively. The inverting terminal of operational amplifier U9 is connected to the negative power supply through resistor R19.
[0017] The operational amplifier U9 is powered by a power supply.
[0018] As a preferred embodiment, the integrating circuit module includes an analog switch U12B, a resistor R20, a capacitor C25, and an operational amplifier U10. The opening or closing of the analog switch U12B is controlled by a microcontroller. One end of the analog switch U12B is connected to the output terminal of the operational amplifier U9, and the other end is connected to the inverting input of the operational amplifier U10 through the resistor R20. The non-inverting input of the operational amplifier U10 is connected to the negative terminal of the power supply, and the capacitor C25 is connected to both the inverting input and the output terminal of the operational amplifier U10.
[0019] The operational amplifier U10 is powered by a power supply.
[0020] As a preferred embodiment, the filter circuit module includes a first-stage active low-pass filter composed of capacitors C26, C27, C30, resistors R22, R23, R26, R28 and operational amplifier U11, and a second-stage passive filter composed of resistor R24 and capacitor C29.
[0021] One end of resistor R22 is connected to the output terminal of operational amplifier U10, and the other end is connected to the non-inverting input of operational amplifier U11 through resistor R23; one end of capacitor C26 is connected to resistors R22 and R23, and the other end of capacitor C26 is connected to the output terminal of operational amplifier U11; capacitor C27 is connected to the non-inverting input and the negative terminal of the power supply of operational amplifier U11; capacitor C30 is connected in parallel with resistor R28, and is connected to the inverting input and the output terminal of operational amplifier U11; the inverting input of operational amplifier U11 is also connected to the negative terminal of the power supply through resistor R26.
[0022] One end of resistor R24 is connected to the output of operational amplifier U11, and the other end is connected to the ADC acquisition circuit module and capacitor C29 respectively. Capacitor C29 is also connected to the negative terminal of the power supply.
[0023] The operational amplifier U11 is powered by a power supply.
[0024] As a preferred embodiment, the constant current drive circuit module for the light source includes a current feedback resistor R25, a transistor Q1, an operational amplifier U7, a loop compensation resistor R21, a loop compensation capacitor C28, and a voltage follower U6. The non-inverting input of the voltage follower U6 is connected to the microcontroller, and the inverting input of the voltage follower U6 is connected to the output terminal. The output terminal of the voltage follower U6 is connected to the non-inverting input of the operational amplifier U7, and the inverting input of the operational amplifier U7 is connected to the negative terminal of the power supply through the current feedback resistor R25. The output terminal of the operational amplifier U7 is connected to the base of the transistor Q1, the collector of the transistor Q1 is connected to the positive terminal of the power supply, and the emitter of the transistor Q1 is connected to the positive terminal of the light source D2. The negative terminal of the light source D2 is connected to the resistor R25. The loop compensation resistor R21 and the loop compensation capacitor C28 are connected in series and are respectively connected to the inverting input of the operational amplifier U7 and the negative terminal of the light source D2.
[0025] Among them, voltage follower U6 and operational amplifier U7 are powered by the power supply.
[0026] As a preferred embodiment, the light source feedback circuit unit includes a photodetector D4, a transimpedance amplifier composed of resistor R27 and operational amplifier U14, a non-inverting amplifier composed of feedback capacitor C31, resistor R32, resistor R34, resistor R35 and operational amplifier U13, and a passive filter composed of resistor R29 and capacitor C32.
[0027] Resistor R27 is connected to the inverting input and the output input of op-amp U14 respectively, and feedback capacitor C31 is connected in parallel with resistor R27; the negative terminal of photodetector D4 is connected to the inverting input of op-amp U14, and the positive terminal of photodetector D4 is connected to the non-inverting input of op-amp U14 and grounded.
[0028] Resistor R32 is connected to the output terminal of op-amp U14 and the non-inverting terminal of op-amp U13 respectively. The inverting terminal of op-amp U13 is grounded through resistor R35. Resistor R34 is connected to the output terminal and the inverting terminal of op-amp U13 respectively. One end of resistor R29 is connected to the output terminal of op-amp U13, and the other end is connected to the microcontroller and grounded through capacitor C32.
[0029] The present invention also provides a water quality analyzer that employs the water quality detection circuit described in any of the above embodiments.
[0030] Compared with the prior art, the beneficial effects of this invention are:
[0031] (1) Detecting and compensating the light source is beneficial to maintaining the light intensity of the light source constant, thereby making the fluorescence excited by chlorophyll more stable and reducing the impact of fluorescence fluctuations excited by the light source on subsequent detection.
[0032] (2) Compensation for ambient light such as sunlight and lamplight avoids interference from external light sources and further improves the accuracy of fluorescence detection;
[0033] (3) Since fluorescence signals are usually very weak, direct amplification and sampling will cause the signal to be submerged in noise. However, the three-stage processing of amplification-integration-filtering adopted in this invention can greatly improve the signal-to-noise ratio, which will ensure the accuracy and stability of the sampling results. Attached Figure Description
[0034] Figure 1 This is a schematic diagram of the water quality detection circuit according to an embodiment of the present invention;
[0035] Figure 2 This is a circuit diagram of the light source control and feedback section of an embodiment of the present invention;
[0036] Figure 3 This is a circuit diagram of the fluorescence detection circuit unit according to an embodiment of the present invention. Detailed Implementation
[0037] To more clearly illustrate the embodiments of the present invention, specific implementation methods will be described below with reference to the accompanying drawings. Obviously, the drawings described below are merely some embodiments of the present invention. For those skilled in the art, other drawings and other implementation methods can be obtained based on these drawings without any creative effort.
[0038] Example 1:
[0039] like Figure 1 As shown, the water quality detection circuit in this embodiment includes a microcontroller (MCU), a light source control circuit unit (i.e., a light source control circuit), a light source feedback circuit unit (i.e., a light source feedback circuit), and a fluorescence detection circuit unit (i.e., a fluorescence detection circuit), used for detecting chlorophyll in water.
[0040] The light source control circuit unit includes a light source constant current drive circuit module (i.e., light source drive circuit) and an LED light source. The light source drive circuit is used to drive the LED light source.
[0041] Specifically, such as Figure 2 As shown, the light source driving circuit of this embodiment includes a current feedback resistor R25, a transistor Q1, an operational amplifier U7, a loop compensation resistor R21, a loop compensation capacitor C28, and a voltage follower U6. The non-inverting input of the voltage follower U6 is connected to the microcontroller, and the inverting input of the voltage follower U6 is connected to the output terminal. The output terminal of the voltage follower U6 is connected to the non-inverting input of the operational amplifier U7, and the inverting input of the operational amplifier U7 is connected to the negative terminal of the power supply through the current feedback resistor R25. The output terminal of the operational amplifier U7 is connected to the base of the transistor Q1, the collector of the transistor Q1 is connected to the positive terminal VCC of the power supply, and the emitter of the transistor Q1 is connected to the positive terminal of the light source D2. The negative terminal of the light source D2 is connected to the resistor R25. The loop compensation resistor R21 and the loop compensation capacitor C28 are connected in series and are respectively connected to the inverting input of the operational amplifier U7 and the negative terminal of the light source D2. The voltage follower U6 and the operational amplifier U7 are powered by the power supply.
[0042] The light source feedback circuit in this embodiment is used to feed back the intensity change of the light source to the microcontroller. The microcontroller adjusts the driving voltage of the light source according to the feedback intensity change of the light source so that the luminous intensity of the light source is within the target range.
[0043] Specifically, the light source feedback circuit includes a photodetector D4, a transimpedance amplifier composed of resistor R27 and operational amplifier U14, a non-inverting amplifier composed of feedback capacitor C31, resistor R32, resistor R34, resistor R35 and operational amplifier U13, and a passive filter composed of resistor R29 and capacitor C32.
[0044] Among them, resistor R27 is connected to the inverting input and the output input of operational amplifier U14 respectively, and feedback capacitor C31 is connected in parallel with resistor R27; the negative terminal of photodetector D4 is connected to the inverting input of operational amplifier U14, and the positive terminal of photodetector D4 is connected to the non-inverting input of operational amplifier U14 and grounded.
[0045] Resistor R32 is connected to the output terminal of op-amp U14 and the non-inverting terminal of op-amp U13 respectively. The inverting terminal of op-amp U13 is grounded through resistor R35. Resistor R34 is connected to the output terminal and the inverting terminal of op-amp U13 respectively. One end of resistor R29 is connected to the output terminal of op-amp U13, and the other end is connected to the microcontroller and grounded through capacitor C32.
[0046] In this embodiment, grounding is equivalent to connecting to the negative terminal of the power supply.
[0047] The principle of light source control and light source feedback in this embodiment is as follows:
[0048] The microcontroller (MCU) outputs a square wave with adjustable amplitude, 10% duty cycle, and a frequency of 100kHz. This square wave, controlled by a constant current source composed of operational amplifiers U6 and U7, illuminates LED light source D2. The amplitude controls the brightness of the LED, while the duty cycle and frequency modulate the flickering of the light source in conjunction with the subsequent sampling circuit. A photodetector D4 converts the light emitted by the LED into a current signal, which is then converted into a voltage by a transimpedance amplifier U14. After amplification by a non-inverting amplifier U13, the voltage is sampled by the MCU. Through a feedback circuit, the MCU can sense fluctuations and attenuation in the light source intensity, thereby adjusting the voltage amplitude driving the light source to stabilize its luminous intensity at the desired value.
[0049] The specific process of light source control and light source feedback is as follows:
[0050] 1. The microcontroller sets the light source driving voltage to be buffered by voltage follower U6 and then input to the constant current drive. U7 controls Q1 to turn on, D2 to start emitting light, R25 feeds back current to the inverting input of U7, and loop compensation R21 and C28 make the circuit work stably and prevent oscillation. The driving voltage is a 10% duty cycle pulse with a frequency of 100K, and the modulated light source is used to cooperate with the subsequent circuit.
[0051] 2. At this point, photodetector D4 in the feedback circuit detects the light signal from D2, generating a corresponding current. The transimpedance amplifier composed of R27 and U14 converts this current value into a corresponding voltage value, which is then output to the next stage circuit. Feedback capacitor C25 limits the bandwidth to maintain circuit stability. Specifically, since the output voltage at this point is obtained by multiplying the current output from the photodetector by the resistor R27, a low-temperature drift resistor with a precision of one-thousandth is used here, and capacitor C31 is also a low-temperature drift capacitor made of NP0 material.
[0052] 3. After the non-inverting amplifier U13 amplifies the signal, it is filtered by R29 and C32 and then sent to the microcontroller MCU for sampling.
[0053] 4. After measuring the strength of the feedback signal, the microcontroller (MCU) fine-tunes the set light source driving voltage until the feedback signal stabilizes within the desired range. At this point, the feedback signal is sampled to obtain a reference signal characterizing the light source.
[0054] The brightness of the LED light source in this embodiment is adjustable. The brightness of the light-emitting diodes can be controlled by the microcontroller controlling the light source driving voltage, making it flexible and convenient for detecting samples of different concentrations. Moreover, the light source has high stability and can be adjusted in real time. The light source intensity is fed back by the circuit, and the MCU uses a PID algorithm to adjust the light source intensity in real time to ensure the stability of the light source. In addition, the light intensity of the light source is known, and the MCU directly collects the light source intensity to obtain a reference signal characterizing the light source. This signal can be used in the calculation of chlorophyll concentration to further compensate for the light source and help obtain accurate final results.
[0055] The fluorescence detection circuit in this embodiment is used to detect the fluorescence generated after the light source illuminates the sample (e.g., water sample) and perform ambient light compensation to obtain the chlorophyll concentration.
[0056] Specifically, the fluorescence detection circuit unit includes a transimpedance amplifier module, an ambient light compensation circuit module, a non-inverting amplifier module, an integrating circuit module, a filtering circuit module, and an ADC acquisition circuit module. The transimpedance amplifier is used to convert the fluorescence and ambient light signals into voltage signals; the ambient light compensation circuit is used to compensate the voltage signal for ambient light to cancel the low-frequency, DC voltage signal of the ambient light and obtain the fluorescence signal; the non-inverting amplifier is used to amplify the fluorescence signal; the integrating circuit is used to integrate the amplified fluorescence signal; the filtering circuit is used to filter the integrated fluorescence signal; and the ADC acquisition circuit is used to acquire the filtered fluorescence signal to obtain the fluorescence voltage signal and output it to the microcontroller to obtain the chlorophyll concentration.
[0057] like Figure 3 As shown, the transimpedance amplifier module includes a photodetector D3, a resistor R16, an operational amplifier U8, and a feedback capacitor C24. The negative terminal of the photodetector D3 is connected to the inverting input of the operational amplifier U8, and the positive terminal of the photodetector D3 is connected to the non-inverting input of the operational amplifier U8 through the negative power supply. The resistor R16 and the feedback capacitor C24 are connected in parallel and are respectively connected to the inverting input and the output terminal of the operational amplifier U8.
[0058] Among them, resistor R16 and operational amplifier U8 form a transimpedance amplifier; operational amplifier U8 is powered by a power supply.
[0059] The ambient light compensation circuit module in this embodiment includes an analog switch U12A, resistors R30, R31, and R33, and an operational amplifier U15. The opening or closing of the analog switch U12A is controlled by the microcontroller MCU_CON1. The analog switch U12A is connected to the output terminal of the operational amplifier U8 and the resistor R31. The resistor R31 is also connected to the non-inverting input of the operational amplifier U15. The inverting input of the operational amplifier U15 is connected to the negative terminal of the power supply through the resistor R33. The output terminal of the operational amplifier U15 is connected to the photodetector D3 through the resistor R30. The operational amplifier U15 is powered by the power supply.
[0060] The non-inverting amplifier circuit module of this embodiment includes resistors R17, R18, and R19, and operational amplifier U9. Resistor R18 is connected to the output terminal of operational amplifier U8 and the non-inverting terminal of operational amplifier U9, respectively. Resistor R17 is connected to the non-inverting terminal and the output terminal of operational amplifier U9, respectively. The inverting terminal of operational amplifier U9 is connected to the negative terminal of the power supply through resistor R19. Operational amplifier U9 is powered by the power supply.
[0061] The integrating circuit module of this embodiment includes an analog switch U12B, a resistor R20, a capacitor C25, and an operational amplifier U10. The opening or closing of the analog switch U12B is controlled by the microcontroller MCU_CON2. One end of the analog switch U12B is connected to the output terminal of the operational amplifier U9, and the other end is connected to the inverting input of the operational amplifier U10 through the resistor R20. The non-inverting input of the operational amplifier U10 is connected to the negative terminal of the power supply, and the capacitor C25 is connected to both the inverting input and the output terminal of the operational amplifier U10. The operational amplifier U10 is powered by the power supply.
[0062] The filter circuit module of this embodiment includes a first-stage active low-pass filter (which is also the second-stage non-inverting amplifier circuit) composed of capacitors C26, C27, C30, resistors R22, R23, R26, R28 and operational amplifier U11, and also includes a second-stage passive filter composed of resistor R24 and capacitor C29.
[0063] One end of resistor R22 is connected to the output terminal of operational amplifier U10, and the other end is connected to the non-inverting input of operational amplifier U11 through resistor R23; one end of capacitor C26 is connected to resistors R22 and R23, and the other end of capacitor C26 is connected to the output terminal of operational amplifier U11; capacitor C27 is connected to the non-inverting input and the negative terminal of the power supply of operational amplifier U11; capacitor C30 is connected in parallel with resistor R28, and is connected to the inverting input and the output terminal of operational amplifier U11; the inverting input of operational amplifier U11 is also connected to the negative terminal of the power supply through resistor R26.
[0064] One end of resistor R24 is connected to the output terminal of operational amplifier U11, and the other end is connected to the ADC acquisition circuit module and capacitor C29 respectively. Capacitor C29 is also connected to the negative terminal of the power supply; operational amplifier U11 is powered by the power supply.
[0065] The principle of fluorescence detection in this embodiment is as follows:
[0066] The transimpedance amplifier converts the fluorescence excited by the modulated light source, along with ambient light such as sunlight and lamplight that cannot be avoided by the structure or filters, into a voltage signal. Within one LED light source flicker cycle (10% on, 90% off), MCU_CON1 controls analog switch U12A to open when the LED light source is off, inputting the low-frequency, DC voltage signal corresponding to the ambient light into the loop compensation circuit composed of U15. After detecting the input, U15 outputs an opposite voltage through R30 to compensate the photodetector D3, thereby canceling the low-frequency, DC voltage signal. The in-phase amplifier amplifies the processed weak fluorescence signal. Analog switch U12B, controlled by MCU_CON2, opens when the LED light source is on, inputting the amplified fluorescence signal into the integrator circuit for integration. Finally, the signal enters the subsequent filtering circuit to further filter out interference and noise, and the fluorescence voltage signal acquired by the ADC is output to the MCU to calculate the corresponding chlorophyll concentration.
[0067] The fluorescence detection process in this embodiment is as follows:
[0068] (1) When chlorophyll in the water sample is irradiated by a specifically modulated light source, it excites a pulsed fluorescence signal with a corresponding frequency and duty cycle. After the photodetector D3 of the fluorescence detection circuit detects the fluorescence, it generates a corresponding current signal, which is converted into a corresponding voltage by a transimpedance amplifier. The feedback capacitor C26 limits the bandwidth and keeps the circuit stable. In particular, since the output voltage at this point is obtained by multiplying the current output by the photodetector by the resistor R16, a low-temperature drift resistor with an accuracy of one-thousandth is used at this point, and the capacitor C24 is also a low-temperature drift capacitor made of NP0 material.
[0069] (2) Analog switch U12A opens when the light source is off, connecting the output signal of the transimpedance amplifier (interference caused by ambient light such as lamps and sunlight) when the light source is off and there is no excitation fluorescence to the ambient light compensation circuit. After receiving the difference between the inverting and non-inverting input terminals, U15 generates a voltage with the same amplitude but opposite polarity at its output terminal. This voltage is superimposed on photodiode D3, thereby canceling other light signals detected by the detector when the light source is off and there is no excitation fluorescence. When the light source is on and there is excitation fluorescence, the analog switch closes, no longer connecting the normal fluorescence signal to the compensation circuit. At the same time, since U15 continuously outputs the compensation voltage for 90% of the time when the light source is off, this voltage can be maintained for a short time during the 10% time when the light source is on, even though U15 has no input, and compensation can still be performed. In particular, the switching timing here must be in the same frequency but out of phase with the duty cycle of the light source modulation frequency.
[0070] (3) The compensated fluorescence pulse signal has eliminated most of the DC ambient light signal and is input to the next stage in-phase amplifier U9 for amplification;
[0071] (4) To further eliminate the influence of ambient light, the output signal of U9 is input to the integrating circuit via an analog switch U12B. U12B is turned on when the light source is on and there is a fluorescence signal, inputting the signal to the integrating circuit. When the light source is off and there is no excitation fluorescence, it is turned off to block invalid interference signals from entering the integrating circuit. With this design, the integrator U10 can integrate only the fluorescence signal, thereby eliminating interference from other DC components of ambient light. In particular, the switching timing here must be in phase and frequency matching the duty cycle of the light source modulation.
[0072] (5) The filter circuit U11 further amplifies the integrated signal and performs two-stage filtering. Here, interference and fluctuations on the signal are further filtered out, which is beneficial for subsequent measurement.
[0073] (6) The ADC acquisition section is controlled by a microcontroller to convert analog electrical signals into digital signals so as to facilitate subsequent data calculation and obtain chlorophyll concentration.
[0074] Due to size limitations, the chlorophyll electrode structure cannot employ complex structures to eliminate ambient light interference. Furthermore, the intensity of other light sources is much greater than that of the detected fluorescence, leading to significant interference. This embodiment utilizes a first-stage ambient light compensation circuit and a first-stage controllable integration circuit to effectively eliminate ambient light interference and improve measurement accuracy.
[0075] The water quality analyzer in this embodiment uses the above-mentioned water quality detection circuit, which effectively improves the detection accuracy of chlorophyll.
[0076] Example 2:
[0077] The water quality detection circuit in this embodiment differs from that in Embodiment 1 in that:
[0078] The integrator circuit and filter circuit in Embodiment 1 can also be replaced with existing common integrator circuits and filter circuits to meet the needs of different applications.
[0079] Other circuit architectures can be referred to in Example 1;
[0080] The water quality analyzer in this embodiment uses the water quality detection circuit described above, which has high detection accuracy.
[0081] The above description is merely a detailed explanation of preferred embodiments and principles of the present invention. For those skilled in the art, there may be changes in specific implementation methods based on the ideas provided by the present invention, and these changes should also be considered within the scope of protection of the present invention.
Claims
1. A water quality detection circuit for detecting chlorophyll in water, characterized in that, include: Microcontroller; The light source control circuit unit includes a light source constant current drive circuit module and a light source. The light source constant current drive circuit module is used to drive the light source. A light source feedback circuit unit is used to feed back the intensity change of the light source to the microcontroller; the microcontroller adjusts the driving voltage of the light source according to the feedback intensity change of the light source so that the luminous intensity of the light source is within the target range. The fluorescence detection circuit unit is used to detect the fluorescence generated after the light source illuminates the sample and to perform ambient light compensation in order to obtain the chlorophyll concentration. The fluorescence detection circuit unit includes a transimpedance amplifier module, an ambient light compensation circuit module, a non-inverting amplifier circuit module, an integrating circuit module, a filtering circuit module, and an ADC acquisition circuit module. The transimpedance amplifier module converts the fluorescence and ambient light signals into voltage signals. The ambient light compensation circuit module compensates for the voltage signal to cancel the low-frequency, DC voltage signal of the ambient light, thus obtaining the fluorescence signal. The non-inverting amplifier circuit module amplifies the fluorescence signal. The integrating circuit module integrates the amplified fluorescence signal. The filtering circuit module filters the integrated fluorescence signal. The ADC acquisition circuit module acquires the filtered fluorescence signal to obtain a fluorescence voltage signal and outputs it to the microcontroller to obtain the chlorophyll concentration. The transimpedance amplifier module includes a photodetector D3, a resistor R16, an operational amplifier U8, and a feedback capacitor C24. The negative terminal of the photodetector D3 is connected to the inverting input of the operational amplifier U8, and the positive terminal of the photodetector D3 is connected to the non-inverting input of the operational amplifier U8 through the negative power supply. The resistor R16 and the feedback capacitor C24 are connected in parallel and are respectively connected to the inverting input and the output terminal of the operational amplifier U8. Among them, resistor R16 and operational amplifier U8 form a transimpedance amplifier; operational amplifier U8 is powered by a power supply.
2. The water quality detection circuit according to claim 1, characterized in that, The ambient light compensation circuit module includes an analog switch U12A, resistors R30, R31, and R33, and an operational amplifier U15. The opening or closing of the analog switch U12A is controlled by a microcontroller. The analog switch U12A is connected to the output terminal of the operational amplifier U8 and the resistor R31. The resistor R31 is also connected to the non-inverting input of the operational amplifier U15. The inverting input of the operational amplifier U15 is connected to the negative terminal of the power supply through the resistor R33. The output terminal of the operational amplifier U15 is connected to the photodetector D3 through the resistor R30. The operational amplifier U15 is powered by a power supply.
3. The water quality detection circuit according to claim 2, characterized in that, The non-inverting amplifier circuit module includes resistors R17, R18, and R19, and operational amplifier U9. Resistor R18 is connected to the output terminal of operational amplifier U8 and the non-inverting terminal of operational amplifier U9, respectively. Resistor R17 is connected to the non-inverting terminal and the output terminal of operational amplifier U9, respectively. The inverting terminal of operational amplifier U9 is connected to the negative power supply through resistor R19. The operational amplifier U9 is powered by a power supply.
4. The water quality detection circuit according to claim 3, characterized in that, The integrating circuit module includes an analog switch U12B, a resistor R20, a capacitor C25, and an operational amplifier U10. The opening or closing of the analog switch U12B is controlled by a microcontroller. One end of the analog switch U12B is connected to the output terminal of the operational amplifier U9, and the other end is connected to the inverting input of the operational amplifier U10 through the resistor R20. The non-inverting input of the operational amplifier U10 is connected to the negative terminal of the power supply, and the capacitor C25 is connected to both the inverting input and the output terminal of the operational amplifier U10. The operational amplifier U10 is powered by a power supply.
5. The water quality detection circuit according to claim 4, characterized in that, The filter circuit module includes a first-stage active low-pass filter composed of capacitors C26, C27, and C30, resistors R22, R23, R26, and R28, and operational amplifier U11, and a second-stage passive filter composed of resistor R24 and capacitor C29. One end of resistor R22 is connected to the output terminal of operational amplifier U10, and the other end is connected to the non-inverting input of operational amplifier U11 through resistor R23; one end of capacitor C26 is connected to resistors R22 and R23, and the other end of capacitor C26 is connected to the output terminal of operational amplifier U11; capacitor C27 is connected to the non-inverting input and the negative terminal of the power supply of operational amplifier U11; capacitor C30 is connected in parallel with resistor R28, and is connected to the inverting input and the output terminal of operational amplifier U11; the inverting input of operational amplifier U11 is also connected to the negative terminal of the power supply through resistor R26. One end of resistor R24 is connected to the output of operational amplifier U11, and the other end is connected to the ADC acquisition circuit module and capacitor C29 respectively. Capacitor C29 is also connected to the negative terminal of the power supply. The operational amplifier U11 is powered by a power supply.
6. The water quality detection circuit according to any one of claims 1-5, characterized in that, The constant current drive circuit module for the light source includes a current feedback resistor R25, a transistor Q1, an operational amplifier U7, a loop compensation resistor R21, a loop compensation capacitor C28, and a voltage follower U6. The non-inverting input of the voltage follower U6 is connected to the microcontroller, and the inverting input of the voltage follower U6 is connected to the output terminal. The output terminal of the voltage follower U6 is connected to the non-inverting input of the operational amplifier U7, and the inverting input of the operational amplifier U7 is connected to the negative terminal of the power supply through the current feedback resistor R25. The output terminal of the operational amplifier U7 is connected to the base of the transistor Q1, the collector of the transistor Q1 is connected to the positive terminal of the power supply, and the emitter of the transistor Q1 is connected to the positive terminal of the light source D2. The negative terminal of the light source D2 is connected to the resistor R25. The loop compensation resistor R21 and the loop compensation capacitor C28 are connected in series and are respectively connected to the inverting input of the operational amplifier U7 and the negative terminal of the light source D2. Among them, voltage follower U6 and operational amplifier U7 are powered by the power supply.
7. The water quality detection circuit according to any one of claims 1-5, characterized in that, The light source feedback circuit unit includes a photodetector D4, a transimpedance amplifier composed of resistor R27 and operational amplifier U14, a non-inverting amplifier composed of feedback capacitor C31, resistor R32, resistor R34, resistor R35 and operational amplifier U13, and a passive filter composed of resistor R29 and capacitor C32. Resistor R27 is connected to the inverting input and the output input of op-amp U14 respectively, and feedback capacitor C31 is connected in parallel with resistor R27; the negative terminal of photodetector D4 is connected to the inverting input of op-amp U14, and the positive terminal of photodetector D4 is connected to the non-inverting input of op-amp U14 and grounded. Resistor R32 is connected to the output terminal of op-amp U14 and the non-inverting terminal of op-amp U13 respectively. The inverting terminal of op-amp U13 is grounded through resistor R35. Resistor R34 is connected to the output terminal and the inverting terminal of op-amp U13 respectively. One end of resistor R29 is connected to the output terminal of op-amp U13, and the other end is connected to the microcontroller and grounded through capacitor C32.
8. A water quality analyzer, characterized in that, The water quality detection circuit described in any one of claims 1-7 is adopted.
Citation Information
Patent Citations
Chlorophyll content measuring device based on phase lock technique
CN110632053A
Ambient light sensing system with variable range
CN114964479A