A csr capacitance touch detection circuit and method
By employing a multi-level oscillation frequency hopping design and a novel ESD protection circuit, the anti-interference capability and sensitivity issues of the CSR capacitive touch detection circuit have been resolved, achieving improved high sensitivity and anti-interference capability, making it suitable for multi-channel touch detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HUNAN UNIV
- Filing Date
- 2026-01-19
- Publication Date
- 2026-04-17
AI Technical Summary
Traditional CSR capacitive touch detection circuits have weak anti-interference capabilities, low sensitivity, and their fixed oscillation frequency is easily affected by external interference.
A multi-frequency oscillation method is adopted, a single Schmitt trigger is used to replace the traditional comparator, and a new ESD protection circuit is designed. It is combined with a low dropout linear regulator to reduce parasitic capacitance, and frequency oscillation is achieved through a variable current source module.
It improves anti-interference capability and sensitivity, is suitable for multi-channel touch detection, reduces the sensitivity of oscillator frequency to power supply changes, and significantly reduces parasitic capacitance.
Smart Images

Figure CN121541799B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of capacitive touch detection technology, and particularly relates to a CSR (relaxation oscillation) capacitive touch detection circuit and method, which is a capacitive touch detection circuit and method with strong anti-interference ability and high sensitivity based on the CSR principle. Background Technology
[0002] Capacitive touch detection (CSR) technology is widely used due to its simplicity and low cost, but traditional CSR circuits suffer from weak anti-interference capabilities and low sensitivity. For example, in Chinese invention patent CN110347294A, entitled "A Capacitive Touch Detection Circuit and Method," a high-bandwidth linear regulator (LDO) is used to power the internal and external oscillators, resulting in very small frequency deviations and mitigating the pitting problem that occurs when the internal and external oscillators have similar oscillation frequencies. While this technology has a small circuit area, each touch detection pin requires two comparators and ESD protection circuitry, leading to large parasitic capacitance, low sensitivity, and increased area with multiple channels. Furthermore, the fixed oscillation frequency is susceptible to external interference. Therefore, a CSR capacitive touch detection solution that can simultaneously improve both anti-interference capabilities and sensitivity is urgently needed. Summary of the Invention
[0003] This invention provides a CSR capacitive touch detection circuit that uses a multi-level oscillation frequency hopping method for capacitance detection, avoiding fixed interference at a certain frequency point and thus improving anti-interference capability; it uses a single Schmitt trigger instead of a traditional comparator and employs a new ESD protection circuit to reduce the parasitic capacitance of the touch foot and improve sensitivity.
[0004] To achieve the above objectives, the technical solution of the present invention is: a CSR capacitive touch detection circuit, comprising:
[0005] The variable current source module is used to charge and discharge the touch capacitor to generate an oscillation waveform. The variable current source has a multi-level configuration and can output different currents to generate multiple oscillation frequencies, thereby achieving frequency hopping anti-interference.
[0006] A Schmitt trigger module, replacing a traditional comparator, is used to shape the oscillating waveform, and its input is connected to the touch capacitor;
[0007] The ESD protection circuit module is connected to the touch detection pin and uses a common diode and MOSFET structure to reduce the parasitic capacitance of the touch detection pin.
[0008] A counter module is used to count the number of cycles of an oscillating waveform within a fixed time period to detect touch events;
[0009] The variable current source module and the Schmitt trigger module are powered by a low-dropout linear regulator to reduce the impact of power supply voltage changes on the oscillation frequency.
[0010] Furthermore, the variable current source module includes a P-type variable current source and an N-type variable current source, which consists of a current source reference and a mirror transistor. The output current is controlled by a proportional coefficient (denoted as k), which has multiple selectable values and corresponds to multiple oscillation frequencies.
[0011] Furthermore, the temperature coefficient of the variable current source is matched with the temperature coefficient of the threshold voltage of the Schmitt trigger, so that the temperature coefficient of the oscillation frequency is close to zero.
[0012] Furthermore, the Schmitt trigger consists of the first to third NMOS transistors, the first to third PMOS transistors (P1-P3 transistors, N1-N3 transistors) and an inverter, and has two threshold voltages. Its input capacitance is smaller than that of a conventional comparator.
[0013] Furthermore, the ESD protection circuit module includes a first resistor, a second resistor, and a third resistor (R). E1 R P1 R N1 ), first diode, second diode (D) EP1 D EN1 ), PMOS transistor (P E1 ) and NMOS transistor (N E1 The gates of the PMOS and NMOS transistors are connected to the output signal terminals, serving as output driver transistors.
[0014] Furthermore, the circuit also includes a touch channel selection switch module for selecting one of multiple touch channels; the touch channel selection switch module consists of CMOS switches for switching multiple external touch capacitors.
[0015] Furthermore, the counter module generates a fixed counting time based on the system clock and counts the number of oscillation cycles within that time. Touch events are detected by the decrease in the count value.
[0016] Furthermore, the oscillation frequency f is expressed by the following formula:
[0017] ,
[0018] Among them, V H V L Here, k represents the high and low threshold voltages of the Schmitt trigger, k is the current source proportionality coefficient, I0 is the current value of the reference current source, and C is the reference current source. X This is the capacitance value of the touch capacitor.
[0019] The present invention also provides a CSR capacitive touch detection method, based on the above-mentioned CSR capacitive touch detection circuit, including the following steps: S1, the system is powered on, and a touch channel to be detected is selected through the touch channel selection switch module;
[0020] S2, control the variable current source module to dynamically select a current level according to a preset sequence or according to environmental interference, and charge and discharge the touch capacitor of the selected touch channel with the corresponding current to generate an oscillation waveform with a specific frequency.
[0021] S3: Signal shaping and counting. After the oscillation waveform is shaped by the Schmitt trigger module, the counter module performs periodic counting within a fixed time window to obtain an original count value.
[0022] S4: Touch detection, comparing the original count value with a reference count value; wherein, the reference count value is a reference value obtained when there is no touch or through learning from historical data;
[0023] If the decrease in the original count value compared to the reference count value exceeds a threshold, then a touch event is determined to have occurred in the current touch channel.
[0024] S5: Switch to the next touch channel and repeat steps S2 to S4 to achieve cyclic detection of multiple touch channels.
[0025] The present invention also provides a touch button, including the CSR capacitive touch detection circuit described above.
[0026] The beneficial effects of this invention are:
[0027] A variable current source is used to charge and discharge the touch capacitor. Frequency hopping oscillation is achieved through multi-level current output, which generates an oscillation waveform. The current of the variable current source is determined by multiple levels, so multiple oscillation frequencies can be generated, i.e. frequency hopping oscillation, avoiding fixed frequency interference and thus improving anti-interference capability.
[0028] By replacing the traditional comparator with a single Schmitt trigger, the input capacitance is reduced, and a new ESD protection circuit is designed. This reduces parasitic capacitance and improves sensitivity while reducing chip area and power consumption.
[0029] The core of the circuit is powered by an LDO, which reduces the impact of oscillator frequency variations on chip power supply.
[0030] The temperature coefficient of the variable current source is compensated for with the threshold temperature coefficient of the Schmitt trigger to achieve a zero temperature coefficient oscillation frequency.
[0031] This invention significantly improves anti-interference capability and sensitivity, and is suitable for multi-channel touch detection scenarios. Attached Figure Description
[0032] Figure 1 : This is a circuit structure block diagram of the present invention;
[0033] Figure 2 : This is a specific circuit diagram of the present invention. Detailed Implementation
[0034] 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 a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0035] Furthermore, the technical solutions of the various embodiments of the present invention can be combined with each other, but only if they are feasible for those skilled in the art. If the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such combination of technical solutions does not exist and is not within the scope of protection claimed by the present invention.
[0036] like Figure 1 and Figure 2 As shown, the embodiment of the present invention includes a Schmitt trigger, inverter 1, inverter 2, inverter 3, a touch counter, a variable current source, and an external touch capacitor C. X1 -C Xn and touch channel selection switches S1-Sn.
[0037] The variable current source consists of P-type current sources (P4, P5) and N-type current sources (N4, N5, N7) and switches KP (P6) and KN (N6). The output current of the reference current source is controlled by a proportional coefficient k to achieve multi-level frequency switching.
[0038] The Schmitt trigger consists of N1-N3, P1-P3 and inverter 4, and its threshold voltage is determined by the width-to-length ratio of the MOS transistor.
[0039] ESD protection circuit includes resistor R E1 R P1 R N1 diode D EP1 D EN1 PMOS transistor P E1 and NMOS transistor N E1 Among them, P E1 and N E1 Its gate is connected to the output signal terminal and also serves as a driver transistor.
[0040] The touch channel selection switches S1-Sn are CMOS switches, and their common terminal is connected to the Schmitt trigger input.
[0041] A Schmitt trigger, inverter 1, inverter 2, a P-type variable current source, an N-type variable current source, and switches KP and KN constitute a 5-stage ring oscillator. A constant current source charges and discharges the touch capacitor, generating an oscillating waveform.
[0042] In this embodiment of the variable current source, the upper end of the reference current source is connected to VLDO, and the lower end is connected to the drain and gate of NMOS transistors N7, N5 and PMOS transistor P5, and is also connected to the gate of NMOS transistor N4 and PMOS transistor P4. The drain of N4 is connected to the source of NMOS transistor N6, and the drain of P4 is connected to the source of PMOS transistor P6. The drains of N6 and P6 are connected together and connected to the input of Schmitt trigger and the common terminal of touch channel selection switches S1, S2...Sn. The input of the Schmitt trigger is connected to the gates of NMOS transistors N1 and N3 and the gates of PMOS transistors P1 and P3. The source of N1 is grounded, and the drain of N1 is connected to the source of N3 and the drain of N2. The source of N2 is grounded. The source of P1 is connected to VLDO, and the drain of P1 is connected to the source of P3 and the drain of P2. The source of P2 is connected to VLDO. The drain of N3 and the drain of P3 are connected and connected to the input of inverter 4. The output of inverter 4 is connected to the input of inverter 1 and the gates of N2 and N3. The output of inverter 1 is connected to the input of inverter 2. The output of inverter 2 is connected to the gates of N6 and P6 and the input of inverter 3. The output of inverter 3 is connected to one input of the touch counter, and the other input of the touch counter is connected to the system clock. The other end of switch S1 is connected to resistor R in ESD protection circuit 1. N1 and R P1 And with diode D EN1 The negative terminal of diode D EP1 positive terminal and resistor R E1 One end is connected, R N1 The other end is connected to the NMOS transistor N. E1 The drain terminal, N E1 Both the gate and source terminals are grounded, R P1 The other end is connected to the PMOS transistor P. E1 The drain end, P E1 Both the gate and source terminals are connected to the power supply VDD, D EN1 The positive terminal is grounded, D EP1 The negative terminal is connected to VDD, R E1 The other end is connected to the touch capacitor C. X1 One end, C X1 The other end is grounded. Similarly, the connection for other touch channels is similar to that for touch channel 1.
[0043] In this embodiment, switching transistors KP and KN correspond to transistors P6 and N6, respectively. The P-type and N-type variable current sources correspond to transistors P4 and P5, N4 and N5, and N7, respectively. The variable current source consists of a P-type variable current source, an N-type variable current source, and switches KP and KN. The ESD protection circuit 1 includes resistor R. E1 Resistor R P1 Resistor R N1 diode D EP1 diode D EN1 PMOS transistor P E1 NMOS transistor N E1 Diode D EP1 and diode D EN1 They are all ordinary diodes, PMOS transistors P E1 and NMOS transistor N E1 These are all ordinary MOSFETs, so the parasitic capacitance introduced by the ESD protection circuit of the PAD is very small. In other embodiments, the PMOS transistor P... E1 and NMOS transistor N E1 Its gate can be connected to the output signal terminal, serving as an output driver transistor, and can provide a driving capability of hundreds of mA of current.
[0044] The Schmitt trigger in this embodiment has two threshold voltages, high and low, respectively:
[0045] ,
[0046] ,
[0047] in, , , It is the mobility of P-type carriers. It is the mobility of N-type carriers. It is the equivalent width-to-length ratio of transistors P1 and P2 connected in parallel and then connected in series with transistor P3. It is the equivalent width-to-length ratio of P1 and P3 transistors connected in series. It is the equivalent width-to-length ratio of N1 and N3 connected in series. It is the equivalent width-to-length ratio of transistors N1 and N2 connected in parallel and then in series with transistor N3. The variable current source consists of a current source reference and a mirror transistor, and the output current is... Where k is the current source proportionality coefficient, which determines the magnitude of the charging and discharging current, and thus controls the oscillation frequency. In this embodiment, the oscillator frequency is:
[0048]
[0049] The temperature coefficient of the oscillator is positive, typically around +0.3% / ℃ at 95nm process technology. Therefore, a variable current source with a temperature coefficient of approximately +0.3% / ℃ should be selected, bringing the temperature coefficient of the oscillator's output frequency close to zero. Traditional threshold reference current sources using ppolysab resistors can easily achieve an output current with a temperature coefficient of +0.3% / ℃, and other current sources with similar temperature coefficients can also be used.
[0050] In this embodiment, except for the ESD protection circuit and the touch channel selection switches S1, S2…Sn, whose power supply is the chip's power supply voltage, the power supply of other modules is the output voltage VLDO of a low-dropout linear regulator (LDO). This ensures that the oscillator frequency hardly changes with the chip's power supply voltage. The counter module generates a fixed time using the input system clock, and within this fixed time, it counts the number of touch oscillator cycles, which is the touch count value. If the fixed counting time is t, then the count value N is:
[0051]
[0052] When a finger touches the touchpad, the touch capacitor C X If the value increases, the oscillator frequency f decreases, and the count value will decrease. The program detects that the count value has decreased beyond a certain value to determine that the finger has touched the touchpad, thus detecting the touch.
[0053] Table 1 below shows the relationship between the coefficient k and the oscillator frequency f under a typical design condition. The frequency hopping design has 8 levels. Depending on the application requirements, the value of k can be selected in multiple ways. The number of coefficients k represents the number of frequency hopping levels.
[0054] Table 1
[0055]
[0056] The sensitivity of capacitive touch detection is ,in The change in touch capacitance is typically fixed for a specific touchpad and touch pressure. To increase sensitivity, the touch capacitance needs to be reduced. Size, The touch detection circuit mainly consists of the touch pad capacitance and the parasitic capacitance of the touch detection pins. Typically, the parasitic capacitance of the touch detection pins inside the chip mainly comprises the Cgd of the ESD device of the PAD, the Cgd capacitance of the touch selection switch transistor, the Cgd of the switching transistors KP and KN, and the input capacitance Cgs of the Schmitt trigger (or a traditional comparator). The Cgd capacitance of the ESD device and the input capacitance Cgs of the Schmitt trigger are relatively large. Replacing the traditional comparator with a Schmitt trigger can reduce the latter's input capacitance. To reduce the parasitic circuitry introduced by the ESD device, the ESD protection circuit proposed in this embodiment uses only ordinary components, resulting in very small parasitic capacitance. Traditional ESD protection circuits typically consist of GGNMOS transistors, using SAB-type MOS transistors, which have particularly large Cgd values. Under the same HBM 6KV conditions at 95nm process, the ESD protection circuit proposed in this embodiment introduces more than half the parasitic capacitance of traditional GGNMOS transistors. Therefore, the sensitivity of the capacitive touch detection circuit of this invention is much higher than that of traditional circuits.
[0057] This invention utilizes an LDO power supply and temperature compensation design to achieve stable oscillation frequency and strong anti-interference capability. The novel ESD protection circuit, manufactured using a 95nm process, exhibits parasitic capacitance reduced by more than half compared to traditional GGNMOS, resulting in significantly improved sensitivity.
[0058] This invention also provides a touch detection method based on the above circuit, including S1: initialization and channel selection: the system is powered on, and a touch channel to be detected is selected through the touch channel selection switch module;
[0059] S2: Frequency hopping excitation: Control the variable current source module to dynamically select a current level according to a preset sequence or according to environmental interference, and charge and discharge the touch capacitor of the selected touch channel with the corresponding current to generate an oscillation waveform with a specific frequency.
[0060] S3: Signal Shaping and Counting: After the oscillation waveform is shaped by the Schmitt trigger module, the counter module performs periodic counting within a fixed time window to obtain an original count value;
[0061] S4: Touch detection: Compare the original count value with a reference count value; wherein the reference count value is a reference value obtained when there is no touch or through learning from historical data;
[0062] If the decrease in the original count value compared to the reference count value exceeds a threshold, then a touch event is determined to have occurred in the current touch channel.
[0063] S5: Polling Scan: Switch to the next touch channel and repeat steps S2 to S4 to achieve cyclic detection of multiple touch channels. The core of this method lies in using the multi-level characteristics of a variable current source for frequency hopping scanning, thereby avoiding fixed-frequency interference. In specific execution, the microcontroller can periodically change the proportional coefficient k of the current source according to a preset sequence, and perform counting and touch judgment at each frequency point. This dynamic frequency hopping mechanism, combined with the inherent high sensitivity of the circuit of this invention, enables the entire touch detection system to maintain high reliability and response speed even in complex electromagnetic environments.
[0064] An embodiment of a touch button is also obtained through the above circuit structure.
[0065] In this embodiment of the invention, frequency hopping avoids fixed interference at a specific frequency point, thereby improving anti-interference capability. The ring oscillator operates under an LDO power supply, so the oscillator frequency is minimally affected by changes in the chip's power supply. The temperature coefficient of the current difference between the variable current source and the two threshold values of the Schmitt trigger is compensated, resulting in an oscillation frequency with zero temperature coefficient. Using a single Schmitt trigger instead of a traditional comparator, and employing a new ESD protection circuit, reduces chip area and power consumption while simultaneously decreasing the parasitic capacitance of the touch pin, thus improving sensitivity.
[0066] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A CSR capacitive touch detection circuit, characterized by, include: The variable current source module includes a P-type variable current source and an N-type variable current source, which are composed of a reference current source and a mirror transistor. The current output is controlled by a PMOS switch and an NMOS switch, respectively. The P-type variable current source, the PMOS switch, the NMOS switch, and the N-type variable current source are connected in series. The upper end of the P-type variable current source is connected to a VLDO, and the lower end of the N-type variable current source is grounded. The variable current source is used to charge and discharge the touch capacitor to generate an oscillation waveform. The variable current source has a multi-level configuration and can output different currents to generate multiple oscillation frequencies to achieve frequency hopping anti-interference. A Schmitt trigger module is used to shape the oscillation waveform. The Schmitt trigger consists of NMOS transistors N1-N3, PMOS transistors P1-P3, and a fourth inverter. The input of the Schmitt trigger is connected to the gates of NMOS transistors N1 and N3 and the gates of PMOS transistors P1 and P3. The source of N1 is grounded, and the drain of N1 is connected to the source of N3 and the drain of N2. The source of N2 is grounded. The source of P1 is connected to VLDO, and the drain of P1 is connected to the source of P3 and the drain of P2. The source of P2 is connected to VLDO. The drains of N3 and P3 are connected together and connected to the input of the fourth inverter. The output of the fourth inverter is connected to the gates of N2 and P2. The variable current source, the Schmitt trigger, and the two inverters are connected in series to form a ring oscillator. The ESD protection circuit module is connected to the touch detection pin. It adopts a common diode and MOSFET structure to reduce the parasitic capacitance of the touch detection pin. Each touch detection pin is connected to an ESD protection circuit. The touch detection pin is connected to the output of the variable current source and the input of the Schmitt trigger through a touch channel selection switch, thereby connecting to the ring oscillator. A counter module is used to count the number of cycles of an oscillating waveform within a fixed time period to detect touch events; The variable current source module and the Schmitt trigger module are powered by a low-dropout linear regulator to reduce the impact of power supply voltage changes on the oscillation frequency.
2. The CSR capacitance touch detection circuit according to claim 1, wherein, The output current of the variable current source module is controlled by a proportional coefficient, which has multiple selectable values, each corresponding to a set of oscillation frequencies.
3. The CSR capacitance touch detection circuit according to claim 2, wherein, The temperature coefficient of the current source is matched with the temperature coefficient of the threshold voltage of the Schmitt trigger.
4. The CSR capacitance touch detection circuit according to claim 3, wherein, The ESD protection circuit module includes a first resistor, a second resistor, a third resistor, a first diode, a second diode, a PMOS transistor, and an NMOS transistor; wherein the gates of the PMOS transistor and the NMOS transistor are both configured to be connected to an output signal terminal, so that the PMOS transistor and the NMOS transistor have the function of output driving.
5. The CSR capacitance touch detection circuit according to claim 4, wherein, The counter module generates a fixed counting time based on the system clock and counts the number of oscillation cycles within that time. Touch events are determined by the decrease in the count value.
6. The CSR capacitance touch detection circuit according to claim 5, wherein, The oscillation frequency f is expressed by the following formula: , Among them, V H V L Here, I represents the high and low threshold voltages of the Schmitt trigger, k is the current source proportionality coefficient (k has 8 selectable levels), I0 is the reference current source current value, and C... X This is the capacitance value of the touch capacitor.
7. The CSR capacitance touch detection circuit according to claim 6, wherein, The touch channel selection switch is used to select one of multiple touch channels to be connected to the detection circuit. The touch channel selection switch is composed of CMOS switches.
8. A method of CSR capacitive touch detection based on the CSR capacitive touch detection circuit of claim 7, characterized by, The steps include: S1: Initialization and channel selection: Power on the system and select a touch channel to be detected using the touch channel selection switch; S2: Frequency hopping excitation: Control the variable current source module to dynamically select a current level according to a preset sequence or according to environmental interference, and charge and discharge the touch capacitor of the selected touch channel with the corresponding current to generate an oscillation waveform with a specific frequency. S3: Signal Shaping and Counting: After the oscillation waveform is shaped by the Schmitt trigger module, the counter module counts it periodically within a fixed time window to obtain an original count value; S4: Touch detection: Compare the original count value with a reference count value; wherein the reference count value is a reference value obtained when there is no touch or through learning from historical data; If the decrease in the original count value compared to the reference count value exceeds a threshold, then a touch event is determined to have occurred in the current touch channel. S5: Polling Scan: Switch to the next touch channel and repeat steps S2 to S4 to achieve cyclic detection of multiple touch channels.
9. A touch key, characterized by Includes the CSR capacitive touch detection circuit as described in any one of claims 1-7.
Citation Information
Patent Citations
A capacitive touch detection circuit and method
CN110347294A
A capacitive touch key detection circuit and method
CN109245754A
Capacitance sensor using relaxation oscillators
US7307485B1