Capacitance sensing device and parasitic capacitance compensation method thereof
By configuring a compensation capacitor and a temperature detection module, and utilizing the mapping relationship between ambient temperature and the residual value of parasitic capacitance, the problem of real-time compensation of parasitic capacitance in capacitive sensing devices is solved, thereby improving detection accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-31
- Publication Date
- 2026-04-03
AI Technical Summary
Existing technologies struggle to achieve real-time temperature compensation for parasitic capacitance in capacitive sensing devices without the need for an external reference channel, which affects detection accuracy.
By configuring a compensation capacitor, combined with the temperature detection module and the main control module, real-time compensation is performed using the mapping relationship between ambient temperature and the residual value of parasitic capacitance, thereby reducing detection errors.
This technology enables real-time compensation of parasitic capacitance based on changes in ambient temperature without the need for additional reference channels, thereby improving the detection accuracy of capacitance sensing devices.
Smart Images

Figure CN121783210A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of capacitance sensing technology, and in particular to a capacitance sensing device and a method for compensating for its parasitic capacitance. Background Technology
[0002] Proximity detection using capacitance changes is a common method in electronic devices. For example, SAR (Specific Absorption Rate) sensors are used to distinguish the proximity of inanimate objects from living beings (such as the human body) and can be used in portable electronic devices like smartphones and wearable devices. SAR refers to the electromagnetic radiation energy absorbed by a unit mass of matter per unit time. SAR is primarily used for mobile phone radiation verification; it represents the rate at which radiation is absorbed by the soft tissues of the head. The lower the SAR value, the less radiation is absorbed by the brain. The main principle of SAR sensors is to measure the capacitance formed between the human body / object and the sensor electrodes, and to determine the presence of a human body or object based on the capacitance value. In actual detection systems, parasitic capacitance exists in the sensor electrodes and the traces on the PCB (Printed Circuit Board) on which they are mounted. This parasitic capacitance changes with temperature, affecting the accuracy of the measured values.
[0003] Currently, there are two main solutions to the above problems:
[0004] Technology 1: When no human body / object is nearby, the analog capacitor array compensation function is executed. This function eliminates parasitic capacitance by controlling the analog capacitor array to equal the parasitic capacitance, so that the detected capacitance value is close to zero when no human body / object is nearby. However, the analog capacitor array compensation function is static and cannot compensate in real time according to the ambient temperature. It also needs to be executed when no human body / object is nearby, and its accuracy is limited by the minimum capacitance value of the analog capacitor array.
[0005] Technique 2: Adding a reference capacitance measurement. The change in capacitance of the reference capacitance due to temperature changes is proportional to the change in parasitic capacitance of the sensor's measured capacitance due to temperature changes. Therefore, when the temperature changes, the change in the sensor's parasitic capacitance due to temperature can be obtained from the change in the reference capacitance, thus eliminating measurement errors caused by ambient temperature changes in real time. However, this method requires an external reference channel for measurement, complicating the circuit structure.
[0006] Therefore, it is difficult to easily achieve real-time compensation of parasitic capacitance based on changes in ambient temperature in related technologies. Summary of the Invention
[0007] This invention provides a capacitance sensing device and a parasitic capacitance compensation method thereof, which can achieve real-time compensation of parasitic capacitance based on changes in ambient temperature without the need for an external channel, thereby reducing the detection error of the capacitance sensing device.
[0008] In a first aspect, embodiments of the present invention provide a method for compensating parasitic capacitance in a capacitance sensing device. The capacitance sensing device includes a sensing capacitor and a compensation capacitor. The sensing capacitor includes a parasitic capacitance and a variable capacitance. The compensation capacitor is used to compensate for the parasitic capacitance. The method includes:
[0009] Obtain the current capacitance measurement value; wherein, the current capacitance measurement value is the difference between the current capacitance value of the sensing capacitor and the capacitance value of the compensation capacitor;
[0010] Get the current ambient temperature;
[0011] Based on the current ambient temperature and the first mapping relationship, determine the current residual value of the parasitic capacitance after compensation by the compensation capacitor at the current ambient temperature; wherein, the first mapping relationship is the correspondence between the residual value of the parasitic capacitance after compensation by the compensation capacitor and the ambient temperature;
[0012] The current variable capacitance value is obtained by subtracting the current residual value from the current capacitance measurement value.
[0013] Optionally, before acquiring the current capacitance measurement value, the method further includes:
[0014] Without setting the compensation capacitor and with the capacitance value of the variable capacitor remaining at 0, the capacitance value of the sensing capacitor is measured at multiple different binding point ambient temperatures to obtain the capacitance value of the parasitic capacitance corresponding to each binding point ambient temperature; wherein, each binding point ambient temperature is distributed between the lower limit of the allowable operating temperature and the upper limit of the allowable operating temperature of the capacitance sensing device.
[0015] The temperature coefficient function is determined based on the ambient temperature of each binding point and the capacitance value of the parasitic capacitance corresponding to each ambient temperature of the binding point; wherein, the temperature coefficient function is the relationship function between the temperature coefficient and the ambient temperature, the temperature coefficient is the multiple relationship between the capacitance value of the parasitic capacitance at any ambient temperature and the initial capacitance value, and the initial capacitance value is the capacitance value of the parasitic capacitance corresponding to the lower limit of the allowable operating temperature.
[0016] Set the compensation capacitor, record the ambient temperature when setting the compensation capacitor as the reference ambient temperature, and record the residual value of the parasitic capacitance after setting the compensation capacitor at the reference ambient temperature as the reference residual value.
[0017] The first mapping relationship is determined based on the reference ambient temperature, the reference residual value, and the temperature coefficient function; wherein, under the same ambient temperature, the residual value of the parasitic capacitance has the same temperature coefficient as the capacitance value of the parasitic capacitance.
[0018] Optionally, the temperature coefficient function is expressed as: f(T), T∈[Tori, Tend]; where T is the ambient temperature, Tori is the lower limit of the allowable operating temperature, and Tend is the upper limit of the allowable operating temperature;
[0019] Determining the first mapping relationship based on the reference ambient temperature, the reference residual value, and the temperature coefficient function includes:
[0020] The first mapping relationship is: Where T represents the ambient temperature, Cp(T) represents the residual value of the parasitic capacitance corresponding to the ambient temperature T, Ccomp represents the reference residual value, and Tcomp represents the reference ambient temperature.
[0021] Optionally, when setting the compensation capacitor, the reference ambient temperature is configured to be equal to the lower limit of the allowable operating temperature;
[0022] The first mapping relationship is: Cp(T) = Ccomp × f(T).
[0023] Optionally, a temperature coefficient function is determined based on the ambient temperature of each binding point and the capacitance value of the parasitic capacitance corresponding to each ambient temperature of the binding point, including:
[0024] The ambient temperatures of each binding point are arranged from low to high to obtain a temperature sequence, and the temperature sequence is divided into at least two temperature segments; wherein each temperature segment includes at least two ambient temperatures of binding points;
[0025] For any temperature range: Based on the ambient temperature of each binding point in the temperature range and the capacitance value of the parasitic capacitance corresponding to each binding point ambient temperature, a temperature coefficient sub-function of the temperature range is fitted.
[0026] The temperature coefficient function is obtained based on the temperature coefficient sub-functions for all temperature ranges.
[0027] Optionally, the temperature sequence is divided into a temperature segment between every two adjacent binding point ambient temperatures, and the upper limit binding point ambient temperature of the previous temperature segment is used as the lower limit binding point ambient temperature of the next temperature segment.
[0028] Linear fitting is performed on the ambient temperatures of the two binding points and the capacitance values of the parasitic capacitances corresponding to the ambient temperatures of the two binding points in each temperature range to obtain the temperature coefficient sub-function of the temperature range.
[0029] Optionally, the ambient temperatures at each binding point in the temperature sequence are, in order: T0, T1, ..., T n n is a positive integer greater than or equal to 2; where T0 is equal to the lower limit of the allowable operating temperature, T n It equals the upper limit of the allowable operating temperature;
[0030] The temperature coefficient function is: f(T) n )=1+K1×(T1-T0)+K2×(T2-T1)+…+K n ×(T n -T n-1 ); where K i This represents the slope of the parasitic capacitance value in the i-th temperature range as a function of ambient temperature, where the i-th temperature range is [T]. i-1 ,T i ].
[0031] Optionally, multiple ambient temperatures are selected as the ambient temperatures of each binding point at equal temperature intervals between the lower limit of the allowable operating temperature and the upper limit of the allowable operating temperature.
[0032] And / or,
[0033] Setting the compensation capacitor includes: under the condition that the capacitance value of the variable capacitor is kept at 0, configuring the capacitance value of the compensation capacitor such that the difference between the capacitance value of the sensing capacitor and the capacitance value of the compensation capacitor is less than a preset threshold.
[0034] Secondly, embodiments of the present invention also provide a capacitance sensing device, comprising:
[0035] Sensing capacitance includes variable capacitance and parasitic capacitance;
[0036] Compensation capacitor;
[0037] The capacitance detection module is used to detect the capacitance value of the sensing capacitor and subtract the capacitance value of the compensation capacitor to obtain the capacitance measurement value.
[0038] Temperature detection module, used to detect ambient temperature;
[0039] The main control module is connected to the capacitance detection module and the temperature detection module respectively, and is used to execute the parasitic capacitance compensation method of the capacitance sensing device provided in any embodiment of the present invention.
[0040] Optionally, the main control module includes: a temperature compensation unit, which is used to execute the parasitic capacitance compensation method of the capacitance sensing device;
[0041] The main control module further includes: a first analog-to-digital converter and a second analog-to-digital converter; the first analog-to-digital converter is connected between the capacitance detection module and the temperature compensation unit, and the second analog-to-digital converter is connected between the temperature detection module and the temperature compensation unit; or, the main control module further includes: a third analog-to-digital converter, connected to the output terminal of the temperature compensation unit.
[0042] In the parasitic capacitance compensation method of the capacitance sensing device provided in this embodiment of the invention, a compensation capacitor is used to compensate for the parasitic capacitance to avoid excessive parasitic capacitance affecting the detection results. Based on this, the current residual value of the parasitic capacitance after compensation is determined according to a first mapping relationship at the current ambient temperature. This is equivalent to using the mapping relationship between temperature and residual value to perform temperature drift compensation, reducing capacitance detection errors and improving the accuracy of the current variable capacitance value. This embodiment of the invention can achieve real-time compensation of the compensated parasitic capacitance based on changes in ambient temperature without the need for an additional reference channel, reducing detection errors in the capacitance sensing device and improving detection accuracy.
[0043] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0044] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0045] Figure 1 This is a flowchart of a parasitic capacitance compensation method for a capacitance sensing device provided in an embodiment of the present invention;
[0046] Figure 2 This is a flowchart of the process for obtaining the first mapping relationship provided in an embodiment of the present invention;
[0047] Figure 3 This is a schematic diagram of the structure of a capacitive sensing device provided in an embodiment of the present invention;
[0048] Figure 4 This is a schematic diagram of another capacitive sensing device provided in an embodiment of the present invention;
[0049] Figure 5 This is a schematic diagram of the structure of another capacitive sensing device provided in an embodiment of the present invention. Detailed Implementation
[0050] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0051] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion.
[0052] This invention provides a method for compensating for parasitic capacitance in a capacitive sensing device. This method is applicable to compensating for temperature drift of parasitic capacitance in a capacitive sensing device, thereby improving the accuracy of the detection results. The method can be executed by a parasitic capacitance compensation device within the capacitive sensing device. This device can be implemented in hardware and / or software and can be configured within the main control module of the capacitive sensing device. For ease of explanation, the structure of the capacitive sensing device is first briefly described, followed by a detailed explanation of the parasitic capacitance compensation method.
[0053] A capacitive sensing device includes a sensing capacitor, which comprises parasitic capacitance and variable capacitance. Specifically, the sensing capacitor can be a self-capacitive structure with one capacitor plate, or a mutual-capacitive structure with two capacitor plates, depending on the actual requirements. The parasitic capacitance value does not change upon the approach of a living organism; it remains a fixed value at a constant ambient temperature. When a living organism approaches the capacitive sensing device, the variable capacitance changes. By detecting the magnitude of the variable capacitance, the distance between the living organism and the capacitive sensing device can be determined. Furthermore, the capacitive sensing device includes a capacitance detection module to detect the capacitance value of the sensing capacitor. If the parasitic capacitance is too large, it can easily cause the capacitance detection module to saturate, making it unable to detect changes in the variable capacitance. Therefore, a compensation capacitor is often added to the capacitive sensing device to compensate for the parasitic capacitance. For example, by selecting a suitable compensation capacitor, the difference between the capacitance value of the sensing capacitor and the capacitance value of the compensation capacitor can be used as the capacitance measurement value. This allows for a smaller detected capacitance measurement value, such as near 0, when no living organisms are present (i.e., the capacitance value of the variable capacitor is 0), thus compensating for parasitic capacitance. This ensures that when living organisms are present, the capacitance measurement value reflects changes in the variable capacitance. It is understandable that compensation capacitors can only achieve static compensation and cannot completely compensate for parasitic capacitance. After compensation, a certain amount of residual parasitic capacitance remains in the capacitance measurement value. This residual value changes with ambient temperature and will still affect the accuracy of the capacitance measurement.
[0054] To address the above problems, embodiments of the present invention provide a method for compensating for parasitic capacitance in a capacitance sensing device. Figure 1 This is a flowchart of a parasitic capacitance compensation method for a capacitance sensing device provided in an embodiment of the present invention. See also... Figure 1 The parasitic capacitance compensation method for the capacitive sensing device includes:
[0055] S110, Obtain the current capacitance measurement value.
[0056] The current capacitance measurement value is the difference between the current sensing capacitance value and the compensation capacitance value. For example, the capacitance detection module in the capacitance sensing device detects the current sensing capacitance value (which is the sum of the current parasitic capacitance value and the current variable capacitance value), and then subtracts the compensation capacitance value to obtain the current capacitance measurement value.
[0057] S120, Obtain the current ambient temperature.
[0058] The capacitive sensing device may be configured with a temperature detection module for detecting ambient temperature. For example, the temperature detection module may include a temperature sensor.
[0059] S130. Based on the current ambient temperature and the first mapping relationship, determine the current residual value of the parasitic capacitance after compensation by the compensation capacitor at the current ambient temperature.
[0060] The first mapping relationship is the correspondence between the residual value of the parasitic capacitance after compensation with a compensating capacitor and the ambient temperature. The current residual value can be obtained by looking up the first mapping relationship based on the current ambient temperature.
[0061] For example, after setting the compensation capacitor, the ambient temperature can be adjusted multiple times, and the residual value of the parasitic capacitance after each adjustment can be obtained. The first mapping relationship can then be fitted based on the results of these multiple adjustments. Alternatively, before setting the compensation capacitor, the ambient temperature can be adjusted multiple times, and the capacitance value of the parasitic capacitance after each adjustment can be obtained. A mapping relationship between the parasitic capacitance and ambient temperature can be fitted based on the results of these adjustments. A temperature coefficient function of capacitance changing with temperature can be extracted from this mapping relationship, and the first mapping relationship can be derived accordingly. For example, the first mapping relationship can be stored in the form of a function or a curve. The specific method of obtaining and storing the first mapping relationship is not limited here.
[0062] S140. Subtract the current residual value from the current capacitance measurement value to obtain the current variable capacitance value.
[0063] In this process, after compensation by the compensation capacitor, the current capacitance measurement value includes the capacitance value of the variable capacitor and the residual value of the parasitic capacitance. Step S130 is equivalent to performing temperature drift compensation on the parasitic capacitance after compensation by the compensation capacitor, so that the current residual value at the current ambient temperature can be obtained. Then, in this step, the current capacitance measurement value is subtracted from the current residual value to obtain the accurate current variable capacitance value, which is beneficial for subsequent processing, such as obtaining the accurate distance between the organism and the sensing capacitance device.
[0064] In the parasitic capacitance compensation method of the capacitance sensing device provided in this embodiment of the invention, a compensation capacitor is used to compensate for the parasitic capacitance to avoid excessive parasitic capacitance affecting the detection results. Based on this, the current residual value of the parasitic capacitance after compensation is determined according to a first mapping relationship at the current ambient temperature. This is equivalent to using the mapping relationship between temperature and residual value to perform temperature drift compensation, reducing capacitance detection errors and improving the accuracy of the current variable capacitance value. This embodiment of the invention can achieve real-time compensation of the compensated parasitic capacitance based on changes in ambient temperature without the need for an additional reference channel, reducing detection errors in the capacitance sensing device and improving detection accuracy.
[0065] In one embodiment, optionally, the change in parasitic capacitance with ambient temperature is proportional to the change in residual parasitic capacitance with ambient temperature after compensation by the compensation capacitor. In other words, the parasitic capacitance and the residual value exhibit the same change pattern with ambient temperature, and under the same ambient temperature, the parasitic capacitance and the residual value have the same temperature coefficient. Since the residual value of the parasitic capacitance is smaller after compensation by the compensation capacitor, and the change in residual value with ambient temperature is even smaller, direct measurement of the residual value may result in significant errors and requires high precision from the measuring device. Therefore, this embodiment can measure the change in parasitic capacitance itself with ambient temperature before configuring the compensation capacitor for the capacitance sensing device to summarize the law of parasitic capacitance change with temperature, obtain the temperature coefficient function, thereby improving the accuracy of the temperature coefficient function. Then, based on the characteristic that the parasitic capacitance and the residual value have the same temperature coefficient function, a first mapping relationship is obtained, and this first mapping relationship is applied to temperature drift compensation in actual measurements to improve the accuracy of the compensation-based detection results. It is understandable that the acquisition of the temperature coefficient function, the configuration of the compensation capacitor, and the determination of the first mapping relationship can all be performed before the capacitive sensing device leaves the factory. During the actual use of the capacitive sensing device, the first mapping relationship can be directly called to calculate the current residual value. Alternatively, after the capacitive sensing device has been running for a period of time, in order to avoid the influence of device aging on the detection results, the temperature coefficient function and the first mapping relationship can be updated.
[0066] The specific process of obtaining the first mapping relationship is described below, but it is not intended to limit the present invention.
[0067] Figure 2 This is a flowchart of the process for obtaining the first mapping relationship provided in an embodiment of the present invention. See [link / reference]. Figure 2 Before acquiring the current capacitance measurement value, the method further includes: acquiring a first mapping relationship. It is understood that the process of acquiring the first mapping relationship can be performed before the first use of the capacitance sensing device, i.e., before leaving the factory, or it can be performed after each preset period of use of the capacitance sensing device, without needing to be performed before each acquisition of the current capacitance measurement value. For details, see [link to details]. Figure 2 The steps to obtain the first mapping relationship include:
[0068] S210. Without setting a compensation capacitor and with the capacitance value of the variable capacitor remaining at 0, measure the capacitance value of the sensing capacitor at multiple different binding point ambient temperatures to obtain the capacitance value of the parasitic capacitance corresponding to each binding point ambient temperature.
[0069] The ambient temperature at each binding point is distributed between the lower and upper limits of the allowable operating temperature of the capacitive sensing device. For example, multiple ambient temperatures can be uniformly selected between the lower and upper limits of the allowable operating temperature as the ambient temperature of each binding point. The lower and upper limits of the allowable operating temperature of the capacitive sensing device can be set according to its actual needs and characteristics.
[0070] Providing an environment free of living organisms near the capacitance sensing device is sufficient to ensure that the capacitance value of the variable capacitor remains zero. The capacitance value of the sensing capacitor measured under the condition that the variable capacitor value remains zero is equal to the capacitance value of the parasitic capacitance. Therefore, in this embodiment, there is no need to set up a separate capacitance detection module; the capacitance value of the parasitic capacitance at each binding point under the environmental conditions can be obtained.
[0071] S220. Determine the temperature coefficient function based on the ambient temperature of each binding point and the capacitance value of the parasitic capacitance corresponding to the ambient temperature of each binding point.
[0072] The temperature coefficient function represents the relationship between the temperature coefficient and the ambient temperature. The temperature coefficient is a multiple of the parasitic capacitance at any ambient temperature to the initial capacitance, where the initial capacitance is the parasitic capacitance corresponding to the lower limit of the allowable operating temperature. Specifically, if the temperature coefficient function is denoted as f(T), and the initial capacitance is denoted as C0, then the parasitic capacitance at any ambient temperature Tx is Cx = C0 × f(Tx). For example, the ambient temperature at each binding point may include both the lower and upper limits of the allowable operating temperature. The temperature coefficient function can be fitted based on the ambient temperature at each binding point and the corresponding parasitic capacitance values.
[0073] S230. Set the compensation capacitor, record the ambient temperature when setting the compensation capacitor as the reference ambient temperature, and record the residual value of the parasitic capacitance after setting the compensation capacitor at the reference ambient temperature as the reference residual value.
[0074] Specifically, by determining the temperature coefficient function and then setting the compensation capacitor, the temperature coefficient function is obtained based on a larger parasitic capacitance, ensuring its accuracy. The reference ambient temperature can be any temperature between the lower and upper limits of the allowable operating temperature.
[0075] The compensation capacitor may include the off-chip capacitor and / or on-chip capacitor of the capacitive sensing chip in the capacitive sensing device, specifically defined according to actual needs. For example, the compensation capacitor may be a capacitor array composed of multiple capacitors. When setting the compensation capacitor, the number of capacitors connected to the capacitive sensing device can be configured according to the size of the parasitic capacitance, so that the reference residual value is as small as possible and as close to 0 as possible.
[0076] Setting the compensation capacitor may specifically include: under the condition that the capacitance value of the variable capacitor remains at 0, specifically under the condition that no living organisms approach the sensing capacitor device, configuring the capacitance value of the compensation capacitor such that the difference between the capacitance value of the sensing capacitor and the capacitance value of the compensation capacitor is less than a preset threshold. This preset threshold can be set according to actual needs, for example, close to 0.
[0077] S240. Determine the first mapping relationship based on the reference ambient temperature, reference residual value, and temperature coefficient function.
[0078] Wherein, under the same ambient temperature, the residual value of parasitic capacitance has the same temperature coefficient as the capacitance value. Therefore, given that the temperature coefficient function is known, and that any reference ambient temperature and its corresponding reference residual value are known, a first mapping relationship can be derived to obtain the residual value at any ambient temperature.
[0079] This embodiment provides a method for obtaining the first mapping relationship based on S210-S240, which is beneficial for obtaining an accurate first mapping relationship.
[0080] Based on the above embodiments, optionally, the temperature coefficient function is expressed as: f(T), T∈[Tori, Tend]; where T is the ambient temperature, Tori is the lower limit of the allowable operating temperature, and Tend is the upper limit of the allowable operating temperature. The specific form of f(T) can be determined according to the selected fitting method, for example, a linear function or a nonlinear function.
[0081] Accordingly, the first mapping relationship is determined based on the reference ambient temperature, the reference residual value, and the temperature coefficient function, including: The first mapping relationship is: Where T represents the ambient temperature, Cp(T) represents the residual value of the parasitic capacitance corresponding to the ambient temperature T, Ccomp represents the reference residual value, and Tcomp represents the reference ambient temperature. f(Tcomp) is the temperature coefficient at the reference ambient temperature Tcomp, specifically obtained by substituting Tcomp into f(T). Therefore, if Tx represents the current ambient temperature and Cpx represents the current residual value, then... .
[0082] This embodiment is configured in such a way that there are no restrictions on the reference ambient temperature. Therefore, when setting the capacitance value of the compensation capacitor, there is no need to configure the ambient temperature. It is only necessary to record the ambient temperature when setting the compensation capacitor as the reference ambient temperature. This reduces the requirements for the testing and configuration environment of the capacitance sensing device, which helps to reduce production line costs.
[0083] Based on the above embodiments, optionally, when setting the compensation capacitor, the reference ambient temperature is configured to be equal to the lower limit of the allowable operating temperature; correspondingly, the first mapping relationship is: Cp(T) = Ccomp × f(T). In this embodiment, by limiting the compensation capacitor to the lower limit of the allowable operating temperature, the obtained reference residual value is the residual value of the parasitic capacitance below the lower limit of the allowable operating temperature, thereby making the reference residual value and the initial capacitance value the same value at the same ambient temperature, thus simplifying the first mapping relationship. For example, a constant temperature chamber can be configured, the temperature of the constant temperature chamber can be set to the lower limit of the allowable operating temperature, and the capacitance sensing device can be placed in the constant temperature chamber with the compensation capacitor configured.
[0084] Based on the above embodiments, optionally, a temperature coefficient function is determined according to the ambient temperature of each binding point and the capacitance value of the parasitic capacitance corresponding to each ambient temperature of each binding point, including:
[0085] 1) Arrange the ambient temperatures of each binding point from low to high to obtain a temperature sequence, and divide the temperature sequence into at least two temperature segments.
[0086] Each temperature segment includes at least two binding point ambient temperatures to allow for fitting separately for each temperature segment.
[0087] 2) For any temperature range: Based on the ambient temperature of each binding point in the temperature range and the capacitance value of the parasitic capacitance corresponding to each binding point, the temperature coefficient sub-function of the temperature range is fitted.
[0088] 3) Obtain the temperature coefficient function based on the temperature coefficient sub-functions for all temperature ranges.
[0089] In this embodiment, the temperature range is divided according to the ambient temperature of each binding point, and the measured parameters of each temperature range are fitted separately. This makes the temperature coefficient sub-function of each temperature range closer to the actual change characteristics of the temperature coefficient in that temperature range. Compared with directly fitting all the measured data, this can improve the accuracy of the fitting results and reduce the fitting difficulty.
[0090] Based on the above embodiments, optionally, the temperature sequence can be divided into temperature segments between every two adjacent binding point ambient temperatures, with the upper limit binding point ambient temperature of the previous temperature segment serving as the lower limit binding point ambient temperature of the next temperature segment; and a linear fit can be performed on the two binding point ambient temperatures and the capacitance values of the parasitic capacitances corresponding to the two binding point ambient temperatures in each temperature segment to obtain the temperature coefficient sub-function of the temperature segment. In this way, by subdividing the temperature segments, the accuracy of the fitting results can be improved as much as possible, and the difficulty of fitting the sub-function of each temperature segment can be simplified as much as possible.
[0091] In one specific embodiment, optionally, the ambient temperatures of each binding point in the temperature sequence are: T0, T1, ..., T nn is a positive integer greater than or equal to 2; where T0 is equal to the lower limit of the allowable operating temperature, T n This equals the upper limit of the permissible operating temperature.
[0092] Based on this, the temperature coefficient function is: f(T) n )=1+K1×(T1-T0)+K2×(T2-T1)+…+K n ×(T n -T n-1 ); where K i This represents the slope of the parasitic capacitance value in the i-th temperature range as a function of ambient temperature, where the i-th temperature range is [T]. i-1 ,T i For a more complete illustration, T is given here as an example. n The temperature coefficient function f(T) under the following conditions n ) in its specific form.
[0093] More broadly, for any ambient temperature T, the temperature coefficient function can be expressed as:
[0094] ;
[0095] Among them, T i Let a be the ambient temperature of the (i+1)th binding point in the temperature sequence, where a is a positive integer.
[0096] Based on the above embodiments, optionally, multiple ambient temperatures can be selected as the ambient temperatures for each binding point at equal temperature intervals between the lower limit and upper limit of the allowable operating temperature. This makes the temperature coefficient function more accurate, and the temperature interval can be set according to actual needs. For example, if higher accuracy of temperature drift compensation is required, the temperature interval can be set to be smaller.
[0097] In one specific embodiment, the parasitic capacitance compensation method of the capacitance sensing device optionally includes the following steps:
[0098] 1. Before leaving the factory, the parasitic capacitance is measured sequentially at equal intervals under ambient temperature to determine the mapping relationship between parasitic capacitance and ambient temperature. The relevant parameters can be stored in the corresponding storage module. The mapping relationship between parasitic capacitance and ambient temperature can be expressed as: Cn = C0 × (1 + K1 × (T1 - T0) + K2 × (T2 - T1) + ... + K n ×(T n -T n-1 ), where T0, T1, T2, ..., T n The selected equally spaced ambient temperature values, i.e., the ambient temperatures at each binding point; K1, K2, ..., K n Let f(T) be the slope of the parasitic capacitance value as a function of ambient temperature in each temperature range. Correspondingly, f(T) can be obtained.n )=1+K1×(T1-T0)+K2×(T2-T1)+…+K n ×(T n -T n-1 ).
[0099] 2. Before use, the user sets the compensation capacitor and records the residual capacitance measurement value after compensation, i.e., the reference residual value Ccomp, and the ambient temperature at the time of compensation, i.e., the reference ambient temperature Tcomp. At this time, no human body or object is near. The capacitance measurement value is the residual value of the parasitic capacitance value after compensation by the compensation capacitor. This reference residual value is close to 0.
[0100] 3. After the user starts using the capacitance sensing device, the current ambient temperature is measured in real time. Based on the change in the current ambient temperature, the change in the residual value of the parasitic capacitance is predicted. For example, if the current ambient temperature is Tx, and assuming Tx is between T6 and T7, and Tcomp is between T3 and T4, then the current residual value of the parasitic capacitance Cpx = Ccomp × {1 + [K4 × (T4 - Tcomp) + K5 × (T5 - T4) + K6 × (T6 - T5) + K7 × (T... x -T6)] / [1+K1×(T1-T0)+K2×(T2-T1)+K3×(T3-T2)+K4×(Tcomp-T3)]}, Current variable capacitance value = Current capacitance measurement value - Current residual value.
[0101] In the above-described embodiment of the present invention, the parasitic capacitance compensation method for a capacitance sensing device is used for real-time environmental compensation in capacitance detection. This method overcomes the shortcomings of technique 1 in the related art by providing real-time compensation and improving accuracy. It also overcomes the shortcomings of technique 2 in the related art by eliminating the need for an external reference channel for measurement, thus simplifying the device structure. In summary, the present invention utilizes the mapping relationship between ambient temperature changes and parasitic capacitance changes to reduce the error in capacitance detection caused by temperature variations, thereby improving detection accuracy.
[0102] This invention also provides a capacitance sensing device. The parasitic capacitance compensation method of the capacitance sensing device provided in any embodiment of this invention has corresponding beneficial effects. Figure 3 This is a schematic diagram of the structure of a capacitive sensing device provided in an embodiment of the present invention. See also: Figure 3The capacitive sensing device includes: a sensing capacitor 10, a compensation capacitor 20, a capacitance detection module 30, a temperature detection module 40, and a main control module 50. The sensing capacitor 10 includes a variable capacitance and a parasitic capacitance. The capacitance detection module 30 detects the capacitance value of the sensing capacitor 10 and subtracts the capacitance value of the compensation capacitor 20 to obtain a measured capacitance value. The temperature detection module 40 detects the ambient temperature. The main control module 50 is connected to both the capacitance detection module 30 and the temperature detection module 40, and is used to execute the parasitic capacitance compensation method of the capacitive sensing device provided in any embodiment of the present invention. For example, this capacitive sensing device can be applied to a proximity sensor.
[0103] For example, the capacitance sensing device may also include a storage module 60, which may store the mapping relationship between parasitic capacitance and ambient temperature, temperature coefficient function, and first mapping relationship, etc.
[0104] Figure 4 This is a schematic diagram of another capacitive sensing device provided in an embodiment of the present invention. See also... Figure 4 Based on the above embodiments, optionally, the main control module 50 includes a temperature compensation unit 510, which is used to execute a parasitic capacitance compensation method for the capacitive sensing device. The output signal Cuser of the main control module 50 can be transmitted to a subsequent processing unit, for example, to determine the distance between the organism and the capacitive sensing device based on the output signal Cuser. For example, the output signal Cuser can be a digital signal.
[0105] In one implementation, optionally, see [link to relevant documentation]. Figure 4 The main control module 50 also includes: a first analog-to-digital converter ADC1 and a second analog-to-digital converter ADC2; the first analog-to-digital converter ADC1 is connected between the capacitance detection module 30 and the temperature compensation unit 510, and the second analog-to-digital converter ADC2 is connected between the temperature detection module 40 and the temperature compensation unit 510; in this way, the current capacitance measurement value and the current ambient temperature are converted into digital signals by the two analog-to-digital converters respectively, and then processed by the temperature compensation unit 510 to obtain the digital output signal Cuser.
[0106] Or see Figure 5In another embodiment, optionally, the main control module 50 further includes a third analog-to-digital converter (ADC3), which is connected to the output of the temperature compensation unit 510. Thus, the temperature compensation unit 510 can process the analog current capacitance measurement value and the current ambient temperature, and the processing result can be converted into a digital output signal Cuser via the third ADC3. This embodiment simplifies the circuit structure by using only one ADC, and since the third ADC3 only needs to perform analog-to-digital conversion on the compensated current variable capacitance value, the requirement for the third ADC3 is reduced. Furthermore, the temperature compensation unit 510 directly processes the analog signal, avoiding errors caused by the preceding analog-to-digital conversion and improving the accuracy of the result.
[0107] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0108] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A method for compensating for parasitic capacitance in a capacitive sensing device, characterized in that, The capacitance sensing device includes a sensing capacitor and a compensation capacitor. The sensing capacitor includes a parasitic capacitance and a variable capacitance. The compensation capacitor is used to compensate for the parasitic capacitance. The method includes: Obtain the current capacitance measurement value; wherein, the current capacitance measurement value is the difference between the current capacitance value of the sensing capacitor and the capacitance value of the compensation capacitor; Get the current ambient temperature; Based on the current ambient temperature and the first mapping relationship, determine the current residual value of the parasitic capacitance after compensation by the compensation capacitor at the current ambient temperature; wherein, the first mapping relationship is the correspondence between the residual value of the parasitic capacitance after compensation by the compensation capacitor and the ambient temperature; The current variable capacitance value is obtained by subtracting the current residual value from the current capacitance measurement value.
2. The parasitic capacitance compensation method for the capacitive sensing device according to claim 1, characterized in that, Before acquiring the current capacitance measurement value, the method further includes: Without setting the compensation capacitor and with the capacitance value of the variable capacitor remaining at 0, the capacitance value of the sensing capacitor is measured at multiple different binding point ambient temperatures to obtain the capacitance value of the parasitic capacitance corresponding to each binding point ambient temperature; wherein, each binding point ambient temperature is distributed between the lower limit of the allowable operating temperature and the upper limit of the allowable operating temperature of the capacitance sensing device. The temperature coefficient function is determined based on the ambient temperature of each binding point and the capacitance value of the parasitic capacitance corresponding to each ambient temperature of the binding point; wherein, the temperature coefficient function is the relationship function between the temperature coefficient and the ambient temperature, the temperature coefficient is the multiple relationship between the capacitance value of the parasitic capacitance at any ambient temperature and the initial capacitance value, and the initial capacitance value is the capacitance value of the parasitic capacitance corresponding to the lower limit of the allowable operating temperature. Set the compensation capacitor, record the ambient temperature when setting the compensation capacitor as the reference ambient temperature, and record the residual value of the parasitic capacitance after setting the compensation capacitor at the reference ambient temperature as the reference residual value. The first mapping relationship is determined based on the reference ambient temperature, the reference residual value, and the temperature coefficient function; wherein, under the same ambient temperature, the residual value of the parasitic capacitance has the same temperature coefficient as the capacitance value of the parasitic capacitance.
3. The parasitic capacitance compensation method for the capacitive sensing device according to claim 2, characterized in that, The temperature coefficient function is expressed as: f(T), T∈[Tori, Tend]; where T is the ambient temperature, Tori is the lower limit of the allowable operating temperature, and Tend is the upper limit of the allowable operating temperature; Determining the first mapping relationship based on the reference ambient temperature, the reference residual value, and the temperature coefficient function includes: The first mapping relationship is: Where T represents the ambient temperature, Cp(T) represents the residual value of the parasitic capacitance corresponding to the ambient temperature T, Ccomp represents the reference residual value, and Tcomp represents the reference ambient temperature.
4. The parasitic capacitance compensation method for the capacitive sensing device according to claim 3, characterized in that, When setting the compensation capacitor, the reference ambient temperature is configured to be equal to the lower limit of the allowable operating temperature; The first mapping relationship is: Cp(T) = Ccomp × f(T).
5. The parasitic capacitance compensation method for the capacitive sensing device according to any one of claims 2-4, characterized in that, The temperature coefficient function is determined based on the ambient temperature of each binding point and the capacitance value of the parasitic capacitance corresponding to each ambient temperature of the binding point, including: The ambient temperatures of each binding point are arranged from low to high to obtain a temperature sequence, and the temperature sequence is divided into at least two temperature segments; wherein each temperature segment includes at least two ambient temperatures of binding points; For any temperature range: Based on the ambient temperature of each binding point in the temperature range and the capacitance value of the parasitic capacitance corresponding to each binding point ambient temperature, a temperature coefficient sub-function of the temperature range is fitted. The temperature coefficient function is obtained based on the temperature coefficient sub-functions for all temperature ranges.
6. The parasitic capacitance compensation method for the capacitive sensing device according to claim 5, characterized in that, The temperature sequence is divided into two adjacent binding point ambient temperatures, and the upper limit binding point ambient temperature of the previous temperature segment is used as the lower limit binding point ambient temperature of the next temperature segment. Linear fitting is performed on the ambient temperatures of the two binding points and the capacitance values of the parasitic capacitances corresponding to the ambient temperatures of the two binding points in each temperature range to obtain the temperature coefficient sub-function of the temperature range.
7. The parasitic capacitance compensation method for the capacitive sensing device according to claim 6, characterized in that, The ambient temperatures at each binding point in the temperature sequence are, in order: T0, T1, ..., T n n is a positive integer greater than or equal to 2; where T0 is equal to the lower limit of the allowable operating temperature, T n It equals the upper limit of the allowable operating temperature; The temperature coefficient function is: f(T) n )=1+K1×(T1-T0)+K2×(T2-T1)+…+K n ×(T n -T n-1 ); where K i This represents the slope of the parasitic capacitance value in the i-th temperature range as a function of ambient temperature, where the i-th temperature range is [T]. i-1 ,T i ].
8. The parasitic capacitance compensation method for the capacitive sensing device according to claim 2, characterized in that, Multiple ambient temperatures are selected as the ambient temperatures of each binding point at equal temperature intervals between the lower limit of the allowable operating temperature and the upper limit of the allowable operating temperature. And / or, Setting the compensation capacitor includes: under the condition that the capacitance value of the variable capacitor is kept at 0, configuring the capacitance value of the compensation capacitor such that the difference between the capacitance value of the sensing capacitor and the capacitance value of the compensation capacitor is less than a preset threshold.
9. A capacitive sensing device, characterized in that, include: Sensing capacitance includes variable capacitance and parasitic capacitance; Compensation capacitor; The capacitance detection module is used to detect the capacitance value of the sensing capacitor and subtract the capacitance value of the compensation capacitor to obtain the capacitance measurement value. Temperature detection module, used to detect ambient temperature; The main control module is connected to the capacitance detection module and the temperature detection module respectively, and is used to execute the parasitic capacitance compensation method of the capacitance sensing device according to any one of claims 1-8.
10. The capacitive sensing device according to claim 9, characterized in that, The main control module includes a temperature compensation unit, which is used to execute the parasitic capacitance compensation method of the capacitance sensing device. The main control module further includes: a first analog-to-digital converter and a second analog-to-digital converter; the first analog-to-digital converter is connected between the capacitance detection module and the temperature compensation unit, and the second analog-to-digital converter is connected between the temperature detection module and the temperature compensation unit; or, the main control module further includes: a third analog-to-digital converter, connected to the output terminal of the temperature compensation unit.