Proximity detection circuits, methods, electronic devices, and media based on capacitive sensors

By using a current mirror module to provide a proportional charging current to the capacitive sensor and the variable holding capacitor, and by using a differential processing module to amplify the voltage difference, the problem of parasitic capacitance interference with detection is solved, thereby improving detection accuracy and reducing costs.

CN123074474APending Publication Date: 2026-11-10GREE ELECTRIC APPLIANCE INC OF ZHUHAI +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611214776.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-11
Publication Date
2026-11-10

AI Technical Summary

Technical Problem

Existing capacitive proximity sensor detection solutions fail to effectively address the interference of parasitic capacitance on detection, thus affecting detection sensitivity.

Method used

A current mirror module is used to provide a proportional charging current to the capacitive sensor and the variable holding capacitor. The voltage difference is amplified by a differential processing module to counteract the effects of parasitic capacitance.

Benefits of technology

It improves detection accuracy, reduces the capacitance value of the variable holding capacitor, saves chip area, reduces manufacturing costs, and expands the application range of the detection circuit.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123074474A_ABST
    Figure CN123074474A_ABST
Patent Text Reader

Abstract

This invention provides a proximity detection circuit, method, electronic device, and readable storage medium based on a capacitive sensor, belonging to the field of capacitive sensors. The detection circuit includes a current source, a current mirror module, a capacitive sensor, a variable holding capacitor, and a differential processing module. The first current mirror branch of the current mirror module outputs a first current to the capacitive sensor for charging, and the second current mirror branch outputs a second current to the variable holding capacitor for charging. The ratio of the first current to the second current is equal to the ratio of the parasitic capacitance value of the capacitive sensor to the capacitance value of the variable holding capacitor. This invention provides a proportional charging current to the two capacitors through the current mirror module. Based on this ratio, the capacitance value of the variable holding capacitor only needs to be kept in a fixed proportion to the parasitic capacitance value. While ensuring that the parasitic capacitance is effectively canceled out, the capacitance value of the variable holding capacitor is set to be relatively small, thereby reducing manufacturing costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of capacitive sensor technology, and in particular to a proximity detection circuit, method, electronic device, and readable storage medium based on a capacitive sensor. Background Technology

[0002] A capacitive proximity sensor is a non-contact sensor that detects the approach of an external object by utilizing changes in capacitance. When an external object approaches the sensor electrodes, the equivalent capacitance between the sensor electrodes and ground increases because the dielectric constant of the object is typically greater than that of air. By detecting this capacitance change, the proximity of the object can be determined. Capacitive proximity sensors have advantages such as fast response, simple structure, and low power consumption, and are widely used in scenarios such as proximity wake-up of home appliances, obstacle warning in automobiles, and human-computer interaction in smart homes.

[0003] Among related technologies, detection schemes based on capacitive proximity sensors include oscillator methods, charge transfer methods, and differential detection methods. The basic idea of ​​the differential detection method is to set up two branches: one connected to the sensor and the other used as a reference. The difference between the two signals is amplified and then output. Since environmental noise, temperature drift, and other interferences coexist in both signals, comparing the sensor signal with the reference signal can, to some extent, offset the effects of common-mode interference and environmental changes.

[0004] However, the above solution failed to effectively solve the problem of parasitic capacitance interfering with detection, which in turn affected the detection sensitivity. Summary of the Invention

[0005] In view of the above problems, embodiments of the present invention are proposed to provide a proximity detection circuit, method, electronic device, and readable storage medium based on a capacitive sensor that overcomes or at least partially solves the above problems.

[0006] In a first aspect, embodiments of the present invention provide a proximity detection circuit based on a capacitive sensor, the circuit comprising: Current source, current mirror module, first switch, second switch, capacitive sensor, variable holding capacitor and differential processing module; The current mirror module includes a first current mirror branch and a second current mirror branch; the input terminals of the first current mirror branch and the second current mirror branch are connected to the current source. The output terminal of the first current mirror branch is connected to the capacitive sensor via the first switch, and the output terminal of the second current mirror branch is connected to the variable holding capacitor via the second switch. When the first switch and the second switch are closed, the first current mirror branch outputs a first current to the capacitive sensor for charging, and the second current mirror branch outputs a second current to the variable holding capacitor for charging. The ratio of the first current to the second current is equal to the ratio of the parasitic capacitance value of the capacitive sensor to the capacitance value of the variable holding capacitor. One end of the capacitive sensor is connected to the first switch, and the other end is grounded; One end of the variable holding capacitor is connected to the second switch, and the other end is grounded; The differential processing module is used to amplify the voltage difference between the first voltage output by the capacitive sensor and the second voltage output by the variable holding capacitor after the first switch and the second switch are turned off, so as to obtain an output voltage. The output voltage is used to indicate the proximity of an external object to the capacitive sensor.

[0007] Optionally, the circuit further includes a third switch and a fourth switch; One end of the third switch is connected between the capacitive sensor and the first switch, and the other end is grounded; one end of the fourth switch is connected between the variable holding capacitor and the second switch, and the other end is grounded. When the first switch and the second switch are closed, and the third switch and the fourth switch are open, the first current mirror branch outputs a first current to the capacitive sensor for charging, and the second current mirror branch outputs a second current to the variable holding capacitor for charging. When the first switch and the second switch are open, and the third switch and the fourth switch are open, the differential processing module amplifies the voltage difference between the first voltage output by the capacitive sensor and the second voltage output by the variable holding capacitor to obtain the output voltage. When the first switch and the second switch are open, and the third switch and the fourth switch are closed, the capacitive sensor discharges through the third switch, and the variable holding capacitor discharges through the fourth switch.

[0008] Optionally, the differential processing module includes a first resistor, a second resistor, a third resistor, and a fourth resistor; The negative input terminal of the differential processing module is connected between the capacitive sensor and the first switch via the first resistor; the negative input terminal of the differential processing module is connected to the output terminal of the differential processing module via the fourth resistor. The positive input terminal of the differential processing module is connected between the variable holding capacitor and the second switch via the second resistor; the positive input terminal of the differential processing module is connected to the output terminal of the differential processing module via the third resistor. The amplification factor of the differential processing module is determined based on the resistance values ​​of the first resistor, the second resistor, the third resistor, and the fourth resistor.

[0009] Optionally, the circuit further includes a first voltage follower and a second voltage follower; The positive input terminal of the first voltage follower is connected between the variable holding capacitor and the second switch; the negative input terminal of the first voltage follower is connected to the output terminal of the first voltage follower; the output terminal of the first voltage follower is connected to the second resistor; The positive input terminal of the second voltage follower is connected between the capacitive sensor and the first switch; the negative input terminal of the second voltage follower is connected to the output terminal of the second voltage follower; the output terminal of the second voltage follower is connected to the first resistor.

[0010] Optionally, the current mirror module includes a first MOSFET and a second MOSFET; The source of the first MOSFET and the source of the second MOSFET are connected to the current source, and the gate of the first MOSFET is connected to the gate of the second MOSFET; the drain of the first MOSFET is the output terminal of the first current mirror branch; the drain of the second MOSFET is the output terminal of the second current mirror branch.

[0011] Optionally, the ratio of the first current output by the first current mirror branch to the second current output by the second current mirror branch is determined based on the ratio of the width-to-length ratio of the first MOSFET to the width-to-length ratio of the second MOSFET.

[0012] Secondly, embodiments of the present invention provide a proximity detection method based on a capacitive sensor, applied to the aforementioned proximity detection circuit based on a capacitive sensor, the method comprising: The first switch and the second switch are controlled to close, so that the first current mirror branch outputs a first current to the capacitive sensor for charging, and the second current mirror branch outputs a second current to the variable holding capacitor for charging; wherein, the ratio of the first current to the second current is equal to the ratio of the parasitic capacitance value of the capacitive sensor to the capacitance value of the variable holding capacitor; The first switch and the second switch are controlled to be turned off, so that the charge on the capacitive sensor and the variable holding capacitor remains unchanged. The first voltage of the capacitive sensor and the second voltage of the holding capacitor are input to the differential processing module. The differential processing module amplifies the voltage difference between the first voltage and the second voltage to obtain the output voltage. Proximity detection is performed based on the output voltage.

[0013] Optionally, the circuit further includes a third switch and a fourth switch; one end of the third switch is connected between the capacitive sensor and the first switch, and the other end is grounded; one end of the fourth switch is connected between the variable holding capacitor and the second switch, and the other end is grounded. The control of closing the first switch and the second switch, causing the first current mirror branch to output a first current to the capacitive sensor for charging, and the second current mirror branch to output a second current to the variable holding capacitor for charging, includes: The first and second switches are closed, and the third and fourth switches are opened, so that the first current mirror branch outputs a first current to the capacitive sensor for charging, and the second current mirror branch outputs a second current to the variable holding capacitor for charging. The control of the first switch and the second switch to be turned off, so that the charge on the capacitive sensor and the holding capacitor remains unchanged, includes: The first and second switches are turned off, and the third and fourth switches are turned off, so that the charge on the capacitive sensor and the holding capacitor remains unchanged; The method further includes: The first and second switches are controlled to be open, and the third and fourth switches are controlled to be closed, so that the capacitive sensor is discharged through the third switch and the variable holding capacitor is discharged through the fourth switch.

[0014] Optionally, the method further includes: When the first switch, the second switch, the third switch, and the fourth switch are open, and no external object is near the capacitive sensor, the capacitance value of the variable holding capacitor is adjusted so that the output voltage of the differential processing module is zero.

[0015] Thirdly, embodiments of the present invention provide an electronic device including a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the steps of the proximity detection method based on a capacitive sensor as described in the second aspect.

[0016] Fourthly, embodiments of the present invention provide a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the proximity detection method based on a capacitive sensor as described in the second aspect.

[0017] The embodiments of the present invention have the following advantages: The detection circuit of this invention includes a current source, a current mirror module, a first switch, a second switch, a capacitive sensor, a variable holding capacitor, and a differential processing module.

[0018] The current mirror module includes a first current mirror branch and a second current mirror branch. The input terminals of both branches are connected to a current source. The output terminal of the first current mirror branch is connected to a capacitive sensor via a first switch, and the output terminal of the second current mirror branch is connected to a variable holding capacitor via a second switch. When both switches are closed, the first current mirror branch outputs a first current to the capacitive sensor for charging, and the second current mirror branch outputs a second current to the variable holding capacitor for charging. The ratio of the first current to the second current is equal to the ratio of the parasitic capacitance of the capacitive sensor to the capacitance of the variable holding capacitor. One end of the capacitive sensor is connected to the first switch, and the other end is grounded. One end of the variable holding capacitor is connected to the second switch, and the other end is grounded. A differential processing module amplifies the voltage difference between the first voltage output by the capacitive sensor and the second voltage output by the variable holding capacitor after both switches are open to obtain an output voltage. This output voltage represents the proximity of an external object to the capacitive sensor.

[0019] The above scheme uses a differential processing module to differentially amplify the voltage of the capacitive sensor and the variable holding capacitor after charging, which can effectively counteract the influence of the parasitic capacitance of the capacitive sensor on the detection, thereby improving the detection accuracy. Furthermore, a current mirror module provides proportional charging currents to the two capacitors, with the ratio of the first current to the second current equal to the ratio of the parasitic capacitance of the capacitive sensor to the capacitance of the variable holding capacitor. Based on this ratio, the capacitance of the variable holding capacitor does not need to be equal to the parasitic capacitance, but only needs to maintain a fixed proportion to it. Thus, the capacitance of the variable holding capacitor can be controlled by setting this proportion, ensuring that the parasitic capacitance is effectively canceled while setting a smaller capacitance. A smaller capacitance value occupies less space in the circuit, saving chip area, reducing manufacturing costs, and adapting to a wider range of parasitic currents, thus expanding the applicability of the detection circuit. Attached Figure Description

[0020] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 This is a schematic diagram of a proximity detection circuit based on a capacitive sensor provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of another proximity detection circuit based on a capacitive sensor provided in an embodiment of the present invention; Figure 3 This is a flowchart of the proximity detection method based on a capacitive sensor provided in an embodiment of the present invention.

[0022] The annotations in the attached figures are explained as follows: U0: Current source; M1: First MOSFET; M2: Second MOSFET; S1: First switch; S2: Second switch; S3: Third switch; S4: Fourth switch; C1: Capacitive sensor; Cp: Parasitic capacitance of the capacitive sensor; C2: Variable holding capacitance; U1: First voltage follower; U2: Second voltage follower; U3: Differential amplifier; R1: First resistor; R2: Second resistor; R3: Third resistor; R4: Fourth resistor; CMP: Threshold Comparator; Uc: Threshold voltage source; out: Circuit output terminal. Detailed Implementation

[0023] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0024] The terms "first," "second," etc., used in the specification and claims of this invention are used to distinguish similar objects and are not used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention can be implemented in orders other than those illustrated or described herein. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0025] A capacitive proximity sensor is a non-contact sensor that detects the approach of an external object by utilizing changes in capacitance. When an external object approaches the sensor electrodes, the equivalent capacitance between the sensor electrodes and ground increases because the dielectric constant of the object is typically greater than that of air. By detecting this capacitance change, the proximity of the object can be determined. Capacitive proximity sensors have advantages such as fast response, simple structure, and low power consumption, and are widely used in scenarios such as proximity wake-up of home appliances, obstacle warning in automobiles, and human-computer interaction in smart homes.

[0026] In related technologies, detection schemes based on capacitive proximity sensors include oscillator methods, charge transfer methods, and differential detection methods. The basic idea of ​​differential detection is to set up two branches: one connected to the sensor and the other used as a reference. The difference between the two signals is amplified and then output. Since environmental noise, temperature drift, and other interferences coexist in both signals, comparing the sensor signal with the reference signal can, to some extent, offset the effects of common-mode interference and environmental changes. However, the above schemes fail to effectively solve the problem of parasitic capacitance interference in detection, thus affecting detection sensitivity.

[0027] In real-world scenarios, when a limb approaches a capacitive sensor, the overall dielectric constant of the sensor increases because the dielectric constant of the human body is greater than that of air. This increases the sensor's capacitance, known as the ΔC capacitance. Since the ΔC capacitance is extremely small, while the inherent parasitic capacitance Cp of the capacitive sensor is very large, this invention proposes a circuit structure and method to effectively counteract the influence of the parasitic capacitance Cp, amplify the signal generated by the changing capacitance ΔC, and simultaneously reduce the size of the holding capacitance, which is beneficial for integration into a chip and reduces chip cost.

[0028] One of the core concepts of this invention is that a current mirror module provides proportional charging currents to two capacitors, and the ratio of the first current to the second current is equal to the ratio of the parasitic capacitance of the capacitive sensor to the capacitance of the variable holding capacitor. Based on this ratio, the capacitance of the variable holding capacitor does not need to be equal to the parasitic capacitance, but only needs to maintain a fixed ratio with it. Therefore, by setting this ratio, the capacitance of the variable holding capacitor can be controlled, ensuring that the parasitic capacitance is effectively canceled while setting the capacitance of the variable holding capacitor to a smaller value, thereby reducing manufacturing costs.

[0029] Figure 1 This is a schematic diagram of a proximity detection circuit based on a capacitive sensor provided in an embodiment of the present invention.

[0030] like Figure 1 As shown, the proximity detection circuit includes: a current source 110, a current mirror module 120, a first switch 130, a second switch 140, a capacitive sensor 150, a variable holding capacitor 160, and a differential processing module 170. The current mirror module includes a first current mirror branch 121 and a second current mirror branch 122; the input terminals of the first current mirror branch 121 and the second current mirror branch 122 are connected to the current source 110. The output terminal of the first current mirror branch 121 is connected to the capacitive sensor 150 through the first switch 130, and the output terminal of the second current mirror branch 122 is connected to the variable holding capacitor 160 through the second switch 140. When the first switch 130 and the second switch 140 are closed, the first current mirror branch 121 outputs a first current to the capacitive sensor 150 for charging, and the second current mirror branch 122 outputs a second current to the variable holding capacitor 160 for charging. The ratio of the first current to the second current is equal to the ratio of the parasitic capacitance value of the capacitive sensor 150 to the capacitance value of the variable holding capacitor 160. One end of the capacitive sensor 150 is connected to the first switch 130, and the other end is grounded; One end of the variable holding capacitor 160 is connected to the second switch 140, and the other end is grounded; The differential processing module 170 is used to amplify the voltage difference between the first voltage output by the capacitive sensor 150 and the second voltage output by the variable holding capacitor 160 after the first switch 130 and the second switch 140 are turned off, so as to obtain an output voltage. The output voltage is used to indicate the proximity of an external object to the capacitive sensor 150.

[0031] The circuit setup described above uses a differential processing module to differentially amplify the voltages of the capacitive sensor and the variable holding capacitor after charging. This effectively counteracts the influence of the parasitic capacitance of the capacitive sensor on detection, thereby improving detection accuracy. Furthermore, a current mirror module provides proportional charging currents to the two capacitors, with the ratio of the first current to the second current equal to the ratio of the parasitic capacitance of the capacitive sensor to the capacitance of the variable holding capacitor. Based on this ratio, the capacitance of the variable holding capacitor does not need to be equal to the parasitic capacitance, but only needs to maintain a fixed proportion to it. Thus, the capacitance of the variable holding capacitor can be controlled by setting this proportion, ensuring that the parasitic capacitance is effectively counteracted while setting a smaller capacitance. A smaller capacitance value occupies less space in the circuit, saving chip area, reducing manufacturing costs, and adapting to a wider range of parasitic capacitances, thus expanding the applicability of the detection circuit.

[0032] Figure 2 This is a schematic diagram of another proximity detection circuit based on a capacitive sensor provided in an embodiment of the present invention.

[0033] like Figure 2 As shown, the proximity detection circuit includes: a current source U0, a current mirror module, a first switch S1, a second switch S2, a capacitive sensor C1, a variable holding capacitor C2, a differential processing module, a third switch S3, and a fourth switch S4.

[0034] The current mirror module includes a first current mirror branch and a second current mirror branch; the input terminals of the first current mirror branch and the second current mirror branch are connected to the current source U0. The output terminal of the first current mirror branch is connected to the capacitive sensor C1 via the first switch S1, and the output terminal of the second current mirror branch is connected to the variable holding capacitor C2 via the second switch S2. When the first switch S1 and the second switch S2 are closed, the first current mirror branch outputs a first current I1 to the capacitive sensor C1 for charging, and the second current mirror branch outputs a second current I2 to the variable holding capacitor C2 for charging. The ratio of the first current I1 to the second current I2 is equal to the ratio of the parasitic capacitance Cp of the capacitive sensor C1 to the capacitance of the variable holding capacitor C2. One end of the capacitive sensor C1 is connected to the first switch S1, and the other end is grounded; one end of the third switch S3 is connected between the capacitive sensor C1 and the first switch S1, and the other end is grounded. One end of the variable holding capacitor C2 is connected to the second switch S2, and the other end is grounded; one end of the fourth switch S4 is connected between the variable holding capacitor C2 and the second switch S2, and the other end is grounded. The differential processing module is used to amplify the voltage difference between the first voltage V1 output by the capacitive sensor C1 and the second voltage V2 output by the variable holding capacitor C2 after the first switch S1 and the second switch S2 are turned off, so as to obtain an output voltage Vout. The output voltage Vout is used to represent the proximity of the external object to the capacitive sensor C1.

[0035] When the first switch S1 and the second switch S2 are closed, and the third switch S3 and the fourth switch S4 are open, the first current mirror branch outputs a first current I1 to the capacitive sensor C1 for charging, and the second current mirror branch outputs a second current I2 to the variable holding capacitor C2 for charging. When the first switch S1 and the second switch S2 are open, and the third switch S3 and the fourth switch S4 are open, the differential processing module amplifies the voltage difference between the first voltage V1 output by the capacitive sensor C1 and the second voltage V2 output by the variable holding capacitor C2 to obtain the output voltage Vout. When the first switch S1 and the second switch S2 are open, and the third switch S3 and the fourth switch S4 are closed, the capacitive sensor C1 is discharged through the third switch S3, and the variable holding capacitor C2 is discharged through the fourth switch S4.

[0036] It can be understood that the current source U0, current mirror module, first switch S1, second switch S2, capacitive sensor C1, variable holding capacitor C2, and differential processing module in this embodiment correspond one-to-one with the current source 110, current mirror module 120, first switch 130, second switch 140, capacitive sensor 150, variable holding capacitor 160, and differential processing module 170 in the previous real-time example.

[0037] In some embodiments, the current mirror module includes a first MOSFET M1 and a second MOSFET M2; The source of the first MOSFET M1 and the source of the second MOSFET M2 are connected to the current source U0, and the gate of the first MOSFET M1 is connected to the gate of the second MOSFET M2; the drain of the first MOSFET M1 is the output terminal of the first current mirror branch; the drain of the second MOSFET M2 is the output terminal of the second current mirror branch.

[0038] With the first switch S1 and the second switch S2 closed, and the third switch S3 and the fourth switch S4 open, the capacitive sensor 150 is charged with a first current I1 through the current source U0. The current mirror module composed of the first MOSFET M1 and the second MOSFET M2 can mirror the first current I1 to obtain a second current I2, which is used to charge the variable holding capacitor C2. The relationship between the first MOSFET M1 and the second MOSFET M2 and the first current I1 and the second current I2 can be described by the following formula.

[0039] Because the gate and drain of the first MOSFET M1 are shorted. Then the following formula 1 exists:

[0040] in, This is the gate-source voltage of the first MOSFET M1; This is the drain-source voltage of the first MOSFET M1. The aspect ratio of transistor M1, For carrier mobility, For oxide layer capacitance and This is the threshold voltage.

[0041] Since the gate of the first MOSFET M1 is connected to the gate of the second MOSFET M2, Then the following formula 2 exists:

[0042] in, This refers to the gate-source voltage of MOSFET M2. This refers to the aspect ratio of transistor M2.

[0043] Since the first MOSFET M1 and the second MOSFET M2 are manufactured using the same process, the carrier mobility in Equations 1 and 2 is... Oxide layer capacitance and threshold voltage If they are equal, then dividing Formula 1 by Formula 2 yields Formula 3:

[0044] Formula 3 can be transformed into Formula 4:

[0045] When the capacitive sensor C reaches the set voltage V0 after being charged by current I for a time T, the voltage across the capacitive sensor C can be expressed by the formula... Push .

[0046] Therefore, the first voltage V1 on the capacitive sensor C1 can be described by the following formula 5:

[0047] The second voltage V2 across the variable holding capacitor C2 can be described by the following formula 6:

[0048] Substituting Formula 6 into Formula 4, we get Formula 7:

[0049] In some embodiments, the differential processing module includes a first resistor R1, a second resistor R2, a third resistor R3, and a fourth resistor R4; The negative input terminal of the differential processing module is connected between the capacitive sensor C1 and the first switch S1 via the first resistor R1; the negative input terminal of the differential processing module is connected to the output terminal of the differential processing module via the fourth resistor R4. The positive input terminal of the differential processing module is connected between the variable holding capacitor C2 and the second switch S2 via the second resistor R2; the positive input terminal of the differential processing module is connected to the output terminal of the differential processing module via the third resistor S3. The amplification factor of the differential processing module is determined based on the resistance values ​​of the first resistor R1, the second resistor R2, the third resistor R3, and the fourth resistor R4.

[0050] In some embodiments, the circuit further includes a first voltage follower U1 and a second voltage follower U2; The positive input terminal of the first voltage follower U1 is connected between the variable holding capacitor C2 and the second switch S2; the negative input terminal of the first voltage follower U1 is connected to the output terminal of the first voltage follower U1; the output terminal of the first voltage follower U1 is connected to the second resistor R2. The positive input terminal of the second voltage follower U2 is connected between the capacitive sensor C1 and the first switch S1; the negative input terminal of the second voltage follower U2 is connected to the output terminal of the second voltage follower U2; and the output terminal of the second voltage follower U2 is connected to the first resistor R1.

[0051] It can be understood that the voltages on the capacitive sensor C1 and the variable holding capacitor C2 are transmitted to the terminals of the first resistor R1 and the second resistor R2 by the first voltage follower U1 and the second voltage follower U2, respectively, and finally reach the negative and positive terminals of the voltage differential amplifier U3. The reason for using voltage followers is that their input impedance is extremely high, which can effectively transmit the voltages on the capacitive sensor C1 and the variable holding capacitor C2 without affecting their charge.

[0052] The amplification factor of the differential amplifier can be determined by adjusting the first resistor R1, the second resistor R2, the third resistor R3, and the fourth resistor R4. The amplification factor K can be expressed as the following formula 8:

[0053] The output voltage Vout at the differential amplifier terminal can be expressed as follows: Formula 9:

[0054] Substituting Formula 7 and Formula 5 into Formula 9, we obtain the following Formula 10:

[0055] Because the capacitance of the capacitive sensor C1 is equal to its own parasitic capacitance when no limb is near it. When a limb approaches the capacitive sensor C1, its capacitance increases. The capacitance increment is set to... If the limb approaches the capacitive sensor C1, its capacitance is... .

[0056] Therefore, according to Formula 10, when the limb capacitive sensor C1 is applied, the output voltage Vout value increases.

[0057] In some embodiments, the ratio of the first current I1 output by the first current mirror branch to the second current I2 output by the second current mirror branch is determined based on the ratio of the width-to-length ratio of the first MOSFET to the width-to-length ratio of the second MOSFET.

[0058] As shown in Formula 10, the aspect ratio of the first MOSFET M1 during manufacturing can be adjusted. and the aspect ratio of the second MOSFET M2 To determine the ratio x of the first current I1 to the second current I2.

[0059] As an example, during manufacturing, the width-to-length ratio of M1 and M2 is freely set so that the ratio of the first current I1 to the second current I2, i.e., the mirror ratio of the current mirror, x=0.1. Therefore, the variable holding capacitor C2 only needs to satisfy C2 = 0.1Cp to ensure that the voltage of the variable holding capacitor C2 is equal to the voltage of the parasitic capacitance Cp, thus canceling each other out during differential processing. In other words, this scheme can significantly reduce the required size of the variable holding capacitor C2, effectively reducing the integrated circuit area and saving costs.

[0060] The method described above, which configures the aspect ratio of M1 and M2 to set a mirror ratio, allows the capacitance value of the variable holding capacitor C2 to be compressed to a set multiple of the parasitic capacitance Cp during the design phase, thereby reducing the chip area. However, in practical applications, the actual value of the parasitic capacitance Cp of the capacitive sensor C1 may deviate from the design value due to factors such as differences in PCB wiring and changes in ambient temperature and humidity. Therefore, relying solely on a fixed mirror ratio during manufacturing may not be sufficient to completely offset these deviations.

[0061] Therefore, in this embodiment, the variable holding capacitor C2 is configured as a capacitor array with an adjustable capacitance value. The value of the variable holding capacitor C2 can be adjusted during the chip power-on initialization phase or when no external object is nearby, so that in formula 10... Right now The output approaches 0, thus achieving precise matching and effectively offsetting the parasitic capacitance of the capacitive sensor C1 itself. The impact on detection, and the increment after the external object approaches by a factor of K. The signal generated by the capacitor is used for precise proximity detection.

[0062] In some embodiments, the circuit further includes a comparator CMP and a threshold voltage source Uc.

[0063] The output terminal of the differential processing module, namely the output terminal of the differential amplifier U3, is connected to the positive input terminal of the comparator CMP, the positive terminal of the threshold voltage source Uc is connected to the negative input terminal of the comparator CMP, and the negative terminal of the threshold voltage source Uc is grounded.

[0064] The comparator CMP compares the output voltage Vout of the differential processing module with the threshold voltage provided by the threshold voltage source Uc. When the output voltage Vout is greater than the threshold voltage, the output of the comparator CMP is high, indicating that an external object is detected approaching; when the output voltage Vout is less than or equal to the threshold voltage, the output of the comparator CMP is low, indicating that no external object is detected approaching.

[0065] Figure 3 This is a flowchart of a proximity detection method based on a capacitive sensor provided in an embodiment of the present invention.

[0066] This proximity detection method is applied to the proximity detection circuit based on a capacitive sensor as described above. For example... Figure 3As shown, the method may specifically include the following steps: Step 301: Control the first switch S1 and the second switch S2 to close, so that the first current mirror branch outputs a first current I1 to the capacitive sensor C1 for charging, and the second current mirror branch outputs a second current I2 to the variable holding capacitor C2 for charging; wherein, the ratio of the first current I1 to the second current I2 is equal to the ratio of the capacitance value of the parasitic capacitance Cp of the capacitive sensor C1 to the capacitance value of the variable holding capacitor C2; Step 302: Control the first switch S1 and the second switch S2 to be disconnected, so that the charge on the capacitive sensor C1 and the variable holding capacitor C2 remains unchanged. Input the first voltage V1 of the capacitive sensor C1 and the second voltage V2 of the variable holding capacitor C2 to the differential processing module. The differential processing module amplifies the voltage difference between the first voltage V1 and the second voltage V2 to obtain the output voltage Vout. Step 303: Proximity detection is performed based on the output voltage Vout.

[0067] In practical scenarios, the output voltage Vout can be compared with a preset threshold voltage Uc. When Vout is greater than Uc, it is determined that an external object is approaching; when Vout is less than or equal to Uc, it is determined that there is no approach event. The threshold voltage Uc can be set according to the sensitivity requirements of the actual application scenario.

[0068] In some embodiments, the circuit further includes a third switch S3 and a fourth switch S4; one end of the third switch S3 is connected between the capacitive sensor C1 and the first switch S1, and the other end is grounded; one end of the fourth switch S4 is connected between the variable holding capacitor C2 and the second switch S2, and the other end is grounded; Step 301 specifically includes: The first switch S1 and the second switch S2 are closed, and the third switch S3 and the fourth switch S4 are opened, so that the first current mirror branch outputs a first current I1 to the capacitive sensor C1 for charging, and the second current mirror branch outputs a second current I2 to the variable holding capacitor C2 for charging. At this time, the current source U0 provides bias current to the current mirror module, and the first current mirror branch and the second current mirror branch of the current mirror module generate the first current I1 and the second current I2 respectively under the action of the bias current.

[0069] With the first switch S1 closed, the first current I1 output from the first current mirror branch flows into the capacitive sensor C1 through the first switch S1, charging the capacitive sensor C1 and establishing a first voltage V1 across its terminals. With the second switch S2 closed, the second current I2 output from the second current mirror branch flows into the variable holding capacitor C2 through the second switch S2, charging the variable holding capacitor C2 and establishing a second voltage V2 across its terminals.

[0070] Since the third switch S3 and the fourth switch S4 are in the open state, the discharge circuits of the capacitive sensor C1 and the variable holding capacitor C2 are both cut off. The charging current is used entirely to establish the voltage across the capacitor and will not leak through other paths.

[0071] The ratio of the first current I1 to the second current I2 is configured to be equal to the ratio of the parasitic capacitance Cp of the capacitive sensor C1 to the capacitance of the variable holding capacitor C2. Due to this ratio, within the same charging time T, the first voltage V1 on the capacitive sensor C1 and the second voltage V2 on the variable holding capacitor C2 satisfy the following: when no external object is nearby, the first voltage V1 and the second voltage V2 are equal after charging, meaning that the variable holding capacitor C2 can cancel out the influence of the parasitic capacitance Cp on detection. The specific principle has been explained in detail in the circuit structure description above and will not be repeated here.

[0072] Step 302 specifically includes: The first switch S1 and the second switch S2 are disconnected, and the third switch S3 and the fourth switch S4 are disconnected, so that the charge on the capacitive sensor and the holding capacitor remains unchanged; When the first switch S1 and the second switch S2 are opened, the charging circuit of the capacitive sensor C1 and the variable holding capacitor C2 is cut off. Since the third switch S3 and the fourth switch S4 are also in the open state, the discharge circuit of the two capacitors is also cut off. Therefore, the amount of charge stored in the capacitive sensor C1 and the variable holding capacitor C2 is maintained, preventing charge leakage, and the voltages V1 and V2 across the two capacitors remain stable.

[0073] In some embodiments, the first voltage V1 of the capacitive sensor C1 is buffered by the second voltage follower U2 and then transmitted to the negative input terminal of the differential processing module via the first resistor R1. The second voltage V2 of the variable holding capacitor C2 is buffered by the first voltage follower U1 and then transmitted to the positive input terminal of the differential processing module via the second resistor R2.

[0074] The first voltage follower U1 and the second voltage follower U2 have extremely high input impedances, and the current they draw from the capacitive sensor C1 and the variable holding capacitor C2 is minimal. Therefore, they can accurately transmit the voltage values ​​of V1 and V2 to the input of the differential processing module without affecting the original charge on C1 and C2. This characteristic ensures that the voltage value in the subsequent differential amplification process can truly reflect the charging state of the two capacitors.

[0075] The method further includes: The first switch S1 and the second switch S2 are opened, and the third switch S3 and the fourth switch S4 are closed, so that the capacitive sensor C1 is discharged through the third switch S3, and the variable holding capacitor C2 is discharged through the fourth switch S4.

[0076] It is understandable that this step is equivalent to a reset operation. After the proximity determination is completed in step 303, the circuit needs to prepare for the next detection cycle. At this time, the third switch S3 and the fourth switch S4 are closed, while the first switch S1 and the second switch S2 remain open.

[0077] After the third switch S3 is closed, the two ends of the capacitive sensor C1 are shorted to ground through the third switch S3, and the charge stored in it is discharged through the third switch S3, causing the voltage across C1 to return to zero. After the fourth switch S4 is closed, the two ends of the variable holding capacitor C2 are shorted to ground through the fourth switch S4, and the charge stored in it is discharged through the fourth switch S4, causing the voltage across C2 to return to zero. After the reset is completed, the circuit can repeat steps 301 to 303 to enter the next detection cycle.

[0078] In some embodiments, the method further includes: When the first switch S1, the second switch S2, the third switch S3, and the fourth switch S4 are open, and no external object approaches the capacitive sensor C1, the capacitance value of the variable holding capacitor C2 is adjusted so that the output voltage Vout of the differential processing module is zero.

[0079] After chip manufacturing, the actual parasitic capacitance Cp of the capacitive sensor C1 may vary between batches or be affected by factors such as PCB layout, ambient temperature and humidity, resulting in a deviation from the theoretical design value. These deviations can cause Vout to fail to return to zero completely when no external object is nearby, thus affecting detection accuracy. Therefore, this calibration stage is set up. Under the condition that the first switch S1, the second switch S2, the third switch S3, and the fourth switch S4 are all open and no external object is nearby, the capacitance value of the variable holding capacitor C2 is adjusted so that Vout tends to zero, making the actual capacitance value of the variable holding capacitor C2 precisely match the actual parasitic capacitance value of the capacitive sensor C1.

[0080] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.

[0081] This invention also provides an electronic device, including a processor, a memory, and a program or instructions stored in the memory and executable on the processor. When the program or instructions are executed by the processor, they implement the various processes of the above-described proximity detection method embodiments based on capacitive sensors and achieve the same technical effects. To avoid repetition, they will not be described again here.

[0082] It should be noted that the electronic devices in the embodiments of the present invention include the mobile electronic devices and non-mobile electronic devices described above.

[0083] This invention also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described proximity detection method based on a capacitive sensor and achieve the same technical effect. To avoid repetition, they will not be described again here.

[0084] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0085] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0086] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, embodiments of the present invention can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0087] Embodiments of the present invention are described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, as well as combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0088] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0089] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0090] Although preferred embodiments of the present invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present invention.

[0091] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.

[0092] The control method, device, electronic device, and computer-readable storage medium for home appliances provided by the present invention have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A proximity detection circuit based on a capacitive sensor, characterized in that, The circuit includes: Current source, current mirror module, first switch, second switch, capacitive sensor, variable holding capacitor and differential processing module; The current mirror module includes a first current mirror branch and a second current mirror branch; the input terminals of the first current mirror branch and the second current mirror branch are connected to the current source. The output terminal of the first current mirror branch is connected to the capacitive sensor via the first switch, and the output terminal of the second current mirror branch is connected to the variable holding capacitor via the second switch. When the first switch and the second switch are closed, the first current mirror branch outputs a first current to the capacitive sensor for charging, and the second current mirror branch outputs a second current to the variable holding capacitor for charging. The ratio of the first current to the second current is equal to the ratio of the parasitic capacitance value of the capacitive sensor to the capacitance value of the variable holding capacitor. One end of the capacitive sensor is connected to the first switch, and the other end is grounded; One end of the variable holding capacitor is connected to the second switch, and the other end is grounded; The differential processing module is used to amplify the voltage difference between the first voltage output by the capacitive sensor and the second voltage output by the variable holding capacitor after the first switch and the second switch are turned off, so as to obtain an output voltage. The output voltage is used to indicate the proximity of an external object to the capacitive sensor.

2. The proximity detection circuit based on a capacitive sensor according to claim 1, characterized in that, The circuit also includes a third switch and a fourth switch; One end of the third switch is connected between the capacitive sensor and the first switch, and the other end is grounded; one end of the fourth switch is connected between the variable holding capacitor and the second switch, and the other end is grounded. When the first switch and the second switch are closed, and the third switch and the fourth switch are open, the first current mirror branch outputs a first current to the capacitive sensor for charging, and the second current mirror branch outputs a second current to the variable holding capacitor for charging. When the first switch and the second switch are open, and the third switch and the fourth switch are open, the differential processing module amplifies the voltage difference between the first voltage output by the capacitive sensor and the second voltage output by the variable holding capacitor to obtain the output voltage. When the first switch and the second switch are open, and the third switch and the fourth switch are closed, the capacitive sensor discharges through the third switch, and the variable holding capacitor discharges through the fourth switch.

3. The proximity detection circuit based on a capacitive sensor according to claim 1, characterized in that, The differential processing module includes a first resistor, a second resistor, a third resistor, and a fourth resistor; The negative input terminal of the differential processing module is connected between the capacitive sensor and the first switch via the first resistor; the negative input terminal of the differential processing module is connected to the output terminal of the differential processing module via the fourth resistor. The positive input terminal of the differential processing module is connected between the variable holding capacitor and the second switch via the second resistor; the positive input terminal of the differential processing module is connected to the output terminal of the differential processing module via the third resistor. The amplification factor of the differential processing module is determined based on the resistance values ​​of the first resistor, the second resistor, the third resistor, and the fourth resistor.

4. The proximity detection circuit based on a capacitive sensor according to claim 3, characterized in that, The circuit also includes a first voltage follower and a second voltage follower; The positive input terminal of the first voltage follower is connected between the variable holding capacitor and the second switch; the negative input terminal of the first voltage follower is connected to the output terminal of the first voltage follower; the output terminal of the first voltage follower is connected to the second resistor; The positive input terminal of the second voltage follower is connected between the capacitive sensor and the first switch; The negative input terminal of the second voltage follower is connected to the output terminal of the second voltage follower; the output terminal of the second voltage follower is connected to the first resistor.

5. The proximity detection circuit based on a capacitive sensor according to claim 1, characterized in that, The current mirror module includes a first MOSFET and a second MOSFET; The source of the first MOSFET and the source of the second MOSFET are connected to the current source, and the gate of the first MOSFET is connected to the gate of the second MOSFET; the drain of the first MOSFET is the output terminal of the first current mirror branch; the drain of the second MOSFET is the output terminal of the second current mirror branch.

6. The proximity detection circuit based on a capacitive sensor according to claim 5, characterized in that, The ratio of the first current output by the first current mirror branch to the second current output by the second current mirror branch is determined based on the ratio of the width-to-length ratio of the first MOSFET to the width-to-length ratio of the second MOSFET.

7. A proximity detection method based on a capacitive sensor, characterized in that, The method, applied to the proximity detection circuit based on a capacitive sensor according to any one of claims 1-7, comprises: The first switch and the second switch are controlled to close, so that the first current mirror branch outputs a first current to the capacitive sensor for charging, and the second current mirror branch outputs a second current to the variable holding capacitor for charging; wherein, the ratio of the first current to the second current is equal to the ratio of the parasitic capacitance value of the capacitive sensor to the capacitance value of the variable holding capacitor; The first switch and the second switch are controlled to be turned off, so that the charge on the capacitive sensor and the variable holding capacitor remains unchanged. The first voltage of the capacitive sensor and the second voltage of the holding capacitor are input to the differential processing module. The differential processing module amplifies the voltage difference between the first voltage and the second voltage to obtain the output voltage. Proximity detection is performed based on the output voltage.

8. The proximity detection method based on a capacitive sensor according to claim 7, characterized in that, The circuit also includes a third switch and a fourth switch; one end of the third switch is connected between the capacitive sensor and the first switch, and the other end is grounded; one end of the fourth switch is connected between the variable holding capacitor and the second switch, and the other end is grounded. The control of closing the first switch and the second switch, causing the first current mirror branch to output a first current to the capacitive sensor for charging, and the second current mirror branch to output a second current to the variable holding capacitor for charging, includes: The first and second switches are closed, and the third and fourth switches are opened, so that the first current mirror branch outputs a first current to the capacitive sensor for charging, and the second current mirror branch outputs a second current to the variable holding capacitor for charging. The control of the first switch and the second switch to be turned off, so that the charge on the capacitive sensor and the holding capacitor remains unchanged, includes: The first and second switches are turned off, and the third and fourth switches are turned off, so that the charge on the capacitive sensor and the holding capacitor remains unchanged; The method further includes: The first and second switches are controlled to be open, and the third and fourth switches are controlled to be closed, so that the capacitive sensor is discharged through the third switch and the variable holding capacitor is discharged through the fourth switch.

9. The proximity detection method based on a capacitive sensor according to claim 8, characterized in that, The method further includes: When the first switch, the second switch, the third switch, and the fourth switch are open, and no external object is near the capacitive sensor, the capacitance value of the variable holding capacitor is adjusted so that the output voltage of the differential processing module is zero.

10. An electronic device, characterized in that, It includes a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the steps of the proximity detection method based on a capacitive sensor as described in claims 7-9.

11. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the proximity detection method based on a capacitive sensor as described in claims 7-9.