WO2024119517A1 - 电容检测的方法、装置、芯片和电子设备 - Google Patents

电容检测的方法、装置、芯片和电子设备 Download PDF

Info

Publication number
WO2024119517A1
WO2024119517A1 PCT/CN2022/138139 CN2022138139W WO2024119517A1 WO 2024119517 A1 WO2024119517 A1 WO 2024119517A1 CN 2022138139 W CN2022138139 W CN 2022138139W WO 2024119517 A1 WO2024119517 A1 WO 2024119517A1
Authority
WO
WIPO (PCT)
Prior art keywords
signal
value
detection signal
frame
detection
Prior art date
Application number
PCT/CN2022/138139
Other languages
English (en)
French (fr)
Inventor
曾晓燕
Original Assignee
汇顶科技(成都)有限责任公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 汇顶科技(成都)有限责任公司 filed Critical 汇顶科技(成都)有限责任公司
Priority to PCT/CN2022/138139 priority Critical patent/WO2024119517A1/zh
Publication of WO2024119517A1 publication Critical patent/WO2024119517A1/zh

Links

Images

Definitions

  • Embodiments of the present application relate to the field of capacitance detection, and more specifically, to a capacitance detection method, device, chip, and electronic device.
  • Capacitance detection devices are usually installed in electronic devices such as headphones and mobile phones. They include detection electrodes and related processing circuits to detect whether a human body is close to or away from the detection electrodes, so that the electronic devices can perform corresponding operations.
  • changes in ambient temperature can affect the results of capacitance detection, thereby causing misjudgment of the state of the conductor approaching or away from the detection electrode. Therefore, how to eliminate the influence of the environment on capacitance detection and improve the accuracy of capacitance detection has become a problem that needs to be solved.
  • the embodiments of the present application provide a capacitance detection method, device, chip and electronic device, which can eliminate the influence of the environment on capacitance detection to improve the accuracy of capacitance detection.
  • a method for capacitance detection comprising: obtaining a signal value of a detection signal output by a detection electrode; determining a compensation amount of the Nth frame detection signal based on a deviation of a signal value of M frame detection signals before the Nth frame detection signal relative to a reference value, wherein N is a positive integer and M is a positive integer less than N; and calibrating the signal value of the Nth frame detection signal based on the compensation amount to obtain a calibration value of the Nth frame detection signal.
  • the reference values of the M frame detection signals are equal; when the M frame detection signals do not meet the predetermined condition, the reference value of the i+1th frame detection signal in the M frame detection signals is equal to the calibration value of the i-th frame detection signal in the M frame detection signals, where i ranges from 1 to M-1.
  • the reference value of the first frame detection signal among the M frame detection signals is equal to the signal value of the first frame detection signal.
  • the predetermined condition includes: a difference between a signal value of each detection signal in the M-frame detection signal and a detection signal separated by P frames therefrom is less than a first threshold, where P is a positive integer less than N.
  • the compensation amount is an average value of the difference between the signal value of each frame detection signal in the M frame detection signal and a reference value.
  • calibrating the signal value of the Nth frame detection signal according to the compensation amount includes: calibrating the signal values of the Nth frame detection signal to the N+M-1th frame detection signal according to the compensation amount.
  • the device also includes a reference electrode, and obtaining the signal value of the detection signal output by the detection electrode includes: obtaining the original value of the detection signal and the original value of the reference signal output by the reference electrode; based on the original value of the reference signal, offsetting the part of the original value of the detection signal caused by environmental changes to obtain the signal value of the detection signal.
  • the signal value of the Nth frame detection signal is the difference between the original value of the Nth frame detection signal and the change in the Nth frame reference signal
  • the change in the Nth frame reference signal is K times the difference between the original value of the Nth frame reference signal and the original value of the 1st frame reference signal, where K is a preset coefficient.
  • the original value of the reference signal of the Nth frame is obtained by filtering the original value of the reference signal of the previous P frames.
  • the method further includes: when the difference between the calibration value of the Nth frame detection signal and its base value is greater than a second threshold value, determining that an event of a conductor approaching or leaving the detection electrode occurs, and the base value is the signal value of the detection signal when no conductor approaches or contacts the detection electrode; when the difference between the calibration value of the Nth frame detection signal and its base value is less than the second threshold value, determining that an event of a conductor approaching or leaving the detection electrode does not occur.
  • a device for capacitance detection comprising: a signal acquisition unit, used to obtain the signal value of the detection signal output by the detection electrode; a processing unit, used to determine the compensation amount of the Nth frame detection signal based on the deviation of the signal value of the M frame detection signal before the Nth frame detection signal relative to the reference value, wherein N is a positive integer and M is a positive integer less than N; the processing unit is also used to calibrate the signal value of the Nth frame detection signal according to the compensation amount to obtain the calibration value of the Nth frame detection signal.
  • the reference values of the M frame detection signals are equal; when the M frame detection signals do not meet the predetermined condition, the reference value of the i+1th frame detection signal in the M frame detection signals is equal to the calibration value of the i-th frame detection signal in the M frame detection signals, where i ranges from 1 to M-1.
  • the reference value of the first frame detection signal among the M frame detection signals is equal to the signal value of the first frame detection signal.
  • the predetermined condition includes: a difference between a signal value of each detection signal in the M-frame detection signal and a detection signal separated by P frames therefrom is less than a first threshold, where P is a positive integer less than N.
  • the compensation amount is an average value of the difference between the signal value of each frame detection signal in the M frames of detection signals and a reference value.
  • the processing unit is specifically configured to: calibrate signal values of the Nth frame detection signal to the N+M-1th frame detection signal according to the compensation amount.
  • the signal acquisition unit is specifically used to: obtain the original value of the detection signal and the original value of the reference signal output by the reference electrode; the processing unit is also used to offset the part of the original value of the detection signal caused by environmental changes based on the original value of the reference signal to obtain the signal value of the detection signal.
  • the signal value of the Nth frame detection signal is the difference between the original value of the Nth frame detection signal and the change in the Nth frame reference signal
  • the change in the Nth frame reference signal is K times the difference between the original value of the Nth frame reference signal and the 1st frame reference signal, where K is a preset coefficient.
  • the original value of the reference signal of the Nth frame is obtained by filtering the original value of the reference signal of the previous P frames.
  • the processing unit is also used to: when the difference between the calibration value of the Nth frame detection signal and its base value is greater than a second threshold, determine that an event of a conductor approaching or leaving the detection electrode has occurred, and the base value is the signal value of the detection signal when no conductor approaches or contacts the detection electrode; when the difference between the calibration value of the Nth frame detection signal and its base value is less than the second threshold, determine that an event of a conductor approaching or leaving the detection electrode has not occurred.
  • a capacitance detection chip comprising a processor and a memory, the memory being used to store instructions, and the processor being used to execute the instructions to implement the capacitance detection method described in the first aspect or any implementation manner of the first aspect.
  • an electronic device in a fourth aspect, includes the capacitance detection device described in the second aspect or any implementation of the second aspect, or includes the capacitance detection chip described in the third aspect.
  • the compensation amount of the Nth frame detection signal is determined by the deviation of the signal value of the M-frame detection signal before the current Nth frame detection signal relative to the reference value, so as to calibrate the signal value of the Nth frame detection signal. This is equivalent to calibrating the signal value of each frame detection signal toward the reference value, reducing the fluctuation of the detection signal, making its signal value smoother, and effectively avoiding misjudgment in the capacitance detection process.
  • FIG. 1 is a schematic structural diagram of a capacitance detection device according to an embodiment of the present application.
  • FIG. 2 is a schematic diagram of the variation rules of the detection signal and the reference signal.
  • FIG. 3 is a schematic flow chart of a capacitance detection method according to an embodiment of the present application.
  • FIG. 4 is a schematic diagram showing how the signal value of the detection signal and its P-point differential variation vary with the number of detection frames when an event occurs and the temperature changes.
  • FIG. 5 is a schematic diagram showing how the signal value of the detection signal and its P-point differential variation vary with the number of detection frames when no event occurs and the temperature changes.
  • FIG. 6 is a schematic diagram showing how the signal values of a detection signal and a reference signal vary with the number of detection frames according to an embodiment of the present application.
  • FIG. 7 is a schematic diagram of signal values and calibration values of a detection signal.
  • FIG. 8 is a schematic block diagram of a capacitance detection device according to an embodiment of the present application.
  • FIG1 shows a schematic structural diagram of a capacitance detection device according to an embodiment of the present application.
  • the capacitance detection device 200 includes a detection electrode 210, an analog front end (AFE) circuit 220 connected to the detection electrode 210, and a processing unit 230, wherein the AFE circuit 220 includes an amplifier (AMP) 221 and an analog to digital converter (ADC) 222.
  • a capacitance Cs is formed between the detection electrode 210 and the ground.
  • the capacitance Cs changes, and the AMP 221 converts its capacitance signal into a voltage signal, and the ADC 222 performs analog-to-digital conversion on the voltage signal and sends it to the processing unit 230 for corresponding data processing.
  • the change in capacitance Cs can be used to determine whether an event of a conductor approaching or leaving occurs, so that corresponding operations can be performed.
  • the device 200 when the device 200 is applied to headphones, it can conveniently detect the wearing and falling off of the headphones.
  • the device 200 is applied to a mobile phone, in the specific absorption rate (SAR) detection scenario of the mobile phone, it can determine whether a human body is approaching and adjust the antenna transmission power.
  • SAR specific absorption rate
  • the device 200 may further include a reference electrode 240 and an AFE circuit 250 connected to the reference electrode 240, wherein the AFE circuit 250 includes an AMP 251 and an ADC 252.
  • a capacitor Cr is formed between the reference electrode 240 and the ground. The capacitor Cr is only used to reflect the influence of environmental changes on capacitance detection. Since the detection electrode 210 and the reference electrode 240 are in the same environment, they are affected by the environment in the same way. By using the reference signal generated on the reference electrode 240, the part of the detection signal generated on the detection electrode 210 caused by the environmental change can be offset.
  • the reference signal can fully reflect the temperature influence on the detection signal.
  • the temperature-affected portion of the detection signal can be eliminated, and the following is obtained:
  • RawData is the original value of the detection signal, for example, the signal value output by the AFE circuit 220 connected to the detection electrode 210;
  • RefData is the original value of the reference signal, for example, the signal value output by the AFE circuit 250 connected to the reference electrode 240;
  • RawDataNew obtained after eliminating the part of the original value of the detection signal caused by the temperature change by using the reference signal is called the signal value of the detection signal. According to the signal value of the detection signal, it can be determined whether the conductor is currently approaching.
  • the signal value of the detection signal can be, for example:
  • RawDataNew(N) RawData(N)-K*[RefData(N)-RefData(1)] (2);
  • N is the number of detection frames
  • RefData(1) is the original value of the reference signal of the 1st frame, for example, the initial value of the reference signal when the device 200 is powered on
  • RefData(N) is the original value of the reference signal of the Nth frame
  • RawData(N) is the original value of the detection signal of the Nth frame
  • RawDataNew(N) is the signal value of the detection signal of the Nth frame after eliminating the temperature influence using the reference signal.
  • the test can be performed under the maximum temperature difference environment to obtain the change in the original value of the detection signal and the change in the original value of the reference signal, so that K is equal to the ratio between the change in the original value of the detection signal and the change in the original value of the reference signal.
  • the test is performed in the scene of rapid temperature rise and rapid temperature drop respectively to obtain two K values, and the K value corresponding to the larger difference between the change in the detection signal and the change in the reference signal is selected as the K value for subsequent use, that is, when the K value is greater than 1, the larger of the two K values is taken, and when the K value is less than 1, the smaller of the two K values is taken.
  • RefData(N)-RefData(1) reflects the signal change caused by the different temperatures when collecting the reference signal of the Nth frame and the reference signal of the 1st frame. Since the detection signal and the reference signal change in the same way as the temperature changes, theoretically, the signal change in the detection signal caused by the temperature change should also be equal to RefData(N)-RefData(1). However, in practice, considering that the detection electrode 210 and the reference electrode 240 cannot be completely matched, the coefficient K is used to adjust RefData(N)-RefData(1), and then the original value of the detection signal is subtracted from the adjusted signal change, thereby roughly eliminating the influence of temperature on the detection signal.
  • the coefficient K cannot effectively eliminate the influence of the mismatch between the detection electrode 210 and the reference electrode 240 on the detection result. For example, if K is set to a small value, it may be misjudged as an event of a conductor approaching due to noise; if K is set to a large value, it may be judged as a conductor moving away when the current event of a conductor approaching occurs. This misjudgment will have a greater impact in specific applications.
  • the in-ear detection function (In Ear Detection, IED) of the headset will be misjudged as wearing or falling off.
  • the misjudgment in the SAR detection scenario of the mobile phone will cause the antenna transmission power to be adjusted incorrectly, thereby affecting the function of the entire machine.
  • the embodiment of the present application provides a capacitance detection solution, which aims to solve the problem of how to eliminate the influence of the environment on capacitance detection to improve the accuracy of capacitance detection.
  • the compensation amount is calculated in real time using the change trend of the detection signal itself to calibrate the detection signal, which effectively improves the accuracy of capacitance detection.
  • the device 200 shown in FIG. 1 takes the detection of self-capacitance as an example.
  • the capacitance detection scheme of the embodiment of the present application can be applied to various capacitance detection-based scenarios and applications such as self-capacitance detection and mutual capacitance detection.
  • FIG3 shows a capacitance detection method 100 according to an embodiment of the present application.
  • the method 100 may be performed by the capacitance detection device 200 shown in FIG1 .
  • the device 200 includes a detection electrode 210.
  • the method 100 is used to detect whether an event occurs in which a conductor approaches or leaves the detection electrode 210.
  • the method 100 includes some or all of the following steps.
  • step 110 the signal value of the detection signal output by the detection electrode 210 is obtained.
  • the compensation amount of the Nth frame detection signal is determined according to the deviation of the signal value of the M frame detection signal before the Nth frame detection signal relative to the reference value, wherein N is a positive integer and M is a positive integer less than N.
  • step 130 the signal value of the N-th frame detection signal is calibrated according to the compensation amount to obtain a calibrated value of the N-th frame detection signal.
  • the compensation amount of the Nth frame detection signal is determined by the deviation of the signal value of the M-frame detection signal before the current Nth frame detection signal relative to the reference value, so as to calibrate the signal value of the Nth frame detection signal. This is equivalent to calibrating the signal value of each frame detection signal toward the reference value, reducing the fluctuation of the detection signal, making its signal value smoother, and effectively avoiding misjudgment in the capacitance detection process.
  • the method 100 further includes: when the difference between the calibration value of the detection signal of the Nth frame and its base value is greater than the second threshold value TH2, determining that an event of a conductor approaching or leaving the detection electrode 210 occurs; when the difference between the calibration value of the detection signal of the Nth frame and its base value is less than the second threshold value TH2, determining that an event of a conductor approaching or leaving the detection electrode 210 does not occur.
  • the base value is the signal value of the detection signal output by the detection electrode 210 when no conductor approaches or contacts the detection electrode 210. In other words, the base value is the signal value of the detection signal after the conductor moves away from the detection electrode 210.
  • the signal value of the detection signal output by the detection electrode 210 when no conductor approaches or contacts the detection electrode 210 can be obtained in advance as the base value. Therefore, when performing capacitance detection later, it can be determined whether an event of a conductor approaching or leaving occurs based on the magnitude relationship between the difference between the calibration value of the detection signal and the base value and the second threshold value TH2.
  • the compensation amount of the Nth frame detection signal is determined by the deviation of the signal value of the M frame detection signal before the Nth frame detection signal relative to the reference value.
  • the compensation amount is the average value of the difference between the signal value of each frame detection signal in the M frame detection signal and the reference value. That is,
  • ⁇ s (N) is the compensation amount of the Nth frame detection signal
  • TempBase (Ni) is the reference value of the Nith frame detection signal
  • RawDataNew (Ni) is the signal value of the Nith frame detection signal
  • M is a preset positive integer less than N.
  • the signal value RawDataNew(N) of the Nth frame detection signal can be calibrated according to ⁇ s (N), and the calibration value of the Nth frame detection signal can be obtained as follows:
  • Raw(N) is the calibration value of the detection signal of the Nth frame
  • RawDataNew(N) is the signal value of the detection signal of the Nth frame
  • ⁇ s (N) is the compensation amount of the detection signal of the Nth frame.
  • calibrating the signal value of the Nth frame detection signal according to the compensation amount includes: calibrating the signal values of the Nth frame detection signal to the N+M-1th frame detection signal according to the compensation amount. That is, the compensation amount can be updated once every M frames, that is, the average of the change amounts of the first M frames detection signal is used as the compensation amount of the next M frames detection signal.
  • this compensation method is also referred to as minimum deviation compensation.
  • the above-mentioned reference value TempBase only follows the change of the signal value caused by the event of the conductor approaching or moving away from the detection electrode 210, but does not follow the change of the signal value caused by temperature. That is to say, in the process of capacitance detection, if the change of the detected signal value may be caused by the event of the conductor approaching or moving away, the reference value changes with the number of detection frames; if the change of the detected signal value may be caused only by temperature change, the reference value remains unchanged.
  • a predetermined condition can be set to determine whether the change in the current signal value may be caused by an event in which the conductor approaches or moves away, or by a temperature change.
  • the reference value of the M frame detection signal is equal; when the M frame detection signal does not meet the predetermined condition, the reference value of the i+1 frame detection signal in the M frame detection signal is equal to the calibration value of the i frame detection signal in the M frame detection signal, and i ranges from 1 to M-1.
  • the reference value of the 1st frame detection signal in the M frame detection signal can be equal to the signal value of the 1st frame detection signal, for example.
  • the compensation amount of the 1st frame detection signal is defaulted to 0, so the calibration value of the 1st frame detection signal is also its signal value.
  • the change in the signal value of the detection signal caused by temperature change is usually slow and steady.
  • the signal value of the detection signal will show a step change characteristic. Therefore, the differential method can be used to preliminarily identify whether the change in the current signal value is caused by an event or a temperature change.
  • the predetermined condition may be that the difference between the signal value of each detection signal in the M frame detection signals before the N frame detection signal and the signal value of the detection signal separated by P frames before the N frame detection signal is less than the first threshold TH1, where P is a positive integer less than N.
  • the values of P and M may be selected independently; or, preferably, P ⁇ M may also be selected.
  • i ranges from 1 to M
  • the change in the signal value of the i-th frame detection signal relative to the i-P-th frame detection signal is:
  • RawDataNew(i) is the signal value of the detection signal of the i-th frame
  • RawDataNew(i-P) is the signal value of the detection signal of the i-P-th frame
  • DiffChange(i) is the change in the signal value of the detection signal of the i-th frame relative to the signal value of the detection signal of the i-P-th frame, hereinafter also referred to as the P-point differential change.
  • the selection of the P value is usually related to the rate of change of the ambient temperature. Considering the influence of noise in the environment and the relatively slow occurrence of the conductor approaching or moving away from the detection electrode, setting P>1 can effectively eliminate the influence of some noise, and can still accurately obtain the differential change when the conductor approaches or moves away from the detection electrode relatively slowly. The following is a specific explanation in conjunction with Figures 4 and 5.
  • FIG4 shows the change of the signal value of the detection signal with the number of detection frames when the conductor approaches or moves away and the temperature changes;
  • P the more obvious the influence of noise on DiffChange is.
  • FIG5(a) shows the change of the signal value of the detection signal with the detection frame number when there is no conductor approaching or moving away and the temperature changes
  • the influence of temperature on the detection signal in FIG5(a) causes its signal value to drop at point A.
  • the DiffChange in the dotted box in FIG5(c) can also reflect this change, while the DiffChange in the dotted box in FIG5(b) cannot reflect this change well.
  • DiffChange(i) if DiffChange(i) is greater than or equal to the first threshold TH1, it indicates that the change in the current signal value may be caused by the event of the conductor approaching or moving away; if DiffChange(i) is less than the first threshold TH1, it indicates that the change in the current signal value may be caused only by temperature change.
  • the reference value changes with the number of detection frames
  • the reference value of the first frame detection signal in the M frame detection signal can be the signal value of the first frame detection signal.
  • the default ⁇ s (i) 0, so the calibration value of the first frame detection signal is its signal value, and starting from the second frame detection signal, the reference value of each frame detection signal changes with the calibration value of the previous frame detection signal; when DiffChange(i) ⁇ TH1, the reference value of the M frame detection signal remains unchanged, and the reference value of each frame detection signal in the M frame detection signal is equal to the reference value of the previous frame detection signal.
  • the compensation amount ⁇ s (N) of the N-frame detection signal can be calculated based on the aforementioned formulas (3) and (4).
  • the signal value of the N-frame detection signal is calibrated according to ⁇ s (N) to obtain the calibration value of the N-frame detection signal.
  • the capacitance detection method 100 of the embodiment of the present application can be applied to a scenario without a reference electrode 240, and can also be applied to a scenario with a reference electrode 240.
  • step 110 the signal value of the detection signal output by the detection electrode 210 is obtained, including: obtaining the original value of the detection signal and the original value of the reference signal; based on the original value of the reference signal, offsetting the portion of the original value of the detection signal caused by environmental changes to obtain the signal value of the detection signal.
  • the signal value of the Nth frame detection signal is the difference between the original value of the Nth frame detection signal and the change in the Nth frame reference signal
  • the change in the Nth frame reference signal is K times the difference between the original value of the Nth frame reference signal and the 1st frame reference signal, where K is a preset coefficient.
  • the original value of the Nth frame reference signal is obtained by filtering the original value of the P-frame reference signal before it.
  • the original value of the P-frame reference signal before the Nth frame reference signal can be filtered to obtain the original value of the Nth frame reference signal:
  • RefDataNew(N) filter[RefData(N-1),...,RefData(N-P)] (6);
  • RefDataNew(N) is the original value of the Nth frame reference signal after filtering
  • RefData(N-1) to RefData(N-P) are the original values of the P frame reference signals before the Nth frame reference signal.
  • RawDataNew(N) RawData(n)-K*[RefDataNew(N)-RefData(1)] (7);
  • RefData(1) is the initial value of the reference signal at power-on
  • RefDataNew(N) is the original value of the reference signal of the Nth frame after filtering
  • RawData(N) is the original value of the detection signal of the Nth frame
  • RawDataNew(N) is the signal value of the detection signal of the Nth frame after eliminating the temperature influence using the reference signal.
  • the variation of the reference signal can be converted into the detection signal, thereby eliminating the influence of temperature on the detection signal.
  • the coefficient K is not 1, but is set based on the difference between the detection electrode 210 and the reference electrode 240.
  • the coefficient K cannot completely eliminate the influence of the environment on the detection signal, but can only reduce the temperature drift of the detection signal to a certain extent.
  • the reference signal can only be used to make preliminary compensation for the detection signal.
  • the detection signal is also compensated for the minimum deviation in real time, that is, the compensation amount of the Nth frame detection signal is determined by the deviation of the signal value of the M-frame detection signal before the current Nth frame detection signal relative to the reference value, so as to calibrate the signal value of the Nth frame detection signal.
  • the influence of the environment on the detection signal can be basically completely eliminated.
  • the signal values of the detection signal and the reference signal change with the number of detection frames, wherein curve D represents the original value of the reference signal, curve E represents the original value of the detection signal, curve F represents the reference value of the detection signal, and curve Q represents the signal value of the detection signal after preliminary compensation.
  • curve D represents the original value of the reference signal
  • curve E represents the original value of the detection signal
  • curve F represents the reference value of the detection signal
  • curve Q represents the signal value of the detection signal after preliminary compensation.
  • curve Q can be pulled to coincide with curve F, that is, after preliminary compensation and minimum deviation compensation, the influence of the environment on the detection signal can be basically completely eliminated. That is, after preliminary compensation using the reference signal, curve E is pulled to the position of curve Q; and then the compensation amount is calculated using the change amount of the detection signal of the first M frames for minimum deviation compensation, so that curve Q can be pulled to the position of curve F.
  • the signal value of the detection signal is curve E.
  • the signal value of the detection signal is the calibration value shown by curve Q.
  • Curve F is the reference value of the detection signal. It can be seen that curve Q is substantially coincident with curve F. It can be seen that method 100 can effectively reduce the impact of environmental changes on the detection signal, so that the signal value of the calibrated detection signal tends to be stable and is not affected by temperature and fluctuates.
  • the detection signal of the current frame is preliminarily compensated using the reference signal, it is determined whether the change in the current signal value is caused by an event or by temperature based on the differential change at point P, and a suitable reference value is selected based on this.
  • the signal value of the detection signal of the current frame is calibrated based on the change between the signal value of the detection signal of the previous M frames and the reference value, thereby more accurately eliminating environmental changes and retaining valid signals, optimizing the impact of environmental changes on the detection signal, and effectively improving the accuracy of capacitance detection.
  • FIG8 shows a schematic block diagram of a capacitance detection device according to an embodiment of the present application.
  • the capacitance detection device 200 includes a signal acquisition unit 201 and a processing unit 230.
  • the signal acquisition unit 201 may include, for example, the AFE circuit 220 and the AFE circuit 250 shown in FIG1 , and the device 200 may also include a detection electrode 210 connected to the signal acquisition unit 201, and further, may also include a reference electrode 240 connected to the signal acquisition unit 201.
  • the signal acquisition unit 201 is used to obtain the signal value of the detection signal output by the detection electrode 210 .
  • the processing unit 230 is used to determine the compensation amount of the Nth frame detection signal based on the deviation of the signal value of the M frame detection signal before the Nth frame detection signal relative to the reference value, wherein N is a positive integer and M is a positive integer less than N; the processing unit 230 is also used to calibrate the signal value of the Nth frame detection signal based on the compensation amount to obtain the calibration value of the Nth frame detection signal.
  • the reference values of the M frame detection signals are equal; when the M frame detection signals do not meet the predetermined condition, the reference value of the i+1th frame detection signal in the M frame detection signals is equal to the calibration value of the ith frame detection signal in the M frame detection signals, where i ranges from 1 to M-1.
  • the reference value of the first frame detection signal among the M frame detection signals is equal to the signal value of the first frame detection signal.
  • the predetermined condition includes: a difference between a signal value of each detection signal in M frames of detection signals and a detection signal separated by P frames before it is less than a first threshold, where P is a positive integer less than N.
  • the compensation amount is an average value of the difference between the signal value of each frame detection signal in the M frames detection signal and the reference value.
  • the processing unit 230 is specifically configured to: calibrate the signal values of the Nth frame detection signal to the N+M-1th frame detection signal according to the compensation amount.
  • the signal acquisition unit 201 is specifically used to: obtain the original value of the detection signal and the original value of the reference signal output by the reference electrode 240; the processing unit 230 is also used to offset the part of the original value of the detection signal caused by environmental changes based on the original value of the reference signal to obtain the signal value of the detection signal.
  • the signal value of the Nth frame detection signal is the difference between the original value of the Nth frame detection signal and the change in the Nth frame reference signal
  • the change in the Nth frame reference signal is K times the difference between the original value of the Nth frame reference signal and the original value of the 1st frame reference signal, where K is a preset coefficient.
  • the original value of the reference signal of the Nth frame is obtained by filtering the original value of the reference signal of the previous P frames.
  • the processing unit 230 is also used to: when the difference between the calibration value of the Nth frame detection signal and its base value is greater than a second threshold, determine that an event of a conductor approaching or leaving the detection electrode 210 has occurred; when the difference between the calibration value of the Nth frame detection signal and its base value is less than the second threshold, determine that an event of a conductor approaching or leaving the detection electrode 210 has not occurred, wherein the base value is the signal value of the detection signal when no conductor approaches or contacts the detection electrode 210.
  • the present application also provides a capacitance detection chip, which includes a processor and a memory, the memory is used to store instructions, and the processor is used to execute instructions to implement the capacitance detection method described in any of the above embodiments.
  • the present application also provides an electronic device, which includes the capacitance detection device described in any of the above embodiments, or includes the capacitance detection chip described in any of the above embodiments.
  • the electronic device in the embodiment of the present application can be a portable or mobile computing device such as a terminal device, a mobile phone, a tablet computer, a laptop computer, a desktop computer, a gaming device, an in-vehicle electronic device or a wearable smart device, as well as other electronic devices such as an electronic database, a car, and an automated teller machine (ATM).
  • a portable or mobile computing device such as a terminal device, a mobile phone, a tablet computer, a laptop computer, a desktop computer, a gaming device, an in-vehicle electronic device or a wearable smart device, as well as other electronic devices such as an electronic database, a car, and an automated teller machine (ATM).
  • ATM automated teller machine
  • the wearable smart device includes a device with full functions and large size that can realize full or partial functions without relying on a smart phone, such as a smart watch or smart glasses, and includes a device that only focuses on a certain type of application function and needs to be used in conjunction with other devices such as a smart phone, such as various types of smart bracelets and smart jewelry for vital sign monitoring.
  • the systems, devices and methods disclosed in the embodiments of the present application may be implemented in other ways. For example, some features of the method embodiments described above may be ignored or not performed.
  • the device embodiments described above are merely schematic, and the division of units is merely a logical function division. There may be other division methods in actual implementation, and multiple units or components may be combined or integrated into another system.
  • the coupling between the units or the coupling between the components may be direct coupling or indirect coupling, and the coupling may include electrical, mechanical or other forms of connection.

Landscapes

  • Geophysics And Detection Of Objects (AREA)

Abstract

本申请提供一种电容检测的方法、装置、芯片和电子设备,能够消除环境对电容检测的影响,以提高电容检测的准确性。该方法包括:获取检测电极输出的检测信号的信号值(110);根据第N帧检测信号之前的M帧检测信号的信号值相对于基准值的偏差,确定第N帧检测信号的补偿量(120),其中,N为正整数,M为小于N的正整数;根据补偿量,对第N帧检测信号的信号值进行校准,得到第N帧检测信号的校准值(130)。

Description

电容检测的方法、装置、芯片和电子设备 技术领域
本申请实施例涉及电容检测领域,并且更具体地,涉及一种电容检测的方法、装置、芯片和电子设备。
背景技术
电容检测装置通常设置于耳机、手机等电子设备中,其包括检测电极和相关的处理电路,以检测人体是否靠近或者离开检测电极,便于电子设备执行相应的操作。但是,环境温度的变化会对电容检测的结果造成影响,从而对导体靠近或者远离检测电极的状态造成误判。为此,如何消除环境对电容检测的影响,以提高电容检测的准确性,成为需要解决的问题。
发明内容
本申请实施例提供一种电容检测的方法、装置、芯片和电子设备,能够消除环境对电容检测的影响,以提高电容检测的准确性。
第一方面,提供一种电容检测的方法,所述方法包括:获取检测电极输出的检测信号的信号值;根据第N帧检测信号之前的M帧检测信号的信号值相对于基准值的偏差,确定所述第N帧检测信号的补偿量,其中,N为正整数,M为小于N的正整数;根据所述补偿量,对所述第N帧检测信号的信号值进行校准,得到所述第N帧检测信号的校准值。
在一种实现方式中,所述M帧检测信号满足预定条件时,所述M帧检测信号的基准值相等;所述M帧检测信号不满足所述预定条件时,所述M帧检测信号中第i+1帧检测信号的基准值等于所述M帧检测信号中第i帧检测信号的校准值,i从1至M-1。
在一种实现方式中,所述M帧检测信号中第1帧检测信号的基准值等于所述第1帧检测信号的信号值。
在一种实现方式中,所述预定条件包括:所述M帧检测信号中每帧检测信号与其之前间隔P帧的检测信号的信号值之间的差值,小于第一阈值,其中,P为小于N的正整数。
在一种实现方式中,所述补偿量为所述M帧检测信号中各帧检测信号 的信号值与基准值之间的差值的平均值。
在一种实现方式中,所述根据所述补偿量,对所述第N帧检测信号的信号值进行校准,包括:根据所述补偿量,对所述第N帧检测信号至第N+M-1帧检测信号的信号值进行校准。
在一种实现方式中,所述装置还包括参考电极,所述获取检测电极输出的检测信号的信号值,包括:获取所述检测信号的原始值和所述参考电极输出的参考信号的原始值;根据所述参考信号的原始值,抵消所述检测信号的原始值中由环境变化引起的部分,得到所述检测信号的信号值。
在一种实现方式中,所述第N帧检测信号的信号值为所述第N帧检测信号的原始值与第N帧参考信号的变化量之间的差值,所述第N帧参考信号的变化量为所述第N帧参考信号的原始值与第1帧参考信号的原始值之间的差值的K倍,K为预设的系数。
在一种实现方式中,所述第N帧参考信号的原始值是对其前P帧参考信号的原始值进行滤波后得到的。
在一种实现方式中,所述方法还包括:所述第N帧检测信号的校准值与其基础值之间的差值大于第二阈值时,确定所述检测电极上发生导体靠近或者离开的事件,所述基础值为没有导体靠近或接触所述检测电极时所述检测信号的信号值;所述第N帧检测信号的校准值与其基础值之间的差值小于第二阈值时,确定所述检测电极上没有发生导体靠近或者离开的事件。
第二方面,提供一种电容检测的装置,所述装置包括:信号采集单元,用于获取检测电极输出的检测信号的信号值;处理单元,用于根据第N帧检测信号之前的M帧检测信号的信号值相对于基准值的偏差,确定所述第N帧检测信号的补偿量,其中,N为正整数,M为小于N的正整数;所述处理单元还用于,根据所述补偿量,对所述第N帧检测信号的信号值进行校准,得到所述第N帧检测信号的校准值。
在一种实现方式中,所述M帧检测信号满足预定条件时,所述M帧检测信号的基准值相等;所述M帧检测信号不满足所述预定条件时,所述M帧检测信号中第i+1帧检测信号的基准值等于所述M帧检测信号中第i帧检测信号的校准值,i从1至M-1。
在一种实现方式中,所述M帧检测信号中第1帧检测信号的基准值等于所述第1帧检测信号的信号值。
在一种实现方式中,所述预定条件包括:所述M帧检测信号中每帧检测信号与其之前间隔P帧的检测信号的信号值之间的差值,小于第一阈值,其中,P为小于N的正整数。
在一种实现方式中,所述补偿量为所述M帧检测信号中各帧检测信号的信号值与基准值之间的差值的平均值。
在一种实现方式中,所述处理单元具体用于:根据所述补偿量,对所述第N帧检测信号至第N+M-1帧检测信号的信号值进行校准。
在一种实现方式中,所述信号采集单元具体用于:获取所述检测信号的原始值和参考电极输出的参考信号的原始值;所述处理单元还用于,根据所述参考信号的原始值,抵消所述检测信号的原始值中由环境变化引起的部分,得到所述检测信号的信号值。
在一种实现方式中,所述第N帧检测信号的信号值为所述第N帧检测信号的原始值与第N帧参考信号的变化量之间的差值,所述第N帧参考信号的变化量为所述第N帧参考信号与第1帧参考信号的原始值之间的差值的K倍,K为预设的系数。
在一种实现方式中,所述第N帧参考信号的原始值是对其前P帧参考信号的原始值进行滤波后得到的。
在一种实现方式中,所述处理单元还用于:所述第N帧检测信号的校准值与其基础值之间的差值大于第二阈值时,确定所述检测电极上发生导体靠近或者离开的事件,所述基础值为没有导体靠近或接触所述检测电极时所述检测信号的信号值;所述第N帧检测信号的校准值与其基础值之间的差值小于第二阈值时,确定所述检测电极上没有发生导体靠近或者离开的事件。
第三方面,提供一种电容检测的芯片,所述芯片包括处理器和存储器,所述存储器用于存储指令,所述处理器用于执行所述指令,以实现第一方面或第一方面的任一实现方式中所述的电容检测的方法。
第四方面,提供一种电子设备,所述电子设备包括第二方面或第二方面的任一实现方式中所述的电容检测的装置,或者包括第三方面所述的电容检测的芯片。
基于上述技术方案,通过当前第N帧检测信号之前的M帧检测信号的信号值相对于基准值的偏差,确定第N帧检测信号的补偿量,以对第N帧检测信号的信号值进行校准。相当于将每帧检测信号的信号值均朝向基准值 的方向校准,减小了检测信号的波动,使其信号值更加平整,有效避免了电容检测过程中的误判。
附图说明
图1是本申请实施例的电容检测的装置的示意性结构图。
图2是检测信号和参考信号的变化规律的示意图。
图3是本申请实施例的电容检测的方法的示意性流程图。
图4是有事件发生且温度变化时检测信号的信号值及其P点差分变化量随检测帧数变化的示意图。
图5是没有事件发生且温度变化时检测信号的信号值及其P点差分变化量随检测帧数变化的示意图。
图6是本申请实施例的检测信号和参考信号的信号值随检测帧数变化的示意图。
图7是检测信号的信号值和校准值的示意图。
图8是本申请实施例的电容检测的装置的示意性框图。
具体实施方式
下面将结合附图,对本申请中的技术方案进行描述。
图1示出了本申请实施例的电容检测的装置的示意性结构图。如图1所示,电容检测的装置200包括检测电极210、与检测电极210连接的模拟前端(Analog Front End,AFE)电路220、以及处理单元230,其中,AFE电路220包括放大器(Amplifier,AMP)221和模数转换器(Analog to Digital Converter,ADC)222。检测电极210与地之间形成电容Cs。当有导体靠近或者远离检测电极210时,电容Cs会发生变化,AMP 221将其电容信号转换为电压信号,并由ADC 222对该电压信号进行模数转换后送入处理单元230进行相应的数据处理。这样,便可以电容Cs的变化判断是否有导体靠近或者离开的事件发生,从而执行相应的操作,例如,当装置200应用于耳机中,可以方便地检测耳机的佩戴和脱落;又例如,当该装置200应用于手机中,在手机的特定吸收率(Specific Absorption Rate,SAR)检测场景中可以判断是否有人体接近从而调整天线发射功率。
可选地,装置200还可以包括参考电极240、以及与参考电极240连接 的AFE电路250,其中,AFE电路250包括AMP 251和ADC 252。参考电极240与地之间形成电容Cr。电容Cr仅用于反应环境变化对电容检测的影响,由于检测电极210和参考电极240处于相同环境中,二者受环境的影响相同,利用参考电极240上产生的参考信号,便可以抵消检测电极210上产生的检测信号中由环境变化引起的部分。
由于通常环境中的温度变化对检测结果的影响最大,以下,均以温度的影响为例,对电容检测的过程进行描述。
例如,如图2所示,当检测电极210和参考电极240能够完全匹配时,参考信号能够完全反映检测信号中所受的温度影响,对检测信号与参考信号之间作差,便可以消除掉检测信号中受温度影响的部分,得到:
RawDataNew=RawData-RefData        (1);
其中,RawData为检测信号的原始值,例如是与检测电极210连接的AFE电路220输出的信号值;RefData为参考信号的原始值,例如是与参考电极240连接的AFE电路250输出的信号值;利用参考信号消除了检测信号的原始值中由温度变化引起的部分之后得到的RawDataNew称为该检测信号的信号值。根据该检测信号的信号值,便可以确定当前是导体是否靠近。
由于结构设计、以及检测电极210和参考电极240本身的电容存在偏差等原因,检测电极210和参考电极240无法完全匹配,为此,可以通过系数K来减小检测电极210和参考电极240之间的不匹配对检测结果的影响。这时,该检测信号的信号值例如可以为:
RawDataNew(N)=RawData(N)-K*[RefData(N)-RefData(1)]    (2);
其中,N为检测帧数,RefData(1)为第1帧参考信号的原始值,例如装置200上电时参考信号的初始值,RefData(N)为第N帧参考信号的原始值,RawData(N)为第N帧检测信号的原始值,RawDataNew(N)为利用参考信号消除温度影响后第N帧检测信号的信号值。
可选地,可以在最大温差环境下进行测试,得到检测信号的原始值的变化量和参考信号的原始值的变化量,从而K等于检测信号的原始值的变化量与参考信号的原始值的变化量之间的比值。例如,在温度快速上升和温度快速下降的场景中分别进行测试,得到两个K值,并从中选择检测信号变化量与参考信号变化量之间差异更大时对应的K值作为后续使用的K值,即K值大于1时取两个K值中较大的,K值小于1时取两个K值中较小的。
在公式(2)中,RefData(N)-RefData(1)反映了采集第N帧参考信号和采集第1帧参考信号时温度不同所引起的信号变化量,由于检测信号和参考信号随温度变化而变化的规律是一致的,因此,理论上检测信号中由温度变化引起的信号变化量也应等于RefData(N)-RefData(1),但实际考虑到检测电极210和参考电极240无法完全匹配,因此利用系数K对RefData(N)-RefData(1)进行调整,之后再对检测信号的原始值与调整后的该信号变化量作差,从而粗略地消除检测信号受温度的影响。
如果检测电极210和参考电极240之间的匹配性较差,那么,在温度剧烈变化的场景中,例如循环升降温测试的场景、室内外温差突变的场景、手机应用中功率放大设备的温度变化较大的场景中,系数K也无法有效地消除检测电极210和参考电极240之间的不匹配对检测结果的影响。例如,K如果设置的较小,则可能因噪声而误判为有导体靠近的事件发生;K如果设置的较大,则可能在当前有导体靠近的事件发生时判断为导体远离。这种误判在特定应用下会带来较大的影响,例如,耳机的入耳检测功能(In Ear Detection,IED)会误判为佩戴或者脱落,手机的SAR检测场景中的误判会引起天线发射功率的误调整从而对整机功能造成影响。
为此,本申请实施例提供一种电容检测方案,旨在解决如何消除环境对电容检测的影响以提高电容检测的准确性的问题。利用检测信号本身的变化趋势实时计算补偿量,用以对检测信号进行校准,有效提高了电容检测的准确性。
图1中所示的装置200是以自电容的检测为例,本申请实施例的电容检测方案可以应用于自电容检测、互电容检测等各种基于电容检测的场景及应用中。
图3示出了本申请实施例的电容检测的方法100,方法100可以由图1中所示的电容检测的装置200执行,装置200包括检测电极210,方法100用于检测是否有导体靠近或者离开检测电极210的事件发生。如图3所示,方法100包括以下步骤中的部分或全部。
在步骤110中,获取检测电极210输出的检测信号的信号值。
在步骤120中,根据第N帧检测信号之前的M帧检测信号的信号值相对于基准值的偏差,确定第N帧检测信号的补偿量,其中,N为正整数,M为小于N的正整数。
在步骤130中,根据该补偿量,对第N帧检测信号的信号值进行校准,得到第N帧检测信号的校准值。
可见,通过当前第N帧检测信号之前的M帧检测信号的信号值相对于基准值的偏差,确定第N帧检测信号的补偿量,以对第N帧检测信号的信号值进行校准。这相当于将每帧检测信号的信号值均朝向基准值的方向校准,减小了检测信号的波动,使其信号值更加平整,有效避免了电容检测过程中的误判。
进一步地,可选地,方法100还包括:在第N帧检测信号的校准值与其基础值之间的差值大于第二阈值TH2时,确定检测电极210上发生导体靠近或者离开的事件;在第N帧检测信号的校准值与其基础值之间的差值小于第二阈值TH2时,确定检测电极210上没有发生导体靠近或者离开的事件。其中,该基础值(base值)为没有导体靠近或接触检测电极210时检测电极210输出的检测信号的信号值。或者说是,该基础值为导体远离检测电极210后该检测信号的信号值。
可以理解,在进行电容检测之前,可以事先获取没有导体靠近或接触检测电极210时检测电极210输出的检测信号的信号值作为该基础值。于是,在后续进行电容检测时,便可以根据检测信号的校准值和该基准值之差与第二阈值TH2之间的大小关系,确定是否发生导体靠近或者离开的事件。
第N帧检测信号的补偿量由第N帧检测信号之前的M帧检测信号的信号值相对于基准值的偏差来确定,例如,在一种实现方式中,该补偿量为M帧检测信号中各帧检测信号的信号值与基准值之间的差值的平均值。即,
Figure PCTCN2022138139-appb-000001
其中,δ s(N)为第N帧检测信号的补偿量,TempBase(N-i)为第N-i帧检测信号的基准值,RawDataNew(N-i)为第N-i帧检测信号的信号值,M为预设的小于N的正整数。
在得到δ s(N)后,可以根据δ s(N)对第N帧检测信号的信号值RawDataNew(N)进行校准,得到第N帧检测信号的校准值为:
Raw(N)=RawDataNew(N)-δ s(N)      (4);
其中,Raw(N)为第N帧检测信号的校准值,RawDataNew(N)为第N帧检测信号的信号值,δ s(N)为第N帧检测信号的补偿量。
可选地,在步骤130中,根据该补偿量,对第N帧检测信号的信号值进行校准,包括:根据该补偿量,对第N帧检测信号至第N+M-1帧检测信号的信号值进行校准。也就是说,可以每M帧更新一次该补偿量,即,将前M帧检测信号的变化量的均值,作为后M帧检测信号的补偿量。
以下,也将这种补偿方式称为最小偏差补偿。
上述的基准值TempBase仅对导体靠近或远离检测电极210的事件引起的信号值的变化进行跟随,而不对温度引起的信号值的变化进行跟随。也就是说,在电容检测的过程中,如果检测到的信号值的变化可能是由导体靠近或远离的事件引起时,该基准值随着检测帧数而跟随变化;如果检测到的信号值的变化可能仅由温度变化引起,该基准值保持不变。
本申请实施例中可以通过设置预定条件来判断当前信号值的变化可能由导体靠近或远离的事件引起,还是由温度变化引起。例如,该M帧检测信号满足预定条件时,M帧检测信号的基准值相等;M帧检测信号不满足预定条件时,M帧检测信号中第i+1帧检测信号的基准值等于所述M帧检测信号中第i帧检测信号的校准值,i从1至M-1。M帧检测信号中第1帧检测信号的基准值例如可以等于该第1帧检测信号的信号值,这时默认该第1帧检测信号的补偿量为0,因此第1帧检测信号的校准值也即其信号值。
温度变化引起的检测信号的信号值的变化通常都是缓慢且平稳的,发生导体靠近或者远离的事件时检测信号的信号值会出现阶跃变化的特征,因此,可以通过差分方式,初步识别当前信号值的变化是由事件发生引起的还是温度变化引起的。
例如,该预定条件可以是,第N帧检测信号之前的M帧检测信号中每帧检测信号与其之前间隔P帧的检测信号的信号值之间的差值,小于第一阈值TH1,其中,P为小于N的正整数。在本申请实施例中,P和M的值可以独立进行选择;或者,优选地,也可以选择P≥M。
以M帧检测信号中的第i帧检测信号为例,i从1至M,第i帧检测信号相对于第i-P帧检测信号的信号值的变化量为:
DiffChange(i)=|RawDataNew(i)-RawDataNew(i-P)|      (5);
其中,RawDataNew(i)为第i帧检测信号的信号值,RawDataNew(i-P)为第i-P帧检测信号的信号值。DiffChange(i)为第i帧检测信号相对于第i-P帧检测信号的信号值的变化量,以下也称为P点差分变化量。
P值的选择通常与环境温度变化的速率相关。考虑到环境中噪声的影响以及导体靠近或远离检测电极的事件发生的较为缓慢的情况,设置P>1能够有效消除部分噪声的影响,并且在导体较为缓慢地靠近或远离检测电极的情况下依然能够较为准确地获取到差分变化量。以下,结合图4和图5进行具体说明。
图4中的(a)示出了有导体靠近或远离的事件发生且温度变化的情况下,检测信号的信号值随检测帧数的变化;图4中的(b)示出了这种情况下P=1时DiffChange随检测帧数的变化;图4中的(c)示出了这种情况下P=5时DiffChange随检测帧数的变化。P越小,DiffChange受噪声的影响越明显,例如,如图4的(b)和(c)中的虚线框所示,(c)中所示的P=5时DiffChange的值更大,且抖动更小,即纵坐标的数值波动更小,表明DiffChange受噪声影响较小;而(b)中所示的P=1时DiffChange的值更小,且抖动更明显,即纵坐标的数值波动更大,表明DiffChange受噪声影响较大。
图5中的(a)示出了没有导体靠近或远离的事件发生且温度变化的情况下,检测信号的信号值随检测帧数的变化;图5中的(b)示出了这种情况下P=1时DiffChange随检测帧数的变化;图5中的(c)示出了这种情况下P=5时DiffChange随检测帧数的变化。P越小,DiffChange受噪声的影响越明显,图5的(a)中温度对检测信号的影响导致其信号值在A点处下降,图5的(c)中虚线框内的DiffChange也能够反映出这种变化,而图5的(b)中虚线框内的DiffChange无法很好的反映这种变化。
根据公式(5),若DiffChange(i)大于或等于第一阈值TH1,表明当前信号值的变化可能由导体靠近或远离的事件引起;若DiffChange(i)小于第一阈值TH1,表明当前信号值的变化可能仅由温度变化引起。
那么,当DiffChange(i)≥TH1时,该基准值随着检测帧数而跟随变化,M帧检测信号中第1帧检测信号的基准值可以是该第1帧检测信号的信号值,这时默认δ s(i)=0,因此该第1帧检测信号的校准值即为其信号值,而从第2帧检测信号起,每帧检测信号的基准值随其前一帧检测信号的校准值而变化;当DiffChange(i)<TH1时,M帧检测信号的基准值保持不变,M帧检测信号中每帧检测信号的基准值均等于其前一帧检测信号的基准值。
在得到M帧检测信号的基准值后,基于前述的公式(3)和公式(4),便可以计算第N帧检测信号的补偿量δ s(N),根据δ s(N)对第N帧检测信号 的信号值进行校准,得到第N帧检测信号的校准值。
本申请实施例的电容检测的方法100可以应用于没有参考电极240的场景下,也可以应用于有参考电极240的场景下。需要说明的是,在没有参考电极240的场景下,前述的检测信号的信号值即为该检测信号的原始值,例如,RawDataNew(N)=RawData(N);在有参考电极240的场景下,参考电极240输出的参考信号用于抵消检测信号中由环境变化引起的部分,前述的检测信号的信号值即为利用该参考信号消除该检测信号的原始值中受温度影响的部分而得到的,例如,RawDataNew(N)=RawData(N)-K*[RefData(N)-RefData(1)]。
对于有参考电极240的场景,在一种实现方式中,在步骤110中,获取检测电极210输出的检测信号的信号值,包括:获取该检测信号的原始值和该参考信号的原始值;根据该参考信号的原始值,抵消该检测信号的原始值中由环境变化引起的部分,得到该检测信号的信号值。
例如,可以参考前述公式(2),第N帧检测信号的信号值为第N帧检测信号的原始值与第N帧参考信号的变化量之间的差值,第N帧参考信号的变化量为第N帧参考信号与第1帧参考信号的原始值之间的差值的K倍,K为预设的系数。
为了消除噪声,在一种实现方式中,第N帧参考信号的原始值是对其前P帧参考信号的原始值进行滤波后得到的。例如,可以对第N帧参考信号之前的P帧参考信号的原始值进行滤波处理,得到第N帧参考信号的原始值为:
RefDataNew(N)=filter[RefData(N-1),…,RefData(N-P)]     (6);
其中,RefDataNew(N)滤波后的第N帧参考信号的原始值,RefData(N-1)至RefData(N-P)分别为第N帧参考信号之前的P帧参考信号的原始值。
将公式(2)中的RefData(N)替换为RefDataNew(N),可以得到:
RawDataNew(N)=RawData(n)-K*[RefDataNew(N)-RefData(1)]    (7);
其中,RefData(1)为上电时参考信号的初始值,RefDataNew(N)为滤波后第N帧参考信号的原始值,RawData(N)为第N帧检测信号的原始值,RawDataNew(N)为利用参考信号消除温度影响后第N帧检测信号的信号值。
根据公式(6)和公式(7),可以将参考信号的变化量换算到检测信号中,从而消除检测信号受温度的影响。但由于前述匹配性的原因,系数K并 不为1,而是基于检测电极210和参考电极240之间的差异而设定,但是系数K又无法完全消除环境对检测信号的影响,只能在一定程度上减小检测信号的温度漂移。也就是说,利用参考信号只能够对检测信号进行初步补偿。
而本申请实施例中,在初步补偿之后,还会实时对检测信号进行最小偏差补偿,即,通过当前第N帧检测信号之前的M帧检测信号的信号值相对于基准值的偏差,确定第N帧检测信号的补偿量,以对第N帧检测信号的信号值进行校准。通过初步补偿和最小偏差补偿后,基本上能够完全消除环境对检测信号的影响。
如图6所示的检测信号和参考信号的信号值随检测帧数的变化,其中,曲线D表示参考信号的原始值,曲线E表示检测信号的原始值,曲线F表示检测信号的基准值,曲线Q表示初步补偿后检测信号的信号值。在位置B之前,检测电极210和参考电极240受温度影响的程度相同,因此曲线Q为水平的,而在位置B之后,检测电极210和参考电极240受温度影响的程度出现差异,因此曲线Q也出现波动,即经过初步补偿后无法完全消除环境对检测信号的影响。但采用本申请实施例的方法100时,可以将曲线Q拉至与曲线F重合,即经过初步补偿和最小偏差补偿后,基本上能够完全消除环境对检测信号的影响。也就是说,利用参考信号进行初步补偿后,曲线E被拉到曲线Q的位置;再利用前M帧检测信号的变化量计算补偿量进行最小偏差补偿,可以将曲线Q拉至与曲线F的位置。
再如图7所示,在实际测试中,若不进行最小偏差补偿,检测信号的信号值为曲线E,进行最小偏差补偿后,检测信号的信号值为曲线Q所示的校准值,曲线F为检测信号的基准值,可以看出,曲线Q与曲线F基本重合。可见,通过方法100能够有效减小环境变化对检测信号的影响,使校准后的检测信号的信号值趋于平稳,不受温度的影响而波动。
本申请实施例中,利用参考信号对当前帧的检测信号进行初步补偿后,根据P点差分变化量判断当前信号值的变化是由事件引起还是由温度引起,并基于此选择合适基准值,从而根据前M帧检测信号的信号值与基准值之间的变化量,对当前帧的检测信号的信号值进行校准,更准确地消除了环境变化而保留了有效信号,优化了环境变化对检测信号的影响,有效地提高了电容检测的准确性。
图8示出了本申请实施例的电容检测的装置的示意性框图。如图8所 示,电容检测的装置200包括信号采集单元201和处理单元230。其中,信号采集单元201例如可以包括图1中所示的AFE电路220和AFE电路250,装置200还可以包括与信号采集单元201连接的检测电极210,进一步地,还可以包括与信号采集单元201连接的参考电极240。
信号采集单元201用于获取检测电极210输出的检测信号的信号值。
处理单元230用于根据第N帧检测信号之前的M帧检测信号的信号值相对于基准值的偏差,确定第N帧检测信号的补偿量,其中,N为正整数,M为小于N的正整数;处理单元230还用于,根据补偿量,对第N帧检测信号的信号值进行校准,得到第N帧检测信号的校准值。
在一种实现方式中,M帧检测信号满足预定条件时,M帧检测信号的基准值相等;M帧检测信号不满足预定条件时,M帧检测信号中第i+1帧检测信号的基准值等于M帧检测信号中第i帧检测信号的校准值,i从1至M-1。
在一种实现方式中,M帧检测信号中第1帧检测信号的基准值等于第1帧检测信号的信号值。
在一种实现方式中,该预定条件包括:M帧检测信号中每帧检测信号与其之前间隔P帧的检测信号的信号值之间的差值,小于第一阈值,其中,P为小于N的正整数。
在一种实现方式中,该补偿量为该M帧检测信号中各帧检测信号的信号值与基准值之间的差值的平均值。
在一种实现方式中,处理单元230具体用于:根据该补偿量,对第N帧检测信号至第N+M-1帧检测信号的信号值进行校准。
在一种实现方式中,信号采集单元201具体用于:获取检测信号的原始值和参考电极240输出的参考信号的原始值;处理单元230还用于,根据该参考信号的原始值,抵消该检测信号的原始值中由环境变化引起的部分,得到该检测信号的信号值。
在一种实现方式中,第N帧检测信号的信号值为第N帧检测信号的原始值与第N帧参考信号的变化量之间的差值,第N帧参考信号的变化量为第N帧参考信号的原始值与第1帧参考信号的原始值之间的差值的K倍,K为预设的系数。
在一种实现方式中,第N帧参考信号的原始值是对其前P帧参考信号 的原始值进行滤波后得到的。
在一种实现方式中,处理单元230还用于:第N帧检测信号的校准值与其基础值之间的差值大于第二阈值时,确定检测电极210上发生导体靠近或者离开的事件;第N帧检测信号的校准值与其基础值之间的差值小于该第二阈值时,确定检测电极210上没有发生导体靠近或者离开的事件,其中,该基础值为没有导体靠近或接触检测电极210时检测信号的信号值。
应理解,装置200进行电容检测的具体细节,可以参考前述针对方法100的描述,为了简洁,这里不再赘述。
本申请还提供一种电容检测的芯片,该芯片包括处理器和存储器,存储器用于存储指令,处理器用于执行指令,以实现上述任一实施例中所述的电容检测的方法。
本申请还提供一种电子设备,该电子设备包括上述任一实施例中所述的电容检测的装置,或者包括上述任一实施例中所述的电容检测的芯片。
作为示例而非限定,本申请实施例中的电子设备可以为终端设备、手机、平板电脑、笔记本电脑、台式机电脑、游戏设备、车载电子设备或穿戴式智能设备等便携式或移动计算设备,以及电子数据库、汽车、银行自动柜员机(Automated Teller Machine,ATM)等其他电子设备。该穿戴式智能设备包括功能全、尺寸大、可不依赖智能手机实现完整或部分功能的设备,例如智能手表或智能眼镜等,以及包括只专注于某一类应用功能并且需要和其它设备如智能手机配合使用的设备,例如各类进行体征监测的智能手环、智能首饰等设备。
需要说明的是,在不冲突的前提下,本申请描述的各个实施例和/或各个实施例中的技术特征可以任意的相互组合,组合之后得到的技术方案也应落入本申请的保护范围。
本申请实施例中所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的方法实施例的一些特征可以忽略或者不执行。以上所描述的装置实施例仅仅是示意性的,单元的划分仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,多个单元或组件可以结合或者可以集成到另一个系统。另外,各单元之间的耦合或各个组件之间的耦合可以是直接耦合,也可以是间接耦合,上述耦合包括电的、机械的或其它形式的连接。
本领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描 述的装置和设备的具体工作过程以及产生的技术效果,可以参考前述方法实施例中对应的过程和技术效果,在此不再赘述。
应理解,本申请实施例中的具体的例子只是为了帮助本领域技术人员更好地理解本申请实施例,而非限制本申请实施例的范围,本领域技术人员可以在上述实施例的基础上进行各种改进和变形,而这些改进或者变形均落在本申请的保护范围内。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (20)

  1. 一种电容检测的方法,其特征在于,应用于电容检测的装置,所述装置包括检测电极,所述检测电极用于检测导体的靠近或者离开,所述方法包括:
    获取所述检测电极输出的检测信号的信号值;
    根据第N帧检测信号之前的M帧检测信号的信号值相对于基准值的偏差,确定所述第N帧检测信号的补偿量,其中,N为正整数,M为小于N的正整数;
    根据所述补偿量,对所述第N帧检测信号的信号值进行校准,得到所述第N帧检测信号的校准值。
  2. 根据权利要求1所述的方法,其特征在于,
    所述M帧检测信号满足预定条件时,所述M帧检测信号的基准值相等;
    所述M帧检测信号不满足所述预定条件时,所述M帧检测信号中第i+1帧检测信号的基准值等于所述M帧检测信号中第i帧检测信号的校准值,i从1至M-1。
  3. 根据权利要求2所述的方法,其特征在于,所述M帧检测信号中第1帧检测信号的基准值等于所述第1帧检测信号的信号值。
  4. 根据权利要求2或3所述的方法,其特征在于,所述预定条件包括:
    所述M帧检测信号中每帧检测信号与其之前间隔P帧的检测信号的信号值之间的差值,小于第一阈值,其中,P为小于N的正整数。
  5. 根据权利要求1至4中任一项所述的方法,其特征在于,所述补偿量为所述M帧检测信号中各帧检测信号的信号值与基准值之间的差值的平均值。
  6. 根据权利要求1至5中任一项所述的方法,其特征在于,所述根据所述补偿量,对所述第N帧检测信号的信号值进行校准,包括:
    根据所述补偿量,对所述第N帧检测信号至第N+M-1帧检测信号的信号值进行校准。
  7. 根据权利要求1至6中任一项所述的方法,其特征在于,所述装置还包括参考电极,所述获取检测电极输出的检测信号的信号值,包括:
    获取所述检测信号的原始值和所述参考电极输出的参考信号的原始值;
    根据所述参考信号的原始值,抵消所述检测信号的原始值中由环境变化 引起的部分,得到所述检测信号的信号值。
  8. 根据权利要求7所述的方法,其特征在于,所述第N帧检测信号的信号值为所述第N帧检测信号的原始值与第N帧参考信号的变化量之间的差值,所述第N帧参考信号的变化量为所述第N帧参考信号的原始值与第1帧参考信号的原始值之间的差值的K倍,K为预设的系数。
  9. 根据权利要求8所述的方法,其特征在于,所述第N帧参考信号的原始值是对其前P帧参考信号的原始值进行滤波后得到的。
  10. 根据权利要求1至9中任一项所述的方法,其特征在于,所述方法还包括:
    所述第N帧检测信号的校准值与其基础值之间的差值大于第二阈值时,确定所述检测电极上发生导体靠近或者离开的事件,所述基础值为没有导体靠近或接触所述检测电极时所述检测信号的信号值;
    所述第N帧检测信号的校准值与其基础值之间的差值小于所述第二阈值时,确定所述检测电极上没有发生导体靠近或者离开的事件。
  11. 一种电容检测的装置,其特征在于,所述装置包括:
    信号采集单元,用于获取检测电极输出的检测信号的信号值;
    处理单元,用于根据第N帧检测信号之前的M帧检测信号的信号值相对于基准值的偏差,确定所述第N帧检测信号的补偿量,其中,N为正整数,M为小于N的正整数;
    所述处理单元还用于,根据所述补偿量,对所述第N帧检测信号的信号值进行校准,得到所述第N帧检测信号的校准值。
  12. 根据权利要求11所述的装置,其特征在于,
    所述M帧检测信号满足预定条件时,所述M帧检测信号的基准值相等;
    所述M帧检测信号不满足所述预定条件时,所述M帧检测信号中第i+1帧检测信号的基准值等于所述M帧检测信号中第i帧检测信号的校准值,i从1至M-1。
  13. 根据权利要求12所述的装置,其特征在于,所述M帧检测信号中第1帧检测信号的基准值等于所述第1帧检测信号的信号值。
  14. 根据权利要求12或13所述的装置,其特征在于,所述预定条件包括:
    所述M帧检测信号中每帧检测信号与其之前间隔P帧的检测信号的信 号值之间的差值,小于第一阈值,其中,P为小于N的正整数。
  15. 根据权利要求11至14中任一项所述的装置,其特征在于,所述补偿量为所述M帧检测信号中各帧检测信号的信号值与基准值之间的差值的平均值。
  16. 根据权利要求11至15中任一项所述的装置,其特征在于,所述信号采集单元具体用于:
    获取所述检测信号的原始值和参考电极输出的参考信号的原始值;
    所述处理单元还用于,根据所述参考信号的原始值,抵消所述检测信号的原始值中由环境变化引起的部分,得到所述检测信号的信号值。
  17. 根据权利要求16所述的装置,其特征在于,所述第N帧检测信号的信号值为所述第N帧检测信号的原始值与第N帧参考信号的变化量之间的差值,所述第N帧参考信号的变化量为所述第N帧参考信号与第1帧参考信号的原始值之间的差值的K倍,K为预设的系数。
  18. 根据权利要求11至17中任一项所述的装置,其特征在于,所述处理单元还用于:
    所述第N帧检测信号的校准值与其基础值之间的差值大于第二阈值时,确定所述检测电极上发生导体靠近或者离开的事件,所述基础值为没有导体靠近或接触所述检测电极时所述检测信号的信号值;
    所述第N帧检测信号的校准值与其基础值之间的差值小于所述第二阈值时,确定所述检测电极上没有发生导体靠近或者离开的事件。
  19. 一种电容检测的芯片,其特征在于,所述芯片包括处理器和存储器,所述存储器用于存储指令,所述处理器用于执行所述指令,以实现上述权利要求1至10中任一项所述的电容检测的方法。
  20. 一种电子设备,其特征在于,所述电子设备包括上述权利要求11至18中任一项所述的电容检测的装置,或者包括根据权利要求19所述的电容检测的芯片。
PCT/CN2022/138139 2022-12-09 2022-12-09 电容检测的方法、装置、芯片和电子设备 WO2024119517A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/138139 WO2024119517A1 (zh) 2022-12-09 2022-12-09 电容检测的方法、装置、芯片和电子设备

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/138139 WO2024119517A1 (zh) 2022-12-09 2022-12-09 电容检测的方法、装置、芯片和电子设备

Publications (1)

Publication Number Publication Date
WO2024119517A1 true WO2024119517A1 (zh) 2024-06-13

Family

ID=91378363

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/138139 WO2024119517A1 (zh) 2022-12-09 2022-12-09 电容检测的方法、装置、芯片和电子设备

Country Status (1)

Country Link
WO (1) WO2024119517A1 (zh)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070032967A1 (en) * 2005-07-18 2007-02-08 Analog Devices, Inc. Automatic environmental compensation of capacitance based proximity sensors
CN101727235A (zh) * 2009-12-01 2010-06-09 深圳市汇顶科技有限公司 一种触摸检测方法、系统及触摸感应装置
CN103235672A (zh) * 2013-04-11 2013-08-07 深圳市天微电子有限公司 电容触摸屏自动校准方法与系统
KR20150081575A (ko) * 2014-01-06 2015-07-15 (주)세미센스 정전용량 방식 터치센서 캘리브레이션 자동화 시스템 및 그 방법
CN107504994A (zh) * 2017-08-08 2017-12-22 广东欧珀移动通信有限公司 接近传感器的校准方法、装置、移动终端及可读存储介质
CN111707295A (zh) * 2020-08-17 2020-09-25 深圳市汇顶科技股份有限公司 用于处理温漂的方法和装置
CN114113801A (zh) * 2022-01-24 2022-03-01 上海艾为微电子技术有限公司 电容检测方法及电容检测装置
CN115298644A (zh) * 2020-02-12 2022-11-04 法雷奥开关和传感器有限责任公司 用于校准电容式触摸传感器系统的装置和方法

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070032967A1 (en) * 2005-07-18 2007-02-08 Analog Devices, Inc. Automatic environmental compensation of capacitance based proximity sensors
CN101727235A (zh) * 2009-12-01 2010-06-09 深圳市汇顶科技有限公司 一种触摸检测方法、系统及触摸感应装置
CN103235672A (zh) * 2013-04-11 2013-08-07 深圳市天微电子有限公司 电容触摸屏自动校准方法与系统
KR20150081575A (ko) * 2014-01-06 2015-07-15 (주)세미센스 정전용량 방식 터치센서 캘리브레이션 자동화 시스템 및 그 방법
CN107504994A (zh) * 2017-08-08 2017-12-22 广东欧珀移动通信有限公司 接近传感器的校准方法、装置、移动终端及可读存储介质
CN115298644A (zh) * 2020-02-12 2022-11-04 法雷奥开关和传感器有限责任公司 用于校准电容式触摸传感器系统的装置和方法
CN111707295A (zh) * 2020-08-17 2020-09-25 深圳市汇顶科技股份有限公司 用于处理温漂的方法和装置
CN114113801A (zh) * 2022-01-24 2022-03-01 上海艾为微电子技术有限公司 电容检测方法及电容检测装置

Similar Documents

Publication Publication Date Title
CN107731223B (zh) 语音活性检测方法、相关装置和设备
WO2020034710A1 (zh) 指纹识别方法及相关产品
KR101646964B1 (ko) 휴대용 단말기에서 이어폰 인식 회로 장치
TWI789596B (zh) 抗干擾電路及積體電路的抗干擾方法
TW201524222A (zh) 麥克風的接腳偵測電路與其方法
CN110726475A (zh) 红外测温标定方法、装置、红外热成像设备及存储装置
WO2023072007A1 (zh) 耳机的控制方法、装置、耳机和存储介质
WO2024119517A1 (zh) 电容检测的方法、装置、芯片和电子设备
US9231426B2 (en) Charge control device and electronic apparatus using the same
CN113453122A (zh) 佩戴检测方法、装置、设备及计算机可读存储介质
US10386881B2 (en) Power supply circuit and a method of controlling the same
EP4072157B1 (en) Method for determining capacitance reference, apparatus for determining capacitance reference, and device
CN113038320A (zh) 一种电容检测方法、装置及一种耳机
EP1914531A2 (en) Deformation detection sensor
US20220260393A1 (en) Method for updating capacitance reference, chip, and capacitance detection apparatus
CN115951128A (zh) 电容检测的方法、装置、芯片和电子设备
CN111695319A (zh) 一种实时补偿连接器串联回路电感的方法和设备
CN103841494A (zh) 自动匹配耳机模式的装置
TWI779548B (zh) 近接偵測方法及其電路
WO2022193313A1 (zh) 电容检测装置和耳机
CN111341085A (zh) 用于从电力监控器通过无线系统提供波形的系统和方法
CN115243145A (zh) 耳机控制方法、装置、耳机及计算机可读存储介质
CN114554382B (zh) 一种入耳检测方法及装置、无线耳机、存储介质
CN110971742A (zh) 天线切换方法、装置、终端及计算机可读存储介质
CN109803064B (zh) 增强摄像头模块稳定性的方法及装置