Liquid level detection device and method

By using sensing electrodes and processing modules of different sizes in the liquid level detection device, the liquid level height is calculated, and the problems of low accuracy and pollution in the existing liquid level detection device are solved, and high-precision and reliable liquid level detection are achieved.

CN119826928APending Publication Date: 2025-04-15JINAN BYD SEMICON TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411161604.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-22
Publication Date
2025-04-15

AI Technical Summary

Technical Problem

The existing liquid level detection device has low detection accuracy and has problems with polluted water quality, which is difficult to meet the needs of users.

Method used

Using a liquid level detection device including a sensing electrode module and a processing module, two sensing electrodes of different sizes are set to form an equivalent capacitor with the liquid in the container to be tested, the sensing value is obtained by using the processing module and the liquid level height is calculated through a mapping relationship.

Benefits of technology

It achieves higher liquid level detection accuracy, offsets errors in the sensing value, ensures the simplicity and reliability of the detection process, and avoids liquid contamination.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119826928A_ABST
    Figure CN119826928A_ABST
Patent Text Reader

Abstract

The invention discloses a liquid level detection device and method, relates to the technical field of liquid level detection, and aims to improve the accuracy of liquid level detection. The liquid level detection device comprises a sensing electrode module and a processing module. The sensing electrode module is arranged on the side wall of the to-be-detected container and comprises two sensing electrodes, the sizes of the two sensing electrodes in the first direction are different, and the first direction is parallel to the liquid level in the to-be-detected container. And each sensing electrode and the liquid in the container to be detected form equivalent capacitance. The processing module is connected with the sensing electrode module, and the processing module can obtain two sensing values related to the capacitance values of the two equivalent capacitors and obtain the liquid level height of the to-be-measured container according to the difference value between the two sensing values and the mapping relational expression. The mapping relational expression represents the relationship between the liquid level height of the to-be-measured container and the difference value between the two sensing values.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of liquid level detection, and in particular to a liquid level detection device and method. Background Art

[0002] With the widespread application of liquid level detection technology in smart homes, users have more stringent requirements for the reliability, safety and accuracy of liquid level detection devices. Existing common liquid level detection devices such as resistor-type liquid level detection devices and float-type liquid level detection devices have low detection accuracy and the problem of water pollution, which is difficult to meet user needs. Summary of the invention

[0003] The object of the present invention is to provide a liquid level detection device and method, aiming to improve the accuracy of liquid level detection.

[0004] In order to achieve the above object, the present invention adopts the following technical scheme:

[0005] In a first aspect, the present invention provides a liquid level detection device, comprising a sensing electrode module and a processing module. The sensing electrode module is arranged on the side wall of the container to be tested, and comprises two sensing electrodes, wherein the two sensing electrodes have different sizes along a first direction, and the first direction is a direction parallel to the liquid surface in the container to be tested. Each sensing electrode forms an equivalent capacitance with the liquid in the container to be tested. The processing module is connected to the sensing electrode module, and the processing module is configured to respectively obtain two sensing values ​​related to the capacitance values ​​of the two equivalent capacitors, and obtain the liquid level height of the container to be tested according to the difference between the two sensing values ​​and a mapping relationship. The mapping relationship characterizes the relationship between the liquid level height of the container to be tested and the difference between the two sensing values.

[0006] In the liquid level detection device provided in some embodiments of the present application, two sensing electrodes with different sizes in the first direction are arranged, and the sensing electrodes and the liquid in the container to be tested form an equivalent capacitor. Since the equivalent capacitance value is related to the facing area of ​​the two plates of the capacitor, the facing area of ​​the two plates of the capacitor refers to the facing area of ​​the sensing electrode and the liquid in the container to be tested, and the facing area is related to the liquid level height, the equivalent capacitance formed by the two sensing electrodes and the liquid in the container to be tested is also different. Two sensing values ​​related to the capacitance values ​​of the two equivalent capacitors are obtained by the processing module, and the two sensing values ​​are subtracted, and the liquid level height of the container to be tested is obtained by substituting them into the mapping relationship. Since the liquid level height of the container to be tested has a corresponding relationship with the difference between the two sensing values, real-time liquid level detection can be achieved by the above method, and the detection process is simple and reliable. Moreover, since the two sensing values ​​are subtracted, the error introduced by the two sensing values ​​can be offset, so that the obtained liquid level height of the container to be tested is more accurate, and the accuracy is improved. In addition, since the sensing electrode module and the processing module are both located outside the container to be tested, they will not come into contact with the liquid inside the container to be tested, thereby ensuring that the liquid inside the container to be tested will not be contaminated due to detection.

[0007] In some embodiments, the equivalent capacitor includes a first equivalent capacitor and a second equivalent capacitor, and the processing module includes a detection circuit and a processor. The detection circuit is connected to the sensing electrode module. The detection circuit is configured to charge and discharge the first equivalent capacitor to obtain a first count value, and the first count value is related to the capacitance of the first equivalent capacitor. The second equivalent capacitor is charged and discharged to obtain a second count value, and the second count value is related to the capacitance of the second equivalent capacitor. The processor is connected to the detection circuit, and a mapping relationship is pre-stored in the processor. The processor is configured to: obtain the first count value and the second count value, obtain the first sensing value according to the first count value, obtain the second sensing value according to the second count value, and obtain the liquid level height of the container to be measured according to the difference between the first sensing value and the second sensing value and the mapping relationship.

[0008] In some embodiments, the sensing electrode module includes: a first sensing electrode and a second sensing electrode. The detection circuit includes a first switch circuit, a second switch circuit, a current source circuit, a charge and discharge circuit, a comparison circuit and a counting circuit. The first end of the first switch circuit is connected to the first sensing electrode, the second end of the first switch circuit is connected to the second sensing electrode, and the third end of the first switch circuit is connected to the first end of the second switch circuit. The first switch circuit is configured to connect the first sensing electrode to the second switch circuit in a first period, and to connect the second sensing electrode to the second switch circuit in a second period. The second end of the second switch circuit is connected to the first end of the charge and discharge circuit, and the third end of the second switch circuit is connected to the first ground voltage terminal. The second switch circuit is configured to connect the first sensing electrode to the charge and discharge circuit and the first ground voltage terminal alternately, and to connect the second sensing electrode to the charge and discharge circuit and the first ground voltage terminal alternately. The first end of the current source circuit is connected to the first voltage terminal, and the second end of the current source circuit is connected to the first end of the charge and discharge circuit. The current source circuit is configured to charge the charge and discharge circuit. The first end of the charge and discharge circuit is also connected to the first input end of the comparison circuit, the second end of the charge and discharge circuit is connected to the second ground voltage end, and the third end of the charge and discharge circuit is connected to the third ground voltage end. The charge and discharge circuit is configured to charge the first sensing electrode or the second sensing electrode. The second input end of the comparison circuit is connected to the reference voltage end, the output end of the comparison circuit is connected to the control end of the charge and discharge circuit, and is also connected to the first end of the counting circuit. The comparison circuit is configured to output a first signal from the output end when the voltage at the first input end is greater than the voltage at the second input end. The charge and discharge circuit is configured to discharge through the third ground voltage end when the first signal is received. The second end of the counting circuit is connected to the processor. The counting circuit is configured to receive the first signal and obtain a first count value and a second count value according to the number of the first signal.

[0009] In some embodiments, the first switch circuit includes a first switch and a second switch, one end of the first switch is connected to the first end of the first switch circuit, the other end of the first switch is connected to the third end of the first switch circuit, one end of the second switch is connected to the second end of the first switch circuit, and the other end of the second switch is connected to the third end of the first switch circuit. The second switch circuit includes a third switch and a fourth switch, one end of the third switch is connected to the first end of the second switch circuit, and the other end of the third switch is connected to the second end of the second switch circuit. One end of the fourth switch is connected to the first end of the second switch circuit, and the other end of the fourth switch is connected to the third end of the second switch circuit. The current source circuit includes a current source, one end of the current source is connected to the first end of the current source circuit, and the other end of the current source is connected to the second end of the current source circuit. The charge and discharge circuit includes a first capacitor, a first resistor and a fifth switch. The first electrode of the first capacitor is connected to the first end of the charge and discharge circuit, the second electrode of the first capacitor is connected to the second end of the charge and discharge circuit, the first end of the first resistor is connected to the first end of the charge and discharge circuit, the second end of the first resistor is connected to the first end of the fifth switch, the second end of the fifth switch is connected to the third end of the charge and discharge circuit, and the control end of the fifth switch is connected to the control end of the charge and discharge circuit. The comparison circuit includes a comparator, a first end of the comparator is connected to a first input end of the comparison circuit, a second end of the comparator is connected to a second input end of the comparison circuit, and a third end of the comparator is connected to an output end of the comparison circuit. The counting circuit includes a counter, a first end of the counter is connected to a first end of the counting circuit, and a second end of the counter is connected to a second end of the counting circuit.

[0010] In some embodiments, the third switch and the fourth switch are configured to be alternately closed at a preset frequency. The fifth switch is configured to be closed under the control of the first signal output by the comparator. The current source is configured to output a first current in a first time period and a second current in a second time period. In the mapping relationship, the liquid level height of the container to be measured is also related to the preset frequency of the alternate closure of the first switch and the second switch, the difference between the first current and the second current, and the size difference of the first sensing electrode and the second sensing electrode in the first direction.

[0011] In some embodiments, the mapping relationship is:

[0012]

[0013] Wherein, h is the liquid level height of the container to be tested, ΔI is the difference between the first current and the second current, Rb is the resistance of the first resistor, VREF is the voltage output by the reference voltage terminal, ΔDmod is the difference between the first sensing value and the second sensing value, d is the thickness of the container to be tested, D1 is the size of the first sensing electrode along the first direction, and D2 is the size of the second sensing electrode along the first direction. fs is the preset frequency of the alternating closure of the third switch and the fourth switch. k is the electrostatic force constant. ε is the dielectric constant.

[0014] In some embodiments, the detection circuit is further configured to: obtain multiple first count values ​​at n consecutive moments in the first time period, and obtain multiple second count values ​​at n consecutive moments in the second time period. The processor is configured to: obtain multiple first count values ​​and multiple second count values, obtain the first sensing value corresponding to the first time period according to the average value of the multiple first count values, obtain the second sensing value corresponding to the first time period according to the average value of the multiple second count values, and obtain the liquid level height of the container to be tested according to the difference between the first sensing value and the second sensing value and the mapping relationship.

[0015] In some embodiments, the sensing value includes a sensing value before correction and a sensing value after correction. Before obtaining the liquid level height of the container to be tested according to the difference between the two sensing values ​​and a mapping relationship, the processor is further configured to: correct the sensing value before correction according to a correction formula to obtain a corrected sensing value.

[0016] In some embodiments, the correction formula is:

[0017] DMOD=γ1*Dmod (t-1) +γ2*Dmod (t)

[0018] Wherein, Dmod(t-1) and Dmod(t) are the sensing values ​​before correction in adjacent time periods, DMOD is the sensing value after correction, γ1 and γ2 are discount factors, and γ1+γ2=1.

[0019] In some embodiments, the processor is configured to: perform multiple rounds of liquid level detection to obtain multiple liquid level heights, wherein the processor can obtain a liquid level height for each round of liquid level detection. The processor also includes an accumulator, and the processor is further configured to: make a difference between the liquid level heights obtained by adjacent rounds of liquid level detection, and when the difference is less than or equal to a first threshold, control the count value of the accumulator to increase by a preset step, and when the difference is greater than the first threshold, control the count value of the accumulator to be cleared, and when the count value of the accumulator is greater than or equal to a second threshold, output the liquid level height of the current round, and control the count value of the accumulator to be cleared.

[0020] In a second aspect, the present application provides a liquid level detection method, which is applied to the liquid level detection device mentioned in the first aspect and its possible embodiments. The liquid level detection method includes obtaining a first count value and a second count value, and obtaining a first sensing value according to the first count value, and obtaining a second sensing value according to the second count value, wherein the first count value is related to the capacitance of the first equivalent capacitor, and the second count value is related to the capacitance of the second equivalent capacitor. The liquid level height of the container to be tested is obtained according to the difference between the first sensing value and the second sensing value and the mapping relationship.

[0021] In some embodiments, obtaining a first sensing value according to a first count value and obtaining a second sensing value according to a second count value includes obtaining a plurality of first count values ​​at n consecutive moments in a first time period, and obtaining a plurality of second count values ​​at n consecutive moments in a second time period. The first sensing value corresponding to the first time period is obtained according to an average value of the plurality of first count values, and the second sensing value corresponding to the first time period is obtained according to an average value of the plurality of second count values.

[0022] In some embodiments, before obtaining the liquid level height of the container to be tested according to the difference between the two sensed values ​​and the mapping relationship, the detection method further includes: correcting the sensed value before correction according to a correction formula to obtain a corrected sensed value.

[0023] In some embodiments, after obtaining the liquid level height of the container to be tested according to the difference between the first sensing value and the second sensing value and the mapping relationship, the liquid level detection method further includes: performing multiple rounds of liquid level detection to obtain multiple liquid level heights. Outputting the liquid level height of the current round when a preset condition is met, the preset condition is: subtracting the liquid level heights obtained by the adjacent rounds of liquid level detection, and when the difference is less than or equal to the first threshold, controlling the count value of the accumulator to increase by a preset step, and when the difference is greater than the first threshold, controlling the count value of the accumulator to be cleared, and when the count value of the accumulator is greater than or equal to the second threshold, outputting the liquid level height of the current round.

[0024] Among them, the beneficial effects of the second aspect and its possible embodiments can refer to the first aspect and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the technical solutions of 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.

[0026] Figure 1 A schematic diagram of a liquid level detection device provided in an embodiment of the present application;

[0027] Figure 2 A schematic diagram of another liquid level detection device provided in an embodiment of the present application;

[0028] Figure 3 A schematic diagram of the composition of a liquid level detection device provided in an embodiment of the present application;

[0029] Figure 4 A schematic diagram of another liquid level detection device provided in an embodiment of the present application;

[0030] Figure 5 A schematic diagram of the composition of a processor provided in an embodiment of the present application;

[0031] Figure 6 A schematic diagram of a liquid level detection method provided in an embodiment of the present application;

[0032] Figure 7 A schematic diagram of another liquid level detection method provided in an embodiment of the present application;

[0033] Figure 8 A schematic diagram of another liquid level detection method provided in an embodiment of the present application.

[0034] Figure numerals: 1, sensing electrode module; 2, processing module; 10, container to be tested; 11, first sensing electrode; 12, second sensing electrode; 20, liquid; 21, detection circuit; 22, processor; 211, first switch circuit; 212, second switch circuit; 213, current source circuit; 214, charge and discharge circuit; 215, comparison circuit; 216, counting circuit; 2111, first switch; 2112, second switch; 2121, third switch; 2122, fourth switch; 2131, current source; 2141, first capacitor; 2142, first resistor; 2143, fifth switch; 2151, comparator; 2161, counter; 221, accumulator. DETAILED DESCRIPTION

[0035] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0036] In the description of the invention, it should be understood that the terms "upper", "lower", "left", "right", "front", "back", "inside", "outside" and the like indicate directions or positional relationships based on the directions or relative positional relationships shown in the drawings, and are only for the convenience of describing the invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore cannot be understood as a limitation on the invention. Unless otherwise specified, the above-mentioned directional description can be flexibly set in the process of actual application under the condition that the relative positional relationship shown in the drawings is satisfied.

[0037] 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 the present invention, unless otherwise specified, "plurality" means two or more.

[0038] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection. It can be directly connected, or indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0039] In the embodiments of the present invention, the terms "comprises", "comprising" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, article or device including the element.

[0040] In the embodiments of the present invention, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present invention should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0041] With the widespread application of liquid level detection technology in smart homes, users have more stringent requirements for the reliability, safety and accuracy of liquid level detection devices. Existing liquid level detection devices are difficult to meet the increasing needs of users. For example, a float-type liquid level detection device requires the float to be placed in the liquid of the container to be tested, which will cause water pollution. Ultrasonic liquid level detection devices are expensive and have high maintenance costs. Capacitive liquid level detection devices rely on multiple electrodes to calculate the liquid level through small changes. When the liquid is shaking, it is easy to make misjudgments and the accuracy is not high.

[0042] In order to improve the accuracy of liquid level detection and reduce costs, the present application provides a liquid level detection device, for example, Figure 1 As shown. The liquid level detection device includes a sensing electrode module 1 and a processing module 2. The sensing electrode module 1 is arranged on the side wall of the container to be tested 10, and includes two sensing electrodes: a first sensing electrode 11 and a second sensing electrode 12. The two sensing electrodes have different sizes along the first direction (X direction). For example, the size L1 of the first sensing electrode 11 along the first direction (X direction) is smaller than the size L2 of the second sensing electrode 12 along the first direction (X direction). The first direction (X direction) is a direction parallel to the liquid surface in the container to be tested 10.

[0043] Each sensing electrode forms an equivalent capacitor with the liquid 20 in the container 10 to be tested. The processing module 2 is connected to the sensing electrode module 1, and the processing module 2 is configured to respectively obtain two sensing values ​​related to the capacitance of the two equivalent capacitors, and obtain the liquid level height of the container 10 to be tested according to the difference between the two sensing values ​​and the mapping relationship. The mapping relationship represents the relationship between the liquid level height of the container 10 to be tested and the difference between the two sensing values.

[0044] exist Figure 1In the liquid level detection device shown, two sensing electrodes of different sizes are arranged in the first direction (X direction), and the sensing electrodes and the liquid in the container 10 to be tested form an equivalent capacitor. Since the equivalent capacitance value is related to the facing area of ​​the two plates of the capacitor, the facing area of ​​the two plates of the capacitor refers to the facing area of ​​the sensing electrode and the liquid 20 in the container 10 to be tested, and the facing area is related to the liquid level height, the equivalent capacitance formed by the two sensing electrodes and the liquid 20 in the container 10 to be tested is also different. Two sensing values ​​related to the capacitance values ​​of the two equivalent capacitors are obtained by the processing module 2, and the two sensing values ​​are subtracted, and the liquid level height of the container 10 to be tested is obtained by substituting them into the mapping relationship. Since the liquid level height of the container 10 to be tested has a corresponding relationship with the difference between the two sensing values, the above method can realize real-time liquid level detection, and the detection process is simple and reliable. Moreover, since the two sensing values ​​are subtracted, the error introduced by the two sensing values ​​can be offset, so that the obtained liquid level height of the container 10 to be tested is more accurate, and the accuracy is improved. In addition, since the sensing electrode module 1 and the processing module 2 are both located outside the container 10 to be tested, they will not contact the liquid 20 inside the container 10 to be tested, ensuring that the liquid 20 inside the container 10 to be tested will not be contaminated due to detection.

[0045] In some embodiments, Figure 2 , the processing module 2 includes a detection circuit 21 and a processor 22. The equivalent capacitance includes a first equivalent capacitance and a second equivalent capacitance, wherein the equivalent capacitance formed by the first sensing electrode 11 and the liquid 20 in the container 10 to be tested is the first equivalent capacitance, and the equivalent capacitance formed by the second sensing electrode 12 and the liquid 20 in the container 10 to be tested is the second equivalent capacitance. The detection circuit 21 is connected to the sensing electrode module 1, and the processor 22 is connected to the detection circuit 21.

[0046] The detection circuit 21 is configured to charge and discharge the first equivalent capacitor to obtain a first count value, and the first count value is related to the capacitance of the first equivalent capacitor. Charge and discharge the second equivalent capacitor to obtain a second count value, and the second count value is related to the capacitance of the second equivalent capacitor. A mapping relationship is pre-stored in the processor 22, and the processor 22 is configured to: obtain the first count value and the second count value, obtain a first sensing value according to the first count value, obtain a second sensing value according to the second count value, and obtain the liquid level height of the container 10 to be tested according to the difference between the first sensing value and the second sensing value and the mapping relationship.

[0047] The capacitance of the capacitor is different, and the time required for full charge and discharge is also different. As a possible implementation method, the first equivalent capacitor is charged and discharged within a preset time, and a first count value is obtained according to the number of charge and discharge. The second equivalent capacitor is charged and discharged within a preset time, and a second count value is obtained according to the number of charge and discharge. Since the first sensing value is obtained by the first count value, and the second sensing value is obtained by the second count value, the first count value and the second count value are respectively related to the capacitance of the first equivalent capacitor and the second equivalent capacitor. The capacitance of the first equivalent capacitor and the second equivalent capacitor is related to the liquid level height of the container 10 to be tested, so the sensing value can reflect the liquid level height to a certain extent. The processor obtains the liquid level height of the container 10 to be tested according to the difference between the first sensing value and the second sensing value and the mapping relationship, and further optimizes the algorithm to make the result more accurate.

[0048] In some embodiments, Figure 3 As shown, the detection circuit 21 includes a first switch circuit 211, a second switch circuit 212, a current source circuit 213, a charge and discharge circuit 214, a comparison circuit 215 and a counting circuit 216. The first end 211-1 of the first switch circuit 211 is connected to the first sensing electrode 11, the second end 211-2 of the first switch circuit 211 is connected to the second sensing electrode 12, and the third end 211-3 of the first switch circuit 211 is connected to the first end 212-1 of the second switch circuit 212. The first switch circuit 211 is configured to connect the first sensing electrode 11 to the second switch circuit 212 in a first period, and connect the second sensing electrode 12 to the second switch circuit 212 in a second period.

[0049] The second end 212-2 of the second switch circuit 212 is connected to the first end 214-1 of the charge and discharge circuit 214, and the third end 212-3 of the second switch circuit 212 is connected to the first ground voltage terminal. The second switch circuit 212 is configured to connect the first sensing electrode 11′ to the charge and discharge circuit 214 and the first ground voltage terminal alternately, and to connect the second sensing electrode 12′ to the charge and discharge circuit 214 and the first ground voltage terminal alternately.

[0050] A first terminal 213 - 1 of the current source circuit 213 is connected to the first voltage terminal VCC, and a second terminal 213 - 2 of the current source circuit 213 is connected to a first terminal 214 - 1 of the charge and discharge circuit 214 . The current source circuit 213 is configured to charge the charge and discharge circuit 214 .

[0051] The first terminal 214-1 of the charge and discharge circuit 214 is also connected to the first input terminal 215-1 of the comparison circuit 215, the second terminal 214-2 of the charge and discharge circuit 214 is connected to the second ground voltage terminal, and the third terminal 214-3 of the charge and discharge circuit 214 is connected to the third ground voltage terminal. The charge and discharge circuit 214 is configured to charge the first sensing electrode 11 or the second sensing electrode 12.

[0052] The second input terminal 215-2 of the comparison circuit 215 is connected to the reference voltage terminal VSS, and the output terminal 215-3 of the comparison circuit 215 is connected to the control terminal 214-4 of the charge and discharge circuit 214, and is also connected to the first terminal 216-1 of the counting circuit 216. The comparison circuit 215 is configured to output a first signal from the output terminal 215-3 when the voltage at the first input terminal 215-1 is greater than the voltage at the second input terminal 215-2. The charge and discharge circuit 214 is configured to discharge through the third ground voltage terminal when receiving the first signal. The second terminal 216-2 of the counting circuit 216 is connected to the processor 22. The counting circuit 216 is configured to receive the first signal and obtain a first count value and a second count value according to the number of the first signal.

[0053] As a possible implementation manner, the first ground voltage terminal, the second ground voltage terminal and the third ground voltage terminal are the same ground voltage terminal.

[0054] Further, in some embodiments, Figure 4 As shown, the first switch circuit 211 includes a first switch 2111 and a second switch 2112, one end of the first switch 2111 is connected to the first end 211-1 of the first switch circuit 211, the other end of the first switch 2111 is connected to the third end 211-3 of the first switch circuit 211, one end of the second switch 2112 is connected to the second end 211-2 of the first switch circuit 211, and the other end of the second switch 2112 is connected to the third end 211-3 of the first switch circuit 211.

[0055] The second switch circuit 212 includes a third switch 2121 and a fourth switch 2122, wherein one end of the third switch 2121 is connected to the first end 212-1 of the second switch circuit 212, and the other end of the third switch 2121 is connected to the second end 212-2 of the second switch circuit 212. One end of the fourth switch 2122 is connected to the first end 212-1 of the second switch circuit 212, and the other end of the fourth switch 2122 is connected to the third end 212-3 of the second switch circuit 212.

[0056] The current source circuit 213 includes a current source 2131 , one end of the current source 2131 is connected to a first end 213 - 1 of the current source circuit 213 , and the other end of the current source 2131 is connected to a second end 213 - 2 of the current source circuit 213 .

[0057] The charge and discharge circuit 214 includes a first capacitor 2141, a first resistor 2142, and a fifth switch 2143. A first electrode of the first capacitor 2141 is connected to a first end 214-1 of the charge and discharge circuit 214, a second electrode of the first capacitor 2141 is connected to a second end 214-2 of the charge and discharge circuit 214, a first end of the first resistor 2142 is connected to a first end 214-1 of the charge and discharge circuit 214, a second end of the first resistor 2142 is connected to a first end of the fifth switch 2143, a second end of the fifth switch 2143 is connected to a third end 214-3 of the charge and discharge circuit 214, and a control end of the fifth switch 2143 is connected to a control end 214-4 of the charge and discharge circuit 214.

[0058] The comparison circuit 215 includes a comparator 2151 , a first terminal of the comparator 2151 is connected to a first input terminal 215 - 1 of the comparison circuit 215 , a second terminal of the comparator 2151 is connected to a second input terminal 215 - 2 of the comparison circuit 215 , and a third terminal of the comparator 2151 is connected to an output terminal 215 - 3 of the comparison circuit 215 .

[0059] The counting circuit 216 includes a counter 2161 , a first terminal of the counter 2161 is connected to a first terminal 216 - 1 of the counting circuit 216 , and a second terminal of the counter 2161 is connected to a second terminal 216 - 2 of the counting circuit 216 .

[0060] The first switch circuit 211 is configured to connect the first sensing electrode 11 to the second switch circuit 212 in the first time period, and to connect the second sensing electrode 12 to the second switch circuit 212 in the second time period, that is, in the first time period, the first switch 2111 in the first switch circuit 211 is closed and the second switch 2112 is opened, and in the second time period, the first switch 2111 in the first switch circuit 211 is opened and the second switch 2112 is closed. In the first time period, the first equivalent capacitance formed by the first sensing electrode 11 and the liquid 20 in the container 10 to be tested is connected to the second switch circuit 212, and in the second time period, the second equivalent capacitance formed by the second sensing electrode 12 and the liquid 20 in the container 10 to be tested is connected to the second switch circuit 212.

[0061] It should be understood that in actual applications, the time occupied by the first time period and the second time period is extremely small. Therefore, whether the liquid level of the container to be tested does not change for a long time or the liquid level of the container to be tested changes in real time, the liquid level detection device provided in the present application can accurately perform measurements.

[0062] In some embodiments, the third switch 2121 and the fourth switch 2122 are configured to be alternately closed at a preset frequency. The current source 2131 is configured to output a first current in a first period and a second current in a second period. The fifth switch 2143 is configured to be closed under the control of a first signal output by the comparator 2151.

[0063] During the detection process of the liquid level detection device, there is always an equivalent capacitor formed by a sensing electrode and the liquid 20 in the container 10 to be detected connected to the second switch circuit 212, and the equivalent capacitor is the first equivalent capacitor as an example for explanation. The first voltage terminal VCC continuously charges the first capacitor 2141. When the third switch 2121 is closed, the first voltage terminal VCC and the first capacitor 2141 charge the first equivalent capacitor. When the fourth switch 2122 is closed, the first equivalent capacitor discharges. Since the third switch 2121 and the fourth switch 2122 are alternately closed at a preset frequency, the first equivalent capacitor is sometimes charged and sometimes discharged in the first time period. The discharge voltage of the first capacitor 2141 received by the first end of the comparator 2151 is less than the reference voltage output by the reference voltage terminal VSS, which is not enough to achieve the flipping of the comparator 2151. However, by adjusting the frequency of the alternating closing of the third switch 2121 and the fourth switch 2122, the first equivalent capacitor can be fully charged. At this time, when the third switch 2121 is closed again, the voltage received by the first end of the comparator 2151 is greater than the reference voltage output by the reference voltage terminal VSS, the comparator 2151 flips, the third end of the comparator 2151 outputs the first signal, the fifth switch 2143 switches from the normally open state to the closed state, and the first capacitor 2141 is discharged through the branch where the first resistor 2142 and the fifth switch 2143 are located, until the voltage received by the first end of the comparator 2151 is less than the reference voltage output by the reference voltage terminal VSS, the comparator 2151 flips again, the comparator 2151 no longer outputs the first signal, the fifth switch 2143 is disconnected, and the first capacitor 2141 starts charging again. The counter 2161 obtains the first count value according to the number of the received first signals. Similarly, when the equivalent capacitor is the second equivalent capacitor, the counter 2161 obtains the second count value according to the number of the received first signals.

[0064] The processor can obtain the first sensing value and the second sensing value according to the first count value and the second count value, respectively, and then obtain the liquid level height of the container to be tested according to the mapping formula and the first sensing value and the second sensing value. In some embodiments, the liquid level height of the container to be tested is also related to the preset frequency of the alternating closure of the first switch and the second switch, the difference between the first current and the second current, and the size difference of the first sensing electrode and the second sensing electrode in the first direction.

[0065] Furthermore, as a possible implementation, the mapping relationship stored in the processor is:

[0066]

[0067] Wherein, h is the liquid level height of the container to be tested, ΔI is the difference between the first current and the second current, Rb is the resistance of the first resistor, VREF is the voltage output by the reference voltage terminal, ΔDmod is the difference between the first sensing value and the second sensing value, d is the thickness of the container to be tested, D1 is the size of the first sensing electrode along the first direction, and D2 is the size of the second sensing electrode along the first direction. fs is the preset frequency of the alternating closure of the third switch and the fourth switch. k is the electrostatic force constant. ε is the dielectric constant.

[0068] The detection circuit in the liquid level detection device provided by the present application uses the law of conservation of charge, that is, by using the charge transferred to the first capacitor to be equal to the charge discharged through the first resistor and the branch to detect the equivalent capacitance formed by the sensing electrode and the liquid in the container to be tested, and reflects the capacitance of the equivalent capacitance through the flipping of the comparator. The flipping of the comparator can be reflected by the counter recording the number of times of the first signal, that is, the first count value and the second count value. Finally, the first sensing value and the second sensing value obtained according to the first count value and the second count value are matched with the mapping formula to calculate the liquid level.

[0069] Since the first sensing electrode and the second sensing electrode are arranged on the side wall of the container to be tested, and the size and installation position of the first sensing electrode and the second sensing electrode can be adjusted according to the needs of the user, the feasibility and flexibility of assembly are greatly improved. The liquid level detection device provided by the present application can detect the liquid level inside the container to be tested through the container to be tested, ensuring that the liquid inside the container to be tested is not contaminated. And since the liquid level detection device is composed of conventional electronic components, such as a first capacitor and a first resistor, compared with the capacitive liquid level detection device in the prior art that requires multiple sensing electrodes, the number of sensing electrode modules required is less, the cost is low, and it is easy to achieve mass production.

[0070] In some embodiments, the detection circuit is further configured to: obtain multiple first count values ​​at n consecutive moments in the first time period, and obtain multiple second count values ​​at n consecutive moments in the second time period. The processor is configured to: obtain multiple first count values ​​and multiple second count values, obtain the first sensing value corresponding to the first time period according to the average value of the multiple first count values, obtain the second sensing value corresponding to the first time period according to the average value of the multiple second count values, and obtain the liquid level height of the container to be tested according to the difference between the first sensing value and the second sensing value and the mapping relationship.

[0071] In the above embodiment, in the first time period, the counter can obtain a first count value, and in the second time period, the counter can obtain a second count value. In this case, the first count value is also the first sensing value, and the second count value is also the second sensing value. When the detection circuit can obtain multiple first count values ​​at n consecutive moments in the first time period, and can obtain multiple second count values ​​at n consecutive moments in the second time period, the first sensing value is the average value of the multiple first count values, and the second sensing value is the average value of the multiple second count values. Obtaining the sensing value by the average of multiple count values ​​can weaken the influence of chance, and what is detected is the overall liquid level trend of the first time period and the second time period, thereby improving the accuracy of detection.

[0072] In some embodiments, the sensing value includes a sensing value before correction and a sensing value after correction. Before obtaining the liquid level height of the container to be tested according to the difference between the two sensing values ​​and a mapping relationship, the processor is further configured to: correct the sensing value before correction according to a correction formula to obtain a corrected sensing value.

[0073] Specifically, the correction formula is:

[0074] DMOD=γ1*Dmod (t-1) +γ2*Dmod (t)

[0075] Wherein, Dmod(t-1) and Dmod(t) are the sensing values ​​before correction in adjacent time periods, DMOD is the sensing value after correction, γ1 and γ2 are discount factors, and γ1+γ2=1.

[0076] The sensing value that has not been processed by the processor according to the correction formula is the sensing value before correction, and the sensing value that has been processed by the processor according to the correction formula is the sensing value after correction. Since the time occupied by the first period and the second period is very short, when the liquid hangs on the wall of the container to be inspected, even if the method of averaging multiple count values ​​is used to obtain the sensing value, it is still possible that the liquid hanging on the wall fails to converge into the liquid surface in the first period and the second period, resulting in a deviation between the sensing value obtained and the sensing value corresponding to the theoretical liquid surface, thereby affecting the accuracy of the detection. However, after being processed by the processor according to the correction formula, the impact of this situation can be weakened. By weighting the sensing values ​​before correction at two adjacent moments, it means that the consideration of the sensing value is extended in time. The hanging liquid beads that could not converge into the liquid surface in one period may converge into the liquid surface under a longer time consideration. Therefore, the weighted processing of the sensing values ​​before correction at two adjacent moments to obtain the corrected sensing value is closer to the sensing value under ideal conditions, so the detection accuracy can be improved.

[0077] It should be understood that according to the above embodiment, "adjacent time periods" include at least two situations. The first situation is: in the first time period, the counter can obtain a first count value, and in the second time period, the counter can obtain a second count value. In this case, the first sensing value before correction is the first count value, and the second sensing value before correction is the second count value. When calculating the corrected first sensing value, Dmod(t-1) and Dmod(t) are the first count value in the first first time period and the first count value in the second first time period, respectively. When calculating the corrected second sensing value, Dmod(t-1) and Dmod(t) are the second count value in the first second time period and the second count value in the second second time period, respectively.

[0078] The second case is: when the detection circuit can obtain multiple first count values ​​for n consecutive moments in the first time period, and can obtain multiple second count values ​​for n consecutive moments in the second time period, in this case, the first sensing value before correction is the average value of multiple first count values, and the second sensing value before correction is the average value of multiple second count values. When calculating the corrected first sensing value, Dmod(t-1) and Dmod(t) are respectively the average value of multiple first count values ​​in the first first time period and the average value of multiple first count values ​​in the second first time period. When calculating the corrected second sensing value, Dmod(t-1) and Dmod(t) are respectively the average value of multiple second count values ​​in the first second time period and the average value of multiple second count values ​​in the second second time period.

[0079] In some embodiments, Figure 5 As shown, the processor 22 also includes an accumulator 221. The processor 22 is configured to: perform multiple rounds of liquid level detection to obtain multiple liquid level heights, wherein the processor 22 can obtain a liquid level height for each round of liquid level detection. The processor 22 is also configured to: make a difference between the liquid level heights obtained by adjacent rounds of liquid level detection, and when the difference is less than or equal to a first threshold, control the count value of the accumulator 221 to increase by a preset step, and when the difference is greater than the first threshold, control the count value of the accumulator 221 to be cleared, and when the count value of the accumulator 221 is greater than or equal to a second threshold, output the liquid level height of the current round, and control the count value of the accumulator to be cleared.

[0080] Each round of liquid level detection includes at least one first period and at least one second period, and each round of liquid level detection processor 22 can obtain a liquid level height. By subtracting the liquid level heights obtained by adjacent rounds of liquid level detection, it can be obtained whether the liquid level heights of two adjacent rounds are the same. The first threshold represents a reasonable error range. For example, the first threshold is 3mm, the liquid level height measured in the first round is 103mm, and the liquid level height measured in the second round is 101.5mm. Since the difference between 103mm and 101.5mm is less than 3mm, it means that the liquid level heights measured in the first round and the second round are almost the same. The second threshold is a pre-set value for judging whether the liquid level detection device is capable of stably detecting. The second threshold is 2, the liquid level height measured in the third round is 102 mm, and the preset step is 1 as an example for explanation: the difference between the liquid level height detected in the first round and the liquid level height detected in the second round is less than the first threshold, the count value of the accumulator 221 changes from 0 to 1, the difference between the liquid level height detected in the second round and the liquid level height detected in the third round is less than the first threshold, the count value of the accumulator 221 changes from 1 to 2, at this time the count value of the accumulator is equal to the second threshold, the count value of the accumulator 221 changes from 2 to 0, and the processor outputs the liquid level height of the current round as 102 mm.

[0081] When the liquid level of the container to be tested does not change dynamically, the processor will output the liquid level height only when the liquid level heights measured in multiple rounds are relatively close. Therefore, the use of the above-mentioned liquid level detection device can effectively avoid the liquid level detection device outputting incorrect liquid level heights due to factors such as shaking, thereby further improving the accuracy of measuring the static liquid level and whether there is water in the container to be tested.

[0082] The present application also provides a liquid level detection method, which is applied to the above liquid level detection device. Figure 6 As shown, the liquid level detection method includes:

[0083] S1: Acquire a first count value and a second count value, and obtain a first sensing value according to the first count value, and obtain a second sensing value according to the second count value.

[0084] The first count value is related to the capacitance of the first equivalent capacitor, and the second count value is related to the capacitance of the second equivalent capacitor.

[0085] In some embodiments, obtaining a first sensing value according to a first count value and obtaining a second sensing value according to a second count value include obtaining a plurality of first count values ​​at n consecutive moments in a first time period, and obtaining a plurality of second count values ​​at n consecutive moments in a second time period. The first sensing value corresponding to the first time period is obtained according to the average value of the plurality of first count values, and the second sensing value corresponding to the first time period is obtained according to the average value of the plurality of second count values. For example, in the first time period, the processor obtains 3 first count values, and in the second time period, the processor obtains 3 second count values, and the 3 first count values ​​and the 3 second count values ​​are respectively recorded as count1, count2, count3, count4, count5 and count6, then the first sensing value dmod1 = (count1 + count2 + count3) / 3, and the second sensing value dmod2 = (count4 + count5 + count6) / 3.

[0086] In other embodiments, the counter can obtain a first count value in the first time period, and can obtain a second count value in the second time period. In this case, the first count value is also the first sensing value, and the second count value is also the second sensing value.

[0087] S2: Obtaining the liquid level height of the container to be measured according to the difference between the first sensing value and the second sensing value and a mapping relationship.

[0088] Reference Figure 4 , assuming that the sizes of the first sensing electrode 11 and the second sensing electrode 12 in the first direction (X direction) are D1 and D2 respectively, and D1 is different from D2, and the height of the first sensing electrode 11 and the second sensing electrode 12 is H.

[0089] Then, according to the law of conservation of charge, that is, by using the fact that the charge transferred to the first capacitor 2141 is equal to the charge discharged through the first resistor 2142 and the branch, the equivalent capacitance formed by the sensing electrode and the liquid 20 in the container 10 to be tested is detected, and the first sensing value can be obtained:

[0090] Dmod1 = (I1-CX1*fs*VREF)*(Rb / VREF), where I1 is the current output by the current source in the first period; CX1 is the capacitance of the first equivalent capacitor, fs is the preset frequency of alternating closure of the third switch and the fourth switch; VREF is the reference voltage output by the reference voltage terminal.

[0091] Similarly, the second sensing value can be obtained: Dmod2 = (I2-CX2*fs*VREF)*(Rb / VREF), where I2 is the current output by the current source in the second period; CX2 is the capacitance of the second equivalent capacitor, fs is the preset frequency of alternating closure of the third switch and the fourth switch; VREF is the reference voltage output by the reference voltage terminal.

[0092] Subtract Dmod1 from Dmod2 to get ΔDmod.

[0093]

[0094] Where ΔCX is the difference between CX1 and CX2. Both CX1 and CX2 can be calculated by the capacitance calculation formula We get, where S = Dh, and we can solve for h by inversely solving

[0095]

[0096] k is the electrostatic force constant. ε is the dielectric constant.

[0097] In some embodiments, Figure 7 As shown, before obtaining the liquid level height of the container to be tested according to the difference between the two sensed values ​​and the mapping relationship, the detection method further includes:

[0098] S3: Correcting the sensing value before correction according to the correction formula to obtain the corrected sensing value.

[0099] Specifically, the correction formula is:

[0100] DMOD=γ1*Dmod (t-1) +γ2*Dmod (t)

[0101] Wherein, Dmod(t-1) and Dmod(t) are the sensing values ​​before correction in adjacent time periods, DMOD is the sensing value after correction, γ1 and γ2 are discount factors, and γ1+γ2=1.

[0102] In some embodiments, Figure 8 As shown, after obtaining the liquid level height of the container to be tested according to the difference between the first sensing value and the second sensing value and the mapping relationship, the liquid level detection method further includes:

[0103] S4: Perform multiple rounds of liquid level detection to obtain multiple liquid level heights.

[0104] S5: Output the liquid level height of the current round when the preset conditions are met.

[0105] The preset conditions are: subtract the liquid level heights obtained from adjacent rounds of liquid level detection, and when the difference is less than or equal to a first threshold, control the count value of the accumulator to increase by a preset step; when the difference is greater than the first threshold, control the count value of the accumulator to be cleared; when the count value of the accumulator is greater than or equal to a second threshold, output the liquid level height of the current round.

[0106] In the description of this specification, specific features, structures, materials or characteristics may be combined in an appropriate manner in any one or more embodiments or examples.

[0107] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A liquid level detection device, characterized in that: include: A sensing electrode module, arranged on the side wall of the container to be tested, comprising two sensing electrodes, wherein the two sensing electrodes have different sizes along a first direction, wherein the first direction is a direction parallel to the liquid surface in the container to be tested; wherein each of the sensing electrodes forms an equivalent capacitance with the liquid in the container to be tested; A processing module is connected to the sensing electrode module, and the processing module is configured to respectively obtain two sensing values ​​related to the capacitance of the two equivalent capacitors, and obtain the liquid level height of the container to be tested according to the difference between the two sensing values ​​and a mapping relationship; the mapping relationship represents the relationship between the liquid level height of the container to be tested and the difference between the two sensing values.

2. The liquid level detection device according to claim 1, characterized in that: The equivalent capacitor includes a first equivalent capacitor and a second equivalent capacitor, and the processing module includes: A detection circuit, the detection circuit is connected to the sensing electrode module; the detection circuit is configured to charge and discharge the first equivalent capacitor to obtain a first count value, the first count value is related to the capacitance of the first equivalent capacitor; charge and discharge the second equivalent capacitor to obtain a second count value, the second count value is related to the capacitance of the second equivalent capacitor; A processor is connected to the detection circuit, a mapping relationship is pre-stored in the processor, and the processor is configured to: obtain the first count value and the second count value, obtain a first sensing value according to the first count value, obtain a second sensing value according to the second count value, and obtain the liquid level height of the container to be tested according to the difference between the first sensing value and the second sensing value and the mapping relationship.

3. The liquid level detection device according to claim 2, characterized in that: The sensing electrode module includes: a first sensing electrode and a second sensing electrode; the detection circuit includes a first switch circuit, a second switch circuit, a current source circuit, a charge and discharge circuit, a comparison circuit and a counting circuit; A first end of the first switch circuit is connected to the first sensing electrode, a second end of the first switch circuit is connected to the second sensing electrode, and a third end of the first switch circuit is connected to the first end of the second switch circuit; the first switch circuit is configured to connect the first sensing electrode to the second switch circuit in a first time period, and connect the second sensing electrode to the second switch circuit in a second time period; The second end of the second switch circuit is connected to the first end of the charge and discharge circuit, and the third end of the second switch circuit is connected to the first ground voltage end; the second switch circuit is configured to make the first sensing electrode alternately connected to the charge and discharge circuit and the first ground voltage end, and to make the second sensing electrode alternately connected to the charge and discharge circuit and the first ground voltage end; The first end of the current source circuit is connected to the first voltage end, and the second end of the current source circuit is connected to the first end of the charge-discharge circuit; the current source circuit is configured to charge the charge-discharge circuit; The first end of the charge-discharge circuit is also connected to the first input end of the comparison circuit, the second end of the charge-discharge circuit is connected to the second ground voltage end, and the third end of the charge-discharge circuit is connected to the third ground voltage end; the charge-discharge circuit is configured to charge the first sensing electrode or the second sensing electrode; The second input terminal of the comparison circuit is connected to the reference voltage terminal, the output terminal of the comparison circuit is connected to the control terminal of the charge and discharge circuit, and is also connected to the first terminal of the counting circuit; the comparison circuit is configured to output a first signal from the output terminal when the voltage of the first input terminal is greater than the voltage of the second input terminal; The charging and discharging circuit is configured to: discharge through the third ground voltage terminal when receiving the first signal; The second end of the counting circuit is connected to the processor; the counting circuit is configured to receive the first signal and obtain the first counting value and the second counting value according to the quantity of the first signal.

4. The liquid level detection device according to claim 3, characterized in that: The first switch circuit includes a first switch and a second switch, one end of the first switch is connected to the first end of the first switch circuit, the other end of the first switch is connected to the third end of the first switch circuit, one end of the second switch is connected to the second end of the first switch circuit, and the other end of the second switch is connected to the third end of the first switch circuit; The second switch circuit includes a third switch and a fourth switch, one end of the third switch is connected to the first end of the second switch circuit, and the other end of the third switch is connected to the second end of the second switch circuit; one end of the fourth switch is connected to the first end of the second switch circuit, and the other end of the fourth switch is connected to the third end of the second switch circuit; The current source circuit comprises a current source, one end of the current source is connected to the first end of the current source circuit, and the other end of the current source is connected to the second end of the current source circuit; The charge-discharge circuit includes a first capacitor, a first resistor and a fifth switch; a first electrode of the first capacitor is connected to a first end of the charge-discharge circuit, a second electrode of the first capacitor is connected to a second end of the charge-discharge circuit, a first end of the first resistor is connected to a first end of the charge-discharge circuit, a second end of the first resistor is connected to a first end of the fifth switch, a second end of the fifth switch is connected to a third end of the charge-discharge circuit, and a control end of the fifth switch is connected to a control end of the charge-discharge circuit; The comparison circuit comprises a comparator, a first terminal of the comparator is connected to a first input terminal of the comparison circuit, a second terminal of the comparator is connected to a second input terminal of the comparison circuit, and a third terminal of the comparator is connected to an output terminal of the comparison circuit; The counting circuit comprises a counter, a first end of the counter is connected to a first end of the counting circuit, and a second end of the counter is connected to a second end of the counting circuit.

5. The liquid level detection device according to claim 4, characterized in that: The third switch and the fourth switch are configured to: be alternately closed at a preset frequency; The fifth switch is configured to: close under the control of the first signal output by the comparator; The current source is configured to: output a first current in the first period, and output a second current in the second period; In the mapping relationship, the liquid level height of the container to be tested is also related to a preset frequency of alternating closure of the first switch and the second switch, a difference between the first current and the second current, and a size difference between the first sensing electrode and the second sensing electrode in the first direction.

6. The liquid level detection device according to claim 5, characterized in that: The mapping relationship is: Among them, h is the liquid level height of the container to be tested, ΔI is the difference between the first current and the second current, Rb is the resistance of the first resistor, VREF is the voltage output by the reference voltage terminal, ΔDmod is the difference between the first sensing value and the second sensing value, d is the thickness of the container to be tested, D1 is the size of the first sensing electrode along the first direction, and D2 is the size of the second sensing electrode along the first direction; fs is the preset frequency of alternating closure of the third switch and the fourth switch; k is the electrostatic force constant; ε is the dielectric constant.

7. The liquid level detection device according to claim 2, characterized in that: The detection circuit is further configured to: obtain a plurality of first count values ​​at n consecutive moments in a first time period, and obtain a plurality of second count values ​​at n consecutive moments in a second time period; The processor is configured to: obtain the multiple first count values ​​and the multiple second count values, obtain the first sensing value corresponding to the first time period according to the average value of the multiple first count values, obtain the second sensing value corresponding to the first time period according to the average value of the multiple second count values, and obtain the liquid level height of the container to be tested according to the difference between the first sensing value and the second sensing value and the mapping relationship.

8. The liquid level detection device according to any one of claims 1 to 7, characterized in that: The sensing value includes a sensing value before correction and a sensing value after correction. Before obtaining the liquid level height of the container to be tested according to the difference between the two sensing values ​​and the mapping relationship, the processor is further configured to: correct the sensing value before correction according to the correction formula to obtain the corrected sensing value.

9. The liquid level detection device according to claim 8, characterized in that: The correction formula is: DMOD=γ1*Dmod (t-1) +γ2*Dmod (t) Wherein, Dmod(t-1) and Dmod(t) are the sensing values ​​before correction in adjacent time periods, DMOD is the sensing value after correction, γ1 and γ2 are discount factors, and γ1+γ2=1.

10. The liquid level detection device according to claim 9, characterized in that: The processor is configured to: perform multiple rounds of liquid level detection to obtain multiple liquid level heights, wherein the processor can obtain one liquid level height in each round of liquid level detection; The processor also includes an accumulator, and the processor is further configured to: make a difference between the liquid level heights obtained by the liquid level detection in adjacent rounds, and when the difference is less than or equal to a first threshold, control the count value of the accumulator to increase by a preset step; when the difference is greater than the first threshold, control the count value of the accumulator to be cleared; when the count value of the accumulator is greater than or equal to a second threshold, output the liquid level height of the current round and control the count value of the accumulator to be cleared.

11. A liquid level detection method, applied to the liquid level detection device as claimed in any one of claims 1 to 10, characterized in that: The liquid level detection method comprises: Obtaining a first count value and a second count value, and obtaining a first sensing value according to the first count value, and obtaining a second sensing value according to the second count value; wherein the first count value is related to the capacitance of the first equivalent capacitor, and the second count value is related to the capacitance of the second equivalent capacitor; The liquid level height of the container to be measured is obtained according to the difference between the first sensing value and the second sensing value and the mapping relationship.

12. The liquid level detection method according to claim 11, characterized in that: The obtaining of a first sensing value according to the first counting value and a second sensing value according to the second counting value comprises: In a first time period, a plurality of first count values ​​at n consecutive moments are obtained, and in a second time period, a plurality of second count values ​​at n consecutive moments are obtained; A first sensing value corresponding to the first time period is obtained according to an average value of the plurality of first counting values, and a second sensing value corresponding to the first time period is obtained according to an average value of the plurality of second counting values.

13. The liquid level detection method according to claim 11 or 12, characterized in that: Before obtaining the liquid level height of the container to be tested according to the difference between the two sensed values ​​and the mapping relationship, the detection method further includes: correcting the sensed value before correction according to a correction formula to obtain a corrected sensed value.

14. The liquid level detection method according to claim 11 or 12, characterized in that: After obtaining the liquid level height of the container to be tested according to the difference between the first sensing value and the second sensing value and the mapping relationship, the liquid level detection method further includes: Perform multiple rounds of liquid level detection to obtain multiple liquid level heights; The liquid level height of the current round is output when the preset conditions are met, and the preset conditions are: subtracting the liquid level heights obtained by the liquid level detection of adjacent rounds, and when the difference is less than or equal to a first threshold, controlling the count value of the accumulator to increase by a preset step; when the difference is greater than the first threshold, controlling the count value of the accumulator to be cleared; when the count value of the accumulator is greater than or equal to a second threshold, outputting the liquid level height of the current round.