Detection circuit and electronic equipment

By designing a circuit for ammonia nitrogen detection, using the combination of control circuit, acquisition circuit and addition circuit, the problem of low stability and anti-interference in existing detection circuits is solved, and more stable and efficient detection result output is achieved, reducing the Cost and avoid pollution.

CN222299960UActive Publication Date: 2025-01-03SHENZHEN HONGDIAN TECH CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202421186545.1
Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
Filing Date
2024-05-27
Publication Date
2025-01-03
Estimated Expiration
2034-05-27

AI Technical Summary

Technical Problem

The existing ammonia nitrogen index detection circuit has low stability and anti-interference, resulting in abnormal detection results. The traditional method is costly and difficult to operate, and there is a risk of secondary pollution.

Method used

A detection circuit is designed, including a control circuit, a acquisition circuit, a switching circuit and an addition circuit. By outputting a switching signal, a acquisition voltage and a reference voltage of a preset time, a detection result is output in response to the comparison voltage difference. , stop output when it exceeds the preset range, improving the stability and anti-interference of the circuit.

Benefits of technology

It effectively reduces the risk of abnormal detection results, improves the stability and anti-interference of the circuit, reduces costs, and avoids secondary pollution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN222299960U_ABST
    Figure CN222299960U_ABST
Patent Text Reader

Abstract

The utility model discloses a detection circuit and electronic equipment, and belongs to the technical field of sensors. The acquisition circuit is used for detecting to-be-detected liquid so as to output acquisition voltage; the switching circuit responds to a switching signal of a preset duration and transmits the reference voltage for the preset duration; the summing circuit is used for proportionally amplifying the acquired voltage to output a first comparison voltage, and carrying out addition operation on the acquired voltage and the reference voltage to output a second comparison voltage; the control circuit is further configured to output a detection result according to the first comparison voltage in response to the fact that the difference between the first comparison voltage and the second comparison voltage is within a preset range, and stop outputting the detection result in response to the fact that the difference between the first comparison voltage and the second comparison voltage exceeds the preset range; and when the acquisition circuit fails, the output of the detection result is stopped in time, so that the stability and anti-interference performance of the circuit are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of sensor technology, and in particular, relates to a detection circuit and an electronic device. Background Art

[0002] Water quality monitoring is an important part of environmental monitoring by environmental protection departments. Among them, the detection of ammonia nitrogen index in water quality is a key project of water quality detection. Due to the complex and changeable external environment and its large interference, traditional ammonia nitrogen index detection is usually carried out in the laboratory using a variety of chemical reagents, which is difficult to operate and costly. Chemical reagents can also cause secondary pollution. In this regard, the existing technology uses sensors to detect water quality, but the stability and anti-interference ability of the existing detection circuit are low, and even malfunctions may occur, resulting in the collection of abnormal data.

[0003] Therefore, there is an urgent need for a detection circuit with high stability and anti-interference performance. Utility Model Content

[0004] The purpose of this application is to provide a detection circuit and electronic equipment, aiming to solve the problems of low stability and anti-interference of existing ammonia nitrogen index detection circuits.

[0005] The present application embodiment provides a detection circuit, including:

[0006] A control circuit configured to output a switch signal of a preset duration;

[0007] A collection circuit is configured to detect the liquid to be tested to output a collection voltage;

[0008] A switch circuit, connected to the control circuit, configured to transmit a reference voltage for a preset time period in response to the switch signal of a preset time period;

[0009] an adding circuit connected to the switch circuit and the acquisition circuit, configured to proportionally amplify the acquisition voltage to output a first comparison voltage, and perform an addition operation on the acquisition voltage and the reference voltage to output a second comparison voltage;

[0010] The control circuit is also configured to output a detection result according to the first comparison voltage in response to the difference between the first comparison voltage and the second comparison voltage being within a preset range, and to stop outputting the detection result in response to the difference between the first comparison voltage and the second comparison voltage exceeding the preset range.

[0011] In one of the embodiments, the detection circuit is connected to a host computer;

[0012] The control circuit is also configured to output the detection result to the host computer according to the first comparison voltage in response to the difference between the first comparison voltage and the second comparison voltage being within the preset range, and to stop outputting the detection result to the host computer in response to the difference between the first comparison voltage and the second comparison voltage exceeding the preset range.

[0013] In one of the embodiments, the control circuit is further connected to the acquisition circuit and configured to output a selection signal;

[0014] The acquisition circuit includes a plurality of sub-acquisition units and a selection unit;

[0015] The sub-collection unit is configured to detect the chemical parameters of the liquid to be tested to output a sub-collection voltage;

[0016] The selection unit is connected to the control circuit, the adding circuit and the plurality of sub-collection units, and is configured to select and output one of the plurality of sub-collection voltages as the collection voltage according to the selection signal.

[0017] In one embodiment, the sub-collection unit includes:

[0018] A composite electrode configured to sample the chemical parameters of the liquid to be tested to output a sub-sampling voltage;

[0019] The signal conditioning circuit is connected to the composite electrode and the selection unit, and is configured to modulate the sub-sampling voltage to output the sub-collection voltage.

[0020] In one embodiment, the composite electrode includes at least one of a pH composite electrode, a potassium ion composite electrode, and an ammonia nitrogen composite electrode; the sub-sampling voltage includes at least one of a pH sampling voltage, a potassium ion sampling voltage, and an ammonia nitrogen sampling voltage; the sub-collection voltage includes at least one of a pH collection voltage, a potassium ion collection voltage, and an ammonia nitrogen collection voltage;

[0021] Wherein, the pH composite electrode is configured to detect the pH value of the liquid to be tested to output the pH sampling voltage;

[0022] The potassium ion composite electrode is configured to detect the potassium ion concentration of the liquid to be tested to output the potassium ion sampling voltage;

[0023] The ammonia nitrogen composite electrode is configured to detect the ammonia nitrogen concentration of the liquid to be tested to output the ammonia nitrogen sampling voltage;

[0024] The signal conditioning circuit is connected to at least one of the pH composite electrode, the potassium ion composite electrode and the ammonia nitrogen composite electrode, and is connected to the selection unit;

[0025] The signal conditioning circuit is configured to modulate the pH sampling voltage to output the pH sampling voltage; or

[0026] The signal conditioning circuit is configured to modulate the potassium ion sampling voltage to output the potassium ion sampling voltage; or

[0027] The signal conditioning circuit is configured to modulate the ammonia nitrogen sampling voltage to output the ammonia nitrogen sampling voltage.

[0028] In one of the embodiments, the signal conditioning circuit includes a first operational amplifier and a first resistor;

[0029] The first end of the first resistor serves as a sub-sampling voltage input terminal of the signal conditioning circuit and is connected to the composite electrode to input the sub-sampling voltage; the second end of the first resistor is connected to the non-inverting input terminal of the first operational amplifier, and the inverting input terminal of the first operational amplifier and the output terminal of the first operational amplifier serve together as an output terminal of the sub-sampling voltage of the signal conditioning circuit and are connected to the selection unit to output the sub-sampling voltage.

[0030] In one of the embodiments, the selection unit comprises a multiplexer;

[0031] The selection signal includes a plurality of sub-selection signals;

[0032] The output end of the selection line A of the multiplexer is used as the first sub-selection signal input end of the selection unit, and is connected to the control circuit to input the first sub-selection signal; the output end of the selection line B of the multiplexer is used as the second sub-selection signal input end of the selection unit, and is connected to the control circuit to input the second sub-selection signal; the output end of the selection line C of the multiplexer is used as the third sub-selection signal input end of the selection unit, and is connected to the control circuit to input the third sub-selection signal; the first multiplexer input end of the multiplexer is used as the first sub-selection signal input end of the selection unit a collecting voltage input terminal connected to the sub-collecting unit to input the first sub-collecting voltage; a second multiplexer input terminal of the multiplexer is used as a second sub-collecting voltage input terminal of the selecting unit, connected to the sub-collecting unit to input the second sub-collecting voltage; a third multiplexer input terminal of the multiplexer is used as a third sub-collecting voltage input terminal of the selecting unit, connected to the sub-collecting unit to input the third sub-collecting voltage; a multiplexer output terminal of the multiplexer is used as a collecting voltage output terminal of the selecting unit, connected to the adding circuit to output the collecting voltage.

[0033] In one embodiment, the detection circuit further includes:

[0034] A temperature acquisition circuit, connected to the control circuit, configured to detect the temperature of the liquid to be measured to output a temperature sampling signal;

[0035] The control circuit is specifically configured to respond to the difference between the first comparison voltage and the second comparison voltage being within a preset range, and output the detection result according to the first comparison voltage and the temperature sampling signal.

[0036] In one embodiment, the control circuit comprises:

[0037] an analog-to-digital conversion unit, connected to the adding circuit, configured to convert the first comparison voltage into a first digital signal, and convert the second comparison voltage into a second digital signal; wherein the first digital signal represents a first value, and the second digital signal represents a second value;

[0038] A main control unit is connected to the analog-to-digital conversion unit and the switching circuit, and is configured to output a detection result according to the first digital signal in response to a difference between the first value and the second value being within a preset range, and to stop outputting the detection result in response to a difference between the first value and the second value exceeding the preset range.

[0039] An embodiment of the present application further provides an electronic device, which includes the above-mentioned detection circuit.

[0040] Compared with the prior art, the embodiments of the present application have the following beneficial effects: the adding circuit first amplifies the collected voltage in proportion to output a first comparison voltage, the switching circuit transmits the reference voltage for a preset time according to a switching signal of a preset time, the adding circuit then adds the collected voltage and the reference voltage and outputs a second comparison voltage, and the control circuit stops outputting the detection result in response to the difference between the first comparison voltage and the second comparison voltage exceeding the preset range; thus, when the collection circuit fails, the output of the detection result is stopped through the switching circuit and the adding circuit, thereby reducing the risk of abnormal detection results and improving the stability and anti-interference of the circuit. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the technical application in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0042] Figure 1 A schematic diagram of a structure of a detection circuit provided in one embodiment of the present application;

[0043] Figure 2 Another structural schematic diagram of a detection circuit provided in an embodiment of the present application;

[0044] Figure 3 Another structural schematic diagram of a detection circuit provided in an embodiment of the present application;

[0045] Figure 4 Another structural schematic diagram of a detection circuit provided in an embodiment of the present application;

[0046] Figure 5 Another structural schematic diagram of a detection circuit provided in an embodiment of the present application;

[0047] Figure 6 Another structural schematic diagram of a detection circuit provided in an embodiment of the present application;

[0048] Figure 7 A partial exemplary circuit schematic diagram of a detection circuit provided in an embodiment of the present application;

[0049] Figure 8 A schematic diagram of the principle of an ammonium ion electrode provided in one embodiment of the present application. DETAILED DESCRIPTION

[0050] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0051] It should be noted that when an element is referred to as being "fixed to" or "disposed on" another element, it can be directly on the other element or indirectly on the other element. When an element is referred to as being "connected to" another element, it can be directly connected to the other element or indirectly connected to the other element.

[0052] It should be understood that the orientation or position relationship indicated by terms such as "length", "width", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside" and "outside" are based on the orientation or position relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.

[0053] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0054] Figure 1 A schematic diagram of the structure of a detection circuit provided in an embodiment of the present application is shown. For the sake of convenience, only the part related to the present embodiment is shown, which is described in detail as follows:

[0055] The detection circuit includes a control circuit 100 , a collection circuit 200 , a switch circuit 300 and an adding circuit 400 .

[0056] The control circuit 100 is configured to output a switch signal of a preset duration.

[0057] The acquisition circuit 200 is configured to detect the liquid to be detected and output an acquisition voltage.

[0058] The switch circuit 300 is connected to the control circuit 100 and is configured to transmit a reference voltage for a preset time period in response to a switch signal of a preset time period.

[0059] The adding circuit 400 is connected to the switch circuit 300 and the collection circuit 200, and is configured to proportionally amplify the collection voltage to output a first comparison voltage, and to add the collection voltage and the reference voltage to output a second comparison voltage.

[0060] The control circuit 100 is further configured to output a detection result according to the first comparison voltage in response to the difference between the first comparison voltage and the second comparison voltage being within a preset range, and to stop outputting the detection result in response to the difference between the first comparison voltage and the second comparison voltage exceeding the preset range.

[0061] The control circuit 100 can also store the detection results, and the preset range can be set according to environmental factors, acquisition accuracy, the range of the acquisition circuit 200, etc.

[0062] The adding circuit 400 first amplifies the collected voltage in proportion to output a first comparison voltage. The switching circuit 300 transmits a reference voltage for a preset time according to a switching signal of a preset time. The adding circuit 400 then adds the collected voltage and the reference voltage to output a second comparison voltage. The control circuit 100 responds to the difference between the first comparison voltage and the second comparison voltage exceeding the preset range, that is, when the difference between the first comparison voltage and the second comparison voltage exceeds the preset range, the control circuit 100 determines that the data is abnormal and stops outputting the detection results; thereby reducing the risk of abnormal detection results and improving the stability and anti-interference of the circuit.

[0063] By way of example and not limitation, Figure 2 As shown, the detection circuit is connected to the host computer 500.

[0064] The control circuit 100 is also configured to output the detection result to the host computer 500 according to the first comparison voltage in response to the difference between the first comparison voltage and the second comparison voltage being within a preset range, and to stop outputting the detection result to the host computer 500 in response to the difference between the first comparison voltage and the second comparison voltage exceeding the preset range.

[0065] In a specific implementation, the detection circuit can communicate with the host computer 500 through the RS485 serial port.

[0066] The host computer 500 can store and analyze the test results, enriching the functions of the circuit.

[0067] By way of example and not limitation, Figure 3 As shown, the control circuit 100 is also connected to the acquisition circuit 200 and configured to output a selection signal.

[0068] The acquisition circuit 200 includes a plurality of sub-acquisition units 210 and a selection unit 220 .

[0069] The sub-collection unit 210 is configured to detect the chemical parameters of the liquid to be detected to output a sub-collection voltage.

[0070] The selection unit 220 is connected to the control circuit 100 , the adding circuit 400 and the plurality of sub-collection units 210 , and is configured to select and output one of the plurality of sub-collection voltages as the collection voltage according to a selection signal.

[0071] The selection unit 220 can be used to collect data from each sub-collection unit 210 in a time-sharing manner. One adding circuit 400 can operate on multiple sub-collection voltages, and multiple adding circuits 400 are not required, thereby reducing circuit costs.

[0072] By way of example and not limitation, Figure 4 As shown, the sub-collection unit 210 includes a composite electrode 211 and a signal conditioning circuit.

[0073] The composite electrode 211 is configured to sample the chemical parameters of the liquid to be measured to output a sub-sampling voltage.

[0074] The signal conditioning circuit is connected to the composite electrode 211 and the selection unit 220 and is configured to modulate the sub-sampling voltage to output a sub-collection voltage.

[0075] The input impedance of the composite electrode 211 is increased by the signal conditioning circuit. The higher input impedance can effectively reduce the current flow in the circuit, thereby reducing the interference between signals; the high input impedance can reduce the noise current, improve the signal-to-noise ratio, and make the signal transmission between the signal source and the circuit clearer; the high input impedance can also reduce the offset voltage and current, thereby reducing the error in the measurement process.

[0076] The composite electrode 211 includes at least one of a pH composite electrode, a potassium ion composite electrode, and an ammonia nitrogen composite electrode; the sub-sampling voltage includes at least one of a pH sampling voltage, a potassium ion sampling voltage, and an ammonia nitrogen sampling voltage; the sub-collection voltage includes at least one of a pH collection voltage, a potassium ion collection voltage, and an ammonia nitrogen collection voltage.

[0077] The pH composite electrode is configured to detect the pH value of the liquid to be tested to output a pH sampling voltage.

[0078] The potassium ion composite electrode is configured to detect the potassium ion concentration of the liquid to be tested to output a potassium ion sampling voltage.

[0079] The ammonia nitrogen composite electrode is configured to detect the ammonia nitrogen concentration of the liquid to be tested to output an ammonia nitrogen sampling voltage.

[0080] The signal conditioning circuit is connected to at least one of the pH composite electrode, the potassium ion composite electrode and the ammonia nitrogen composite electrode, and is connected to the selection unit 220 .

[0081] The signal conditioning circuit is configured to modulate the pH sampling voltage to output the pH collection voltage; or the signal conditioning circuit is configured to modulate the potassium ion sampling voltage to output the potassium ion collection voltage; or the signal conditioning circuit is configured to modulate the ammonia nitrogen sampling voltage to output the ammonia nitrogen collection voltage.

[0082] In a specific implementation, the pH composite electrode may include a pH glass electrode and a pH reference electrode. The pH composite electrode detects the pH value of the liquid to be tested. Specifically, the pH composite electrode may be placed in the liquid to be tested to generate a potential difference between the pH glass electrode and the pH reference electrode to output a pH sampling voltage.

[0083] In a specific implementation, the potassium ion composite electrode may include a potassium ion electrode and a reference electrode. The potassium ion composite electrode is put into the liquid to be tested to generate a potential difference between the potassium ion electrode and the reference electrode to output a potassium ion sampling voltage.

[0084] In a specific implementation, the ammonia nitrogen composite electrode may include an ammonium ion electrode and an ammonia nitrogen reference electrode. The ammonia nitrogen composite electrode is put into the liquid to be tested to generate a potential difference between the ammonium ion electrode and the ammonia nitrogen reference electrode to output an ammonia nitrogen sampling voltage.

[0085] In liquids of different concentrations, the potential difference between the two electrodes of each composite electrode 211 may be positive or negative, so a bias voltage may be added to the reference electrode of the composite electrode 211 to ensure that the sub-collection voltage is positive, which facilitates the subsequent collection and data processing of the control circuit 100. The bias voltage may be output by a precision voltage regulator.

[0086] In specific implementation, pH composite electrode, potassium ion composite electrode and ammonia nitrogen composite electrode can be configured according to the needs of customers and on-site environment, with high flexibility.

[0087] By way of example and not limitation, Figure 5 As shown, the detection circuit also includes a temperature acquisition circuit 600 .

[0088] The temperature acquisition circuit 600 is connected to the control circuit 100 and is configured to detect the temperature of the liquid to be measured to output a temperature sampling signal.

[0089] The control circuit 100 is specifically configured to respond to the difference between the first comparison voltage and the second comparison voltage being within a preset range, and output a detection result according to the first comparison voltage and the temperature sampling signal.

[0090] Specifically, the control circuit 100 can derive a pH sampling voltage based on the first comparison voltage, or derive a potassium ion sampling voltage based on the first comparison voltage, or derive an ammonia nitrogen sampling voltage based on the first comparison voltage. The control circuit 100 can also derive the current ambient temperature through the input temperature sampling signal, thereby realizing compensation for pH value according to temperature, compensation for ammonium ions according to temperature, compensation for potassium ions according to temperature, compensation for ammonium ions according to pH, and compensation for ammonium ions by potassium ions, thereby further improving the collection accuracy and stability of the circuit.

[0091] By way of example and not limitation, Figure 6 As shown, the control circuit 100 includes an analog-to-digital conversion unit 110 and a main control unit 120 .

[0092] The analog-to-digital conversion unit 110 is connected to the adding circuit 400 and is configured to convert the first comparison voltage into a first digital signal and convert the second comparison voltage into a second digital signal. The first digital signal represents a first value and the second digital signal represents a second value;

[0093] The main control unit 120 is connected to the analog-to-digital conversion unit 110 and the switching circuit 300, and is configured to output a detection result according to a first digital signal in response to a difference between a first numerical value and a second numerical value being within a preset range, and to stop outputting the detection result in response to a difference between the first numerical value and the second numerical value exceeding the preset range.

[0094] The first comparison voltage is converted into a first digital signal and the second comparison voltage is converted into a second digital signal by the analog-to-digital conversion unit 110, so that the main control unit 120 can process the collected voltage and improve the usability of the circuit.

[0095] Figure 7 A partial exemplary circuit structure of a detection circuit provided in an embodiment of the present application is shown. For the sake of convenience, only the part related to the embodiment of the present application is shown, which is described in detail as follows:

[0096] The signal conditioning circuit includes a first operational amplifier M1 and a first resistor R1.

[0097] The first end of the first resistor R1 serves as a sub-sampling voltage input terminal of the signal conditioning circuit, and is connected to the composite electrode 211 to input a sub-sampling voltage; the second end of the first resistor R1 is connected to the non-inverting input terminal of the first operational amplifier M1, and the inverting input terminal of the first operational amplifier M1 and the output terminal of the first operational amplifier M1 serve together as an output terminal of the sub-sampling voltage of the signal conditioning circuit, and are connected to the selection unit 220 to output the sub-sampling voltage.

[0098] The signal conditioning circuit may further include magnetic beads (not shown in the figure).

[0099] The circuit is simple and reliable.

[0100] The selection unit 220 includes a multiplexer N2.

[0101] The selection signal includes a plurality of sub-selection signals;

[0102] The output terminal A of the selection line A of the multiplexer N2 is used as the first sub-selection signal input terminal of the selection unit 220, and is connected to the control circuit 100 to input the first sub-selection signal; the output terminal B of the selection line B of the multiplexer N2 is used as the second sub-selection signal input terminal of the selection unit 220, and is connected to the control circuit 100 to input the second sub-selection signal; the output terminal C of the selection line C of the multiplexer N2 is used as the third sub-selection signal input terminal of the selection unit 220, and is connected to the control circuit 100 to input the third sub-selection signal; the first multiplexer input terminal Y0 of the multiplexer N2 is used as the first sub-selection signal input terminal of the selection unit 220 The collecting voltage input terminal is connected to the sub-collecting unit 210 to input the first sub-collecting voltage; the second multiplexer input terminal Y1 of the multiplexer N2 is used as the second sub-collecting voltage input terminal of the selecting unit 220, connected to the sub-collecting unit 210 to input the second sub-collecting voltage; the third multiplexer input terminal Y2 of the multiplexer N2 is used as the third sub-collecting voltage input terminal of the selecting unit 220, connected to the sub-collecting unit 210 to input the third sub-collecting voltage; the multiplexer output terminal COM of the multiplexer N2 is used as the collecting voltage output terminal of the selecting unit 220, connected to the adding circuit 400 to output the collecting voltage.

[0103] The multiplexer N2 can select the corresponding sub-collection voltage as the collection voltage for transmission according to each selection signal, and has high flexibility.

[0104] The main control unit 120 includes a microprocessor N1.

[0105] The first general input and output terminal P1.4 of the microprocessor N1 serves as the first digital signal input terminal and the second digital signal input terminal of the main control unit 120, and is connected to the analog-to-digital conversion unit 110 to input the first digital signal and the second digital signal; the second general input and output terminal P1.5 of the microprocessor N1 serves as the temperature sampling signal input terminal of the control circuit 100, and is connected to the temperature acquisition circuit 600 to input the temperature sampling signal; the third general input and output terminal P1.0 of the microprocessor N1 serves as the switch signal output terminal of the control circuit 100, and is connected to the switch circuit 300 to output the switch signal; the fourth general input and output terminal P1.1 of the microprocessor N1 serves as the first selection signal output terminal of the control circuit 100 to output the first selection signal; the fifth general input and output terminal P1.2 of the microprocessor N1 serves as the second selection signal output terminal of the control circuit 100 to output the second selection signal; the sixth general input and output terminal P1.3 of the microprocessor N1 serves as the third selection signal output terminal of the control circuit 100 to output the third selection signal.

[0106] The switch circuit 300 includes a transistor Q1 , a field effect transistor Q2 , a first capacitor C1 , a sixth resistor R6 , and a seventh resistor R7 .

[0107] The base of the transistor Q1 serves as a switch signal input terminal of the switch circuit 300 and is connected to the control circuit 100 to input a switch signal; the collector of the transistor Q1 is connected to the first end of the sixth resistor R6 and the first end of the seventh resistor R7, and the first end of the sixth resistor R6, the first end of the first capacitor C1 and the source of the field effect transistor Q2 serve as a reference voltage input terminal to input a reference voltage; the second end of the seventh resistor R7 is connected to the second end of the first capacitor C1 and the gate of the field effect transistor Q2, and the drain of the field effect transistor Q2 serves as a reference voltage output terminal of the switch circuit 300 and is connected to the adding circuit 400 to output a reference voltage; the emitter of the transistor Q1 is connected to the power ground.

[0108] The adding circuit 400 includes a second operational amplifier M2 and a second resistor R2, a third resistor R3, a fourth resistor R4 and a fifth resistor R5.

[0109] The first end of the third resistor R3 is used as the reference voltage input end of the adding circuit 400, and is connected to the switch circuit 300 to input the reference voltage; the first end of the second resistor R2 is used as the collection voltage input end of the adding circuit 400, and is connected to the switch circuit 300 to input the collection voltage; the second end of the second resistor R2 and the second end of the third resistor R3 are connected to the non-inverting input end of the second operational amplifier M2, the inverting input end of the second operational amplifier M2 is connected to the first end of the fourth resistor R4 and the first end of the fifth resistor R5, the output end of the second operational amplifier M2 and the second end of the fourth resistor R4 are used together as the first comparison voltage output end of the adding circuit 400 and the second comparison voltage output end of the adding circuit 400 to output the first comparison voltage and the second comparison voltage; the second end of the fifth resistor R5 is connected to the power ground.

[0110] In the adding circuit 400 , the resistance value of the fourth resistor R4 and the resistance value of the fifth resistor R5 may be equal.

[0111] It can be known from the principle of the adding circuit 400 that:

[0112] U1=2*UA (1)

[0113] Among them, U1 is the first comparison voltage, and UA is the first acquisition voltage.

[0114] U2=UA'+UR (2)

[0115] Among them, U2 is the second comparison voltage, UA' is the second acquisition voltage, and UR is the reference voltage.

[0116] In actual use, the collected voltage may be different each time due to the collection accuracy of the composite electrode 211, environmental factors, etc., so a preset range can be set in the control circuit 100. Since 2*U2-U1-2*UR=UA'-UA, when the value of UA'-UA is within the preset range, the potential information collected by the composite electrode 211 is correct, and the control circuit 100 obtains the value of UA based on U1 and outputs the detection result, and the control circuit 100 can detect the collection accuracy of the composite electrode 211 based on the value of UA'-UA; if the value of UA'-UA exceeds the preset range, the potential information collected by the composite electrode 211 is abnormal, and the control circuit 100 discards this set of data and stops outputting the detection result.

[0117] The temperature acquisition circuit 600 includes a negative temperature coefficient thermistor RT, an eighth resistor R8 and a ninth resistor R9.

[0118] The first end of the eighth resistor R8 is connected to the first power supply VAA, the second end of the eighth resistor R8, the first end of the ninth resistor R9 and the first end of the negative temperature coefficient thermistor RT are connected, the second end of the ninth resistor R9 serves as the temperature sampling signal output end of the temperature acquisition circuit 600, and is connected to the control circuit 100 to output the temperature sampling signal; the second end of the negative temperature coefficient thermistor RT is connected to the power ground.

[0119] The first power source VAA may be a precision voltage regulator.

[0120] Depend on Figure 7 It can be seen that UT=VAA*RT / (R8+RT) (3)

[0121] UT is the temperature sampling signal.

[0122] RT=Rb*EXP(b*(1 / T1-1 / T2)) (4)

[0123] b is 3950k, RT is the resistance of the thermistor at temperature t, t is the current ambient temperature, Rb is the nominal resistance of the thermistor at room temperature (25°C), generally 10kΩ, Kelvin temperature T=273.15+t, T1 is the Kelvin temperature corresponding to the current ambient temperature, and T2 is the Kelvin temperature corresponding to room temperature.

[0124] From (3) and (4), we can get the relationship between thermistor RT and the current ambient temperature t, so the control circuit 100 can determine the current ambient temperature from the temperature sampling signal.

[0125] The Nernst equation is:

[0126] E=E0+[(ln10)RT / nF]*lgc (5)

[0127] Where, E is the working electrode potential; E0 is the reference electrode potential; R is the gas constant: 8.314 J / K·mol; T is the absolute temperature in K; n is the number of moles of ion transfer charge at E0; F is the Faraday constant: 96487 C / mol; and c is the ion concentration.

[0128] The relationship between pH value and hydrogen ion concentration is:

[0129] pH = -logC(H+) (6)

[0130] From formula (5) and (6), we can get:

[0131] E1=E1-[(ln10)RT / nF]*pH (7),

[0132] At a constant temperature, pHi (pH value) and Ei (potential difference) basically satisfy the linear relationship y=kx+b, but with the increase of temperature, the k value gradually decreases and the b value gradually increases. In the range of 0℃ to 50℃, the linear regression analysis of pHi and Ei can be obtained from multiple sets of laboratory test data.

[0133] x1=(Y1-0.88325t-b1+22.126) / (-0.113t+k1+2.2754)(8)

[0134] Where Y1 is the pH sampling voltage, x1 is the pH value, k1 and b1 are coefficients measured at 25°C, where k1 = -58.374, b1 = 427.41. Substituting into formula (8) yields:

[0135] x1=(Y1-0.88325t-405.284) / (-0.113t-56.0986)(9)

[0136] Formula (9) is the formula for the control circuit 100 to compensate the pH value according to the temperature.

[0137] According to the above derivation process of temperature compensation for pH, the temperature compensation formula for potassium ions can be obtained:

[0138] x2=(Y2+0.92865t-b2-24.365) / (0.296t+k2-12.225) (10)

[0139] Where Y2 is the potassium ion sampling voltage, x2 is the potassium ion concentration, k2 and b2 are coefficients measured at 25°C, k2, b2 are coefficients at 25°C, where k2 = 53.3233, b2 = -10.2079, substituting into formula (10) yields:

[0140] x2=(Y2+0.92865t-14.1571) / (0.296t+41.0983)(11)

[0141] Formula (11) is the formula for the control circuit 100 to compensate potassium ions according to temperature.

[0142] According to the above derivation process of temperature compensation for pH, the temperature compensation formula for ammonia nitrogen can be obtained:

[0143] x3=(y3+1.13614t-b3-27.312) / (0.312t+k3-7.014) (12)

[0144] In the formula, y3 is the ammonia nitrogen collection voltage, x3 is the ammonia ion concentration value, k3 and b3 are coefficients at 25°C, where k3 = 54.8495 and b3 = 315.60. Substituting into formula (12) yields:

[0145] x3=(y3+1.13614t-342.912) / (0.312t+47.8355) (13)

[0146] Formula (13) is the formula for the control circuit 100 to compensate for ammonia nitrogen according to temperature.

[0147] Ammonia nitrogen in water mainly exists in the form of free ammonia (NH3) and ammonium ions (NH4+), so the concentration of ammonia nitrogen is the sum of the concentrations of ammonium ions and free ammonia. There is a chemical equilibrium relationship between free ammonia and ammonium ions in water:

[0148] NH3+H2O==NH4++OH-(reversible)(14)

[0149] Base dissociation equilibrium constant:

[0150] Kb=C(NH4+)*C(OH-) / C(NH3)(15)

[0151] Among them, C(NH4+) is the ammonium ion concentration; C(OH-) is the hydroxide ion concentration; and C(NH3) is the free ammonia concentration.

[0152] Let F = C(NH4+) / C(NH3) (16)

[0153] Then Kb=F*C(OH-) (17)

[0154] Conjugate acid-base pairs:

[0155] Kw=Ka*Kb (18)

[0156] Where Ka is the acid dissociation equilibrium constant.

[0157] Then Kw=Ka*Kb=C(H+)*C(OH-) (19)

[0158] Substituting pH = -logC(H+) yields:

[0159] F=Kb / C(OH)=Kb / (Kw*10 pH )=1 / (Ka*10 pH ) (20)

[0160] The acidity coefficient is:

[0161] PKa=-log 10 Ka (21)

[0162] From formula (20) (21), we can get:

[0163] F=10 PKa-pH (twenty two)

[0164] The value of the acidity coefficient PKa can be found in the table in the analytical chemistry book. When the temperature is 0-50℃, the corresponding PKa value can be expressed as:

[0165] PKa=0.09018+2729.92 / T (23)

[0166] By applying equations (22) and (23), we can obtain the compensation relationship between temperature and pH on the concentration ratio of ammonium ions and free ammonia:

[0167] F=100 0.09018+2729.92 / T-pH (twenty four)

[0168] like Figure 8 As shown, a selective ion permeable membrane can be set on the surface of the ammonia nitrogen composite electrode. Since both ammonium ions and potassium ions are monovalent cations, they can pass through the ion permeable membrane, thus affecting the ammonia nitrogen collection voltage. Therefore, the quadratic fitting curve of potassium ion to ammonium ion concentration is obtained through laboratory data to achieve potassium ion to ammonium ion concentration compensation.

[0169] The following is a combination of working principles Figure 7 As shown for further explanation:

[0170] The pH composite electrode detects the pH value of the liquid to be tested to output a pH sampling voltage, the first first resistor R1 is connected to the pH sampling voltage, the first first operational amplifier M1 modulates the pH sampling voltage, and outputs the pH sampling voltage from the output end of the first first operational amplifier M1 to the first multiplexer input end Y0 of the multiplexer N2; the potassium ion composite electrode detects the potassium ion concentration of the liquid to be tested to output a potassium ion sampling voltage, the second first operational amplifier M1 modulates the potassium ion sampling voltage, and outputs the potassium ion sampling voltage from the output end of the first first operational amplifier M1 to the second multiplexer input end Y1 of the multiplexer N2; the ammonia nitrogen composite electrode is configured to detect the ammonia nitrogen concentration of the liquid to be tested to output an ammonia nitrogen sampling voltage, the first A first operational amplifier M1 modulates the ammonia nitrogen sampling voltage, and outputs the ammonia nitrogen sampling voltage from the output end of the third first operational amplifier M1 to the third multiplexer input end Y2 of the multiplexer N2; the fourth general input and output end P1.1 of the microprocessor N1 outputs the first sub-selection signal to the selection line A output end A of the multiplexer N2, the fifth general input and output end P1.2 of the microprocessor N1 outputs the second sub-selection signal to the selection line B output end B of the multiplexer N2, the sixth general input and output end P1.3 of the microprocessor N1 outputs the third sub-selection signal to the selection line C output end C of the multiplexer N2, and the multiplexer N2 outputs the pH sampling voltage, the potassium ion sampling voltage and the ammonia nitrogen sampling voltage as the sampling voltages in turn according to the three sub-selection signals.

[0171] Take the pH collection voltage as an example for explanation. The first end of the second resistor R2 is connected to the collection voltage, and the second operational amplifier M2 amplifies the collection voltage in proportion, and then outputs the first comparison voltage from the output end of the second operational amplifier M2 to the first general input and output terminal P1.4 of the microprocessor N1; then, the third general input and output terminal P1.0 of the microprocessor N1 outputs a switch signal of a preset duration to the base of the transistor Q1, the transistor Q1 is turned on, the field effect transistor Q2 is turned on, the source of the field effect transistor Q2 is connected to the reference voltage, and the reference voltage is output from the drain of the field effect transistor Q2 to the first end of the third resistor R3, the second operational amplifier M2 performs an addition operation on the reference voltage and the collection voltage, and outputs the reference voltage from the second operational amplifier M2 The output terminal outputs a second comparison voltage to the first general input and output terminal P1.4 of the microprocessor N1; the negative temperature coefficient resistor RT detects the temperature of the liquid to be tested, and outputs a temperature sampling signal to the second general input and output terminal P1.5 of the microprocessor N1 through the second end of the ninth resistor R9; the microprocessor N1 performs a subtraction operation on the first comparison voltage and the second comparison voltage, and when the difference between the first comparison voltage and the second comparison voltage is within a preset range, the pH value is compensated according to the first comparison voltage and the temperature sampling signal and then the detection result is output to the host computer 500; when the difference between the first comparison voltage and the second comparison voltage exceeds the preset range, the output of the detection result to the host computer 500 is stopped.

[0172] The circuit principle when the collection voltage is a potassium ion sampling voltage or an ammonia nitrogen sampling voltage is the same as the circuit principle when the collection voltage is a pH collection voltage, and will not be repeated here.

[0173] An embodiment of the present application further provides an electronic device, which includes the above-mentioned detection circuit.

[0174] In a specific implementation, the electronic device may include an ammonia nitrogen sensor.

[0175] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0176] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A detection circuit, characterized in that: include: A control circuit configured to output a switch signal of a preset duration; A collection circuit is configured to detect the liquid to be tested to output a collection voltage; A switch circuit, connected to the control circuit, configured to transmit a reference voltage for a preset time period in response to the switch signal of a preset time period; an adding circuit connected to the switch circuit and the acquisition circuit, configured to proportionally amplify the acquisition voltage to output a first comparison voltage, and perform an addition operation on the acquisition voltage and the reference voltage to output a second comparison voltage; The control circuit is also configured to output a detection result according to the first comparison voltage in response to the difference between the first comparison voltage and the second comparison voltage being within a preset range, and to stop outputting the detection result in response to the difference between the first comparison voltage and the second comparison voltage exceeding the preset range.

2. The detection circuit according to claim 1, characterized in that: The detection circuit is connected to the host computer; The control circuit is also configured to output the detection result to the host computer according to the first comparison voltage in response to the difference between the first comparison voltage and the second comparison voltage being within the preset range, and to stop outputting the detection result to the host computer in response to the difference between the first comparison voltage and the second comparison voltage exceeding the preset range.

3. The detection circuit according to claim 1, characterized in that: The control circuit is also connected to the acquisition circuit and configured to output a selection signal; The acquisition circuit includes a plurality of sub-acquisition units and a selection unit; The sub-collection unit is configured to detect the chemical parameters of the liquid to be tested to output a sub-collection voltage; The selection unit is connected to the control circuit, the adding circuit and the plurality of sub-collection units, and is configured to select and output one of the plurality of sub-collection voltages as the collection voltage according to the selection signal.

4. The detection circuit according to claim 3, characterized in that: The sub-collection unit comprises: A composite electrode configured to sample the chemical parameters of the liquid to be tested to output a sub-sampling voltage; The signal conditioning circuit is connected to the composite electrode and the selection unit, and is configured to modulate the sub-sampling voltage to output the sub-collection voltage.

5. The detection circuit according to claim 4, characterized in that: The composite electrode includes at least one of a pH composite electrode, a potassium ion composite electrode and an ammonia nitrogen composite electrode; the sub-sampling voltage includes at least one of a pH sampling voltage, a potassium ion sampling voltage and an ammonia nitrogen sampling voltage; the sub-collection voltage includes at least one of a pH collection voltage, a potassium ion collection voltage and an ammonia nitrogen collection voltage; Wherein, the pH composite electrode is configured to detect the pH value of the liquid to be tested to output the pH sampling voltage; The potassium ion composite electrode is configured to detect the potassium ion concentration of the liquid to be tested to output the potassium ion sampling voltage; The ammonia nitrogen composite electrode is configured to detect the ammonia nitrogen concentration of the liquid to be tested to output the ammonia nitrogen sampling voltage; The signal conditioning circuit is connected to at least one of the pH composite electrode, the potassium ion composite electrode and the ammonia nitrogen composite electrode, and is connected to the selection unit; The signal conditioning circuit is configured to modulate the pH sampling voltage to output the pH sampling voltage; or The signal conditioning circuit is configured to modulate the potassium ion sampling voltage to output the potassium ion sampling voltage; or The signal conditioning circuit is configured to modulate the ammonia nitrogen sampling voltage to output the ammonia nitrogen sampling voltage.

6. The detection circuit according to claim 4, characterized in that: The signal conditioning circuit includes a first operational amplifier and a first resistor; The first end of the first resistor serves as a sub-sampling voltage input terminal of the signal conditioning circuit and is connected to the composite electrode to input the sub-sampling voltage; the second end of the first resistor is connected to the non-inverting input terminal of the first operational amplifier, and the inverting input terminal of the first operational amplifier and the output terminal of the first operational amplifier serve together as an output terminal of the sub-sampling voltage of the signal conditioning circuit and are connected to the selection unit to output the sub-sampling voltage.

7. The detection circuit according to claim 3, characterized in that: The selection unit includes a multiplexer; The selection signal includes a plurality of sub-selection signals; The output end of the selection line A of the multiplexer is used as the first sub-selection signal input end of the selection unit, connected to the control circuit, so as to input the first sub-selection signal; the output end of the selection line B of the multiplexer is used as the second sub-selection signal input end of the selection unit, connected to the control circuit, so as to input the second sub-selection signal; the output end of the selection line C of the multiplexer is used as the third sub-selection signal input end of the selection unit, connected to the control circuit, so as to input the third sub-selection signal; the first multiplexer input end of the multiplexer is used as the first sub-collection voltage input end of the selection unit, connected to the sub-collection unit, so as to input the first sub-collection voltage; the second multiplexer input end of the multiplexer is used as the second sub-collection voltage input end of the selection unit, connected to the sub-collection unit, so as to input the second sub-collection voltage; the third multiplexer input end of the multiplexer is used as the third sub-collection voltage input end of the selection unit, connected to the sub-collection unit, so as to input the third sub-collection voltage; The multiplexer output terminal of the multiplexer serves as the collection voltage output terminal of the selection unit and is connected to the adding circuit to output the collection voltage.

8. The detection circuit according to any one of claims 1 to 7, characterized in that: The detection circuit also includes: A temperature acquisition circuit, connected to the control circuit, configured to detect the temperature of the liquid to be measured to output a temperature sampling signal; The control circuit is specifically configured to respond to the difference between the first comparison voltage and the second comparison voltage being within a preset range, and output the detection result according to the first comparison voltage and the temperature sampling signal.

9. The detection circuit according to any one of claims 1 to 7, characterized in that: The control circuit comprises: an analog-to-digital conversion unit, connected to the adding circuit, configured to convert the first comparison voltage into a first digital signal, and convert the second comparison voltage into a second digital signal; wherein the first digital signal represents a first value, and the second digital signal represents a second value; A main control unit is connected to the analog-to-digital conversion unit and the switching circuit, and is configured to output a detection result according to the first digital signal in response to a difference between the first value and the second value being within a preset range, and to stop outputting the detection result in response to a difference between the first value and the second value exceeding the preset range.

10. An electronic device, characterized in that: The method comprises a detection circuit as claimed in any one of claims 1 to 9.