Drift error self-calibration method, circuit and system based on capacitance water level detection system
By introducing a reference electrode into the capacitive water level detection system, the count value of the main detection electrode is calibrated in real time, which solves the problems of chip quantization deviation and drift error, improves the accuracy and stability of water level detection, and reduces manual calibration steps.
Patent Information
- Application Number
- CN202511431537.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-09
- Publication Date
- 2025-11-21
AI Technical Summary
Existing capacitive water level detection technology suffers from chip quantization result deviation and long-term drift error, resulting in high production costs, low testing efficiency, and poor detection stability and reliability, which limits its promotion in high-precision application scenarios.
A reference electrode is introduced. By comparing its current count value with the preset calibration benchmark value, a calibration factor is generated to correct the original count value of the main detection electrode in real time, thereby eliminating drift errors caused by chip process differences, environmental factors, and parasitic capacitance.
This improved the accuracy and stability of water level detection, reduced the need for manual calibration of each unit, ensured the accuracy and consistency of detection, and enhanced the long-term stability of the system.
Smart Images

Figure CN120992004A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of water level detection technology, and in particular to a drift error self-calibration method, circuit and system based on a capacitive water level detection system. Background Technology
[0002] In existing capacitive water level detection technologies, detection electrodes are typically placed on the outer wall of the container. Changes in the dielectric constant caused by water level variations result in changes in capacitance, which is then quantified by a detection chip to obtain a signal value reflecting the liquid level. However, due to variations in integrated circuit manufacturing processes, even chips from the same batch may produce significantly different quantization results for the same capacitance structure. This necessitates individual calibration of similar products before shipment, increasing production costs and reducing testing efficiency.
[0003] Furthermore, during long-term operation, factors such as changes in ambient temperature and humidity, as well as parasitic capacitance, can cause the detection results to gradually drift. Existing factory calibration methods cannot compensate for this long-term drift error, making it difficult to guarantee the stability and reliability of water level detection. When such drift errors are not corrected in a timely manner, inaccurate or even misjudged liquid levels can easily occur, limiting the widespread adoption of capacitive water level detection technology in applications requiring high precision and consistency. Summary of the Invention
[0004] This invention provides a drift error self-calibration method, circuit, and system based on a capacitive water level detection system, which realizes real-time self-calibration of drift error during operation, thereby improving the accuracy and stability of water level detection.
[0005] In a first aspect, the present invention provides a drift error self-calibration method based on a capacitive water level detection system, comprising:
[0006] Obtain the current count value of the reference electrode, which is used to characterize the amount of system drift independent of the liquid level;
[0007] Obtain a preset calibration reference value, compare the calibration reference value with the current count value, obtain a comparison result, and determine whether the comparison result is within a preset normal range;
[0008] When the comparison result is within the preset normal range, a calibration factor is determined based on the comparison result, and the original count value of the detection electrode is corrected using the calibration factor to obtain a corrected detection value.
[0009] In some implementations, the calibration factor is the ratio of the calibration reference value to the current count value of the reference electrode.
[0010] In some embodiments, the original count value of the detection electrode is corrected using the calibration factor to obtain a corrected detection value, including:
[0011] The original count value of the detection electrode is multiplied by the calibration factor to obtain the corrected detection value.
[0012] In some implementations, when the comparison result is not within a preset normal range, an abnormal signal is output and the correction of the main detection electrode is stopped; the preset normal range is when the ratio of the calibration reference value to the current count value of the reference electrode is less than 0.5 or greater than 1.5.
[0013] In some implementations, the calibration reference value is obtained by collecting and averaging the reference electrode counts from multiple prototypes.
[0014] In some implementations, the original count value of the detection electrode and the current count value of the reference electrode are periodically acquired, with a period of 5 to 20 milliseconds.
[0015] Secondly, the present invention also provides a drift error self-calibration circuit based on a capacitive water level detection system, comprising:
[0016] The main sensing electrode is used to collect capacitance signals related to the liquid level.
[0017] The reference electrode is placed on the circuit board and close to the water level detection integrated circuit. It does not come into contact with the liquid and is used to collect the current count value that is independent of the water level.
[0018] A water level detection integrated circuit, the input terminals of which are respectively connected to the main detection electrode and the reference electrode;
[0019] A memory for storing the calibration reference values;
[0020] A processor for executing a drift error self-calibration method for a capacitive water level detection system as described above.
[0021] In some embodiments, the reference electrode is positioned close to the water level detection integrated circuit and has an area smaller than that of the main detection electrode; the main detection electrode is positioned in the projection area of the outer wall of the container.
[0022] In some embodiments, the area of the reference electrode is not less than 2 square millimeters.
[0023] Thirdly, the present invention also provides a capacitive water level detection system, including a drift error self-calibration circuit based on the capacitive water level detection system as described above.
[0024] This application provides a drift error self-calibration method, circuit, and system based on a capacitive water level detection system. By introducing a reference electrode into the capacitive water level detection system and comparing and judging the current count value of the reference electrode with a preset calibration benchmark value, a comparison result reflecting the system drift can be obtained in real time. Based on this result, a calibration factor is generated to correct the original count value of the main detection electrode. This method can automatically compensate for drift errors caused by differences in chip process technology, environmental factors, and parasitic capacitance during operation, thereby ensuring the accuracy and consistency of water level detection, reducing the need for manual calibration of each unit, and improving the long-term stability of the system. Attached Figure Description
[0025] Figure 1 This is a flowchart illustrating a drift error self-calibration method based on a capacitive water level detection system disclosed in an embodiment of the present invention.
[0026] Figure 2 This is a circuit diagram of a drift error self-calibration device based on a capacitive water level detection system disclosed in an embodiment of the present invention;
[0027] Figure 3 This is a schematic diagram of the installation structure of a drift error self-calibration device based on a capacitive water level detection system disclosed in an embodiment of the present invention. Detailed Implementation
[0028] To better understand and implement this invention, the technical solutions in the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0029] The terms “comprising” and “having” and any variations thereof in this invention are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device that includes a series of steps or modules is not necessarily limited to those steps or modules that are explicitly listed, but may include other steps or modules that are not explicitly listed or that are inherent to such processes, methods, products or devices.
[0030] This application provides a drift error self-calibration method based on a capacitive water level detection system. This method can eliminate drift errors caused by IC manufacturing process, ambient temperature, ambient humidity, parasitic capacitance, etc., correct the original count value of the main detection electrode, realize real-time self-calibration of drift error during operation, and improve the accuracy and stability of water level detection.
[0031] Figure 1 This is a flowchart illustrating the method, which can be applied to applications such as... Figure 2 The water level detection integrated circuit or device containing this circuit is shown. A main detection electrode and a reference electrode are simultaneously disposed on the circuit board. The main detection electrode is generally a large-area conductive copper foil, preferably larger than 100 square millimeters, for example, about 300 square millimeters. Figure 3 As shown by the diagonal line, the electrode can be placed in the projected area on the outer wall of the container to sensitively detect differences in dielectric constant caused by changes in liquid level. The reference electrode is a small conductive copper foil, significantly smaller than the main detection electrode, for example, about 2 square millimeters. It is placed on the printed circuit board near the water level detection integrated circuit and does not directly contact the liquid. Both the reference electrode and the main detection electrode are connected to the detection port of the water level detection integrated circuit via wires.
[0032] During operation, the main detection electrode experiences changes in the dielectric constant of its surroundings due to fluctuations in the liquid level, resulting in changes in capacitance. These changes are then sampled and converted by the chip, manifesting as a raw count value related to the liquid level. The reference electrode shares the same structural principle as the main detection electrode, but due to its smaller area and lack of contact with the liquid, its count value is unaffected by liquid level changes. Instead, it primarily reflects non-liquid level factors such as differences in chip manufacturing processes, parasitic capacitance, and variations in ambient temperature and humidity. Therefore, the current count value of the reference electrode serves as a drift monitoring signal, which is compared with a preset calibration benchmark value to generate a calibration factor, thereby correcting the raw count value of the main detection electrode in real time.
[0033] Specifically, this method includes the following steps:
[0034] Step S1: Obtain the current count value of the reference electrode, which is used to characterize the amount of system drift that is independent of the liquid level.
[0035] During equipment operation, the reference electrode is sampled using a water level detection integrated circuit to obtain its current count value. Since the reference electrode does not contact the liquid, its count value does not change with the liquid level, but primarily reflects the drift caused by factors such as differences in integrated circuit manufacturing processes, changes in ambient temperature and humidity, and parasitic capacitance. Therefore, the current count value of the reference electrode can serve as a direct characterization signal of the drift amount, providing a basis for subsequent error calibration.
[0036] In a preferred embodiment, a timed sampling period can be set, for example, from 5 milliseconds to 20 milliseconds. During each sampling period, the processor calls the interface function of the water level detection integrated circuit to read the capacitance count value of the reference electrode and temporarily store it in a register or cache as the current reference value.
[0037] In another implementation, to avoid occasional noise interference, the multiple consecutive count values of the reference electrode can be filtered, for example, by using a moving average or median filtering method, to obtain a more stable current count value of the reference electrode. Through the above steps, the current count value of the reference electrode is acquired in real time during operation, and this is used as the basic data to characterize the system drift amount independent of the liquid level.
[0038] Step S2: Obtain a preset calibration reference value, compare the calibration reference value with the current count value, obtain a comparison result, and determine whether the comparison result is within a preset normal range;
[0039] The processor can read preset calibration reference values from memory. These calibration reference values are usually obtained during the production stage by collecting and statistically processing the reference electrode count values of multiple prototypes. For example, the average of the reference values of 50 prototypes is taken as the reference value and uniformly written into the mass production equipment.
[0040] During operation, the current count value of the reference electrode is compared with the calibration baseline value to obtain the comparison result. This comparison result can reflect the deviation between the reference electrode count value under the current working environment and the statistical value during the production stage, thus indirectly characterizing the degree of system drift.
[0041] In one embodiment, the comparison result can be expressed as a ratio, that is, the ratio of the calibration reference value to the current count value of the reference electrode; in another embodiment, the comparison result can be expressed as a difference, that is, the difference between the calibration reference value and the current count value of the reference electrode.
[0042] Step S3: When the comparison result is within the preset normal range, a calibration factor is determined based on the comparison result, and the original count value of the detection electrode is corrected using the calibration factor to obtain the corrected detection value.
[0043] After obtaining the comparison results, it is further compared whether the results fall within a preset normal range. In this application, the normal range can be determined based on a large number of experimental tests to ensure the effectiveness of the calibration and the reliability of the system.
[0044] In a preferred embodiment, when the ratio of the calibration reference value to the current count value of the reference electrode is within the range of 0.5 to 1.5, it is considered to be within the normal range; when it exceeds this range, the current count value of the reference electrode is considered abnormal. If an abnormality is determined, a reference abnormality signal will be output, and the current calibration and correction process will be stopped to prevent erroneous data from misleading the results of the main detection electrode.
[0045] In another implementation, the abnormal signal can trigger a fault alarm or shutdown protection, prompting the user to perform further maintenance, ensuring that the self-calibration equipment will not output incorrect water level data under abnormal conditions.
[0046] When the comparison result is within a preset normal range, the calibration factor is calculated based on the comparison result. In this application, the calibration factor gain is the ratio of the calibration reference value REF_BASE to the current count value REF_CUR of the reference electrode:
[0047] gain = (float)REF_BASE / REF_CUR
[0048] Multiply the original count value MAIN_RAW of the main detection electrode by the calibration factor gain to obtain the corrected detection value MAIN_CAL:
[0049] MAIN_CAL = MAIN_RAW × gain
[0050] In one implementation, the main sensing electrode is positioned over a large projection area on the outer wall of the container, enabling it to sense the effect of liquid level changes on the dielectric constant. Its output raw count value, MAIN_RAW, increases or decreases with changes in liquid level. However, this raw count value also includes deviations caused by environmental drift or IC process variations. By introducing a calibration factor for correction, drift can be compensated for in real-time during operation, making MAIN_CAL more accurately reflect the liquid level status.
[0051] Furthermore, if multiple main detection electrodes are set, each main detection electrode can be corrected separately to obtain the corresponding corrected detection value, thereby realizing the detection of liquid level at different height positions.
[0052] The corrected detection value MAIN_CAL is used to determine the water level. Multiple thresholds are pre-stored during the design phase, each corresponding to a different water level. For example, three threshold ranges can be set: empty, half-full, and full. During operation, the corrected detection value MAIN_CAL is compared with the preset thresholds. For instance, when the corrected detection value MAIN_CAL is less than the first threshold, the container is determined to be empty; when the corrected detection value MAIN_CAL is between the first and second thresholds, the container level is determined to be at an intermediate height; when the corrected detection value MAIN_CAL is greater than or equal to the second threshold, the container is determined to be full.
[0053] If multiple main detection electrodes are set, each correction value can be judged separately to determine the specific position of the liquid level in the container, thus realizing multi-level water level detection.
[0054] The method will be explained below with reference to specific embodiments:
[0055] Fifty prototype machines were selected at the production testing station. The reference electrode count values of each machine were collected and averaged to obtain a cross-device calibration baseline value of approximately 3000. This value was then uniformly written into the memory of each machine as the calibration baseline value REF_BASE.
[0056] During the operation phase, three devices were randomly selected for testing: the current count value REF_CUR for the reference electrode of device A was 2730, for device B it was 3050, and for device C it was 3280. Under the same water level conditions, the original count values of the main detection electrodes of the three devices were 13650, 15250, and 16400, respectively. According to the method of the present invention, the original count value is multiplied by the calibration factor to obtain the corrected detection value MAIN_CAL:
[0057] Machine A: 13650×(3000 / 2730)≈15000;
[0058] Machine B: 15250×(3000 / 3050)≈15000;
[0059] C machine: 16400×(3000 / 3280)≈15000.
[0060] Although the original count values from different devices at the same water level had an error of approximately ±10%, after correction, the detection results from the three devices became more consistent, with the error reduced to around ±0.5%. By introducing a reference electrode and comparing and correcting cross-device baseline values, drift errors caused by IC process differences and environmental factors can be effectively eliminated, thereby improving the accuracy and consistency of water level detection.
[0061] Based on the same inventive concept, this application provides a drift error self-calibration circuit based on a capacitive water level detection system, comprising:
[0062] The main sensing electrode is used to collect capacitance signals related to the liquid level.
[0063] The reference electrode is placed on the circuit board and close to the water level detection integrated circuit. It does not come into contact with the liquid and is used to collect the current count value that is independent of the water level.
[0064] A water level detection integrated circuit, the input terminals of which are respectively connected to the main detection electrode and the reference electrode;
[0065] A memory for storing the calibration reference values;
[0066] The processor is used to compare the current count value of the reference electrode with the calibration benchmark value and calculate the calibration factor, correct the original count value of the main detection electrode according to the calibration factor, and output the corrected detection value.
[0067] like Figure 2The water level detection integrated circuit IC2 shown internally has multiple water level detection channel interfaces WL0 to WL15, used for sampling and digital conversion of the capacitance of different detection electrodes. In this embodiment, the main detection electrode is connected to the WL12 interface of IC2 via a wire, and the reference electrode is connected to the WL8 interface of IC2 via a wire.
[0068] The main detection electrode is a rectangular electrode with an area greater than 330 square millimeters, positioned on the projected area of the container's outer wall. Its capacitance changes significantly with the liquid level. After sampling by IC2, the original count value of the main detection electrode is output. The reference electrode is an elliptical copper foil with an area of approximately 1.7 square millimeters, positioned on the printed circuit board close to IC2 and not in direct contact with the liquid. Its output signal does not change with the liquid level, reflecting factors such as chip process differences, parasitic capacitance, and environmental changes. During operation, IC2 acquires and converts the signals from the main detection electrode and the reference electrode, obtaining the original count value MAIN_RAW of the main detection electrode and the current count value REF_CUR of the reference electrode, and transmits them to the processor. The processor, combined with the calibration baseline value REF_BASE in memory, compares, calculates, and corrects the acquired data, thereby outputting the corrected detection value MAIN_CAL for subsequent water level determination.
[0069] Based on the same inventive concept, this application also provides a drift error self-calibration device based on a capacitive water level detection system, including a drift error self-calibration circuit based on a capacitive water level detection system as described above.
[0070] Based on the same inventive concept, this application also provides a capacitor level detection system, including a drift error self-calibration circuit based on the capacitor level detection system as described above.
[0071] This application provides a drift error self-calibration method, circuit, and device based on a capacitive water level detection system. By introducing a reference electrode into the capacitive water level detection system and comparing and judging the current count value of the reference electrode with a preset calibration benchmark value, a comparison result reflecting the system drift can be obtained in real time. Based on this result, a calibration factor is generated to correct the original count value of the main detection electrode. This method can automatically compensate for drift errors caused by differences in chip process technology, environmental factors, and parasitic capacitance during operation, thereby ensuring the accuracy and consistency of water level detection, reducing the need for manual calibration of each unit, and improving the long-term stability of the system.
[0072] Based on the same inventive concept, the present invention also provides a computer device, comprising: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and executed the steps of the drift error self-calibration method based on a capacitive water level detection system as described above.
[0073] The processing methods for computer devices can be referred to the description of the methods above, and will not be repeated here.
[0074] This application also provides a non-transitory machine-readable storage medium storing an executable program. When the executable program is run by a microprocessor, it causes the processor to execute a broadband high-speed self-organizing network signal linearization processing method as provided in the above embodiments.
[0075] This invention discloses a computer-readable storage medium storing a computer program for electronic data interchange, wherein the computer program causes a computer to execute a described drift error self-calibration method based on a capacitive water level detection system.
[0076] This invention discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute a described drift error self-calibration method based on a capacitive water level detection system.
[0077] The embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0078] Through the detailed description of the above embodiments, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, including read-only memory (ROM), random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), one-time programmable read-only memory (OTPROM), electrically-Erasable Programmable Read-Only Memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.
[0079] Finally, it should be noted that the embodiments disclosed in this invention are merely preferred embodiments of this invention and are only used to illustrate the technical solutions of this invention, not to limit it. Although this invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this invention.
Claims
1. A method for self-calibration of drift error based on a capacitive water level detection system, characterized in that, The method comprises the following steps: acquiring a current count value of a reference electrode, which represents a system drift value irrelevant to the liquid level; acquiring a preset calibration reference value, comparing the calibration reference value with the current count value to obtain a comparison result, and determining whether the comparison result is within a preset normal range; when the comparison result is within the preset normal range, determining a calibration factor according to the comparison result, and correcting an original count value of a detection electrode with the calibration factor to obtain a corrected detection value.
2. A method of self-calibration of drift error in a capacitive water level detection system as claimed in claim 1, wherein, The calibration factor is a ratio of the calibration reference value to the current count value of the reference electrode.
3. A method of self-calibration of drift error in a capacitive water level detection system as claimed in claim 2, wherein, The correction of the original count value of the detection electrode with the calibration factor to obtain the corrected detection value comprises: multiplying the original count value of the detection electrode by the calibration factor to obtain the corrected detection value.
4. The method of self-calibration of drift error in a capacitive water level detection system as claimed in claim 1, wherein, When the comparison result is not within the preset normal range, an abnormal signal is outputted and the correction of the main detection electrode is stopped; the preset normal range is that the ratio of the calibration reference value to the current count value of the reference electrode is less than 0.5 or greater than 1.
5.
5. The method of self-calibration of drift error in a capacitive water level detection system as claimed in claim 1, wherein, The calibration reference value is obtained by collecting count values of reference electrodes of multiple sample machines and calculating an average value.
6. The method of self-calibration of drift error in a capacitive water level detection system as claimed in claim 1, wherein, The original count value of the detection electrode and the current count value of the reference electrode are acquired periodically, and the period is 5-20 milliseconds.
7. A self-calibration circuit for drift error based on a capacitive water level detection system, characterized in that The method comprises the following steps: a main detection electrode for collecting a capacitance signal related to the liquid level; a reference electrode arranged on a circuit board and close to a water level detection integrated circuit, which does not contact with the liquid and is used for collecting a current count value irrelevant to the liquid level; a water level detection integrated circuit, whose input terminals are connected to the main detection electrode and the reference electrode respectively; a memory for storing the calibration reference value; a processor for executing the self-calibration method of the drift error of the capacitance-based water level detection system according to any one of claims 1-6.
8. A drift error self-calibration circuit based on a capacitive water level detection system as claimed in claim 7, characterized in that, The reference electrode is arranged close to the water level detection integrated circuit and has an area smaller than that of the main detection electrode; and the main detection electrode is arranged in a projection area of the outer wall of the container.
9. A drift error self-calibration circuit for a capacitive water level detection system as claimed in claim 7, wherein, The area of the reference electrode is not less than 2 square millimeters.
10. A capacitive water level detection system, characterized by, The self-calibration circuit of the drift error of the capacitance-based water level detection system comprises any one of the self-calibration circuits according to claims 7-9.