Multi-point touch detection circuit and control method
By designing a multi-touch detection circuit and using channel switches and capacitors to calculate the capacitance change, the problem of low detection efficiency of multi-channel capacitance touch screen in the prior art is solved, and efficient identification of channel positions and gestures are achieved, and static damage is prevented.
Patent Information
- Application Number
- CN202411619704.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-13
- Publication Date
- 2025-03-07
AI Technical Summary
The detection efficiency of existing multi-channel capacitive touch screens is not high, making it difficult to effectively identify operation gestures.
A multi-touch detection circuit is designed, including N channels, each channel consisting of channel switches and channel capacitors. The change of channel capacitance is calculated through an analog-to-digital converter and a microcontroller, and the electrostatic protection part is used to prevent static damage.
By storing the charge magnitude of the capacitor, the capacitor changes can be resolved, and the channel position and gestures can be efficiently identified, the detection efficiency is improved, and the electrostatic protection part is effectively prevented.
Smart Images

Figure CN119576160A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electronic circuits, and in particular to a multi-touch detection circuit and a control method. Background Art
[0002] Capacitive touch screens are popular for their high ease of operation. Touch screens are usually made of two layers of transparent conductive material, one on the surface of the touch screen and the other underneath. A capacitor is formed between the two layers, which is used to detect touch. When there is no external interference, a uniform electric field is established between the two layers of conductive material. Current flows between them, forming a capacitor. When the user touches the screen surface with a finger or stylus, their charge is introduced into the capacitor, causing the mutual capacitance to change. The touch condition can be determined by the change in mutual capacitance. Multi-channel capacitive touch screens detect changes in screen capacitance and then identify operating gestures. However, the multi-channel capacitive touch screens in the prior art have the problem of low detection efficiency. Summary of the invention
[0003] In view of the above problems, the present invention aims to provide a multi-touch detection circuit. The present invention also aims to provide a control method of the multi-touch detection circuit.
[0004] A multi-touch detection circuit, comprising:
[0005] N channels, each of the channels comprising a channel switch and a channel capacitor connected in series between a power supply voltage terminal and a ground terminal, a first end of the channel capacitor being connected to the channel switch, and a second end of the channel capacitor being connected to the ground terminal;
[0006] An analog-to-digital converter, performing analog-to-digital conversion on the output of the channel to convert it into a digital signal;
[0007] The microcontroller is connected to the analog-to-digital converter and calculates the change in channel capacitance of the channel to be measured according to the output of the analog-to-digital converter.
[0008] The multi-touch detection circuit of the present invention further includes an electrostatic protection unit, which is connected between each of the channels and the selection switch and includes:
[0009] A first-level protection unit, the first-level protection unit includes a first PMOS tube and a first NMOS tube, which are connected in series between the power supply voltage terminal and the ground terminal, the gate and source of the first PMOS tube are connected to the power supply voltage terminal, the drain of the first PMOS tube is connected to the first end of the channel capacitor, the drain of the first NMOS tube is connected to the drain of the first PMOS tube, and the source of the first NMOS tube is connected to the ground terminal.
[0010] The multi-touch detection circuit of the present invention, the electrostatic protection unit further includes:
[0011] The secondary protection unit includes a second PMOS tube and a second NMOS tube, which are connected in series between the power supply voltage terminal and the ground terminal, the gate and source of the second PMOS tube are connected to the power supply voltage terminal, the source of the second NMOS tube is connected to the ground terminal, and the drain of the second NMOS tube and the drain of the second PMOS tube are connected to the output terminal of the electrostatic protection unit.
[0012] The multi-touch detection circuit of the present invention, the electrostatic protection unit comprises:
[0013] A protection resistor, wherein a first end of the protection resistor is connected to a point where the first PMOS tube and the first NMOS tube are connected, and a second end of the protection resistor is connected to a point where the second PMOS tube and the second NMOS tube are connected.
[0014] In the multi-touch detection circuit of the present invention, the selection switch is connected between the output end of the electrostatic protection unit of each channel and the input end of the analog-to-digital converter.
[0015] The multi-touch detection circuit of the present invention, the analog-to-digital converter comprises:
[0016] Sampling department, including
[0017] A first sampling switch connected between the output end of the selection switch and the output end of the sampling unit;
[0018] A second sampling switch and a third sampling switch are connected between the output end of the selection switch and the output end of the sampling unit;
[0019] A sampling capacitor, wherein a first end of the sampling capacitor is connected to the output end of the sampling unit, and a second end of the sampling capacitor is connected to a point where the second sampling switch and the third sampling switch are connected.
[0020] In the multi-touch detection circuit of the present invention, the analog-to-digital converter includes a quantization unit, an input end of the quantization unit is connected to the sampling unit, and an output end of the quantization unit is connected to the microcontroller.
[0021] A control method for a multi-touch detection circuit, used for the above multi-touch detection circuit, comprises the following steps:
[0022] Step S1, closing a channel switch of at least one channel to charge the channel capacitor of the channel to be tested until the channel capacitor is fully charged;
[0023] Step S2, sampling the charge of the channel capacitor to obtain a sampled voltage, and quantizing the sampled voltage to obtain a digital signal;
[0024] Step S3, repeating step S1 and step S2 to obtain a changed sampling voltage, and calculating the capacitance change of the channel capacitance according to the changed sampling voltage.
[0025] In the control method of the multi-touch detection circuit of the present invention, in step S2, the selection switch corresponding to the channel to be tested is closed, and the charge of the channel capacitance of the channel to be tested is redistributed within a sampling time to obtain a sampling voltage, and the sampling voltage has the following relationship: Vin is the sampling voltage, C 通道 is the channel capacitance of the channel to be measured, and Csample is the sampling capacitance;
[0026] The changed sampling voltage in step S3 and the capacitance change have the following relationship: Where V in1 is the changing sampling voltage, ΔC 通道 is the capacitance change.
[0027] The control method of the multi-touch detection circuit of the present invention further includes step S4 after step S3, wherein the microcontroller distinguishes the channel position and the gesture according to the capacitance change.
[0028] Beneficial effect: The channel switch of at least one channel of the present invention is turned on, and the power supply voltage end charges the channel capacitor to be tested which is connected to the turned-on channel switch. The charging method can be simultaneous charging or time-sharing charging. The change of the capacitance is distinguished by the size of the charge stored in the capacitor. No additional circuit is required, and the implementation is simple and easy. The analog-to-digital converter converts the output of the channel into a digital signal, and the microcontroller analyzes and processes the digital signal to analyze the channel position and gesture. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 is a principle block diagram of a multi-touch detection circuit of the present invention;
[0030] Figure 2 is a circuit schematic diagram of a specific embodiment of the present invention;
[0031] Figure 3 It is a detection timing diagram of a specific embodiment of the present invention. DETAILED DESCRIPTION
[0032] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0033] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.
[0034] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments, but they are not intended to limit the present invention.
[0035] Reference Figure 1 , 2 , a multi-touch detection circuit, comprising:
[0036] N channels 1, including the 1st channel, the 2nd channel, the N-1th channel, and the Nth channel. Each channel 1 includes a channel switch and a channel capacitor connected in series between a power supply voltage terminal and a ground terminal. The first end of the channel capacitor is connected to the channel switch, and the second end of the channel capacitor is connected to the ground terminal. For example, the 1st channel includes the first channel switch S 通道1 and the first channel capacitor C 通道1 , Channel 2 includes a second channel switch S 通道2 and the second channel capacitor C 通道2 ;
[0037] Analog-to-digital converter 4, converting the output of the channel into a digital signal;
[0038] The microcontroller (MCU) 5 is connected to the analog-to-digital converter 4 and calculates the change in the channel capacitance of the channel to be measured according to the output of the analog-to-digital converter.
[0039] At least one channel switch of the present invention is turned on, and the power supply voltage end charges the channel capacitor to be tested connected to the turned-on channel switch. The charging method can be simultaneous charging or time-sharing charging. The change of the capacitor is distinguished by the size of the charge stored in the capacitor. The channel capacitor stores the charge with the following relationship: Q 通道 =VDD*C 通道 , VDD is the power supply voltage provided by the power supply voltage terminal, no additional circuit is required, and it is simple and easy to implement. The analog-to-digital converter converts the output of the channel into a digital signal, and the microcontroller 5 analyzes and processes the digital signal to analyze the channel position and gesture, and detects the change of the screen capacitance by scanning the screen to recognize the operation gesture.
[0040] The multi-touch detection circuit of the present invention further includes an electrostatic protection unit 2, which is connected between each channel 1 and the selection switch 3 and includes:
[0041] The first-level protection part includes a first PMOS tube PM11 / PM21 and a first NMOS tube NM11 / NM21, which are connected in series between the power supply voltage terminal and the ground terminal. The gate and source of the first PMOS tube PM11 / NM21 are connected to the power supply voltage terminal, and the drain of the first PMOS tube PM11 / PM21 is connected to the channel capacitor C 通道1 / C 通道2 The drain of the first NMOS tube NM11 / NM21 is connected to the drain of the first PMOS tube PM11 / NM21, and the source of the first NMOS tube NM11 / NM21 is connected to the ground end;
[0042] The secondary protection unit includes a second PMOS tube PM12 / PM22 and a second NMOS tube NM12 / NM22, which are connected in series between the power supply voltage terminal and the ground terminal. The gate and source of the second PMOS tube PM12 / PM22 are connected to the power supply voltage terminal, the source of the second NMOS tube NM12 / NM22 is connected to the ground terminal, and the drain of the second NMOS tube NM12 / NM22 and the drain of the second PMOS tube PM12 / PM22 are connected to the output terminal of the electrostatic protection unit 2.
[0043] The present invention adds an electrostatic protection unit to the GPIO port of the microcontroller, which effectively solves the electrostatic damage generated when a person touches the channel. The first-level protection unit discharges the static electricity to the ground terminal through the first PMOS tube and the second NMOS tube to the greatest extent, and then releases the static electricity through the ground terminal. The second-level protection unit can prevent strong instantaneous impact from still damaging the internal core circuit.
[0044] The multi-touch detection circuit of the present invention, the electrostatic protection unit 2 includes:
[0045] The protection resistor R1 / R2 has a first end connected to a point where the first PMOS transistor PM11 / PM21 is connected to the first NMOS transistor NM11 / NM21, and a second end connected to a point where the second PMOS transistor PM12 / PM22 is connected to the second NMOS transistor NM12 / NM22.
[0046] The protective resistor can effectively block the discharge of charge and prevent the internal circuit from being burned out.
[0047] In the multi-touch detection circuit of the present invention, the selection switch 3 includes a selection switch S1 / S2 for each channel, which is connected between the output end of the electrostatic protection unit 2 of each channel and the input end of the analog-to-digital converter 4 .
[0048] The channel selection of the present invention identifies the specific position of the capacitance of the channel to be measured by scanning, and only one channel can be selected at a time, and multiple channels cannot be selected at the same time.
[0049] The multi-touch detection circuit of the present invention, the analog-to-digital converter 4 includes:
[0050] The sampling unit 41 includes
[0051] The first sampling switch S 采样 , connected between the output end of the selection switch 3 and the output end of the sampling unit 41;
[0052] The second sampling switch S' 采样 , a third sampling switch connected between the output end of the selection switch 3 and the output end of the sampling unit 41;
[0053] Sampling capacitor C 采样 , sampling capacitor C 采样 The first end of the sampling capacitor C is connected to the output end of the sampling unit 41. 采样 The second end of the second sampling switch S' 采样 and the third sampling switch
[0054] Connected points.
[0055] The analog-to-digital converter 4 further includes a quantization unit 42 , an input end of the quantization unit 42 is connected to the sampling unit 41 , and an output end of the quantization unit 42 is connected to the microcontroller 5 .
[0056] The sampling unit 41 of the present invention redistributes the capacitance of the currently selected channel through timing control and then converts it into voltage. The output of the sampling unit 41 is the sampling voltage, which is used as the input voltage of the quantization unit 42. When the quantization unit 42 quantizes, the first sampling switch S 采样 and the second sampling switch S' 采样 After disconnecting, the quantization section 42 is then quantized to the input voltage: Quantify and convert into digital signal for easy processing by microcontroller 5, V 参考 It is the reference voltage during sampling.
[0057] When the channel capacitance C 通道 As it increases, the stored charge changes ΔC 通道 , internal channel sampling capacitor C 采样 The distributed charge will also change, and thus the output of the quantization unit of the analog-to-digital converter will also change. The microcontroller 5 analyzes this change through an algorithm to distinguish the channel gesture change.
[0058] The control method of the multi-touch detection circuit of the present invention comprises the following steps:
[0059] Step S1, closing a channel switch of at least one channel to charge the channel capacitor of the channel to be tested until the channel capacitor is fully charged;
[0060] Step S2, sampling the charge of the channel capacitor to obtain a sampled voltage, and quantizing the sampled voltage to obtain a digital signal;
[0061] Step S3, repeating step S1 and step S2 to obtain a changed sampling voltage, and calculating a capacitance change of the channel capacitance according to the changed sampling voltage.
[0062] Combination Figure 3 The timing diagram of the detection circuit comprising two channels is taken as an example. In step S1, the channel switch S of at least one channel to be tested is 通道1 and / or S 通道2 Closed, the power supply voltage VDD affects the channel capacitance C 通道1 and C 通道2 Time-sharing charging or simultaneous charging, Figure 3 The timing diagram is time-sharing charging. 通道 The channel capacitor can be fully charged within a certain time, and the channel to be detected can be charged at the same time, which can reduce the detection charging time and improve efficiency.
[0063] In step S2, the selection switch corresponding to the channel to be measured is closed, and the charge of the channel capacitor of the channel to be measured is redistributed within a sampling time to obtain a sampled voltage, and the sampled voltage has the following relationship: Vin is the sampling voltage, C 通道 is the channel capacitance of the channel to be measured, C 采样 is the sampling capacitor; sampling time T 采样 must be sufficient to complete the channel capacitance C 通道 and sampling capacitor C 采样 The redistribution of charge realizes the conversion of charge into sampling voltage.
[0064] Channel switch S 通道1 and the first sampling switch S 采样 As well as ADC quantization and the third sampling switch There will be a non-overlap time ΔT between 非交叠 , is to avoid charge leakage and inaccurate detection. 1 YesS 通道1 The opposite, S 2 YesS 通道2 the opposite of;
[0065] Disconnect the first sampling switch S 采样 and the second sampling switch S' 采样 , quantize the output of the sampling unit 41, and the quantization time is T 量化 , convert the analog signal into a digital signal, complete the quantization and give the quantized value to the microcontroller 5, and then reset the third sampling switch Reset time T 复位 It is related to the next sampling time.
[0066] The relationship between the sampled voltage and the capacitance change in step S3 is as follows: Where V in1 is the changing sampling voltage, ΔC 通道 is the capacitance change.
[0067] The control method of the multi-touch detection circuit of the present invention further includes step S4 after step S3, wherein the microcontroller distinguishes the channel position and gesture according to the capacitance change. The microcontroller distinguishes the channel position and gesture by performing a comparison operation based on the values before and after the change of the channel capacitance.
[0068] Through the description and drawings, typical embodiments of the specific structures of the specific implementation methods are given, and other transformations can be made based on the spirit of the present invention. Although the above invention proposes the existing preferred embodiments, these contents are not intended to be limiting.
[0069] For those skilled in the art, various changes and modifications will undoubtedly be obvious after reading the above description. Therefore, the attached claims should be regarded as covering all changes and modifications of the true intent and scope of the present invention. Any and all equivalent ranges and contents within the scope of the claims should be considered to still be within the intent and scope of the present invention.
Claims
1. A multi-touch detection circuit, characterized in that: include: N channels, each of the channels comprising a channel switch and a channel capacitor connected in series between a power supply voltage terminal and a ground terminal, a first end of the channel capacitor being connected to the channel switch, and a second end of the channel capacitor being connected to the ground terminal; An analog-to-digital converter, performing analog-to-digital conversion on the output of the channel to convert it into a digital signal; The microcontroller is connected to the analog-to-digital converter and calculates the change in channel capacitance of the channel to be measured according to the output of the analog-to-digital converter.
2. The multi-touch detection circuit according to claim 1, characterized in that: It also includes an electrostatic protection unit, which is connected between each of the channels and the selection switch, and includes: A first-level protection unit, the first-level protection unit includes a first PMOS tube and a first NMOS tube, which are connected in series between the power supply voltage terminal and the ground terminal, the gate and source of the first PMOS tube are connected to the power supply voltage terminal, the drain of the first PMOS tube is connected to the first end of the channel capacitor, the drain of the first NMOS tube is connected to the drain of the first PMOS tube, and the source of the first NMOS tube is connected to the ground terminal.
3. The multi-touch detection circuit according to claim 2, characterized in that: The electrostatic protection unit further includes: The secondary protection unit includes a second PMOS tube and a second NMOS tube, which are connected in series between the power supply voltage terminal and the ground terminal, the gate and source of the second PMOS tube are connected to the power supply voltage terminal, the source of the second NMOS tube is connected to the ground terminal, and the drain of the second NMOS tube and the drain of the second PMOS tube are connected to the output terminal of the electrostatic protection unit.
4. The multi-touch detection circuit according to claim 3, characterized in that: The electrostatic protection unit includes: A protection resistor, wherein a first end of the protection resistor is connected to a point where the first PMOS tube and the first NMOS tube are connected, and a second end of the protection resistor is connected to a point where the second PMOS tube and the second NMOS tube are connected.
5. The multi-touch detection circuit according to claim 2, characterized in that: The selection switch is connected between the output end of the electrostatic protection unit of each channel and the input end of the analog-to-digital converter.
6. The multi-touch detection circuit according to claim 5, characterized in that: The analog-to-digital converter comprises, Sampling department, including A first sampling switch connected between the output end of the selection switch and the output end of the sampling unit; A second sampling switch and a third sampling switch are connected between the output end of the selection switch and the output end of the sampling unit; A sampling capacitor, wherein a first end of the sampling capacitor is connected to the output end of the sampling unit, and a second end of the sampling capacitor is connected to a point where the second sampling switch and the third sampling switch are connected.
7. The multi-touch detection circuit according to claim 6, characterized in that: The analog-to-digital converter comprises a quantization unit, an input end of the quantization unit is connected to the sampling unit, and an output end of the quantization unit is connected to the microcontroller.
8. A control method for a multi-touch detection circuit, characterized in that: The multi-touch detection circuit according to any one of claims 1 to 7 comprises the following steps: Step S1, closing a channel switch of at least one channel to charge the channel capacitor of the channel to be tested until the channel capacitor is fully charged; Step S2, sampling the charge of the channel capacitor to obtain a sampled voltage, and quantizing the sampled voltage to obtain a digital signal; Step S3, repeating step S1 and step S2 to obtain a changed sampling voltage, and calculating the capacitance change of the channel capacitance according to the changed sampling voltage.
9. The control method of the multi-touch detection circuit according to claim 8, characterized in that: In step S2, the selection switch corresponding to the channel to be measured is closed, and the charge of the channel capacitance of the channel to be measured is redistributed within a sampling time to obtain a sampled voltage, and the sampled voltage has the following relationship: Vin is the sampling voltage, C 通道 is the channel capacitance of the channel to be measured, and Csample is the sampling capacitance; The changed sampling voltage in step S3 and the capacitance change have the following relationship: Where V in1 is the changing sampling voltage, ΔC 通道 is the capacitance change.
10. The control method of the multi-touch detection circuit according to claim 8, characterized in that: The step S3 further includes a step S4, wherein the microcontroller distinguishes the channel position and the gesture according to the capacitance variation.