Touch capacitance detection circuit and calibration, detection method
Patent Information
- Application Number
- CN202111655274.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-30
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2041-12-30
AI Technical Summary
此方案在频域上呈现低通特性,可较好抑制高频噪声的影响,但是当外界有强烈低频噪声(50Hz/60Hz)干扰时,容易引起误触发;同时方案还需要芯片集成大电容,以满足较好的低通特性,浪费芯片面积,且成本较高
[0055]根据本申请提出的一种触摸电容检测电路及其控制方法,通过可调的充电电阻,自动实现外部电容的检测和匹配方案;并且具有噪声过滤机制,可以实现对外部噪声的过滤,减小误差;且电路实现方案简单,并不需要额外的器件配合以及占用多余的IO资源。
Smart Images

Figure CN116418329B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of integrated circuits, and more specifically, to a touch capacitance detection circuit and a calibration and detection method. Background Technology
[0002] With the rise of smart homes, more and more home appliances and door locks are adopting capacitive touch solutions. Replacing mechanical buttons with capacitive touch buttons can improve product lifespan, enhance product aesthetics, and improve water resistance.
[0003] Capacitive touch buttons are based on the principle of self-capacitance: when a finger approaches the button area, the equivalent capacitance of the button area increases, that is, the self-capacitance of the button area increases. The self-capacitance detection chip detects whether the self-capacitance changes to determine whether a touch event has occurred.
[0004] Currently, there are two schemes for self-capacitance detection circuits: The first scheme determines whether there is a finger touch by detecting the frequency or period of the oscillator related to the self-capacitance. When a finger touch occurs, the oscillator frequency decreases, and the touch event can be detected by counting the square wave output by the oscillator within one reference clock cycle. This scheme is simple to operate and has low power consumption, but its sensing node is a high impedance node, which is susceptible to external noise interference and may cause false triggering.
[0005] The second approach utilizes the principle of CQT (Continuous Quality Transmission) to periodically transfer the charge from the self-capacitor to a large capacitor inside the chip. When a finger touches the button, the self-capacitor increases, enhancing its ability to store charge. The voltage of the capacitor inside the chip then exceeds the comparator's comparison level earlier. When the comparator level flips, the counter stops counting. This approach exhibits low-pass characteristics in the frequency domain, effectively suppressing the influence of high-frequency noise. However, it is prone to false triggering when there is strong external low-frequency noise (50Hz / 60Hz). Furthermore, this approach requires the chip to integrate a large capacitor to achieve good low-pass characteristics, wasting chip area and increasing cost.
[0006] In order to solve the problems mentioned in the background art, this application aims to propose a capacitive touch button circuit, which has the characteristics of being less prone to accidental touch, low cost, and small chip area.
[0007] The information disclosed in the background section is only intended to enhance the understanding of the background of this application, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0008] This application proposes a touch capacitance detection circuit and calibration and detection method, which automatically realizes the detection and matching scheme of external capacitors through an adjustable charging resistor.
[0009] According to one aspect of this application, a touch capacitance detection circuit is provided, the capacitance detection circuit comprising a channel selection module, a charging / discharging module, a reference module, a comparison module, a delay unit, a counter, and a control module, wherein:
[0010] The channel selection module selects the channel to be detected;
[0011] The charging and discharging module charges or discharges the selected channel to generate a detection signal.
[0012] The comparison module takes the detection signal and the reference voltage of the reference module as input, and outputs a first signal;
[0013] The delay unit receives the first signal and outputs the second signal;
[0014] The counter outputs a count value based on the second signal;
[0015] The control module outputs a control signal based on the second signal and the count value.
[0016] According to some embodiments, the detection signal is a triangular wave signal.
[0017] According to some embodiments, wherein:
[0018] The charging and discharging module includes a charging module and a discharging module;
[0019] The charging module includes at least one charging resistor connected in series and a switch connected in parallel;
[0020] The discharge module includes at least one discharge resistor connected in series and a switch connected in parallel.
[0021] According to some embodiments, a touch detection channel is also included, wherein:
[0022] The touch detection channel is connected to the channel selection module.
[0023] According to some embodiments, the reference module includes a first resistor, a second resistor, and a selection switch, wherein:
[0024] One end of the first resistor is connected to the chip's operating power supply, and the other end is connected to the second resistor, which is grounded.
[0025] The first resistor is connected in parallel with the first and second contacts of the selector switch, and the third contact of the selector switch outputs a reference voltage.
[0026] According to some embodiments, the delay unit includes a first capacitor, a first switch, a second switch, and an inverter, wherein:
[0027] The first switch and the second switch are connected in series, with one end inputting the chip's operating power and the other end grounded;
[0028] The series branch of the first switch and the second switch is connected in parallel with the inverter;
[0029] One end of the first capacitor is grounded, and the other end is connected to the midpoint of the series branch of the first switch and the second switch.
[0030] According to some embodiments, the control module is configured as follows:
[0031] If the second signal is at a predetermined level, the control signal is output to control the charging and discharging module to discharge the selected channel;
[0032] The parallel switch of the charging and discharging module is connected and disconnected according to the count value.
[0033] According to another aspect of this application, a calibration method for a touch capacitance detection circuit as described in any of the preceding statements is provided, comprising:
[0034] Enable the channel selection module to detect the touch detection channel;
[0035] Receive the output data from the counter;
[0036] According to the predetermined detection cycle, the output data of the counter is compared with the corresponding calibration threshold. Based on the comparison result, the charging resistor and / or discharging resistor are adjusted.
[0037] The value of the record counter plus the margin value is used as the detection threshold for this touch detection channel.
[0038] According to some embodiments, adjusting the charging resistor and / or discharging resistor includes:
[0039] If the counter output data is lower than the minimum threshold, then the resistance value of the charging / discharging resistor is reduced;
[0040] If the counter output data is higher than the highest threshold, then the resistance value of the charge / discharge resistor is increased.
[0041] According to some embodiments, the method further includes: if the counter output data is higher than the minimum threshold and lower than the maximum threshold, then the charging resistor and / or discharging resistor level and filtering configuration are recorded.
[0042] According to another aspect of this application, a detection method for a touch capacitance detection circuit as described in any of the preceding statements is characterized in that:
[0043] Enable the channel selection module to detect the touch detection channel;
[0044] Receive the output data from the counter;
[0045] According to the predetermined detection cycle, obtain the comparison results of the counter output data and the corresponding detection threshold;
[0046] Based on the detection results, the current touch detection channel can be reopened; or
[0047] Based on the detection results, the next touch detection channel is activated.
[0048] According to some embodiments, based on the detection result, the next touch detection channel is activated, including:
[0049] If the counter output data is lower than the detection threshold, it is determined that a button has been pressed, and the next touch detection channel is activated.
[0050] If the counter output data is higher than the detection threshold, it is determined that no button is pressed, and the next touch detection channel is activated.
[0051] According to some embodiments, based on the detection results, the current touch detection channel is reopened, including:
[0052] If the difference between the counter output data and the detection threshold is large, then the noise filtering configuration should be increased.
[0053] Adjust the detection threshold according to the noise level, and then reopen the current touch detection channel.
[0054] According to another aspect of this application, an electronic device is proposed, including a touch capacitive detection circuit as described in any of the preceding statements.
[0055] According to the touch capacitance detection circuit and control method proposed in this application, an external capacitance detection and matching scheme is automatically realized through an adjustable charging resistor; it also has a noise filtering mechanism to filter external noise and reduce errors; and the circuit implementation scheme is simple, without the need for additional components or unnecessary IO resources.
[0056] It should be understood that the above general description and the following detailed description are merely exemplary and do not limit this application. Attached Figure Description
[0057] The above and other objects, features, and advantages of this application will become more apparent from the detailed description of exemplary embodiments with reference to the accompanying drawings. The drawings described below are merely some embodiments of this application and are not intended to limit the scope of this application.
[0058] Figure 1 A schematic block diagram of a capacitive touch button circuit according to an example embodiment of this application is shown.
[0059] Figure 2 A schematic diagram of a reference module circuit according to an example embodiment of this application is shown;
[0060] Figure 3 A schematic diagram of a charge / discharge resistor circuit according to an example embodiment of this application is shown;
[0061] Figure 4 A schematic diagram of the delay unit circuit of an example embodiment of this application is shown;
[0062] Figure 5 This diagram shows a normal waveform of a capacitive touch button circuit according to an example embodiment of this application.
[0063] Figure 6 The diagram shows the operating waveform of the capacitive touch button circuit of an example embodiment of this application when subjected to high-frequency interference.
[0064] Figure 7 This application shows a flowchart illustrating the calibration process of a capacitive touch button circuit according to an example embodiment.
[0065] Figure 8 A flowchart illustrating the capacitive touch button detection process of an example embodiment of this application is shown. Detailed Implementation
[0066] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the embodiments set forth herein; rather, they are provided so that this application will be thorough and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted.
[0067] The described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a full understanding of embodiments of this disclosure. However, those skilled in the art will recognize that the technical solutions of this disclosure can be practiced without one or more of these specific details, or other methods, components, materials, devices, etc. In these cases, well-known structures, methods, devices, implementations, materials, or operations will not be shown or described in detail.
[0068] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.
[0069] The terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.
[0070] Those skilled in the art will understand that the accompanying drawings are merely schematic diagrams of exemplary embodiments, and the modules or processes in the drawings are not necessarily essential for implementing this application, and therefore cannot be used to limit the scope of protection of this application.
[0071] The following describes an apparatus embodiment of this application, which can be used to perform the method embodiment of this application. For details not disclosed in the apparatus embodiment of this application, please refer to the method embodiment of this application.
[0072] Figure 1 A schematic block diagram of a capacitive touch button circuit according to an example embodiment of this application is shown.
[0073] like Figure 1 As shown, the capacitive touch button circuit includes a channel selection module Mux, a charging and discharging resistor R0, a reference module 101, a comparison module CMP1, a delay unit 103, a counter 105, a control module 107, N touch detection channels CHN, parasitic capacitance cpN, and equivalent capacitance cfN, where N is an integer greater than or equal to 1.
[0074] The parasitic capacitance cpN and the equivalent capacitance cfN are connected in parallel, with one end grounded and the other end connected to the touch detection channel CHN. The equivalent capacitance cfN is the equivalent capacitance of finger touch coupling. All N touch detection channels are connected in series with the parasitic capacitance cpN and the equivalent capacitance cfN connected in parallel.
[0075] The touch detection channel CHN is the touch detection channel PAD.
[0076] The touch detection channel CHN is connected to the channel selection module Mux, the channel selection module Mux is connected to the comparison module CMP1, and the channel selection module Mux outputs a triangular wave signal V3 to the comparison module CMP1.
[0077] According to the example embodiment, the charging and discharging resistor R0 and the channel selection module Mux are controlled by the input signals SW1a and SW1b to open and close the switch, thereby realizing the output of the triangular wave signal V3 of the channel selection module Mux.
[0078] The reference module 101 is connected to the comparator module CMP1. The reference module 101 outputs a reference voltage V2 to the comparator module CMP1 based on the input SW2 signal.
[0079] According to the example embodiment, if the output signal vout2 changes from 0 to 1, the SW2 signal causes V2 to switch to the output high reference voltage terminal; if the output signal vout2 changes from 1 to 0, the SW2 signal causes V2 to switch to the output low reference voltage terminal.
[0080] The comparison module CMP1 is connected to the delay unit 103. The comparison module CMP1 inputs a triangular wave signal V3 and a reference voltage V2. After comparing the triangular wave signal V3 and the reference voltage V2, it outputs a square wave signal vout1 to the delay unit 103.
[0081] According to the example embodiment, if the triangular wave signal V3 is lower than the reference voltage V2, the output of vout1 is from 0 to 1; if the triangular wave signal V3 is higher than the reference voltage V2, the output of vout1 is from 1 to 0.
[0082] The delay unit 103 is connected to the counter 105. The delay unit 103 delays the vout1 signal and outputs vout2 to the counter 105. The delay unit 103 can filter high-frequency interference signals.
[0083] Counter 105 is connected to control module 107. Counter 105 uses a faster clock to count the clock output by comparator module CMP1.
[0084] The control module 107 outputs the control signal sel for key touch detection, enabling the selection of different detection channels CHN; it outputs control signals SW1a and SW1b to control the opening and closing of the switch, charging and discharging the detection channel CHN through the charging and discharging resistor R0 to generate a triangular wave signal V3; it outputs the control signal r_trim to control the switching of the charging and discharging resistor R0, adjusting the value of the charging and discharging resistor R0; it outputs the control signal SW2 to the reference reference module 101, causing the reference reference module 101 to output different reference voltages V2; it outputs the control signal td_trim to the delay unit 103 to achieve a delayed output vout2. The control module 107 can also perform key counting judgment function, judging the frequency change based on the counting result.
[0085] The frequency Freq1 of the RC oscillator is related to the parasitic capacitance cpN and the equivalent capacitance cfN:
[0086] Freq1 = 1 / (K*R0*(cpN+cfN))
[0087] If there is no equivalent capacitor cfN, and only the parasitic capacitance cpN, the output frequency changes rapidly; if there is an equivalent capacitor cfN, the output frequency Freq1 decreases.
[0088] Figure 2 A schematic diagram of a reference module circuit of an example embodiment of this application is shown.
[0089] like Figure 2 As shown, the reference module includes resistors R11 and R12, and a selector switch S1. One end of resistor R11 is connected to the chip's operating power supply VDD, and the other end is connected to resistor R12, which is grounded. Resistor R11 is connected in parallel with contacts 1 and 2 of selector switch S1, and contact 3 of selector switch S1 outputs the reference voltage V2.
[0090] According to the example embodiment, when the selector switch S1 is connected to contact 1, the output reference voltage V2 is V2, where V2 = Id1*(R11+R12).
[0091] According to the example embodiment, when the selector switch S1 is connected to the contact 2, the output reference voltage V2 is V2, where V2 = Id1 * R12.
[0092] According to the example embodiment, if the output signal vout2 changes from 0 to 1, the SW2 signal causes V2 to switch to the output high reference voltage terminal, i.e., terminal 1; if the output signal vout2 changes from 1 to 0, the SW2 signal causes V2 to switch to the output low reference voltage terminal, i.e., terminal 2.
[0093] Figure 3 A schematic diagram of a charge / discharge resistor circuit according to an example embodiment of this application is shown.
[0094] like Figure 3 The charging and discharging resistor R0 includes a charging resistor R01 and a discharging resistor R02. Both the charging resistor R01 and the discharging resistor R02 consist of m resistors rm connected in series, and each resistor is connected in parallel with a switch sm, where m is an integer greater than or equal to 1.
[0095] According to the example embodiment, the control module 107 outputs the control signal r_trim <m>Each of these controls the opening and closing of the corresponding switch sm.
[0096] The resistance value of the charging / discharging resistor R0 is adjusted by controlling the opening and closing of the switch sm.
[0097] According to the example embodiment, if the output signal vout2 changes from 0 to 1, the control module 107 outputs control signals SW1a and SW1b. Control signal SW1a controls switch K01 to close, and control signal SW1b controls switch K02 to open, charging the channel selection module Mux through the charging resistor R01, thus increasing the voltage of V3.
[0098] If the output signal vout2 changes from 1 to 0, the control module 107 outputs control signals SW1a and SW1b. Control signal SW1a controls switch K01 to open, and control signal SW1b controls switch K02 to close, discharging the channel selection module Mux through charging resistor R02, causing the V3 voltage to drop.
[0099] Figure 4 A schematic diagram of the delay unit circuit of an example embodiment of this application is shown.
[0100] like Figure 4 As shown, the delay unit 103 includes a capacitor c0, switches K1_p and K1_n, and an inverter Inv1.
[0101] According to the example embodiment, switch K1_p can be implemented using a PMOS transistor; K1_n can be implemented using an NMOS transistor.
[0102] According to the example embodiment, the charging delay is controlled by the charging current Id2 and the capacitor c0, and the delayed signal vout2 is output.
[0103] According to the example embodiment, when the input signal vout1 changes from 0 to 1, the output of the inverter Inv1 changes from 1 to 0, the input signal td_trim controls the switch K1_p to turn on and the switch K1_n to turn off, and the capacitor c0 is charged through the charging current Id2.
[0104] According to the example embodiment, when the input signal vout1 changes from 1 to 0, the output of the inverter Inv1 changes from 0 to 1, the input signal td_trim controls the switch K1_n to turn on and the switch K1_p to turn off, and the capacitor c0 is discharged through the charging current Id2.
[0105] According to the example embodiment, the delay unit 103 can also perform the function of filtering high-frequency interference.
[0106] Figure 5 This diagram illustrates the normal waveform of a capacitive touch button circuit according to an example embodiment of this application.
[0107] like Figure 5 As shown, V3 is a triangular wave generated by charging and discharging the capacitor through the charging and discharging resistor R0.
[0108] V2 is the reference voltage, and the output voltage of V2 is switched by the control signal sw2.
[0109] vout1 is the waveform output by the comparison module CMP1 after comparing V2 and V3. As shown in the figure, if V2 is higher than V3, the output is high; if V2 is lower than V3, the output is low.
[0110] vout2 is the waveform output after being delayed by delay unit 103. Delay unit 103 can filter out interference from glitches; vout2 is the output of vout1 after a delay of Td.
[0111] SW2 is the switching control signal for the reference voltage V2;
[0112] Sw1a is the switching control signal for the charging resistor R01;
[0113] Sw1b is the switching control signal for the discharge resistor R02.
[0114] Figure 6 The diagram shows the operating waveform of a capacitive touch button circuit according to an example embodiment of this application when subjected to high-frequency interference.
[0115] like Figure 6 As shown, the delay unit 103 has the function of filtering high-frequency interference signals. Therefore, after the delay Td of the delay unit 103, vout1 outputs the normal vout2 signal, so that the capacitive touch button circuit works normally.
[0116] Figure 7 A flowchart illustrating the calibration process of a capacitive touch button circuit according to an example embodiment of this application is shown.
[0117] In S501, enable the Mux channel selection module to detect the channels.
[0118] According to the example embodiment, without pressing any buttons, the Mux channel selection module is activated, the channel to be detected is selected, and the channel is detected.
[0119] In S502, the counter detects the clock.
[0120] In S503, the output data of the counter is determined.
[0121] According to the example embodiment, based on one detection cycle, it is determined whether the output data of the counter is within a reasonable range. If the counter output data is lower than the expected minimum value, proceed to S504; if the counter output data is higher than the expected maximum value, proceed to S505; if the counter output data is within the expected range, proceed to S506.
[0122] In S504, reduce the resistance value of the charge / discharge resistor R0.
[0123] According to the example embodiment, reducing the resistance value of the charging and discharging resistor R0 will decrease the output of the triangular wave signal V3, thereby reducing the output frequency of the comparison module CMP1, increasing the output result of the counter, and then proceeding to S502.
[0124] In S505, increase the resistance value of the charging / discharging resistor R0.
[0125] According to the example embodiment, increasing the resistance value of the charging and discharging resistor R0 increases the output of the triangular wave signal V3, which in turn increases the output frequency of the comparison module CMP1, decreases the output result of the counter, and then proceeds to S502.
[0126] In S506, calibration is complete.
[0127] According to the example embodiment, after calibration, the counter output data is added with a margin (considering noise) as the judgment threshold, and the corresponding charge / discharge resistor R0 level and filter configuration are recorded.
[0128] Figure 8 A flowchart illustrating the capacitive touch button detection process of an example embodiment of this application is shown.
[0129] In S601, enable the Mux channel selection module to detect the channels.
[0130] According to the example embodiment, without pressing any buttons, the Mux channel selection module is activated, the channel to be detected is selected, and the channel is detected.
[0131] In S602, the counter detects the clock.
[0132] In S603, the output data of the counter is determined.
[0133] According to the example embodiment, based on one detection cycle, the output data of the counter is compared with the corresponding detection threshold. If the counter output data is lower than the detection threshold, proceed to S604; if the counter output data is higher than the detection threshold, proceed to S605; if the counter output data is much higher than the detection threshold, proceed to S606.
[0134] In S604, it is determined that there is a button.
[0135] According to the example embodiment, based on the detection result, if it is determined that a button is pressed, the detection of the next channel is started, that is, the process proceeds to S601.
[0136] In S605, it is determined that no button is pressed.
[0137] According to the example embodiment, based on the detection result, if it is determined that there is no button, the detection of the next channel is started, that is, proceed to S601.
[0138] In the S606, the noise filtering configuration has been improved.
[0139] According to the example embodiment, if the counter output data is much higher than the detection threshold, the noise filtering configuration is increased, and the detection threshold is automatically adjusted according to the noise level. Then, the current detection channel is reopened and the process proceeds to S601.
[0140] It should be clearly understood that this application describes how specific examples are formed and used, but this application is not limited to any details of these examples. Rather, based on the teachings of the disclosure of this application, these principles can be applied to many other embodiments.
[0141] Furthermore, it should be noted that the above figures are merely illustrative representations of the processes included in the method according to exemplary embodiments of this application, and are not intended to be limiting. It is readily understood that the processes shown in the above figures do not indicate or limit the temporal order of these processes. Additionally, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.
[0142] Exemplary embodiments of this application have been specifically shown and described above. It should be understood that this application is not limited to the detailed structures, arrangements, or implementation methods described herein; rather, this application is intended to cover various modifications and equivalent arrangements contained within the spirit and scope of the appended claims.< / m>
Claims
1. A touch capacitance detection circuit, characterized in that, The capacitance detection circuit includes: a touch detection channel, a channel selection module, a charging / discharging module, a reference module, a comparison module, a delay unit, a counter, and a control module, wherein: The touch detection channel is connected to the channel selection module; The channel selection module selects the channel to be detected; The charging and discharging module charges or discharges the selected channel to generate a detection signal. The comparison module takes the detection signal and the reference voltage of the reference module as input, and outputs a first signal; The delay unit takes the first signal as input and outputs the second signal. The counter outputs a count value based on the second signal; The control module outputs a control signal based on the second signal and the count value. The control module is configured as follows: If the second signal is at a predetermined level, the control signal is output to control the charging and discharging module to discharge the selected channel; the parallel switch of the charging and discharging module is connected and disconnected according to the count value; During the calibration process, the channel selection module is activated to detect the touch detection channel; the output data of the counter is received; according to a predetermined detection cycle, the comparison result between the output data of the counter and the corresponding calibration threshold is obtained; according to the comparison result, the charging resistor and / or discharging resistor are adjusted; the value of the counter plus the margin value is recorded as the detection threshold of the touch detection channel. During the detection process, the channel selection module is activated to detect the touch detection channel; the output data of the counter is received; according to the predetermined detection cycle, the comparison result between the output data of the counter and the corresponding detection threshold is obtained; if the output data of the counter differs greatly from the detection threshold, the noise filtering configuration is increased; according to the noise level, the detection threshold is adjusted, and the current touch detection channel is reactivated.
2. The detection circuit according to claim 1, characterized in that, The detection signal is a triangular wave signal.
3. The detection circuit according to claim 1, characterized in that, in: The charging and discharging module includes a charging module and a discharging module; The charging module includes at least one charging resistor connected in series and a switch connected in parallel; The discharge module includes at least one discharge resistor connected in series and a switch connected in parallel.
4. The detection circuit according to claim 1, characterized in that, The reference module includes a first resistor, a second resistor, and a selection switch, wherein: One end of the first resistor is connected to the chip's operating power supply, and the other end is connected to the second resistor, which is grounded. The first resistor is connected in parallel with the first and second contacts of the selector switch, and the third contact of the selector switch outputs a reference voltage.
5. The detection circuit according to claim 1, characterized in that, The delay unit includes a first capacitor, a first switch, a second switch, and an inverter, wherein: The first switch and the second switch are connected in series, with one end inputting the chip's operating power and the other end grounded; The series branch of the first switch and the second switch is connected in parallel with the inverter; One end of the first capacitor is grounded, and the other end is connected to the midpoint of the series branch of the first switch and the second switch.
6. A calibration method for a touch capacitance detection circuit as described in any one of claims 1-5, characterized in that, include: Enable the channel selection module to detect the touch detection channel; Receive the output data from the counter; According to the predetermined detection cycle, obtain the comparison results of the counter's output data and the corresponding calibration threshold; Based on the comparison results, adjust the charging resistor and / or discharging resistor; The value of the record counter plus the margin value is used as the detection threshold for this touch detection channel.
7. The calibration method according to claim 6, characterized in that, Adjusting the charging and / or discharging resistance includes: If the output data of the counter is lower than the minimum threshold, then the resistance value of the charging resistor and / or the discharging resistor is reduced. If the output data of the counter is higher than the highest threshold, then the resistance value of the charging resistor and / or the discharging resistor is increased.
8. The calibration method according to claim 7, characterized in that, Also includes: If the output data of the counter is higher than the minimum threshold and lower than the maximum threshold, then the range and filter configuration of the charging resistor and / or the discharging resistor are recorded.
9. A detection method for a touch capacitance detection circuit as described in any one of claims 1-5, characterized in that: Enable the channel selection module to detect the touch detection channel; Receive the output data from the counter; According to the predetermined detection cycle, obtain the comparison results of the counter output data and the corresponding detection threshold; Based on the comparison results, the current touch detection channel is reopened; or Based on the comparison results, the next touch detection channel is activated.
10. The detection method according to claim 9, characterized in that, The step of activating the next touch detection channel based on the comparison result includes: If the output data of the counter is lower than the detection threshold, it is determined that a button has been pressed, and the next touch detection channel is activated. If the output data of the counter is higher than the detection threshold, it is determined that there is no button pressed, and the next touch detection channel is activated.
11. The detection method according to claim 9, characterized in that, The step of reactivating the current touch detection channel based on the comparison result includes: If the output data of the counter differs significantly from the detection threshold, the noise filtering configuration should be increased. Adjust the detection threshold according to the noise level, and then reopen the current touch detection channel.
12. An electronic device, characterized in that, Includes the touch capacitive detection circuit as described in any one of claims 1-5.
Citation Information
Patent Citations
Capacitance detection circuit
CN103914190A
Capacitive touch key circuit
CN108777574A
Capacitive touch key detection system
CN113644905A
Capacitive touch circuit
US20110011717A1