Self-capacitance data compensation method and device, sensor, chip and electronic equipment
By acquiring mutual capacitance and self-capacitance data, determining compensation data, and performing precise compensation, the impact of environmental capacitance changes on the accuracy of capacitive sensors is resolved, thereby improving the detection accuracy of multi-channel capacitive sensors.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANGHAI AWINIC TECH CO LTD
- Filing Date
- 2023-12-07
- Publication Date
- 2026-07-21
AI Technical Summary
Existing capacitive sensors suffer from decreased accuracy in detecting human proximity or touch when the ambient capacitance changes, failing to effectively counteract the effects of environmental factors.
By acquiring mutual capacitance and self-capacitance data under different detection environments, compensation data is determined, and the current self-capacitance of the detection channel is compensated based on these data. Precise compensation is achieved by utilizing the nonlinear mapping relationship between mutual capacitance and self-capacitance.
This improves the accuracy of capacitive sensors in determining human proximity or touch when environmental capacitance changes, reduces the impact of environmental factors on detection, and enhances the detection accuracy of multi-channel capacitive sensors.
Smart Images

Figure CN117664207B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of capacitance detection technology, and in particular to a method, apparatus, sensor, chip, and electronic device for compensating self-capacitance data. Background Technology
[0002] Capacitive sensors are commonly used in products such as proximity sensors (SAR sensors), touch detection, and in-ear detection. Two detection methods are employed depending on the application: self-capacitance detection and mutual capacitance detection. Self-capacitance detection typically involves applying an excitation voltage to the measurement pin to detect the capacitance between that pin and ground, while mutual capacitance detection typically involves applying an excitation voltage to the transmitting electrode to detect the capacitance between the transmitting and receiving electrodes.
[0003] For example, in human proximity or touch detection scenarios, in order to detect only the capacitance caused by human proximity or touch, capacitive sensors need to be properly calibrated to offset the influence of the environment on the capacitance being measured. However, since environmental capacitance changes with factors such as temperature, humidity, and atmospheric pressure, for a calibrated capacitive sensor, if the environmental capacitance changes, the calibration result will also change, thus affecting the capacitive sensor's judgment of human proximity or touch, i.e., affecting the detection accuracy of the capacitive sensor. Summary of the Invention
[0004] To address the issue that changes in environmental capacitance can affect the detection of human proximity by existing capacitive sensors, this application provides a method, apparatus, sensor, chip, and electronic device for compensating for self-capacitance data.
[0005] In a first aspect, this application provides a self-capacitance data compensation method for a capacitive sensor, the capacitive sensor including multiple detection channels and at least one driving channel;
[0006] Methods for compensating for self-capacitance data include:
[0007] Acquire mutual capacitance data between the detection channel and the driving channel under different detection environments, as well as self-capacitance data corresponding to each detection channel. The mutual capacitance data is the sum of the parasitic capacitances between each detection channel and each driving channel.
[0008] The compensation data is determined based on the mutual capacitance data and the self-capacitance data.
[0009] The current self-capacitance data of each detection channel is compensated based on the compensation data and the mutual capacitance data between the current detection channel and the driving channel to obtain the target self-capacitance data of each detection channel.
[0010] In this application, compensation data is determined based on mutual capacitance data and self-capacitance data. By combining the mutual capacitance between each detection channel and the driving electrode, the self-capacitance of each detection channel to ground is compensated in real time. This can reduce the impact of changes in environmental capacitance on the determination of human proximity and improve the detection accuracy of the capacitance sensor.
[0011] On the other hand, it acquires mutual capacitance data between the detection channel and the driving channel under different detection environments, as well as self-capacitance data corresponding to each detection channel, including:
[0012] Under the first detection environment, acquire the first mutual capacitance data between each detection channel and each driving channel, as well as the first self-capacitance data corresponding to each detection channel;
[0013] Under the second detection environment, acquire the second mutual capacitance data between each detection channel and each driving channel, as well as the second self-capacitance data corresponding to each detection channel;
[0014] Based on mutual capacitance data and self-capacitance data, compensation data is determined, including:
[0015] The mutual capacitance difference data is determined based on the first mutual capacitance data and the second mutual capacitance data, and the self-capacitance difference data is determined based on the first self-capacitance data and the second self-capacitance data.
[0016] The compensation data is determined based on the self-capacitance difference data and the mutual capacitance difference data.
[0017] On the other hand, based on the compensation data and the mutual capacitance data between the current detection channel and the driving channel, the current self-capacitance data of each detection channel is compensated to obtain the target self-capacitance data of each detection channel, including:
[0018] Based on the mutual capacitance data between the current detection channel and the drive channel and the first mutual capacitance data, determine the mutual capacitance change data;
[0019] Based on the compensation data and mutual capacitance change data, the first target compensation data is determined;
[0020] Based on the current self-capacitance data of each detection channel and the first target compensation data, the target self-capacitance data of each detection channel is determined.
[0021] On the other hand, compensation data is determined based on mutual capacitance data and self-capacitance data, including:
[0022] To obtain the nonlinear mapping relationship between mutual capacitance data and self-capacitance data;
[0023] The compensation data is determined based on the nonlinear mapping relationship.
[0024] On the other hand, obtaining the nonlinear mapping relationship between mutual capacitance data and self-capacitance data includes:
[0025] Polynomial fitting is performed on the mutual capacitance data and self-capacitance data to obtain the fitted polynomial, which is used to reflect the nonlinear mapping relationship between the mutual capacitance data and self-capacitance data.
[0026] Based on the nonlinear mapping relationship, the compensation data is determined, including:
[0027] The coefficients of at least one non-constant term of the fitted polynomial are determined as compensation data.
[0028] On the other hand, based on the compensation data and the mutual capacitance data between the current detection channel and the driving channel, the current self-capacitance data of each detection channel is compensated to obtain the target self-capacitance data of each detection channel, including:
[0029] The first mutual capacitance data is determined from the mutual capacitance data; the first mutual capacitance data is the mutual capacitance data obtained under the first detection environment;
[0030] Based on the mutual capacitance data between the current detection channel and the drive channel and the first mutual capacitance data, determine the mutual capacitance change data;
[0031] Based on the compensation data and mutual capacitance change data, determine the second target compensation data;
[0032] Based on the current self-capacitance data of each detection channel and the second target compensation data, the target self-capacitance data of each detection channel is determined.
[0033] On the other hand, the polynomial includes a first non-constant term and a second non-constant term, and the degrees of the first non-constant term and the second non-constant term are different;
[0034] The coefficients of at least one non-constant term of the fitted polynomial are determined as compensation data, including:
[0035] The coefficient of the first non-constant term in the fitted polynomial is used as the first compensation data, and the coefficient of the second non-constant term in the fitted polynomial is used as the second compensation data.
[0036] Based on the compensation data and mutual capacitance change data, the second target compensation data is determined, including:
[0037] Based on the first compensation data and the mutual capacitance change data, the compensation data for the first sub-target is determined;
[0038] Based on the second compensation data and the mutual capacitance change data, the compensation data for the second sub-target is determined;
[0039] Based on the second compensation data, the mutual capacitance change data, and the first mutual capacitance data, the compensation data for the third sub-target is determined.
[0040] The compensation data for the second target is determined based on the compensation data for the first sub-target, the compensation data for the second sub-target, and the compensation data for the third sub-target.
[0041] On the other hand, the temperature range of any two testing environments is different in different testing environments;
[0042] Based on mutual capacitance data and self-capacitance data, compensation data is determined, including:
[0043] For any detection environment under different detection environments, obtain the first linear mapping relationship between mutual capacitance data and temperature under any detection environment, and determine the third compensation data for the corresponding temperature range of any detection environment based on the first linear mapping relationship.
[0044] Obtain the second linear mapping relationship between self-capacitance data and temperature under any detection environment, and determine the fourth compensation data for the temperature range corresponding to any detection environment based on the second linear mapping relationship;
[0045] Based on the third and fourth compensation data, determine the compensation data for the current temperature range;
[0046] The compensation coefficients for multiple temperature ranges are integrated to obtain the compensation coefficients.
[0047] On the other hand, a first linear mapping relationship between mutual capacitance data and temperature is obtained under any detection environment, and third compensation data for the corresponding temperature range of any detection environment is determined based on the first linear mapping relationship, including:
[0048] Polynomial fitting is performed on mutual capacitance data and temperature under any detection environment to obtain the first polynomial after fitting. The first polynomial after fitting is used to reflect the linear mapping relationship between mutual capacitance data and temperature.
[0049] Use the coefficients of the non-constant terms in the first polynomial as the third compensation data;
[0050] Obtain the second linear mapping relationship between self-capacitance data and temperature under any detection environment, and determine the fourth compensation data for the temperature range corresponding to any detection environment based on the second linear mapping relationship, including:
[0051] Polynomial fitting is performed on the self-capacitance data and temperature under any detection environment to obtain the fitted second polynomial. The fitted second polynomial is used to reflect the linear mapping relationship between self-capacitance data and temperature.
[0052] The coefficients of the non-constant terms in the second polynomial are used as the fourth compensation data.
[0053] On the other hand, based on the compensation data and the mutual capacitance data between the current detection channel and the driving channel, the current self-capacitance data of each detection channel is compensated to obtain the target self-capacitance data of each detection channel, including:
[0054] The compensation coefficient of the temperature range in which the current mutual capacitance data is located is determined as the target compensation data;
[0055] The first mutual capacitance data is determined from the mutual capacitance data; the first mutual capacitance data is the mutual capacitance data obtained under the first detection environment;
[0056] Based on the mutual capacitance data between the current detection channel and the drive channel and the first mutual capacitance data, determine the mutual capacitance change data;
[0057] The third target compensation data is determined based on the target compensation data and the mutual capacitance change data;
[0058] Based on the current self-capacitance data of each detection channel and the third target compensation data, the target self-capacitance data of each detection channel is determined.
[0059] On the other hand, acquiring mutual capacitance data between the detection channel and the driving channel under different detection environments includes:
[0060] In each detection environment, the capacitive sensor is controlled to be in an unsensing state, and the capacitive sensor is controlled to be in a mutual capacitance working mode to obtain the parasitic capacitance between each detection channel and each driving channel.
[0061] The mutual capacitance data between the detection channel and the drive channel is determined based on the parasitic capacitance between each detection channel and each drive channel.
[0062] On the other hand, the self-capacitance data of each detection channel under different detection environments are obtained, including:
[0063] The capacitive sensor is controlled to switch from mutual capacitance mode to self-capacitance mode, and the voltage on the control drive channel is equal to the voltage on the detection channel. The parasitic capacitance of each detection channel to ground is obtained, and the self-capacitance data of each detection channel is obtained.
[0064] Secondly, this application provides a self-capacitance data compensation device, which is applied to a capacitive sensor, the capacitive sensor including multiple detection channels and at least one driving channel;
[0065] The self-capacitance data compensation device includes:
[0066] The acquisition module is used to acquire mutual capacitance data between the detection channel and the driving channel under different detection environments, as well as the self-capacitance data corresponding to each detection channel; the mutual capacitance data is the sum of the parasitic capacitances between each detection channel and each driving channel.
[0067] The determination module is used to determine the compensation data based on the mutual capacitance data and the self-capacitance data;
[0068] The compensation module is used to compensate the current self-capacitance data of each detection channel based on the compensation data and the current mutual capacitance data, so as to obtain the target self-capacitance data of each detection channel.
[0069] On the other hand, the acquisition module is used to acquire the first mutual capacitance data between each detection channel and each driving channel under the first detection environment, as well as the first self-capacitance data corresponding to each detection channel.
[0070] It is also used to acquire the second mutual capacitance data between each detection channel and each driving channel under the second detection environment, as well as the second self capacitance data corresponding to each detection channel;
[0071] The determination module is used to determine mutual capacitance difference data based on first mutual capacitance data and second mutual capacitance data, and to determine self-capacitance difference data based on first self-capacitance data and second self-capacitance data.
[0072] The compensation data is determined based on the self-capacitance difference data and the mutual capacitance difference data.
[0073] On the other hand, the compensation module is used to determine the mutual capacitance change data based on the mutual capacitance data between the current detection channel and the driving channel and the first mutual capacitance data;
[0074] Based on the compensation data and mutual capacitance change data, the first target compensation data is determined;
[0075] Based on the current self-capacitance data of each detection channel and the first target compensation data, the target self-capacitance data of each detection channel is determined.
[0076] On the other hand, the modules to be identified include:
[0077] The first acquisition submodule is used to acquire the nonlinear mapping relationship between mutual capacitance data and self-capacitance data;
[0078] The first determining submodule is used to determine the compensation data based on the nonlinear mapping relationship.
[0079] On the other hand, the first acquisition submodule is used to perform polynomial fitting on mutual capacitance data and self-capacitance data to obtain a fitted polynomial, which is used to reflect the nonlinear mapping relationship between mutual capacitance data and self-capacitance data.
[0080] The first determining submodule is used to determine the coefficients of at least one non-constant term of the fitted polynomial as compensation data.
[0081] On the other hand, the compensation module includes:
[0082] The second determining submodule is used to determine the first mutual capacitance data from the mutual capacitance data; the first mutual capacitance data is the mutual capacitance data obtained under the first detection environment.
[0083] The third determination submodule is used to determine the mutual capacitance change data based on the mutual capacitance data between the current detection channel and the driving channel and the first mutual capacitance data;
[0084] The fourth determination submodule is used to determine the second target compensation data based on the compensation data and the mutual capacitance change data;
[0085] The fifth determination submodule is used to determine the target self-capacitance data of each detection channel based on the current self-capacitance data of each detection channel and the second target compensation data.
[0086] On the other hand, the polynomial includes a first non-constant term and a second non-constant term, and the degrees of the first non-constant term and the second non-constant term are different;
[0087] The first determining submodule is used to take the coefficient of the first non-constant term in the fitted polynomial as the first compensation data and the coefficient of the second non-constant term in the fitted polynomial as the second compensation data.
[0088] The fourth determination submodule is used to determine the compensation data for the first sub-target based on the first compensation data and the mutual capacitance change data.
[0089] Based on the second compensation data and the mutual capacitance change data, the compensation data for the second sub-target is determined;
[0090] Based on the second compensation data, the mutual capacitance change data, and the first mutual capacitance data, the compensation data for the third sub-target is determined.
[0091] The compensation data for the second target is determined based on the compensation data for the first sub-target, the compensation data for the second sub-target, and the compensation data for the third sub-target.
[0092] On the other hand, the temperature range of any two testing environments is different in different testing environments;
[0093] The module to be determined includes:
[0094] The second acquisition submodule is used to acquire the first linear mapping relationship between mutual capacitance data and temperature in any detection environment under any detection environment, and to determine the third compensation data for the corresponding temperature range of any detection environment based on the first linear mapping relationship.
[0095] The third acquisition submodule is used to acquire the second linear mapping relationship between self-capacitance data and temperature under any detection environment, and to determine the fourth compensation data for the temperature range corresponding to any detection environment based on the second linear mapping relationship.
[0096] The sixth determination submodule is used to determine the compensation data for the current temperature range based on the third and fourth compensation data.
[0097] The integration submodule is used to integrate the compensation coefficients of multiple temperature ranges to obtain the compensation coefficients.
[0098] On the other hand, the second acquisition submodule is used to perform polynomial fitting on mutual capacitance data and temperature under any detection environment to obtain the first polynomial after fitting. The first polynomial after fitting is used to reflect the linear mapping relationship between mutual capacitance data and temperature.
[0099] Use the coefficients of the non-constant terms in the first polynomial as the third compensation data;
[0100] The third acquisition submodule is used to perform polynomial fitting on the self-capacitance data and temperature under any detection environment to obtain the fitted second polynomial. The fitted second polynomial is used to reflect the linear mapping relationship between self-capacitance data and temperature.
[0101] The coefficients of the non-constant terms in the second polynomial are used as the fourth compensation data.
[0102] On the other hand, the compensation module is used to determine the compensation coefficient of the temperature range in which the current mutual capacitance data is located as the target compensation data;
[0103] The first mutual capacitance data is determined from the mutual capacitance data; the first mutual capacitance data is the mutual capacitance data obtained under the first detection environment;
[0104] Based on the mutual capacitance data between the current detection channel and the drive channel and the first mutual capacitance data, determine the mutual capacitance change data;
[0105] The third target compensation data is determined based on the target compensation data and the mutual capacitance change data;
[0106] Based on the current self-capacitance data of each detection channel and the third target compensation data, the target self-capacitance data of each detection channel is determined.
[0107] On the other hand, the acquisition module is used to control the capacitive sensor to be in a non-sensing state and to control the capacitive sensor to be in a mutual capacitance working mode in various detection environments, and to acquire the parasitic capacitance between each detection channel and each driving channel.
[0108] The mutual capacitance data between the detection channel and the drive channel is determined based on the parasitic capacitance between each detection channel and each drive channel.
[0109] On the other hand, the acquisition module is used to control the capacitive sensor to switch from mutual capacitance working mode to self-capacitance working mode, and to control the voltage on the drive channel to be equal to the voltage on the detection channel, to acquire the parasitic capacitance of each detection channel to ground, and to obtain the self-capacitance data corresponding to each detection channel.
[0110] Thirdly, this application provides a capacitive sensor, comprising:
[0111] The control module is used to control the capacitive sensor to implement the self-capacitance data compensation method according to any one of claims 1-12;
[0112] The multiplexing module is used to select the state of each channel in the capacitive sensor based on the control commands from the control module.
[0113] At least one drive channel;
[0114] Multiple detection channels, each detection channel has parasitic capacitance with each drive channel, and each detection channel has parasitic capacitance to ground.
[0115] On the other hand, capacitive sensors also include:
[0116] The analog front-end module connects to the multiplexer module and is used to output a voltage proportional to the input capacitor.
[0117] Offset compensation module, which is connected to analog front-end module, is used to output a voltage proportional to the second parasitic capacitance on the detection channel;
[0118] The analog-to-digital converter module is connected to the offset compensation module. The analog-to-digital converter module is used to convert the output voltage of the analog front-end module into digital code and output it to the digital processing module.
[0119] The digital processing module is connected to the analog-to-digital conversion module. The digital processing module is used to receive digital codes and transmit them to the register module.
[0120] The register module is connected to the digital processing module.
[0121] Fourthly, this application provides a chip that includes a circuit for performing the above-described self-capacitance data compensation method.
[0122] Fifthly, this application provides an electronic device that includes the aforementioned chip. Attached Figure Description
[0123] Figure 1 This is a schematic diagram of the structure of a capacitive sensor;
[0124] Figure 2 This is a schematic diagram of the structure of a multi-channel capacitive sensor;
[0125] Figure 3 This is a partial structural diagram of a sensor;
[0126] Figure 4 This is a flowchart illustrating a self-capacitance data compensation method provided in an embodiment of this application;
[0127] Figure 5 This is a flowchart illustrating another self-capacitance data compensation method provided in an embodiment of this application;
[0128] Figure 6 This is a schematic diagram of another multi-channel capacitive sensor provided in an embodiment of this application;
[0129] Figure 7 This is a schematic diagram of the structure of a self-capacitance data compensation device provided in an embodiment of this application. Detailed Implementation
[0130] The illustrative embodiments of this application include, but are not limited to, a capacitance compensation method for self-capacitance data and a capacitive sensor.
[0131] Please see Figure 1 , Figure 1 This is a schematic diagram of a capacitive sensor. A capacitive sensor may include: a measuring element, an analog front end (AFE), an offset compensation module, an analog-to-digital converter (ADC), a digital processing module, registers, a logic control module, multiple sensing pins, and a multiplexer (MUX). The measuring element typically refers to a conductive area on a printed circuit board or flexible material. The analog front end module outputs a voltage proportional to the input capacitance. The ADC module converts the analog input voltage from the AFE into a digital code and outputs the digital code to the digital processing module. The digital processing unit processes the digital code obtained from the ADC module and sends the result to the registers. The registers include hardware registers mapped to memory used by the Central Processing Unit (CPU) to configure the capacitive sensor or by the capacitive sensor to report information to the CPU. The logic control module controls the parameter configuration of each module within the capacitive sensor and also controls the state of the sensor's sensing pins. The multiplexer selects the state of the chip's sensing pins.
[0132] In some alternative implementations, the capacitive sensor may also include multiple detection channels and a reference channel. See also... Figure 2 , Figure 2 This is a schematic diagram of a multi-channel capacitive sensor. A multi-channel capacitive sensor can include multiple detection channels CSn (n = 1, 2, 3…) and one reference channel CR. The parasitic capacitance of the detection channel to ground can be represented as Cxn (n = 1, 2, 3…), and the parasitic capacitance of the reference channel to ground can be represented as Cref.
[0133] As mentioned earlier, for example, in scenarios where a human body is near, the environmental capacitance changes with factors such as temperature, humidity, and atmospheric pressure, which can affect the determination of whether a human body is near or being touched, resulting in lower detection accuracy of the capacitance sensor.
[0134] To address the aforementioned issues, in some optional implementations, compensation can be applied to the parasitic capacitance of each detection channel to ground based on the change in the parasitic capacitance of the reference channel to ground and a fixed compensation coefficient. This reduces the impact of changes in environmental capacitance on the determination of human proximity or touch, thereby improving the detection accuracy of the capacitance sensor. The specific compensation method is as follows:
[0135] When no human body is near or touching the reference channel, the initial value of the parasitic capacitance Cref to ground, Cref0, is obtained. When the environment changes, i.e., temperature and humidity change, the change in the parasitic capacitance Cref to ground of the reference channel can be recorded as ΔCref. Assuming that the change in parasitic capacitance of the reference channel is proportional to that of the detection channel, the compensated parasitic capacitance Cxn to ground of the detection channel can be recorded as Cxn'. In practical processing, the compensated parasitic capacitance of the detection channel to ground can be specifically expressed in the following form:
[0136] Cxn'=Cxn+k*△Cref
[0137] Where Cxn' represents the parasitic capacitance of the compensated detection channel to ground, Cxn represents the parasitic capacitance of the detection channel to ground before compensation, ΔCref represents the change in the parasitic capacitance of the reference channel to ground when the environment changes, and k represents the proportionality coefficient between the change in the parasitic capacitance of the detection channel and the change in the parasitic capacitance of the reference channel. This coefficient can be a fixed value or a set of data. Typically, if only the effect of temperature is considered, k can be set as a piecewise coefficient that varies with temperature.
[0138] To achieve better compensation, the reference channel typically needs to be close to the measurement channel, and the connecting trace material should be consistent. This ensures that the temperature coefficient of the parasitic capacitance Cref of the reference channel to ground is close to the parasitic capacitance Cxn of the detection channel to ground before compensation. Furthermore, the magnitude of the parasitic capacitance Cref of the reference channel to ground should not change when a human body or other conductive object is near. Please refer to [link to relevant documentation]. Figure 3 , Figure 3 This is a partial structural diagram of a sensor. The detection channel includes a measuring element and a trace, while the reference channel only contains the trace.
[0139] The above-mentioned parasitic capacitance compensation method is used for including Figure 2 and Figure 3 Parasitic compensation for the multi-channel capacitive sensor with the structure shown, that is, parasitic compensation for multiple detection channels by using the capacitance change of a reference channel, will lead to inconsistent compensation effects among the detection channels, resulting in poor compensation effect and failing to significantly improve the accuracy of the multi-channel capacitive sensor.
[0140] To address the aforementioned problems, this application provides a method for compensating self-capacitance data. This method may include: acquiring mutual capacitance data between the detection channel and the driving channel under different detection environments, and self-capacitance data corresponding to each detection channel; the mutual capacitance data is the sum of the mutual capacitance data between each detection channel and each driving channel. Compensation data is determined based on the mutual capacitance data and the self-capacitance data. The current self-capacitance data of each detection channel is compensated based on the compensation data and the current mutual capacitance data between the detection channel and the driving channel to obtain the target self-capacitance data for each detection channel.
[0141] In the compensation method provided in this application, compensation data is determined based on mutual capacitance data and self-capacitance data. This is combined with the parasitic capacitance between each detection channel and the driving electrode to compensate for the ground self-capacitance of each detection channel. It can be understood that by taking into account the relationship between the parasitic capacitance of each detection channel to ground and the overall change of the parasitic capacitance between each detection channel and the driving electrode, the compensation effect can be improved, effectively reducing the impact of changes in environmental capacitance on the determination of human proximity or touch, thereby effectively improving the accuracy of multi-channel capacitive sensors.
[0142] The following section provides a detailed explanation of the compensation method for self-capacitance data. Please refer to [link / reference needed]. Figure 4 , Figure 4 This is a schematic flowchart illustrating a self-capacitance data compensation method provided in an embodiment of this application. This self-capacitance data compensation method can be used in capacitive sensors. The capacitive sensor may include multiple detection channels and at least one driving channel.
[0143] like Figure 4As shown, the compensation method for self-capacitance data may include:
[0144] S401: Acquire mutual capacitance data between the detection channel and the drive channel under different detection environments, as well as self-capacitance data corresponding to each detection channel.
[0145] In this embodiment, the mutual capacitance data between the detection channel and the driving channel can be the sum of the parasitic capacitances between each detection channel and each driving channel. The self-capacitance data corresponding to each detection channel can be the parasitic capacitance of each detection channel to ground.
[0146] In this embodiment, under each detection environment, the capacitive sensor can be controlled to be in an unsensing state, i.e., no human body is approaching or touching it. Each detection environment can perform one detection process or multiple detection processes. One detection process can include controlling the capacitive sensor to operate in a mutual capacitance mode for a first detection process, and controlling the capacitive sensor to operate in a self-capacitance mode for a second detection process. For example, a detection process can be performed under detection environment 1, where the ambient temperature is "x1" and the ambient humidity is "y1". A detection process can be performed under detection environment 2, where the ambient temperature is "x2" and the ambient humidity is "y2". The first detection process can configure each detection channel as a receiver (RX) and each drive channel as a transmitter (TX) using a multiplexing module.
[0147] In some optional implementations, during each detection process in each detection environment, the capacitive sensor can be controlled to be in an unsensing state, i.e., without human presence or touch. The capacitive sensor can also be controlled to operate in a mutual capacitance mode to acquire the parasitic capacitance between each detection channel and each driving channel. Furthermore, the mutual capacitance data between the detection channel and the driving channel can be determined based on the sum of the parasitic capacitance data between each detection channel and each driving channel.
[0148] Please see Figure 5 , Figure 5 This is a schematic diagram of a multi-channel capacitive sensor provided in an embodiment of this application, including multiple detection channels and one driving channel. In some optional embodiments, for Figure 5 The multi-channel capacitive sensor shown includes multiple detection channels and one drive channel. In each detection process, the parasitic capacitances between the multiple detection channels and the drive channel can be added together to obtain the mutual capacitance data between the detection channels and the drive channel in that detection process. By directly adding the parasitic capacitances between each detection channel and the drive channel, the amount of data processing can be reduced, processing resources can be saved, and processing efficiency can be improved.
[0149] In some optional implementations, when the multi-channel capacitive sensor includes n detection channels and one driving channel, in the first detection process of each detection process, the parasitic capacitance Cm11 between detection channel CS1 and driving channel CD1, the parasitic capacitance Cm2 between detection channel CS2 and driving channel CD1, the parasitic capacitance Cm3 between detection channel CS3 and driving channel CD1, ... the parasitic capacitance Cmn between detection channel CSN and driving channel CD1 can be obtained. Then, the mutual capacitance between each of the n detection channels and the driving channel can be directly added together to obtain the mutual capacitance between the detection channel and the driving channel. Optionally, the mutual capacitance between the detection channel and the driving channel can be specifically expressed in the following form:
[0150] Cm = Cm1 + Cm2 + ... + Cmn.
[0151] Where Cm can be represented as the mutual capacitance between the detection channel and the driving channel.
[0152] Please see Figure 6 , Figure 6 This is a schematic diagram of another multi-channel capacitive sensor provided in an embodiment of this application, which includes multiple detection channels and multiple driving channels. In some optional embodiments, for Figure 6 The multi-channel capacitive sensor shown includes multiple detection channels and multiple drive channels. In each detection process, the parasitic data between each detection channel and any one of the multiple drive channels can be added to obtain the mutual capacitance data between each detection channel and that arbitrary drive channel in the current detection process. Following this method, the mutual capacitance data between each detection channel and each drive channel in the current detection process can be obtained. Then, according to a preset weight for each drive channel, the mutual capacitance data between each detection channel and any one drive channel can be added to obtain the mutual capacitance data between the detection channel and the drive channel in the current detection process. For example, the preset weight of each drive channel can be multiplied by the mutual capacitance data between that drive channel and each detection channel, and then added to obtain the mutual capacitance data between the detection channel and the drive channel in the current detection process. The preset weights of the drive channels can be all different, partially different, or all the same. When the preset weights for each driving channel are all different, the preset weights for multiple driving channels can be a geometric sequence, an arithmetic sequence, or other data sets with a linear relationship; this application embodiment does not impose specific limitations. By multiplying the preset weight of each driving channel by the mutual capacitance data between that driving channel and each detection channel and then summing the results, the accuracy of the determined mutual capacitance data can be improved, thereby improving the compensation effect and enhancing the accuracy of the multi-channel capacitive sensor.
[0153] In some optional implementations, when the multi-channel capacitive sensor includes n1 detection channels and n2 driving channels, in the first detection process under the first detection environment, the parasitic capacitance Cm11 between detection channel CS1 and driving channel CD1, the parasitic capacitance Cm21 between detection channel CS2 and driving channel CD1, ... the parasitic capacitance Cmn1 between detection channel CSN and driving channel CD1 can be obtained. Furthermore, the parasitic capacitance Cm12 between detection channel CS1 and driving channel CD2, the parasitic capacitance Cm22 between detection channel CS2 and driving channel CD2, ... the parasitic capacitance Cmn2 between detection channel CSN and driving channel CD2, ... the parasitic capacitance Cm1n2 between detection channel CS1 and driving channel CDn2, the parasitic capacitance Cm2n2 between detection channel CS2 and driving channel CDn2, ... the parasitic capacitance Cmn1n2 between detection channel CSN1 and driving channel CDn2.
[0154] Next, the mutual capacitance between the n1 detection channels and each driving channel can be added together to obtain the mutual capacitance between the detection channels and the driving channels. Optionally, the mutual capacitance between the detection channels and the driving channels can be specifically expressed in the following form:
[0155] Cm=Cm11+Cm21+…+Cmn11+Cm21+Cm22…+Cmn12+…+Cmn11+Cmn12…+Cmn1n2.
[0156] Alternatively, the mutual capacitance between the detection channel and the driving channel can be obtained by multiplying the preset weight of each driving channel by the mutual capacitance between that driving channel and each detection channel, and then summing the results. That is, according to the preset weight of each driving channel, the mutual capacitance between the n1 detection channels and any one driving channel is multiplied and then summed to obtain the mutual capacitance between the detection channel and the driving channel. Optionally, the mutual capacitance between the detection channel and the driving channel can be specifically represented in the following form:
[0157] Cm=β1(Cm11+Cm21+…+Cmn11)+β2(Cm12+Cm22+…+Cmn12)+…+
[0158] βn(Cm1n2+Cm2n2+…+Cmn1n2)
[0159] Wherein, β1, β2…βn can represent the preset weights of the driving channels.
[0160] In this embodiment, during each detection process in each detection environment, the capacitive sensor can be controlled to switch from mutual capacitance mode to self-capacitance mode, and the voltage on the drive channel can be controlled to be equal to the voltage on the detection channel, so as to obtain the parasitic capacitance of each detection channel to ground and obtain the self-capacitance data corresponding to each detection channel.
[0161] In some optional implementations, in each detection process, after determining the mutual capacitance data between the detection channel and the drive channel in the first detection process, the operating mode of the capacitive sensor can be switched to the self-capacitance operating mode, and the voltage on the drive channel can be made consistent with that of the detection channel. The parasitic capacitance Cxn (n = 1, 2, 3...) of each detection channel to ground can be obtained in sequence to obtain the parasitic capacitance of each detection channel to ground in the second detection process.
[0162] When environmental conditions change, such as variations in temperature or humidity, step S401 can be repeated to obtain mutual capacitance and self-capacitance data under different detection environments. Specifically, in the first detection environment, for example, the parasitic capacitance between the detection channel and the drive channel obtained from the first detection process when the capacitive sensor is in mutual capacitance mode is recorded as the initial mutual capacitance value Cm_i. The parasitic capacitance of each detection channel to ground obtained from the second detection process when the multi-channel capacitive sensor is in self-capacitance mode is recorded as the initial self-capacitance value Cxn_i for each detection channel. By detecting the mutual capacitance and self-capacitance data under various detection environments, abundant mutual capacitance and self-capacitance data can be obtained, improving the accuracy of subsequent compensation data determination, thereby improving the compensation effect and enhancing the accuracy of the multi-channel capacitive sensor.
[0163] S402: Determine the compensation data based on the mutual capacitance data and the self-capacitance data.
[0164] In this embodiment, mutual capacitance data under two different detection environments can be determined from mutual capacitance data obtained under different detection environments, and self-capacitance data under two different detection environments can be determined from self-capacitance data obtained under different detection environments. Then, the difference between the mutual capacitance data under the two detection environments and the difference between the self-capacitance data under the two detection environments can be determined separately, and the ratio of the two can be determined as compensation data.
[0165] In some optional implementations, the mutual capacitance data obtained under the first detection environment can be determined from the mutual capacitance data obtained under different detection environments. Similarly, the self-capacitance data obtained under the first detection environment can be determined from the self-capacitance data obtained under different detection environments. The mutual capacitance data obtained under the t-th detection environment can be determined from the mutual capacitance data obtained under different detection environments, and the self-capacitance data obtained under the t-th detection environment can be determined from the self-capacitance data obtained under different detection environments. Then, compensation data can be determined based on the difference between the mutual capacitance data obtained under the t-th detection environment and the mutual capacitance data obtained under the first detection environment, as well as the difference between the self-capacitance data obtained under the t-th detection environment and the self-capacitance data obtained under the t-th detection environment and the self-capacitance data obtained under the first detection environment.
[0166] Optionally, the mutual capacitance data obtained under the t-th detection environment can be determined from the mutual capacitance data obtained under different detection environments, and the self-capacitance data obtained under the t-th detection environment can be determined from the self-capacitance data obtained under different detection environments. Then, compensation data can be determined based on the difference between the mutual capacitance data obtained under the (t+1)-th and t-th detection environments, and the difference between the self-capacitance data obtained under the (t+1)-th and t-th detection environments.
[0167] In some optional implementations, first mutual capacitance data between each detection channel and each driving channel can be acquired under a first detection environment, as well as first self-capacitance data corresponding to each detection channel. When the environment changes, such as from the first detection environment to the second detection environment, second mutual capacitance data between each detection channel and each driving channel can be acquired under the second detection environment, as well as second self-capacitance data corresponding to each detection channel. Then, mutual capacitance difference data can be determined based on the first and second mutual capacitance data, self-capacitance difference data can be determined based on the first and second self-capacitance data, and compensation data can be determined based on the self-capacitance difference data and the mutual capacitance difference data. The first mutual capacitance data can be the mutual capacitance data obtained under the first detection environment, the second mutual capacitance data can be the mutual capacitance data obtained under the current detection environment, the first self-capacitance data can be the self-capacitance data obtained under the first detection environment, and the second self-capacitance data can be the self-capacitance data obtained under the current detection environment. The mutual capacitance difference data can be the difference between the second and first mutual capacitance data, and the self-capacitance difference data can be the difference between the second and first self-capacitance data. Optionally, the specific form of the compensation data can be:
[0168]
[0169] Where α can represent the compensation data, that is, the proportional coefficient between the change in self-capacitance and the change in mutual capacitance; Cxn_t can represent the self-capacitance data obtained under the current detection environment, that is, the second self-capacitance data; Cxn_i can represent the self-capacitance data obtained under the first detection environment, that is, the first self-capacitance data; Cm_t can represent the mutual capacitance data obtained under the current detection environment, that is, the second mutual capacitance data; and Cm_i can represent the mutual capacitance data obtained under the first detection environment, that is, the first mutual capacitance data.
[0170] Environmental changes alter the self-capacitance of each detection channel relative to ground, as well as the mutual capacitance between each detection channel and each driving channel. However, since the relationship between self-capacitance and mutual capacitance is not necessarily linear, the method described above—determining the difference between mutual capacitance and self-capacitance data under two detection environments and using their ratio as compensation data—is insufficient to meet practical requirements. Therefore, in some optional implementations, a nonlinear mapping relationship between mutual capacitance and self-capacitance data under different detection environments can be obtained, and compensation coefficients can be determined based on this nonlinear mapping relationship. For example, polynomial fitting can be performed on the mutual capacitance and self-capacitance data obtained under various detection environments to obtain a fitted polynomial. This fitted polynomial reflects the nonlinear mapping relationship between mutual capacitance and self-capacitance data; the independent variable of the fitted polynomial can be mutual capacitance data, and the dependent variable can be self-capacitance data. Then, the coefficients of at least one non-constant term of the fitted polynomial can be determined as compensation data.
[0171] In some alternative implementations, to reduce the amount of data processing, the degree of the fitted polynomial is generally no more than 2. The following explanation uses a quadratic polynomial as an example.
[0172] Optionally, the mutual capacitance data and self-capacitance data obtained under different detection environments can be subjected to quadratic polynomial fitting to obtain the quadratic polynomial shown below:
[0173] Cxn=a+b·Cm+c·Cm 2
[0174] Then the coefficients b of the first term and c of the second term can be determined as compensation data, that is, the proportional coefficients between the change in self-capacitance and the change in mutual capacitance.
[0175] Considering that temperature has a dominant effect on multi-channel capacitive sensors, continuous cyclic high and low temperatures can be applied to the multi-channel capacitive sensor under different detection environments. The self-capacitance Cxn of each detection channel relative to ground and the mutual capacitance Cm between each detection channel and each driving channel are recorded within a temperature range under each detection environment. Then, the curves of Cxn and Cm changing with temperature can be recorded separately, and linear fitting is performed in different temperature ranges. The coefficients of the linear fitting of Cxn and Cm in each temperature range are used as compensation data for that temperature range, i.e., the proportional coefficients between the change in self-capacitance and the change in mutual capacitance.
[0176] In some alternative implementations, the temperature ranges of any two detection processes in the multiple detection processes can be different. Generally, the temperature range of the detection processes in the multiple detection processes does not exceed 3.
[0177] In some optional implementations, for any given detection environment, a first linear mapping relationship between mutual capacitance data and temperature is obtained under that detection environment. Based on this first linear mapping relationship, third compensation data for the corresponding temperature range of that detection environment is determined. Simultaneously, a second linear mapping relationship between self-capacitance data and temperature under that detection environment can be obtained. Based on this second linear mapping relationship, fourth compensation data for the corresponding temperature range of that detection environment is determined. Then, based on the third and fourth compensation data, the compensation number for the current temperature range can be determined, and the compensation coefficients for multiple temperature ranges are integrated to obtain the compensation coefficient.
[0178] Optionally, polynomial fitting can be performed on the mutual capacitance data and temperature under the detection environment to obtain a fitted first polynomial. This fitted first polynomial can be used to reflect the linear mapping relationship between mutual capacitance data and temperature. Then, the coefficients of the non-constant terms in the first polynomial can be used as the third compensation data. Similarly, polynomial fitting can be performed on the self-capacitance data and temperature under the detection environment to obtain a fitted second polynomial. This fitted second polynomial can be used to reflect the linear mapping relationship between self-capacitance data and temperature. Then, the coefficients of the non-constant terms in the second polynomial can be used as the fourth compensation data. Furthermore, based on the ratio of the third compensation data and the fourth compensation data, the compensation number for the current temperature range can be determined, and the compensation coefficients for multiple temperature ranges can be integrated to obtain the compensation coefficient.
[0179] S403: Based on the compensation data and the mutual capacitance data between the current detection channel and the driving channel, the current self-capacitance data of each detection channel is compensated to obtain the target self-capacitance data of each detection channel.
[0180] In this embodiment, the current mutual capacitance data can be the sum of the mutual capacitances between each detection channel and the driving channel obtained under the current detection environment, and the current self-capacitance data can be the parasitic capacitance of each detection channel to ground obtained under the current detection environment.
[0181] In this embodiment, when the environment changes, the detection process can be performed again to obtain the current parasitic capacitance between each detection channel and each driving channel of the capacitive sensor. The current parasitic capacitances between each detection channel and each driving channel are then added together to obtain the mutual capacitance data between the current detection channel and the driving channel. Simultaneously, the parasitic capacitance of each detection channel of the capacitive sensor to ground can be obtained.
[0182] In some optional implementations, after obtaining the current parasitic capacitance between each detection channel and each driving channel of the capacitive sensor, the current parasitic capacitance between each detection channel and each driving channel can be directly added together to obtain the mutual capacitance data between the current detection channel and the driving channel, i.e., the new mutual capacitance data Cm_t'. Then, based on the new mutual capacitance data and the compensation coefficient, the current self-capacitance data of each detection channel can be compensated to obtain the target self-capacitance data of each detection channel.
[0183] In some alternative implementations, the current self-capacitance data of each detection channel can be compensated in the following manner:
[0184] Cxn'=Cxn-α(Cm-Cxn_i)
[0185] Where Cxn' represents the target self-capacitance data of each detection channel, α represents the compensation data, Cxn represents the current self-capacitance data of each detection channel, and Cxn_i represents the self-capacitance data of each detection channel under the first detection environment. In actual detection, by using the compensation coefficient and the mutual capacitance between each detection channel and the driving channel, and by compensating for the self-capacitance of each detection channel, the impact of environmental changes on the self-capacitance of each detection channel can be reduced.
[0186] In some alternative implementations, the current self-capacitance data of each detection channel can also be compensated in the following manner:
[0187] Cxn'=Cxn-b(Cm_t'-Cm_i)-c(Cm_t'-Cxn_i) 2 -2c(Cm_t'-Cm_i)Cm_i
[0188] Wherein, Cxn' can represent the target self-capacitance data of each detection channel, b and c can represent compensation data, Cxn can represent the current self-capacitance data of each detection channel, Cm_t' can represent the mutual capacitance data between the current detection channel and the driving channel, Cm_i can represent the mutual capacitance data between the detection channel and the driving channel in the first detection environment, and Cxn_i can represent the self-capacitance data of each detection channel in the first detection environment.
[0189] By using compensation coefficients and the mutual capacitance between each detection channel and the drive channel, as well as the self-capacitance of each detection channel, compensation can be made. This not only reduces the impact of environmental changes on the self-capacitance of each detection channel, but also, for long-distance detection channels, the trend of mutual capacitance between the detection channel and the drive channel with environmental changes is more consistent with the variation law of parasitic capacitance between the detection channel and ground.
[0190] The self-capacitance data compensation method provided in this application determines compensation data based on the mutual capacitance data and self-capacitance data obtained from each detection process, even in the absence of human presence or touch. This compensation, combined with the mutual capacitance between each detection channel and the driving electrode, compensates for the ground self-capacitance of each detection channel in real time. This reduces false triggering of capacitive sensors caused by changes in environmental capacitance. Furthermore, by compensating for the ground self-capacitance of each detection channel separately, and considering the overall change in parasitic capacitance between each detection channel and the driving electrode on the parasitic capacitance to ground of each detection channel, the compensation effect is improved. This effectively reduces the impact of changes in environmental capacitance on the determination of human presence or touch, thereby improving the accuracy of multi-channel capacitive touch sensors.
[0191] The following describes a specific embodiment of a self-capacitance data compensation device. Please refer to [link / reference]. Figure 7 , Figure 7 This is a schematic diagram of a self-capacitance data compensation device provided in an embodiment of this application. This self-capacitance data compensation device can be applied to a multi-channel capacitive sensor, which includes multiple detection channels and at least one driving channel.
[0192] The self-capacitance data compensation device may include:
[0193] The acquisition module 701 is used to acquire the mutual capacitance data between the detection channel and the driving channel under different detection environments, as well as the self-capacitance data corresponding to each detection channel; the mutual capacitance data is the sum of the parasitic capacitances between each detection channel and each driving channel.
[0194] The determination module 702 is used to determine the compensation data based on the mutual capacitance data and the self-capacitance data;
[0195] The compensation module 703 is used to compensate the current self-capacitance data of each detection channel based on the compensation data and the current mutual capacitance data, so as to obtain the target self-capacitance data of each detection channel.
[0196] In some optional implementations, the acquisition module is used to acquire the first mutual capacitance data between each detection channel and each driving channel, and the first self-capacitance data corresponding to each detection channel under the first detection environment.
[0197] It is also used to acquire the second mutual capacitance data between each detection channel and each driving channel under the second detection environment, as well as the second self capacitance data corresponding to each detection channel;
[0198] The determination module is used to determine mutual capacitance difference data based on first mutual capacitance data and second mutual capacitance data, and to determine self-capacitance difference data based on first self-capacitance data and second self-capacitance data.
[0199] The compensation data is determined based on the self-capacitance difference data and the mutual capacitance difference data.
[0200] In some optional implementations, the compensation module is used to determine mutual capacitance change data based on the mutual capacitance data between the current detection channel and the driving channel and the first mutual capacitance data;
[0201] Based on the compensation data and mutual capacitance change data, the first target compensation data is determined;
[0202] Based on the current self-capacitance data of each detection channel and the first target compensation data, the target self-capacitance data of each detection channel is determined.
[0203] In some alternative implementations, the determining module includes:
[0204] The first acquisition submodule is used to acquire the nonlinear mapping relationship between mutual capacitance data and self-capacitance data;
[0205] The first determining submodule is used to determine the compensation data based on the nonlinear mapping relationship.
[0206] In some optional implementations, the first acquisition submodule is used to perform polynomial fitting on the mutual capacitance data and the self-capacitance data to obtain a fitted polynomial, which is used to reflect the nonlinear mapping relationship between the mutual capacitance data and the self-capacitance data.
[0207] The first determining submodule is used to determine the coefficients of at least one non-constant term of the fitted polynomial as compensation data.
[0208] In some alternative implementations, the compensation module includes:
[0209] The second determining submodule is used to determine the first mutual capacitance data from the mutual capacitance data; the first mutual capacitance data is the mutual capacitance data obtained under the first detection environment.
[0210] The third determination submodule is used to determine the mutual capacitance change data based on the mutual capacitance data between the current detection channel and the driving channel and the first mutual capacitance data;
[0211] The fourth determination submodule is used to determine the second target compensation data based on the compensation data and the mutual capacitance change data;
[0212] The fifth determination submodule is used to determine the target self-capacitance data of each detection channel based on the current self-capacitance data of each detection channel and the second target compensation data.
[0213] In some alternative implementations, the polynomial includes a first non-constant term and a second non-constant term, the first non-constant term and the second non-constant term having different degrees;
[0214] The first determining submodule is used to take the coefficient of the first non-constant term in the fitted polynomial as the first compensation data and the coefficient of the second non-constant term in the fitted polynomial as the second compensation data.
[0215] The fourth determination submodule is used to determine the compensation data for the first sub-target based on the first compensation data and the mutual capacitance change data.
[0216] Based on the second compensation data and the mutual capacitance change data, the compensation data for the second sub-target is determined;
[0217] Based on the second compensation data, the mutual capacitance change data, and the first mutual capacitance data, the compensation data for the third sub-target is determined.
[0218] The compensation data for the second target is determined based on the compensation data for the first sub-target, the compensation data for the second sub-target, and the compensation data for the third sub-target.
[0219] In some alternative implementations, the temperature ranges of any two detection environments are different.
[0220] The module to be determined includes:
[0221] The second acquisition submodule is used to acquire the first linear mapping relationship between mutual capacitance data and temperature in any detection environment under any detection environment, and to determine the third compensation data for the corresponding temperature range of any detection environment based on the first linear mapping relationship.
[0222] The third acquisition submodule is used to acquire the second linear mapping relationship between self-capacitance data and temperature under any detection environment, and to determine the fourth compensation data for the temperature range corresponding to any detection environment based on the second linear mapping relationship.
[0223] The sixth determination submodule is used to determine the compensation data for the current temperature range based on the third and fourth compensation data.
[0224] The integration submodule is used to integrate the compensation coefficients of multiple temperature ranges to obtain the compensation coefficients.
[0225] In some optional implementations, the second acquisition submodule is used to perform polynomial fitting on the mutual capacitance data and temperature under any detection environment to obtain a fitted first polynomial, which is used to reflect the linear mapping relationship between the mutual capacitance data and the temperature.
[0226] Use the coefficients of the non-constant terms in the first polynomial as the third compensation data;
[0227] The third acquisition submodule is used to perform polynomial fitting on the self-capacitance data and temperature under any detection environment to obtain the fitted second polynomial. The fitted second polynomial is used to reflect the linear mapping relationship between self-capacitance data and temperature.
[0228] The coefficients of the non-constant terms in the second polynomial are used as the fourth compensation data.
[0229] In some optional implementations, a compensation module is used to determine the compensation coefficient of the temperature range in which the current mutual capacitance data is located as the target compensation data;
[0230] The first mutual capacitance data is determined from the mutual capacitance data; the first mutual capacitance data is the mutual capacitance data obtained under the first detection environment;
[0231] Based on the mutual capacitance data between the current detection channel and the drive channel and the first mutual capacitance data, determine the mutual capacitance change data;
[0232] The third target compensation data is determined based on the target compensation data and the mutual capacitance change data;
[0233] Based on the current self-capacitance data of each detection channel and the third target compensation data, the target self-capacitance data of each detection channel is determined.
[0234] In some optional implementations, the acquisition module is used to control the capacitive sensor to be in a non-sensing state, control the capacitive sensor to be in a mutual capacitance working mode, and acquire the parasitic capacitance between each detection channel and each driving channel in each detection environment.
[0235] The mutual capacitance data between the detection channel and the drive channel is determined based on the parasitic capacitance between each detection channel and each drive channel.
[0236] In some optional implementations, the acquisition module is used to control the capacitive sensor to switch from mutual capacitance operating mode to self-capacitance operating mode, and to control the voltage on the drive channel to be equal to the voltage on the detection channel, to acquire the parasitic capacitance of each detection channel to ground, and to obtain the self-capacitance data corresponding to each detection channel.
[0237] This embodiment is an apparatus embodiment corresponding to the method embodiment described above, and can be implemented in conjunction with the method embodiment. The relevant technical details mentioned in the method embodiment remain valid in this embodiment, and will not be repeated here to avoid repetition. Correspondingly, the relevant technical details mentioned in this embodiment can also be applied to the method embodiment.
[0238] This application provides a capacitive sensor, such as... Figure 5 and Figure 6As shown, the capacitive sensor may include: an analog front-end module connected to a multiplexer module, the analog front-end module being used to output a voltage proportional to the input capacitance; an offset compensation module connected to the analog front-end module, the offset compensation module being used to output a voltage proportional to the second parasitic capacitance on the detection channel; an analog-to-digital conversion module connected to the offset compensation module, the analog-to-digital conversion module being used to convert the output voltage of the analog front-end module into a digital code and output it to a digital processing module; a digital processing module connected to the analog-to-digital conversion module, the digital processing module being used to receive the digital code and transmit it to a register module; a register module connected to the digital processing module; a control module connected to the register module, the control module being used to control the self-capacitance data compensation method described in the capacitive sensor implementation method; and a multiplexer module, the multiplexer module being used to select the state of each channel in the multi-channel capacitive sensor based on the control command of the control module. At least one driving channel. The system has multiple detection channels, each detection channel forming a parasitic capacitance with respect to each driving channel, and each detection channel forming a parasitic capacitance to ground.
[0239] This embodiment is a sensor implementation method corresponding to the method implementation method described above, and this embodiment can be implemented in conjunction with the method implementation method. The relevant technical details mentioned in the method implementation method are still valid in this embodiment, and will not be repeated here to avoid repetition. Correspondingly, the relevant technical details mentioned in this embodiment can also be applied to the method implementation method.
[0240] This application provides a chip that may include circuitry for performing the self-capacitance data compensation method described in the method section.
[0241] This embodiment is a chip-based implementation corresponding to the method implementation described above, and can be implemented in conjunction with the method implementation. The relevant technical details mentioned in the method implementation remain valid in this embodiment, and will not be repeated here to avoid repetition. Correspondingly, the relevant technical details mentioned in this embodiment can also be applied to the method implementation.
[0242] This application provides an electronic device that may include the chip described above.
[0243] The electronic device mentioned in this application will now be described. It is understood that the electronic device can be any electronic device that includes the aforementioned self-capacitance compensation device and / or capacitive sensor. However, this includes, but is not limited to: mobile phones (including foldable and candybar phones), tablets, desktop computers, handheld computers, laptops, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), portable Android devices (PADs), personal digital assistants (PDAs), handheld devices with wireless communication capabilities, computing devices, in-vehicle devices or wearable devices, virtual reality (VR) terminal devices, augmented reality (AR) terminal devices, wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical care, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, and other mobile or fixed terminals, power banks, and other electronic devices with data transmission and synchronization requirements.
[0244] It should be noted that in the examples and description of this patent, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one" does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.
[0245] Although this application has been illustrated and described with reference to certain preferred embodiments thereof, those skilled in the art will understand that various changes in form and detail may be made thereto without departing from the scope of this application.
Claims
1. A method for compensating self-capacitance data, characterized in that, For a capacitive sensor, the capacitive sensor includes multiple detection channels and at least one driving channel; the method includes: Acquire mutual capacitance data between the detection channel and the driving channel under different detection environments, as well as self-capacitance data corresponding to each detection channel, wherein the mutual capacitance data is the sum of the parasitic capacitances between each detection channel and each driving channel; Based on the mutual capacitance data and the self-capacitance data, the compensation data is determined; Based on the compensation data and the mutual capacitance data between the current detection channel and the driving channel, the current self-capacitance data of each detection channel is compensated to obtain the target self-capacitance data of each detection channel.
2. The method according to claim 1, characterized in that, The acquisition of mutual capacitance data between the detection channel and the driving channel under different detection environments, as well as self-capacitance data corresponding to each detection channel, includes: In the first detection environment, the first mutual capacitance data between each detection channel and each driving channel, and the first self-capacitance data corresponding to each detection channel are obtained. In the second detection environment, the second mutual capacitance data between each detection channel and each driving channel, and the second self capacitance data corresponding to each detection channel are obtained. The step of determining compensation data based on the mutual capacitance data and the self-capacitance data includes: Mutual capacitance difference data is determined based on the first mutual capacitance data and the second mutual capacitance data, and self-capacitance difference data is determined based on the first self-capacitance data and the second self-capacitance data; The compensation data is determined based on the self-capacitance difference data and the mutual capacitance difference data.
3. The method according to claim 2, characterized in that, The step of compensating the current self-capacitance data of each detection channel based on the compensation data and the mutual capacitance data between the current detection channel and the driving channel to obtain the target self-capacitance data of each detection channel includes: Based on the mutual capacitance data between the current detection channel and the driving channel and the first mutual capacitance data, the mutual capacitance change data is determined; Based on the compensation data and the mutual capacitance change data, the first target compensation data is determined; The target self-capacitance data of each detection channel is determined based on the current self-capacitance data of each detection channel and the first target compensation data.
4. The method according to claim 1, characterized in that, The step of determining compensation data based on the mutual capacitance data and the self-capacitance data includes: Obtain the nonlinear mapping relationship between the mutual capacitance data and the self-capacitance data; The compensation data is determined based on the nonlinear mapping relationship.
5. The method according to claim 4, characterized in that, The step of obtaining the nonlinear mapping relationship between the mutual capacitance data and the self-capacitance data includes: The mutual capacitance data and the self-capacitance data are subjected to polynomial fitting to obtain a fitted polynomial, which is used to reflect the nonlinear mapping relationship between the mutual capacitance data and the self-capacitance data. Determining the compensation data based on the nonlinear mapping relationship includes: The coefficients of at least one non-constant term of the fitted polynomial are determined as the compensation data.
6. The method according to claim 5, characterized in that, The step of compensating the current self-capacitance data of each detection channel based on the compensation data and the mutual capacitance data between the current detection channel and the driving channel to obtain the target self-capacitance data of each detection channel includes: First mutual capacitance data is determined from the mutual capacitance data; the first mutual capacitance data is the mutual capacitance data obtained under the first detection environment. Based on the mutual capacitance data between the current detection channel and the driving channel and the first mutual capacitance data, the mutual capacitance change data is determined; Based on the compensation data and the mutual capacitance change data, determine the second target compensation data; The target self-capacitance data of each detection channel is determined based on the current self-capacitance data of each detection channel and the second target compensation data.
7. The method according to claim 6, characterized in that, The polynomial includes a first non-constant term and a second non-constant term, wherein the first non-constant term and the second non-constant term have different degrees; Determining the coefficients of at least one non-constant term of the fitted polynomial as the compensation data includes: The coefficients of the first non-constant terms in the fitted polynomial are used as the first compensation data, and the coefficients of the second non-constant terms in the fitted polynomial are used as the second compensation data. The step of determining the second target compensation data based on the compensation data and the mutual capacitance change data includes: Based on the first compensation data and the mutual capacitance change data, the first sub-target compensation data is determined; Based on the second compensation data and the mutual capacitance change data, the second sub-target compensation data is determined; Based on the second compensation data, the mutual capacitance change data, and the first mutual capacitance data, the third sub-target compensation data is determined; The second target compensation data is determined based on the first sub-target compensation data, the second sub-target compensation data, and the third sub-target compensation data.
8. The method according to claim 1, characterized in that, The temperature range of any two testing environments is different; The step of determining compensation data based on the mutual capacitance data and the self-capacitance data includes: For any one of the different detection environments, obtain the first linear mapping relationship between the mutual capacitance data and temperature in the given detection environment, and determine the third compensation data for the corresponding temperature range of the given detection environment based on the first linear mapping relationship. Obtain the second linear mapping relationship between the self-capacitance data and temperature under any detection environment, and determine the fourth compensation data for the temperature range corresponding to any detection environment based on the second linear mapping relationship; Based on the third compensation data and the fourth compensation data, determine the compensation data for the current temperature range; The compensation coefficients for multiple temperature ranges are integrated to obtain the compensation coefficients.
9. The method according to claim 8, characterized in that, The step of obtaining a first linear mapping relationship between the mutual capacitance data and temperature under any given detection environment, and determining third compensation data for the corresponding temperature range under any given detection environment based on the first linear mapping relationship, includes: The mutual capacitance data and temperature under any of the detection environments are subjected to polynomial fitting to obtain a first polynomial after fitting. The first polynomial after fitting is used to reflect the linear mapping relationship between the mutual capacitance data and the temperature. The coefficients of the non-constant terms in the first polynomial are used as the third compensation data; The step of obtaining the second linear mapping relationship between the self-capacitance data and temperature under any given detection environment, and determining the fourth compensation data for the temperature range corresponding to any given detection environment based on the second linear mapping relationship, includes: The self-capacitance data and temperature under any detection environment are subjected to polynomial fitting to obtain a second polynomial after fitting. The second polynomial after fitting is used to reflect the linear mapping relationship between the self-capacitance data and the temperature. The coefficients of the non-constant terms of the second polynomial are used as the fourth compensation data.
10. The method according to claim 9, characterized in that, The step of compensating the current self-capacitance data of each detection channel based on the compensation data and the mutual capacitance data between the current detection channel and the driving channel to obtain the target self-capacitance data of each detection channel includes: The compensation coefficient of the temperature range in which the current mutual capacitance data is located is determined as the target compensation data; First mutual capacitance data is determined from the mutual capacitance data; the first mutual capacitance data is the mutual capacitance data obtained under the first detection environment. Based on the mutual capacitance data between the current detection channel and the driving channel and the first mutual capacitance data, the mutual capacitance change data is determined; Based on the target compensation data and the mutual capacitance change data, the third target compensation data is determined; The target self-capacitance data of each detection channel is determined based on the current self-capacitance data of each detection channel and the third target compensation data.
11. The method according to claim 1, characterized in that, The acquisition of mutual capacitance data between the detection channel and the driving channel under different detection environments includes: In each detection environment, the capacitive sensor is controlled to be in a non-sensing state, and the capacitive sensor is controlled to be in a mutual capacitance working mode to obtain the parasitic capacitance between each detection channel and each driving channel. The mutual capacitance data between the detection channel and the driving channel is determined based on the parasitic capacitance between each detection channel and each driving channel.
12. The method according to claim 11, characterized in that, The acquisition of self-capacitance data for each detection channel under different detection environments includes: The capacitive sensor is controlled to switch from the mutual capacitance working mode to the self-capacitance working mode, and the voltage on the driving channel is controlled to be equal to the voltage on the detection channel. The parasitic capacitance of each detection channel to ground is obtained, and the self-capacitance data corresponding to each detection channel is obtained.
13. A self-capacitance data compensation device, characterized in that, The self-capacitance data compensation device is applied to a capacitive sensor, which includes multiple detection channels and at least one driving channel; The self-capacitance data compensation device includes: The acquisition module is used to acquire mutual capacitance data between the detection channel and the driving channel under different detection environments, as well as self-capacitance data corresponding to each detection channel; the mutual capacitance data is the sum of the parasitic capacitances between each detection channel and each driving channel. The determining module is used to determine compensation data based on the mutual capacitance data and the self-capacitance data; The compensation module is used to compensate the current self-capacitance data of each detection channel based on the compensation data and the current mutual capacitance data, so as to obtain the target self-capacitance data of each detection channel.
14. A capacitive sensor, characterized in that, include: The control module is used to control the capacitive sensor to implement the self-capacitance data compensation method according to any one of claims 1-12; A multiplexing module is used to select the state of each channel in the capacitive sensor based on the control command of the control module; At least one of the aforementioned drive channels; The system has multiple detection channels, each detection channel having a parasitic capacitance with respect to each driving channel, and each detection channel having a parasitic capacitance to ground.
15. A chip, characterized in that, Includes a circuit for performing the self-capacitance data compensation method according to any one of claims 1-12.
16. An electronic device, characterized in that, Includes a chip, wherein a capacitive sensor as described in any one of claims 1-12 is formed in the chip.