CN112533102B - Method for determining capacitance reference, and device and equipment for determining capacitance reference - Google Patents

Method for determining capacitance reference, and device and equipment for determining capacitance reference Download PDF

Info

Publication number
CN112533102B
CN112533102B CN202110183977.1A CN202110183977A CN112533102B CN 112533102 B CN112533102 B CN 112533102B CN 202110183977 A CN202110183977 A CN 202110183977A CN 112533102 B CN112533102 B CN 112533102B
Authority
CN
China
Prior art keywords
value
differential capacitance
reference value
differential
capacitance
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN202110183977.1A
Other languages
Chinese (zh)
Other versions
CN112533102A (en
Inventor
魏海军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Goodix Technology Co Ltd
Original Assignee
Shenzhen Goodix Technology Co Ltd
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 Shenzhen Goodix Technology Co Ltd filed Critical Shenzhen Goodix Technology Co Ltd
Priority to CN202110183977.1A priority Critical patent/CN112533102B/en
Publication of CN112533102A publication Critical patent/CN112533102A/en
Application granted granted Critical
Publication of CN112533102B publication Critical patent/CN112533102B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R1/00Details of transducers, loudspeakers or microphones
    • H04R1/10Earpieces; Attachments therefor ; Earphones; Monophonic headphones
    • H04R1/1041Mechanical or electronic switches, or control elements
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R27/00Arrangements for measuring resistance, reactance, impedance, or electric characteristics derived therefrom
    • G01R27/02Measuring real or complex resistance, reactance, impedance, or other two-pole characteristics derived therefrom, e.g. time constant
    • G01R27/26Measuring inductance or capacitance; Measuring quality factor, e.g. by using the resonance method; Measuring loss factor; Measuring dielectric constants ; Measuring impedance or related variables
    • G01R27/2605Measuring capacitance
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R35/00Testing or calibrating of apparatus covered by the other groups of this subclass
    • G01R35/005Calibrating; Standards or reference devices, e.g. voltage or resistance standards, "golden" references
    • G01R35/007Standards or reference devices, e.g. voltage or resistance standards, "golden references"
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R1/00Details of transducers, loudspeakers or microphones
    • H04R1/10Earpieces; Attachments therefor ; Earphones; Monophonic headphones
    • H04R1/1016Earpieces of the intra-aural type
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R1/00Details of transducers, loudspeakers or microphones
    • H04R1/10Earpieces; Attachments therefor ; Earphones; Monophonic headphones
    • H04R1/1091Details not provided for in groups H04R1/1008 - H04R1/1083
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R2201/00Details of transducers, loudspeakers or microphones covered by H04R1/00 but not provided for in any of its subgroups
    • H04R2201/10Details of earpieces, attachments therefor, earphones or monophonic headphones covered by H04R1/10 but not provided for in any of its subgroups

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Acoustics & Sound (AREA)
  • Signal Processing (AREA)
  • General Physics & Mathematics (AREA)
  • Measuring Fluid Pressure (AREA)

Abstract

The embodiment of the application provides a method for determining a capacitance reference, a device for determining the capacitance reference and equipment, wherein the method is applied to the equipment with a double-layer capacitance sensor, and the method comprises the following steps: acquiring a first differential capacitance value of the double-layer capacitance sensor, wherein the first differential capacitance value is a minimum differential capacitance value acquired when the earphone is outside an earphone box, and the earphone box is matched with the equipment and is used for accommodating the equipment; and determining a latest differential capacitance reference value according to the first differential capacitance value and the differential capacitance reference value. The difference capacitance reference value is tracked and updated to provide a more accurate capacitance reference, so that the accuracy of capacitance variation detection is ensured, and the accuracy of detection of the behavior state of the equipment is further ensured.

Description

Method for determining capacitance reference, and device and equipment for determining capacitance reference
Technical Field
The embodiments of the present application relate to the field of capacitance detection, and more particularly, to a method for determining a capacitance reference, a device and an apparatus for determining a capacitance reference.
Background
In various electronic apparatuses, various sensors based on capacitance are often provided to perform various controls and applications by a detected capacitance signal, for example, proximity detection, pressure detection, and the like based on a change amount of the detected capacitance signal. For another example, the capacitive proximity detection may determine whether the earphone is in the ear of the user, so as to control whether to pause music playing of the earphone, and the capacitive pressure detection may determine whether the user clicks the earphone based on the capacitance variation, so as to control whether to hang up the call of the earphone or to turn on the noise reduction function. In order to improve the user's interactive experience, True Wireless Stereo (TWS) headsets or hearing aids, smartwatches, smartphones, etc. may be provided with various sensors based on capacitance. For example, a change in capacitance may be detected by a capacitance sensor (sensor) incorporated in an earphone, a hearing aid, or the like, and whether or not the change is close to the ear may be detected to determine the wearing state, or other behavior states of the devices provided with the capacitance sensor may be detected by the change in capacitance. Here, taking the earphone as an example, the corresponding capacitance change can be detected according to a sensor configured in the earphone, and the current state of the earphone can be judged according to the detected capacitance change. The premise of this solution is that the capacitance reference value must be stable and accurate, however, in an actual application scenario, the capacitance reference value of the earphone may change, for example, when the earphone housing material and the sensor are aged, the earphone falls down or the climate changes, and the like, all may cause the actual capacitance reference value to change, and such a change may affect the result of the capacitance detection, more specifically, the result of the capacitance change detection, and then the detection based on the capacitance change (for example, wear detection) and subsequent control are inaccurate.
Disclosure of Invention
The embodiment of the application provides a method for determining a capacitance reference, a device and equipment for determining the capacitance reference, which can track a differential capacitance reference value of a sensor in the use process of equipment configured with a double-layer capacitance sensor so as to provide a more accurate capacitance reference, and further solve the technical problems.
In a first aspect, a method for determining a capacitance reference is provided, which is applied to a device having a double-layer capacitance sensor, and the method includes: acquiring a first differential capacitance value of the double-layer capacitance sensor, wherein the first differential capacitance value is a minimum differential capacitance value acquired when the earphone is outside an earphone box, and the earphone box is matched with the equipment and is used for accommodating the equipment; and determining a latest differential capacitance reference value according to the first differential capacitance value and the differential capacitance reference value.
When the wearing condition of the earphone is judged through the detection differential capacitance value and the differential capacitance reference value of the double-layer capacitance sensor, the differential capacitance reference value can be slowly changed due to aging of earphone materials or sensors and falling of the earphone or climate change and other reasons, and then the wearing condition is judged inaccurately. In the embodiment, the latest difference capacitance reference value is determined by obtaining the minimum difference capacitance value of the earphone in the out-of-box state and comparing the minimum value with the difference capacitance reference value, so that the difference capacitance reference value can be calibrated and updated according to actual change, and the wearing detection accuracy is further ensured.
It should be understood that the box in the embodiment of the present application is used with the device configured with the double-layer capacitive sensor in the embodiment of the present application, for example, when the device is an earphone, the box may be an earphone box configured with the earphone.
The reference value of the differential capacitance may be a reference value obtained by the earphone in a state where no external conductor is close to the earphone, for example, the reference value may be a differential capacitance value obtained by the earphone in a blank state (i.e., when no external conductor is close to the earphone) before the earphone leaves the factory, or the reference value of the differential capacitance may be a reference value after calibration during the use of the earphone.
In the following, when the beneficial effects of the determination method and apparatus of the embodiment of the present application are described, the device is taken as an example, and the proximity detection of the device is taken as an example of detecting the wearing state of the headset, but the present application is not limited thereto.
In one possible implementation, the method further includes: acquiring a second differential capacitance value of the double-layer capacitance sensor when the equipment is positioned in the box, and determining whether the equipment is abnormal or not according to the second differential capacitance value and the first differential capacitance value; and when the equipment is determined not to be abnormal, determining the latest differential capacitance reference value according to the first differential capacitance value and the differential capacitance reference value and a preset calibration mode.
It should be understood that the first differential capacitance value obtained in the embodiment of the present application should be the minimum value of the capacitance value under normal conditions, because the device may not be always close to the conductor after going from the state outside the box to the state inside the box, and a smaller value of the differential capacitance value is generated once going away from the conductor, at this time, it is assumed that the minimum value only includes the reference value of the differential capacitance, and the differential capacitance value obtained by the device inside the box includes not only the reference value but also the value of the capacitance signal change caused by the box, so that it can be determined whether the first reference value of the differential capacitance currently obtained outside the box is abnormal by comparing the obtained first differential capacitance value with the differential capacitance value obtained inside the box, for example, if the first differential capacitance value is larger than the differential capacitance value obtained inside the box, it can be determined that the device is in an abnormal state at present, at this time, since the device is abnormal, the reference value of the differential capacitance of the device is not calibrated, and it is not necessary to newly determine the latest reference value of the differential capacitance.
Before determining the latest reference value of the differential capacitance, the currently acquired differential capacitance value is judged through the second differential capacitance value acquired in the box, and when determining that the difference is not abnormal, whether to calibrate the reference value of the differential capacitance is determined, so that the calibration accuracy can be further improved, and unnecessary calibration and updating of the reference value of the differential capacitance are avoided.
The second differential capacitance value may include a capacitance signal caused by the earphone box and a differential capacitance reference value.
In one possible implementation, the first differential capacitance value is the smallest differential capacitance value obtained during a time before the device is inside the cartridge.
Specifically, after the minimum differential capacitance value of the earphone in the out-of-case state is obtained, the process of determining the latest reference value of the differential capacitance may be performed in the earphone case, at this time, the first differential capacitance value may be obtained within a time period from when the earphone is taken out of the earphone case to when the earphone is put into the earphone case again, during this time, the real-time differential capacitance value of the double-layer capacitance sensor may be collected according to a predetermined time period, and the minimum differential capacitance value in this time period may be determined as the first differential capacitance value.
In one possible implementation manner, the determining whether the device is abnormal according to the second differential capacitance value and the first differential capacitance value includes: determining that the device is not abnormal when the first differential capacitance value is less than or equal to the second differential capacitance value; or when the first differential capacitance value is larger than the second differential capacitance value, determining that the equipment is abnormal.
In a possible implementation manner, the determining a latest differential capacitance reference value according to the first differential capacitance value and the differential capacitance reference value includes: and when the device is in a state outside the box and outside the ear, determining whether the reference value of the differential capacitor needs to be calibrated or not according to the first differential capacitance value and the reference value of the differential capacitor, if so, taking the calibrated reference value of the differential capacitor as the latest reference value of the differential capacitor according to a preset calibration mode, and if not, taking the reference value of the differential capacitor as the latest reference value of the differential capacitor.
Optionally, the determination process of the reference value of the differential capacitor can also be performed outside the earphone box, and at this time, the reference value of the differential capacitor can be calibrated and updated in time, so that the accuracy of the reference value of the differential capacitor is ensured, and the accuracy of the judgment of the wearing result is ensured.
Specifically, after acquiring the minimum differential capacitance value of the earphone in the out-of-case state, the process of determining the latest reference value of the differential capacitance may be performed outside the earphone case, where the first differential capacitance value is the minimum differential capacitance value acquired by the earphone in the out-of-ear state and outside the earphone case, it should be understood that when the earphone is in the out-of-earphone state, the earphone may be in the ear or outside the ear, and when the earphone is in the ear, the first differential capacitance value detected by the earphone includes capacitance caused by a human body, and it is meaningless to calibrate and update the earphone at this time.
Specifically, the first differential capacitance value may be obtained according to a preset time period, for example, 10min, 20min, and the like, according to a sampling time period, for example, every 1s, to obtain a real-time differential capacitance value of the double-layer capacitance sensor, and then, in the time period, a minimum differential capacitance value in the time period is obtained according to the collected real-time differential capacitance value.
In a possible implementation manner, the determining a latest differential capacitance reference value according to the first differential capacitance value and the differential capacitance reference value includes: when the absolute value of the difference value between the first differential capacitance value and the differential capacitance reference value is larger than a preset first threshold value, determining to calibrate the differential capacitance reference value; or when the absolute value of the difference between the first differential capacitance value and the differential capacitance reference value is less than or equal to a preset first threshold value, determining not to calibrate the differential capacitance reference value, where the first threshold value is used to indicate that the double-layer capacitance sensor is in an abnormal state.
By comparing with the preset first threshold value, when the absolute value of the difference is smaller than or equal to the first threshold value, the reference value of the differential capacitance is determined not to be calibrated, so that unnecessary calibration can be avoided, and the influence on the normal work of the earphone is reduced.
The threshold may be an empirically obtained threshold, and may be 10, 20, etc., for example.
In a possible implementation manner, the preset calibration manner includes: if the first differential capacitance value is greater than the reference value of the differential capacitance, determining that the reference value of the calibrated differential capacitance is: c (ref)After calibration=c(ref) +(c(min)-c(ref))*k1(ii) a Or, if the first differential capacitance value is smaller than the differential capacitance reference value, determining that the calibrated differential capacitance reference value is: c (ref)After calibration= c(ref) +(c(min)-c(ref))*k2Wherein c (ref) is the reference value of the differential capacitance, c (ref)After calibrationC (min) is the first differential capacitance value, k, for the calibrated differential capacitance reference value1、k2To calibrate the coefficients, k1Greater than or equal to 0 and less than 1, k2Greater than or equal to 0 and less than 1.
Different calibration coefficients are selected, so that the earphone can obtain different calibration values in different situations, the accuracy of the reference value of the differential capacitance is ensured, and the accuracy of the wearing state detection of the earphone is further ensured. Specifically, the software can determine which value K is selected according to the relationship between c (min) and c (ref), and when the difference between c (min) and c (ref) is large, the self-learning is faster, that is, the application can be embodied by different values of K, and the reference can be better adaptively adjusted by selecting different values of K.
Wherein k is1、k2And the difference capacitance value is greater than or equal to 0 and less than 1, different calibration coefficients are selected according to the size relation between the first difference capacitance value and the difference capacitance reference value, and the difference capacitance reference value is calibrated under different conditions, so that the accuracy of the difference capacitance reference value is ensured, and the accuracy of wearing detection of the earphone is further ensured.
The device with the double-layer capacitive sensor in the embodiment of the application judges the behavior state of the device by using the differential capacitance reference value without judging the previous behavior state of the device, thereby avoiding continuous judgment errors of the subsequent device state caused by the judgment errors of the previous state and ensuring the accuracy of detection of the behavior state of the device.
In a second aspect, a capacitance reference determining apparatus is provided, which is applied to a device having a double-layer capacitive sensor, and includes an obtaining module, configured to obtain a first differential capacitance value of the double-layer capacitive sensor, where the first differential capacitance value is a minimum differential capacitance value obtained when the device is outside a box, and the box is a matching device that is paired with the device and is configured to accommodate the device; and the processing module is used for determining the latest difference capacitance reference value according to the first difference capacitance value and the difference capacitance reference value.
In a possible implementation manner, the obtaining module is further configured to: acquiring a second differential capacitance value of the double-layer capacitance sensor when the equipment is positioned in the box, and determining whether the equipment is abnormal or not according to the second differential capacitance value and the first differential capacitance value; and when the device is determined not to be abnormal, determining the latest differential capacitance reference value according to the first differential capacitance value and the differential capacitance reference value and a preset calibration mode.
In one possible implementation, the first differential capacitance value is the smallest differential capacitance value obtained during a time before the device is inside the cartridge.
In a possible implementation manner, the processing module is specifically configured to: determining that the abnormality does not occur when the first differential capacitance value is less than or equal to the second differential capacitance value; or when the first differential capacitance value is larger than the second differential capacitance value, determining that the equipment is abnormal.
In a possible implementation manner, the processing module is specifically configured to: and when the device is in a state outside the box and outside the ear, determining whether the reference value of the differential capacitor needs to be calibrated or not according to the first differential capacitance value and the reference value of the differential capacitor.
In a possible implementation manner, the first differential capacitance value is a minimum differential capacitance value obtained within a preset time period when the device is in a state outside the device box, and if calibration is required, a calibrated differential capacitance reference value is used as the latest differential capacitance reference value according to a preset calibration manner, and if calibration is not required, the differential capacitance reference value is used as the latest differential capacitance reference value.
In a possible implementation manner, the processing module is specifically configured to: when the absolute value of the difference value between the first differential capacitance value and the differential capacitance reference value is larger than a preset first threshold value, determining to calibrate the differential capacitance reference value; or when the absolute value of the difference between the first differential capacitance value and the differential capacitance reference value is less than or equal to a preset first threshold value, determining not to calibrate the differential capacitance reference value, where the first threshold value is used to indicate that the double-layer capacitance sensor is in an abnormal state.
In one possible implementation, the processing module is further configured to: if the first differential capacitance value is greater than the reference value of the differential capacitance, determining that the reference value of the calibrated differential capacitance is: c (ref)After calibration=c(ref) +(c(min)-c(ref))*k1(ii) a Or, if the first differential capacitance value is smaller than the differential capacitance reference value, determining that the calibrated differential capacitance reference value is: c (ref)After calibration= c(ref) +(c(min)-c(ref))*k2Wherein c (ref) is the reference value of the differential capacitance, c (ref)After calibrationC (min) is the first differential capacitance value, k, for the calibrated differential capacitance reference value1、k2To calibrate the coefficients, k1Greater than or equal to 0 and less than 1, k2Greater than or equal to 0 and less than 1. In a third aspect, an apparatus is provided, which includes: a two-layer sensor, and a determination apparatus comprising the capacitive reference of the second aspect or any possible implementation of the second aspect.
In one possible implementation, the device is a wireless headset, and the box is a headset box that is mated with the headset.
In a fourth aspect, a chip is provided, where the chip includes a processor and a memory, where the memory is used to store a computer program, and the processor is used to call and execute the computer program stored in the memory to perform the first aspect or the method in any possible implementation manner of the first aspect.
In a fifth aspect, a computer-readable storage medium is provided, which comprises computer instructions that, when executed on an electronic device, cause the electronic device to perform the method of the first aspect or any possible implementation manner of the first aspect.
A sixth aspect provides a computer program product comprising a computer program which, when run on an electronic device, causes the electronic device to perform the method of the first aspect or any possible implementation manner of the first aspect.
Drawings
Fig. 1 is an overall appearance diagram of a wireless headset.
Fig. 2 is a layout of the capacitive sensor on the headset.
Fig. 3 is a schematic diagram of the contact position of the capacitive sensor of the earphone and the ear.
FIG. 4 is a schematic diagram of the detection principle of the two-layer sensor scheme.
Fig. 5 is a schematic view of the wearing state determination principle.
FIG. 6 is a schematic flow chart diagram of a method of determining a capacitance reference in an embodiment of the present application.
Fig. 7 is a schematic view of an off-cartridge process flow according to an embodiment of the present application.
Fig. 8 is a schematic diagram of a process flow of determining the latest reference value of the differential capacitance in the cartridge according to the embodiment of the present application.
Fig. 9 is a schematic diagram of a process flow of determining the latest differential capacitance reference value outside the cartridge according to the embodiment of the present application.
Fig. 10 is a flow chart illustrating a process of determining a capacitance reference according to an embodiment of the present application.
Fig. 11 is a schematic diagram of a capacitance reference determination apparatus in an embodiment of the present application.
Fig. 12 is a schematic diagram of a chip structure in an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings.
In wearable devices, such as bluetooth headsets, smartwatches, smartphones, capacitive detection schemes are typically utilized to detect a user's behavioral state, such as touch or proximity, etc., to the wearable device. For convenience of description, the calibration method and apparatus of the capacitance reference in the embodiments of the present application are described below by taking a bluetooth headset configured with a capacitive sensor as an example.
The earphone with a built-in capacitive sensor (sensor) 110 shown in fig. 1 can detect a change in capacitance when the earphone is close to an ear by a minute capacitance detection technique to determine whether a user is wearing the earphone currently.
The current capacitive sensing scheme is mainly a single layer sensor scheme. In the single-layer sensor scheme, the wearing state of the earphone can be determined by detecting the capacitance C of the sensor in real time and calculating the relative change amount of the capacitance C, and specifically, can be determined by the human ear signal _ deta = C (t) -C (t-n), where C (t) represents the capacitance value of the sensor at the current time t, and C (t-n) represents the capacitance value of the sensor at the previous time t-n. Comparing the acquired human ear signal _ deta with a preset threshold value so as to judge the wearing action or the falling action of the current earphone, and then switching the earphone state, namely the in-ear state or the out-of-ear state, based on the earphone state at the previous moment and the detected real-time action. However, in the single-layer sensor scheme, if the initial state is judged incorrectly, or if a certain action detection error occurs in the middle, the detection result of the earphone is continuously incorrect, and at this time, the earphone must be powered up again to recover to normal.
A schematic diagram of a headset with a two-level sensor is shown in fig. 2 and 3, where the two levels refer to the two sensors in a spatial relationship of upper and lower levels. Compare solitary capacitive sensor, adopt double-deck dual capacitive sensor to improve the accuracy of wearing the detection itself, reduce the mistake and touch, for example, when the earphone was put on the desk, single sensor probably judged and is the wearing state, but double-deck sensor just can reduce the mistake and trigger, for example, the temperature drift influence can be got rid of to the differential capacitance value, and then the accuracy of wearing the detection is improved. Specifically, the sensor 111 proximate to the ear of the person may be defined as an anode including an anode base capacitance, a capacitance caused by the ear of the person, and a temperature drift capacitance, and the sensor 112 proximate to the inside of the earphone is defined as a cathode including a cathode base capacitance and a temperature drift capacitance.
Fig. 4 shows a schematic diagram of the detection principle of the double-layer sensor scheme, as shown in fig. 4, the capacitive sensor 400 includes a positive sensor 411 as a signal layer 410, and a negative sensor 421 as a reference layer 420, when the earphone approaches the ear, the capacitance of the positive sensor changes, the positive sensor outputs a corresponding detection signal to a capacitance detection circuit 431, the capacitance detection circuit detects the received detection signal, the detection signal is analog-to-digital converted in an analog-to-digital converter 441, meanwhile, the negative sensor 421 also detects the capacitance change in real time, and outputs the detection signal to a capacitance detection circuit 432, then the detection signal is analog-to-digital converted in an analog-to-digital converter 442, further, the detection signals from the positive sensor 411 and the negative sensor 421 after analog-to-digital conversion are subjected to signal differentiation 450 and then input to a processor 460, and finally, the real-time differential capacitance value of the double-layer capacitance sensor can be obtained. Specifically, real-time differential capacitance values of the positive and negative sensors (the positive sensor 411 and the negative sensor 421) can be defined as c (t), under a normal condition that no external conductor is close to the positive sensor, temperature drift capacitances in the positive and negative sensors can be mutually offset, and the positive sensor can not generate capacitance change caused by the conductor due to the fact that no external conductor is close to the positive sensor, so that a basic differential capacitance of the positive and negative sensors can be defined as a differential capacitance reference value c (ref); on the other hand, when the external conductor approaches, the capacitance of the positive electrode sensor changes, and the measured real-time differential capacitance value is determined by the capacitance caused by the external conductor and the positive and negative electrode base (base) capacitance.
Further, the current wearing state of the earphone can be judged according to the real-time differential capacitance value C (t) and the differential capacitance reference value C (ref). Specifically, the current wearing state of the headset can be determined by acquiring the human ear signal _ deta = c (t) -c (ref) and then according to the human ear signal and a preset threshold. It should be understood that, reference may be made to the prior art for a specific process of detecting the differential capacitance of the dual-layer sensor by using the capacitance detection circuit, and details of this process are not repeated in this embodiment of the present application. Fig. 5 is a schematic diagram illustrating a principle of determining a wearing state of an earphone using a human ear signal and a preset threshold. As shown in fig. 5, at time T0, the earphone is worn into the ear, and the ear signal _ deta = c (T) -c (ref) obtained at this time is greater than the preset threshold, so that the wearing state is determined to be in the ear, and after time T1, the earphone is out of the ear, and the ear signal _ deta (i.e., the capacitance signal variation) = c (T) -c (ref) obtained by testing is less than the preset threshold, so that the wearing state is determined to be out of the ear.
In the double-layer sensor scheme, c (ref) is used as a reference value of the differential capacitance to determine a real-time wearing state of the headset, however, in the above double-layer sensor scheme, maintaining the accuracy of the reference value of the differential capacitance c (ref) is an important factor for obtaining an accurate wearing state result, in practical applications, the reference value of the differential capacitance c (ref) may be kept unchanged for a short time, but in a long term, the actual value of the reference value of the differential capacitance c (ref) may change with changes in sensor materials and external environmental influences (such as aging of the headset housing materials, sensor, or dropping of the headset, climate change, and the like). Therefore, if the c (ref) is not updated according to the actual condition of the headset, the wearing result may be inaccurate, and similarly, other operations for performing subsequent judgment and control based on the capacitance variation detected by the capacitive sensor may also be inaccurate.
Therefore, the embodiment of the present application provides a method for determining a capacitance reference, which is to track a differential capacitance value for a long time in a using process of an earphone, and adaptively update a reference value of a differential capacitance, so as to ensure accuracy of the reference value of the differential capacitance, and then ensure accuracy of detection of a variation of the differential capacitance.
Fig. 6 shows a schematic flow chart of a method 600 of determining a capacitance reference according to an embodiment of the application. The method shown in fig. 6 may be performed by a chip in a device, which may have a double-layer capacitive sensor. As shown in fig. 6, method 600 may include some or all of the following steps.
For convenience of understanding, when the device is described in the embodiment of the present application, the earphone is taken as an example, and the behavior state of the device detected according to the capacitance variation in the present application is taken as an example of detecting the wearing state in the earphone, but the present application is not limited thereto, and for example, the embodiment of the present application may be applied to behavior state detection of a smart watch, a smart phone, and the like, for example, in addition to wearing detection of the earphone.
S610, a first differential capacitance value of the double-layer capacitance sensor is obtained.
The first differential capacitance value is a minimum differential capacitance value obtained when the device is outside a box, and the box is a matched device which is paired with the device and is used for accommodating the device.
It should be understood that the box in the embodiment of the present application is a box that is configured to be used with the above-mentioned device, for example, when the device is a headset, the above-mentioned box may be a headset box that is configured to be used with a headset.
And S620, determining a latest difference capacitance reference value according to the first difference capacitance value and the difference capacitance reference value.
Optionally, the reference value of the differential capacitance may be a differential capacitance value obtained by the earphone in an empty state (that is, the earphone is not close to the external conductor) before the earphone leaves the factory, or may be a differential capacitance value after the earphone is calibrated during use, or may be a reference value of a differential capacitance value obtained when the earphone is just powered on.
It should be understood that, in the use process of the earphone, the actual differential capacitance reference value may slowly change due to aging of the earphone housing material or the sensor, or dropping of the earphone or climate change, but in the current double-layer capacitance sensor earphone, the situation that the differential capacitance reference value may change is not considered. In a normal situation, if there is no external conductor approaching, the minimum differential capacitance obtained in this embodiment may be a differential capacitance in an empty state, and therefore, if the reference value of the differential capacitance of the earphone does not change due to aging of materials and external influences, the minimum differential capacitance obtained outside the earphone case should be the same as the reference value of the differential capacitance, that is, the essence of this embodiment is to determine whether the reference value of the differential capacitance needs to be calibrated according to two differential capacitances of the earphone when there is no external conductor approaching.
It should be understood that the first differential capacitance value obtained in this embodiment may be a plurality of differential capacitances of the dual-layer sensor collected by the earphone at different time instants according to a preset sampling period, and then a minimum value is selected from the plurality of collected differential capacitance values.
Fig. 7 is a schematic diagram illustrating a process of obtaining a first differential capacitance value according to an embodiment of the present application. As shown in fig. 7, firstly, a differential capacitance C (0) of the double-layer sensor at time t0 may be obtained and recorded as C (min), then, according to a preset sampling period, (for example, every 1s or 1min, which is not limited by the present application, a value may be taken according to an actual situation) to sample a real-time differential capacitance value of the double-layer sensor, and record a sampling result as C (t) (where t may be any natural number), compare C (t) with C (min), if C (t) is greater than C (min), continue sampling, and if C (t) is less than C (min), update the current C (t) to C (min), and repeat the process until entering a calibration process.
Alternatively, the process of determining the latest reference value of the differential capacitance after sampling may be performed outside the headphone case, or may be performed inside the headphone case.
Fig. 8 shows a flow diagram of a process of the device determining the latest differential capacitance reference value within the cartridge. As shown in fig. 8, after the device is placed in the box, a second differential capacitance value after the device is placed in the box may be collected, and recorded as c (box), where c (box) may include two parts, namely, a capacitance caused by the box (box) and a differential capacitance reference value. Specifically, the method further comprises: and acquiring a second differential capacitance value of the double-layer capacitance sensor when the counting device is positioned in the box.
It should be understood that the first differential capacitance value obtained in fig. 7 is the smallest differential capacitance value obtained during the time period from when the earphone is taken out of the earphone case to when it is put into the earphone case again when the earphone determines the latest differential capacitance reference value within the earphone case.
Further, it is determined whether the earphone is abnormal according to the second differential capacitance value and the first differential capacitance value obtained in fig. 7. Specifically, when the first differential capacitance value is smaller than or equal to the second differential capacitance value, determining that the earphone is not abnormal; or when the first differential capacitance value is larger than the second differential capacitance value, determining that the equipment is abnormal. It should be understood that when the first differential capacitance value is larger than the second differential capacitance value, it indicates that the first differential capacitance value may include the capacitance signal of the outer conductor, in which case the differential capacitance reference value cannot be calibrated, and therefore, if it is determined that the earphone is in an abnormal condition, the calibration may be abandoned (i.e., the differential capacitance reference value is not updated); on the other hand, if the first differential capacitance value is less than or equal to the second differential capacitance value, that is, when it is determined that the earphone is not abnormal, it needs to be further determined whether calibration is required for the differential capacitance reference, specifically, when it is determined that the earphone is not abnormal, the latest differential capacitance reference value may be determined according to the first differential capacitance value and the differential capacitance reference value in a preset calibration manner.
Whether equipment appears unusually is judged to the utilization second difference capacitance value in the earphone box in this application embodiment to further judge the state according to unusual and confirm whether to calibrate the capacitance reference value of equipment, can retrain based on a plurality of boundary conditions, can further filter the condition that needs carry out the calibration like this, and then can provide more accurate capacitance reference value, improve the accuracy of the detection of capacitance variation, guarantee the accuracy that the action state of equipment detected.
The following steps are processes of further judging whether to calibrate the reference value of the differential capacitance according to the first differential capacitance value and the reference value of the differential capacitance, and determining the latest reference value of the differential capacitance.
Specifically, determining the latest differential capacitance reference value according to the first differential capacitance value and the differential capacitance reference value may include: when the absolute value of the difference value between the first differential capacitance value and the differential capacitance reference value is larger than a preset first threshold value, determining to calibrate the differential capacitance reference value; or when the absolute value of the difference between the first differential capacitance value and the differential capacitance reference value is less than or equal to a preset first threshold value, determining not to calibrate the differential capacitance reference value, where the first threshold value is used to indicate that the double-layer capacitance sensor is in an abnormal state.
Optionally, the first threshold may be obtained according to an empirical value, and the threshold may be a preconfigured threshold, for example, the threshold may be 10, 20, and the like, which is not limited in this embodiment of the application, and may be adjusted and set according to an actual situation.
Further, the preset calibration method includes: if the first differential capacitance value is greater than the reference value of the differential capacitance, determining that the reference value of the calibrated differential capacitance is: c (ref)After calibration=c(ref) +(c(min)-c(ref))*k1(ii) a Or, if the first differential capacitance value is smaller than the differential capacitance reference value, determining that the calibrated differential capacitance reference value is: c (ref)After calibration= c(ref) +(c(min)-c(ref))*k2Wherein c (ref) is the reference value of the differential capacitance, c (ref)After calibrationFor the calibrated reference value of the differential capacitance, C (min) is the first differential capacitance value, k1、k2To calibrate the coefficients, k1Greater than or equal to 0 and less than 1, k2Greater than or equal to 0 and less than 1.
After the reference value of the differential capacitor is calibrated according to different calibration coefficients, the earphone can enter a sleep state. Specifically, the software can determine which value K is selected according to the relationship between c (min) and c (ref), and when the difference between c (min) and c (ref) is relatively large, the self-learning is relatively fast, that is, the application can be embodied by different values of K, and the reference can be adjusted better in a self-adaptive manner by selecting different values of K.
It should be understood that in the embodiment of the present application, when the earphone is located in the earphone box, if it is determined that the reference value of the differential capacitance of the earphone does not need to be calibrated, the earphone may then enter a sleep state.
Alternatively, k1、k2The reference value of the calibrated differential capacitance may be the same when the reference value of the calibrated differential capacitance is greater than or less than the reference value of the differential capacitance, or k1、k2Different values can be obtained, different calibration values can be obtained according to the magnitude relation between the first differential capacitance value and the reference value of the differential capacitance, and the application is used for k1、k2The magnitude relationship of (a) is not limited. Preferably, if the difference between the first differential capacitance value and the differential capacitance reference value is large, a large calibration coefficient K may be used to speed up the calibration process. For example, if the first differential capacitance value is greater than the differential capacitance reference value, k is determined to be greater than the reference value1Greater than k2According to c (ref)After calibration=c(ref)+(c(min)-c(ref))*k1And then the latest differential capacitance reference value can be obtained more accurately.
In addition to the process of determining the latest reference value of the differential capacitance shown in fig. 8 when the device is in the in-box state, the embodiment of the present application also provides a schematic diagram of the process flow of determining the latest reference value of the differential capacitance when the device is in the out-box state as shown in fig. 9.
The difference from the in-box processing flow in fig. 8 is that after the first differential capacitance value is obtained, the device is not placed in the box to perform the process of determining the latest differential capacitance reference value, but in an out-of-box state, the determining the latest differential capacitance reference value specifically includes: and when the equipment is in a state outside the box and outside the ear, determining whether the reference value of the differential capacitor needs to be calibrated or not according to the first differential capacitance value and the reference value of the differential capacitor, if so, taking the calibrated reference value of the differential capacitor as the latest reference value of the differential capacitor according to a preset calibration mode, and if not, taking the reference value of the differential capacitor as the latest reference value of the differential capacitor.
It will be appreciated that when the headset is in the out-of-box state and the reference value of the differential capacitance is calibrated, it is meaningless to calibrate the reference value of the differential capacitance because the headset may be in the in-ear state and the first detected differential capacitance value necessarily includes the amount of capacitance change caused by the ear (i.e., the outer conductor) when the headset is in the in-ear state.
It should be understood that the earphone and the matched earphone box in the embodiment of the present application may be provided with corresponding terminals, and the terminals may detect whether the earphone is in the box, further, the chip for wearing detection in the earphone may receive a message whether the earphone detected by the main control of the earphone is in the box, and then, the chip for wearing detection may perform corresponding processing according to the message.
It should be understood that the first differential capacitance value obtained in fig. 7 is obtained within a preset time period when the earphone is in the out-of-earphone-case state and the latest differential capacitance reference value is determined, and specifically, the first differential capacitance value is the smallest differential capacitance value obtained within the preset time period when the apparatus is in the out-of-earphone-case state. The real-time differential capacitance value may be collected according to a preset sampling period within a preset time period, for example, within a preset time period 1h, sampling is performed every 1min according to the preset sampling period, and a first differential capacitance value within the preset time period 1h is determined, where the specific sampling process may refer to the description in fig. 7, and redundant description is not repeated here.
The detection that the equipment is in the out-of-box state in the embodiment of the application can be used for timely detecting and calibrating the reference value of the differential capacitance of the equipment, so that the error detection result of the behavior state of the equipment is avoided, and the user experience is further improved.
Further, it is determined whether a calibration of the differential capacitance reference value is required based on the first differential capacitance value and the differential capacitance reference value. The process of determining whether the reference value of the differential capacitance needs to be calibrated is the same as the corresponding process in fig. 8, and will not be repeated herein.
It should be understood that, if the earphone is in the in-ear state for sampling within the preset time period, the earphone may directly abandon calibration after determining that the wearing state is in the ear, and enter the next preset time period for sampling. For example, the preset time period is 1h, the earphone acquires the minimum differential capacitance value (i.e., the first differential capacitance value) at 1h, and determines that the earphone is in the in-ear state at this time, the earphone determines to directly give up calibrating the reference value of the differential capacitance, and enters the next time period, and starts the process of determining the minimum differential capacitance value in the next time period.
In this embodiment, in order to determine the wearing state of the earphone, the following steps may be performed: acquiring a third differential capacitance value, wherein the third differential capacitance value is a capacitance value acquired when the earphone is in an external state of the earphone box; and determining that the earphone is in an in-ear state or an out-of-ear state according to the third differential capacitance value, the differential capacitance reference value and a preset second threshold value. It should be understood that the third differential capacitance value may be a differential capacitance value obtained at any time when the earphone is in the out-of-box state, and further, the wearing state of the earphone may be determined according to a relationship between the ear signal _ deta = c (t) -c (ref) and the second threshold, where the specific determination process is shown in fig. 5 and is not repeated herein.
It should be understood that when the earphone is in the state outside the earphone case and the latest reference value of the differential capacitance is determined, compared with the process of processing in the earphone case in fig. 8, when the earphone is outside the earphone case, c (box) does not need to be obtained and the first differential capacitance value is compared with c (box), or alternatively, when the earphone is outside the earphone case, a reference value of the differential capacitance may also be preconfigured, and after the first differential capacitance value is compared with the preconfigured reference value of the differential capacitance to determine whether the earphone is in the abnormal state, the latest reference value of the differential capacitance is determined according to the first differential capacitance value and the reference value of the differential capacitance.
It should be understood that, in the embodiment of the present application, when determining the latest reference value of the differential capacitance in the out-of-box state of the headset, a certain time interval may be set after each preset time period, so that the headset may compare the obtained relationship between the first differential capacitance value and the reference value of the differential capacitance or the second differential capacitance value in the time interval, thereby determining whether to calibrate the reference value of the differential capacitance, and after determining to calibrate, determining the latest reference value of the differential capacitance; alternatively, the determination and calibration process may also be performed synchronously with the differential capacitance sampling process, which is not limited in this embodiment of the application.
Fig. 10 is a flow chart illustrating a process of determining a capacitance reference according to an embodiment of the present application. In the embodiment of the present application, a device including a double-layer capacitive sensor is described as an example of an earphone, but the embodiment of the present application is not limited thereto.
As shown in fig. 10, the process may include: 1010, when the earphone leaves the factory, performing initial calibration on the reference value of the positive and negative differential capacitance, specifically, obtaining the values of the positive and negative differential capacitance as the reference values when no external conductor is in contact.
1020, the earphone is taken out of the box.
And 1030, collecting capacitance values of the positive and negative sensors outside the box, acquiring a real-time differential capacitance value according to the capacitance values of the positive and negative sensors (step 1031), and recording the minimum value of the differential capacitance value (step 1032).
1040, the earphone is put into the box.
1050, judging whether the minimum value of the differential capacitance recorded outside the secondary box is abnormal, if so, directly abandoning calibration (namely, not determining the latest reference value of the differential capacitance) to enter a sleep state, if so, determining that the reference value of the differential capacitance possibly needs to be calibrated, namely, determining the latest reference value of the differential capacitance, and entering the next step. Specifically, the difference capacitance value c (box) in the box obtained in the box may be compared with the minimum value of the difference capacitance, and if the minimum value of the difference capacitance is greater than c (box), it is determined that the earphone is in an abnormal state, and if the minimum value of the difference capacitance is less than c (box), it is determined that the earphone is in a normal state.
1060, the deviation between the minimum value of the differential capacitance recorded outside the sub-box and the reference value of the differential capacitance stored in the system is judged, if the deviation is small, calibration is not needed, calibration can be directly abandoned and a sleep state (step 1080) is entered, or if the deviation is large, calibration may be needed, and the next step is ready to be entered. Specifically, the absolute value of the deviation between the minimum value of the differential capacitance and the reference value of the differential capacitance may be compared with a preset threshold, and if the absolute value of the deviation is greater than the preset threshold, calibration may be required, and if the absolute value of the deviation is less than the preset threshold, calibration is not required (i.e., the current reference value of the differential capacitance is still used as the latest reference value of the differential capacitance).
1070, comparing the magnitude relation between the minimum value of the differential capacitance recorded outside the current sub-box and the reference value of the differential capacitance, selecting different calibration coefficients according to the magnitude relation, and calibrating the reference value of the differential capacitance (namely determining the latest reference value of the differential capacitance).
1080, after calibration, enter sleep state.
It will be appreciated that the sleep state in this embodiment is a dormant state after the headset is placed in the case.
The embodiment of the application also provides a device for determining the capacitance reference, which can be applied to equipment with a double-layer capacitance sensor, and the calibration device can be a chip in the equipment and the like. The calibration apparatus may perform the method of determining a capacitance reference in any of the embodiments described above, and the detailed description of the calibration apparatus may refer to the description of the method of determining a capacitance reference described above.
As shown in fig. 11, the apparatus for determining a capacitance reference includes an obtaining module 1101 and a processing module 1102, where the obtaining module 1101 is configured to obtain a first differential capacitance value of the double-layer capacitance sensor, where the first differential capacitance value is a minimum differential capacitance value obtained when the device is outside an earphone box, and the box is a supporting device that is paired with the device and is configured to accommodate the device; the processing module 1102 is configured to determine a latest reference value of the differential capacitance according to the first differential capacitance value and the reference value of the differential capacitance.
Optionally, in an implementation manner, the obtaining module 1101 is further configured to: acquiring a second differential capacitance value of the double-layer capacitance sensor when the equipment is positioned in the box, and determining whether the earphone is abnormal or not according to the second differential capacitance value and the first differential capacitance value; and when the device is determined not to be abnormal, determining the latest differential capacitance reference value according to the first differential capacitance value and the differential capacitance reference value and a preset calibration mode.
Optionally, in an implementation, the first differential capacitance value is a minimum differential capacitance value obtained within a time before the device is placed in the cassette.
Optionally, in an implementation manner, the processing module 1102 is specifically configured to: determining that the device is not abnormal when the first differential capacitance value is less than or equal to the second differential capacitance value; or when the first differential capacitance value is larger than the second differential capacitance value, determining that the equipment is abnormal.
Optionally, in an implementation manner, the processing module 1102 is specifically configured to: and when the device is in a state outside the box and outside the ear, determining whether the reference value of the differential capacitor needs to be calibrated or not according to the first differential capacitance value and the reference value of the differential capacitor, if so, taking the calibrated reference value of the differential capacitor as the latest reference value of the differential capacitor according to a preset calibration mode, and if not, taking the reference value of the differential capacitor as the latest reference value of the differential capacitor.
Optionally, in an implementation manner, the processing module 1102 is specifically configured to: when the absolute value of the difference value between the first differential capacitance value and the differential capacitance reference value is larger than a preset first threshold value, determining to calibrate the differential capacitance reference value; or when the absolute value of the difference between the first differential capacitance value and the differential capacitance reference value is less than or equal to a preset first threshold value, determining not to calibrate the differential capacitance reference value, where the first threshold value is used to indicate that the double-layer capacitance sensor is in an abnormal state.
Optionally, in an implementation manner, the processing module 1102 is further configured to: if the first differential capacitance value is greater than the reference value of the differential capacitance, determining that the reference value of the calibrated differential capacitance is: c (ref)After calibration=c(ref) +(c(min)-c(ref))*k1(ii) a Or, if the first differential capacitance value is smaller than the differential capacitance reference value, determining that the calibrated differential capacitance reference value is: c (ref)After calibration= c(ref) +(c(min)-c(ref))*k2Wherein c (ref) is the reference value of the differential capacitance, c (ref)After calibrationFor the calibrated reference value of the differential capacitance, C (min) is the first differential capacitance value, k1、k2To calibrate the coefficients, k1Greater than or equal to 0 and less than 1, k2Greater than or equal to 0 and less than 1.
An embodiment of the present application further provides an apparatus, including the calibration apparatus for a capacitance reference described in any of the above embodiments, and a double-layer capacitance sensor.
Optionally, the device may be a wireless headset, and the case is a headset case that is mated with the headset.
Fig. 12 is a schematic structural diagram of a chip 1200 according to an embodiment of the present application. The chip 1200 shown in fig. 12 includes a memory 1201 and a processor 1202.
The memory 1201 is used for storing executable instructions; a processor 1202, configured to call and execute the executable instructions in the memory 1201 to implement the method in the embodiment of the present application.
The processor may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method embodiments may be performed by integrated logic circuits of hardware in a processor or instructions in the form of software. The Processor may be a general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, or discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory, and a processor reads information in the memory and completes the steps of the method in combination with hardware of the processor.
The memory described above may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The non-volatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash Memory. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of example, but not limitation, many forms of RAM are available, such as Static random access memory (Static RAM, SRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic random access memory (Synchronous DRAM, SDRAM), Double Data Rate Synchronous Dynamic random access memory (DDR SDRAM), Enhanced Synchronous SDRAM (ESDRAM), Synchronous link SDRAM (SLDRAM), and Direct Rambus RAM (DR RAM).
The embodiment of the application also provides a computer readable storage medium for storing the computer program. The computer-readable storage medium is applicable to the apparatuses in the embodiments of the present application, and the computer program causes the apparatuses to execute the respective methods of the embodiments of the present application.
Embodiments of the present application also provide a computer program product comprising computer program instructions. The computer program product is applicable to the apparatuses in the embodiments of the present application, and the computer program instructions cause the apparatuses to execute the methods of the embodiments of the present application.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (17)

1. A method of determining a capacitive reference, for use in a device having a two-layer capacitive sensor, the method comprising:
acquiring a first differential capacitance value of the double-layer capacitance sensor, wherein the first differential capacitance value is a minimum differential capacitance value acquired when the equipment is outside a box, and the box is matched with the equipment and is used for accommodating the equipment;
when the equipment is in a state of being in the box or the equipment is in a state of being outside the box and being out of the ear, determining a latest difference capacitance reference value according to the first difference capacitance value and the difference capacitance reference value;
the determining a latest reference value of the differential capacitance according to the first differential capacitance value and the reference value of the differential capacitance comprises:
when the absolute value of the difference value between the first differential capacitance value and the differential capacitance reference value is greater than a preset first threshold value, determining the latest differential capacitance reference value according to a preset calibration mode; alternatively, the first and second electrodes may be,
and when the absolute value of the difference between the first differential capacitance value and the reference value of the differential capacitance is smaller than or equal to a preset first threshold, taking the reference value of the differential capacitance as the latest reference value of the differential capacitance, wherein the first threshold is used for indicating that the double-layer capacitance sensor is in an abnormal state.
2. The method of claim 1, further comprising: acquiring a second differential capacitance value of the double-layer capacitance sensor when the equipment is positioned in the box, and determining whether the equipment is abnormal or not according to the second differential capacitance value and the first differential capacitance value;
and when the equipment is determined not to be abnormal, determining the latest differential capacitance reference value according to the first differential capacitance value and the differential capacitance reference value and a preset calibration mode.
3. The method of claim 2, the first differential capacitance value being a minimum differential capacitance value obtained in a time before the device was located within the cartridge.
4. The method of claim 2, wherein determining whether the device is abnormal based on the second differential capacitance value and the first differential capacitance value comprises:
determining that the device is not abnormal when the first differential capacitance value is less than or equal to the second differential capacitance value; or
And when the first differential capacitance value is larger than the second differential capacitance value, determining that the equipment is abnormal.
5. The method of claim 1, wherein determining the latest differential capacitance reference value based on the first differential capacitance value and a differential capacitance reference value comprises:
and when the device is in a state outside the box and outside the ear, determining whether the reference value of the differential capacitor needs to be calibrated or not according to the first differential capacitance value and the reference value of the differential capacitor, if so, taking the calibrated reference value of the differential capacitor as the latest reference value of the differential capacitor according to a preset calibration mode, and if not, taking the reference value of the differential capacitor as the latest reference value of the differential capacitor.
6. The method according to any one of claims 2-5, wherein determining the latest differential capacitance reference value from the first differential capacitance value and the differential capacitance reference value comprises:
when the absolute value of the difference value between the first differential capacitance value and the differential capacitance reference value is larger than a preset first threshold value, determining to calibrate the differential capacitance reference value; alternatively, the first and second electrodes may be,
and when the absolute value of the difference value between the first differential capacitance value and the differential capacitance reference value is smaller than or equal to a preset first threshold value, determining not to calibrate the differential capacitance reference value, wherein the first threshold value is used for indicating that the double-layer capacitance sensor is in an abnormal state.
7. The method of claim 6, wherein the predetermined calibration manner comprises:
if the first differential capacitance value is greater than the reference value of the differential capacitance, determining that the latest reference value of the differential capacitance after calibration is:
c(ref)after calibration=c(ref) +(c(min)-c(ref))*k1(ii) a Alternatively, the first and second electrodes may be,
if the first differential capacitance value is smaller than the reference value of the differential capacitance, determining that the latest reference value of the differential capacitance after calibration is:
c(ref)after calibration= c(ref) +(c(min)-c(ref))*k2
Wherein c (ref) is the reference value of the differential capacitance, c (ref)After calibrationIs the latest differential capacitance reference value after calibration, c (min) is the first differential capacitance value, k1、k2To calibrate the coefficients, k1Greater than or equal to 0 and less than 1, k20 or more and less than 1, and k1Greater than k2
8. A capacitance reference determining apparatus, applied to a device having a double-layer capacitance sensor, comprising:
an obtaining module, configured to obtain a first differential capacitance value of the double-layer capacitance sensor, where the first differential capacitance value is a minimum differential capacitance value obtained when the device is outside a box, and the box is a matching device that is paired with the device and configured to accommodate the device;
the processing module is used for determining a latest difference capacitance reference value according to the first difference capacitance value and the difference capacitance reference value when the equipment is in the box or outside the box and outside the ear;
the processing module is specifically configured to:
when the absolute value of the difference value between the first differential capacitance value and the differential capacitance reference value is greater than a preset first threshold value, determining the latest differential capacitance reference value according to a preset calibration mode; alternatively, the first and second electrodes may be,
and when the absolute value of the difference between the first differential capacitance value and the reference value of the differential capacitance is smaller than or equal to a preset first threshold, taking the reference value of the differential capacitance as the latest reference value of the differential capacitance, wherein the first threshold is used for indicating that the double-layer capacitance sensor is in an abnormal state.
9. The apparatus of claim 8, wherein the obtaining module is further configured to:
obtaining a second differential capacitance value of the double-layer capacitive sensor when the device is located within the case,
determining whether the equipment is abnormal or not according to the second differential capacitance value and the first differential capacitance value; and the number of the first and second groups,
and when the equipment is determined not to be abnormal, determining the latest differential capacitance reference value according to the first differential capacitance value and the differential capacitance reference value and a preset calibration mode.
10. The apparatus of claim 9, wherein the first differential capacitance value is a minimum differential capacitance value obtained during a time before the device is in the cartridge.
11. The determination apparatus according to claim 9, wherein the processing module is specifically configured to:
determining that the device is not abnormal when the first differential capacitance value is less than or equal to the second differential capacitance value; alternatively, the first and second electrodes may be,
and when the first differential capacitance value is larger than the second differential capacitance value, determining that the equipment is abnormal.
12. The determination apparatus according to claim 8, wherein the processing module is specifically configured to:
and when the device is in a state outside the box and outside the ear, determining whether the reference value of the differential capacitor needs to be calibrated or not according to the first differential capacitance value and the reference value of the differential capacitor, if so, taking the calibrated reference value of the differential capacitor as the latest reference value of the differential capacitor according to a preset calibration mode, and if not, taking the reference value of the differential capacitor as the latest reference value of the differential capacitor.
13. The determination apparatus according to any one of claims 9 to 12, wherein the processing module is specifically configured to:
when the absolute value of the difference value between the first differential capacitance value and the differential capacitance reference value is larger than a preset first threshold value, determining to calibrate the differential capacitance reference value; alternatively, the first and second electrodes may be,
and when the absolute value of the difference value between the first differential capacitance value and the differential capacitance reference value is smaller than or equal to a preset first threshold value, determining not to calibrate the differential capacitance reference value, wherein the first threshold value is used for indicating that the double-layer capacitance sensor is in an abnormal state.
14. The determination apparatus of claim 13, wherein the processing module is further configured to:
if the first differential capacitance value is greater than the reference value of the differential capacitance, determining that the latest reference value of the differential capacitance after calibration is:
c(ref)after calibration=c(ref) +(c(min)-c(ref))*k1(ii) a Alternatively, the first and second electrodes may be,
if the first differential capacitance value is smaller than the reference value of the differential capacitance, determining that the latest reference value of the differential capacitance after calibration is:
c(ref)after calibration= c(ref) +(c(min)-c(ref))*k2
Wherein c (ref) is the reference value of the differential capacitance, c (ref)After calibrationIs the latest differential capacitance reference value after calibration, c (min) is the first differential capacitance value, k1、k2To calibrate the coefficients, k1Greater than or equal to 0 and less than 1, k20 or more and less than 1, and k1Greater than k2
15. A chip comprising a processor and a memory for storing a computer program, the processor being adapted to invoke and run the computer program stored in the memory to perform the method of any one of claims 1-7.
16. An apparatus, comprising:
a double layer capacitive sensor; and the number of the first and second groups,
the determination device according to any one of claims 8-14.
17. The apparatus of claim 16, wherein:
the device is a wireless earphone, and the box is an earphone box matched with the earphone.
CN202110183977.1A 2021-02-10 2021-02-10 Method for determining capacitance reference, and device and equipment for determining capacitance reference Active CN112533102B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110183977.1A CN112533102B (en) 2021-02-10 2021-02-10 Method for determining capacitance reference, and device and equipment for determining capacitance reference

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110183977.1A CN112533102B (en) 2021-02-10 2021-02-10 Method for determining capacitance reference, and device and equipment for determining capacitance reference

Publications (2)

Publication Number Publication Date
CN112533102A CN112533102A (en) 2021-03-19
CN112533102B true CN112533102B (en) 2021-06-18

Family

ID=74975608

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110183977.1A Active CN112533102B (en) 2021-02-10 2021-02-10 Method for determining capacitance reference, and device and equipment for determining capacitance reference

Country Status (1)

Country Link
CN (1) CN112533102B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
IT202100021212A1 (en) * 2021-08-05 2023-02-05 Luxottica Srl Electronic glasses.
CN114401480B (en) * 2021-12-30 2024-04-30 歌尔科技有限公司 Calibration method, device and medium for TWS earphone capacitive sensor

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6246772B1 (en) * 1999-03-23 2001-06-12 Keng-Yuan Chang Wireless headphone/speakers sound field control circuit
CN102968217A (en) * 2012-12-07 2013-03-13 深圳市汇顶科技股份有限公司 Reference updating method and system for touch screen as well as touch terminal
CN110099325A (en) * 2019-05-24 2019-08-06 歌尔科技有限公司 A kind of wireless headset enters box detection method, device, wireless headset and earphone products
CN110114738A (en) * 2019-03-25 2019-08-09 深圳市汇顶科技股份有限公司 Wearable device wears detection method and storage medium
CN111970603A (en) * 2020-08-28 2020-11-20 歌尔科技有限公司 Detection method, audio component and readable storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8941393B2 (en) * 2011-01-14 2015-01-27 Cypress Semiconductor Corporation Detection of a conductive object during an initialization process of a touch-sensing device
CN105487899B (en) * 2015-11-30 2018-12-04 歌尔股份有限公司 Wearing state method for reporting, system and earphone for earphone

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6246772B1 (en) * 1999-03-23 2001-06-12 Keng-Yuan Chang Wireless headphone/speakers sound field control circuit
CN102968217A (en) * 2012-12-07 2013-03-13 深圳市汇顶科技股份有限公司 Reference updating method and system for touch screen as well as touch terminal
CN110114738A (en) * 2019-03-25 2019-08-09 深圳市汇顶科技股份有限公司 Wearable device wears detection method and storage medium
CN110099325A (en) * 2019-05-24 2019-08-06 歌尔科技有限公司 A kind of wireless headset enters box detection method, device, wireless headset and earphone products
CN111970603A (en) * 2020-08-28 2020-11-20 歌尔科技有限公司 Detection method, audio component and readable storage medium

Also Published As

Publication number Publication date
CN112533102A (en) 2021-03-19

Similar Documents

Publication Publication Date Title
CN112533102B (en) Method for determining capacitance reference, and device and equipment for determining capacitance reference
US11910148B2 (en) Method for determining capacitance reference, apparatus for determining capacitance reference, and device
US9426587B2 (en) Electronics in a receiver-in-canal module
CN102346050B (en) Sensing device and electronic apparatus
CN104135576A (en) Compass positioning optimization method and system for mobile terminal
US20220124429A1 (en) Method of detecting earphone state relative to earphone case, electronic device, and earphone assembly
CN105783900B (en) A kind of calibration method and device of sensing data
US20160139734A1 (en) Input device
CN114630242A (en) Earphone wearing detection method, earphone and storage medium
CN114791301A (en) Apparatus and method for detecting change in operating environment of electronic device
CN112461437B (en) Air pressure detection circuit, method, equipment and storage medium
JP2007285747A (en) Angular velocity sensor
CN113038320A (en) Capacitance detection method and device and earphone
CN110784797A (en) Wireless earphone control method and device, wireless earphone and storage medium
CN111567900A (en) Electronic cigarette control method and electronic cigarette
CN107800863B (en) Control method for real-time scene detection by wireless communication device
US10993045B1 (en) Hearing devices and methods for implementing automatic sensor-based on/off control of a hearing device
CN115656640A (en) Capacitance detection method and capacitance detection device
WO2022267290A1 (en) Step counting method and apparatus, and electronic device and readable storage medium
KR102276144B1 (en) Environmental compensation methods in proximity sensors and proximity sensors with improved environmental compensation
WO2022165816A1 (en) Capacitance reference line update method, and chip and capacitance measurement apparatus
WO2022052065A1 (en) Living body proximity detection apparatus and method, and electronic device
CN113873941A (en) Method and apparatus for calibrating a user activity model for use with a mobile device
CN115824271A (en) Capacitance detection method, capacitance detection device and electronic equipment
JP2020166411A (en) Data recorder and data recording method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant