A multi-path capacitance-based touch key detection circuit and method
Patent Information
- Application Number
- CN202311400524.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-26
- Publication Date
- 2026-09-11
- Estimated Expiration
- 2043-10-26
AI Technical Summary
[0006]为了克服现有技术的不足,本发明提供一种基于多路电容的触摸按键检测电路及方法,用于解决现有的触摸按键抗干扰性不强的技术问题,从而达到提高触摸按键抗干扰性的目的
[0057]本发明所提供的检测电路允许两个通道同时使能的情况,当同时使能时,两个通道相当于短路,从而可以测得两个通道对地的耦合电容的大小,并通过本发明所提供的检测方法进行操作,从而消除通道上对地的耦合电容,极大地提高了抗干扰性。
Smart Images

Figure CN117424586B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of touch button detection technology, and specifically to a touch button detection circuit and method based on multi-channel capacitors. Background Technology
[0002] With the continuous development of touch button technology, touch buttons have been widely used in electrical appliances, mobile phones, kitchen equipment, home appliances, and industrial control switches. Traditional mechanical buttons have disadvantages such as easy wear and tear, complex installation, and significant susceptibility to temperature and humidity changes. Piezoelectric touch buttons are expensive, easily damaged, and even more susceptible to temperature and humidity variations. Capacitive touch sensing technology completely overcomes the shortcomings of the above two types of buttons, and has advantages such as being wear-resistant, waterproof, unaffected by temperature and humidity, inexpensive, increasing product lifespan, and making products more aesthetically pleasing and appear more high-end.
[0003] The main principle of capacitive touch buttons is to detect changes in capacitance. When a finger touches the ground, the human body has capacitance to the ground, which causes a change in capacitance in the channel. Through software processing, the finger touch operation can be recognized to realize the button function.
[0004] Existing methods for detecting multiple touch buttons typically measure the capacitance of each touch channel in a time-division multiplexing manner, essentially sampling one channel at a time. Only one channel can be enabled at a time; simultaneous enabling of two channels is not allowed.
[0005] During the enabling process of the channel, there will be a coupling capacitance to ground on the channel, which will cause certain interference to the detection. The existing touch button detection circuit and detection method cannot eliminate the coupling capacitance to ground on the channel, resulting in weak anti-interference of the touch button. This makes the touch button often have some problems in complex interference environments, such as automatically triggering the button function and performing the corresponding button action, which can easily cause the user to be unable to use the device normally. Summary of the Invention
[0006] To overcome the shortcomings of the prior art, the present invention provides a touch button detection circuit and method based on multi-channel capacitors, which solves the technical problem of weak anti-interference of existing touch buttons, thereby achieving the purpose of improving the anti-interference of touch buttons.
[0007] To solve the above problems, the technical solution adopted by the present invention is as follows:
[0008] A touch button detection circuit based on multi-channel capacitors includes: an FPGA unit, a multi-channel capacitor Csn, switches DISC1, DISC2, CLKA, CLKB, CLK, capacitor Cb, constant voltage source Vref1, constant voltage source Vref, and a comparator;
[0009] One end of the multi-channel capacitor Csn is connected to one end of the switch DISC1, the switch CLKB, and the switch CLKA, respectively, and the other end of the multi-channel capacitor Csn is grounded.
[0010] The other end of switch DISC1 is grounded, the other end of switch CLKA is connected to the positive terminal of constant voltage source Vref1, and the negative terminal of constant voltage source Vref1 is grounded; the other end of switch CLKB is connected to one end of capacitor Cb, switch DISC2 and switch CLK respectively, and the other end of capacitor Cb and switch DISC2 is grounded.
[0011] The other end of the switch CLK is connected to the positive signal input terminal of the comparator, the negative signal input terminal of the comparator is connected to the positive terminal of the constant voltage source Vref, the negative terminal of the constant voltage source Vref is grounded, and the output terminal of the comparator is connected to the FPGA unit.
[0012] Each of the multiple capacitors Csn is equipped with a selection switch, which is used to select whether to ground or connect to the TS channel of each channel. Each TS channel is equipped with an enable switch, which closes after being enabled.
[0013] In a preferred embodiment of the present invention, when the multi-channel capacitor Csn is used to enable only one of the capacitors, the size of the one capacitor can be obtained by controlling the switches DISC1, DISC2, CLKA, CLKB, and CLK.
[0014] In a preferred embodiment of the present invention, when the multi-channel capacitor Csn is used to enable two of the capacitors simultaneously, the magnitude of the coupling capacitance to ground of the two channels can be obtained.
[0015] In a preferred embodiment of the present invention, the multi-channel capacitor Csn is used to eliminate the coupling capacitance to ground of the two channels by controlling the selection switches on the two channels when two channels are enabled simultaneously.
[0016] A touch button detection method based on multi-channel capacitance, utilizing the aforementioned detection circuit, includes the following steps:
[0017] Enable two of the multiple capacitors Csn in the detection circuit simultaneously;
[0018] After connecting one selection switch and the other selection switch on two of the capacitors to the TS channel, the capacitance is measured to obtain the first capacitor;
[0019] After grounding one of the selector switches and connecting the other selector switch to the TS channel, the capacitance is measured to obtain the second capacitance.
[0020] Connect one selection switch to the TS channel, and ground the other selection switch. Measure the capacitance to obtain the third capacitance.
[0021] The equivalent capacitance of the human body is obtained based on the first capacitor, the second capacitor, and the third capacitor, and detection is performed based on the equivalent capacitance of the human body.
[0022] In a preferred embodiment of the present invention, obtaining the equivalent capacitance of the human body includes:
[0023] Based on the first capacitor, the second capacitor, and the third capacitor, the parasitic capacitance between PAD1 and PAD2 and the parasitic capacitance of PAD2 to the ground are canceled out, the equivalent capacitance of the human body is obtained, as shown in Formula 1, Formula 2, Formula 3, and Formula 4:
[0024] Val2 = C2 + C3 (1);
[0025] Val1 = C1 + C3 (2);
[0026] Val3 = C1 + C2 (3);
[0027] C1=(Val1+Val2+Val3) / 2-Val2 (4);
[0028] In the formula, Val3 is the first capacitor, Val1 is the second capacitor, Val2 is the third capacitor, and Val1, Val2 and Val3 are all known quantities; C1 is the human body equivalent capacitance, C2 is the parasitic capacitance of PAD2 to the earth, and C3 is the parasitic capacitance between PAD1 and PAD2.
[0029] In a preferred embodiment of the present invention, the measurement of capacitance includes:
[0030] Circuit initialization: Close switches DISC1 and DISC2, and keep all other switches in the open state. After releasing the charge of the multi-channel capacitor Csn and the capacitor Cb to 0, disconnect switches DISC1 and DISC2.
[0031] When the switch CLKA is closed, the constant voltage source Vref1 charges the multi-channel capacitor Csn until its voltage reaches the voltage value V. ref1 ;
[0032] Disconnect switch CLKA, close switches CLKB and CLK, and determine whether the voltage value of capacitor Cb exceeds the voltage value V. ref ;
[0033] If so, then according to the voltage value V ref1 The voltage value V ref And the size of the capacitor Cb is used to obtain the size of the multi-channel capacitor Csn;
[0034] If not, repeat the above steps until the voltage value of capacitor Cb reaches the voltage value V. ref .
[0035] In a preferred embodiment of the present invention, obtaining the size of the multi-channel capacitor Csn includes:
[0036] Let the voltage across capacitor Cb be V at the (n-1)th time. n-1 At the nth time, the voltage of the multi-channel capacitor Csn is charged to V. ref1 Formula 5 is obtained:
[0037] C s *V ref1 +C b *V n-1 =V n *(C s +C b (5);
[0038] In the formula, V n The voltage value of capacitor Cb at the nth time;
[0039] Simplifying Formula 5, we obtain Formula 6:
[0040]
[0041] In the formula, C B The value of the capacitor Cb is the reference capacitor, which is a known quantity; C S It is the size of the multi-channel capacitor Csn.
[0042] In a preferred embodiment of the present invention, after obtaining formula 6, the following is included:
[0043] set up Solving Equation 6, we get Equation 7:
[0044] V n =k1V n-1 +k2V ref1 (7);
[0045] Construct a geometric sequence as shown in Formula 8:
[0046]
[0047] Solving for the equation, we obtain Formula 9:
[0048]
[0049] In a preferred embodiment of the present invention, after obtaining Formula 9, the following is included:
[0050] In Formula 9, V0 is the voltage value of capacitor Cb during circuit initialization. Since the charge of capacitor Cb is released to 0 during circuit initialization, V0 = 0. Solving Formula 9 based on V0 = 0 yields Formula 10:
[0051]
[0052] according to k1+k2=1 yields formula 11:
[0053]
[0054] In the formula, V n The voltage is known to be V. ref ;n is the voltage value of the capacitor Cb reaching V. ref The number of times is a known quantity; V ref1 It is the voltage value of the constant voltage source in the circuit, and it is a known quantity.
[0055] The value C of the multi-channel capacitor Csn is obtained using formula 11. S .
[0056] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0057] The detection circuit provided by this invention allows two channels to be enabled simultaneously. When enabled simultaneously, the two channels are equivalent to a short circuit, thereby measuring the magnitude of the coupling capacitance between the two channels and ground. By operating the detection method provided by this invention, the coupling capacitance between the channels and ground can be eliminated, greatly improving the anti-interference capability.
[0058] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments. Attached Figure Description
[0059] Figure 1 - is a flowchart of the touch button detection method based on multi-channel capacitance according to an embodiment of the present invention;
[0060] Figure 2 - is a detection circuit diagram based on a single-channel capacitor Cs according to an embodiment of the present invention;
[0061] Figure 3 - is a detection circuit diagram based on multi-channel capacitor Csn according to an embodiment of the present invention;
[0062] Figure 4 - is a circuit diagram of a touch button detection circuit based on multi-channel capacitance according to an embodiment of the present invention;
[0063] Figure 5 - is the first equivalent circuit diagram of an embodiment of the present invention;
[0064] Figure 6 - is the second equivalent circuit diagram of an embodiment of the present invention;
[0065] Figure 7 - is the third equivalent circuit diagram of an embodiment of the present invention.
[0066] The following are the symbol labels: 1. FPGA unit; 2. Single-channel capacitor Cs; 3. Switch DISC1; 4. Switch DISC2; 5. Switch CLKA; 6. Switch CLKB; 7. Switch CLK; 8. Capacitor Cb; 9. Constant voltage source Vref1; 10. Constant voltage source Vref; 11. Comparator; 12. Enable switch; 13. Single-channel capacitor Cs1; 14. Select switch SC1; 15. Select switch SC2; 16. Enable switch S1; 17. Enable switch S2; 18. TS channel. Detailed Implementation
[0067] The touch button detection circuit based on multi-channel capacitors provided by the present invention includes: FPGA unit 1, multi-channel capacitor Csn, switch DISC13, switch DISC24, switch CLKA 5, switch CLKB 6, switch CLK 7, capacitor Cb 8, constant voltage source Vref 19, constant voltage source Vref 10, and comparator 11.
[0068] One end of the multi-channel capacitor Csn is connected to one end of switch DISC13, switch CLKB 6 and switch CLKA 5 respectively, and the other end of the multi-channel capacitor Csn is grounded.
[0069] The other end of switch DISC13 is grounded, and the other end of switch CLKA5 is connected to the positive terminal of constant voltage source Vref19, while the negative terminal of constant voltage source Vref19 is grounded. The other end of switch CLKB6 is connected to one end of capacitor Cb8, switch DISC24, and switch CLK7, while the other ends of capacitor Cb8 and switch DISC24 are grounded.
[0070] The other end of switch CLK 7 is connected to the positive signal input terminal of comparator 11, the negative signal input terminal of comparator 11 is connected to the positive terminal of constant voltage source Vref 10, the negative terminal of constant voltage source Vref 10 is grounded, and the output terminal of comparator 11 is connected to the FPGA unit 1.
[0071] Each of the multiple capacitors Csn is equipped with a selection switch, which is used to select whether to ground or connect to the TS channel 18 of each channel. Each TS channel 18 is equipped with a comparator 12, which closes after being enabled.
[0072] Furthermore, when the multi-channel capacitor Csn is used to enable only one of the capacitors, the size of one of the capacitors can be obtained by controlling switches DISC13, DISC24, CLKA 5, CLKB 6, and CLK 7.
[0073] Furthermore, when the multi-channel capacitor Csn is used to enable two of the capacitors simultaneously, the magnitude of the coupling capacitance to ground for the two channels can be obtained.
[0074] Furthermore, the multi-channel capacitor Csn is used to eliminate the coupling capacitance between the two channels to ground by controlling the selection switches on the two channels when two channels are enabled simultaneously.
[0075] A touch button detection method based on multi-channel capacitance is proposed, which utilizes the detection circuit provided by this invention for detection, such as... Figure 1 As shown, it includes the following steps:
[0076] Step S1: Enable two of the multiple capacitors Csn in the detection circuit simultaneously.
[0077] Step S2: Connect one selector switch and the other selector switch on two of the capacitors to TS channel 18, measure the capacitance, and obtain the first capacitor;
[0078] Step S3: Ground one selector switch, connect the other selector switch to TS channel 18, measure the capacitance, and obtain the second capacitance;
[0079] Step S4: Connect one selector switch to TS channel 18, ground the other selector switch, measure the capacitance, and obtain the third capacitor;
[0080] Step S5: Obtain the equivalent capacitance of the human body based on the first capacitor, the second capacitor, and the third capacitor, and perform detection based on the equivalent capacitance of the human body.
[0081] In step S5 above, when obtaining the equivalent capacitance of the human body, the following is included:
[0082] Based on the first, second, and third capacitors canceling out the parasitic capacitance between PAD1 and PAD2 and the parasitic capacitance of PAD2 to the ground, the equivalent capacitance of the human body is obtained, as shown in Formulas 1, 2, 3, and 4:
[0083] Val2 = C2 + C3 (1);
[0084] Val1 = C1 + C3 (2);
[0085] Val3 = C1 + C2 (3);
[0086] C1=(Val1+Val2+Val3) / 2-Val2 (4);
[0087] In the formula, Val3 is the first capacitor, Val1 is the second capacitor, Val2 is the third capacitor, and Val1, Val2 and Val3 are all known quantities; C1 is the equivalent capacitance of the human body, C2 is the parasitic capacitance of PAD2 to the earth, and C3 is the parasitic capacitance between PAD1 and PAD2.
[0088] In steps S2 to S4 above, the measurement of capacitance includes:
[0089] Circuit initialization: Close switches DISC13 and DISC24, and keep all other switches in the open state. After releasing the charge of multi-channel capacitor Csn and capacitor Cb8 to 0, open switches DISC13 and DISC24.
[0090] When switch CLKA 5 is closed, the constant voltage source Vref19 charges the multi-channel capacitor Csn until its voltage reaches the value V. ref1 ;
[0091] Open switch CLKA 5, close switches CLKB 6 and CLK 7, and determine whether the voltage across capacitor Cb 8 exceeds the voltage value V. ref ;
[0092] If so, then based on the voltage value V ref1 Voltage value V ref And the size of capacitor Cb8, to obtain the size of multi-channel capacitor Csn;
[0093] If not, repeat the above steps until the voltage value of capacitor Cb8 reaches the voltage value V. ref .
[0094] Furthermore, when obtaining the value of the multi-channel capacitor Csn, the following steps are taken:
[0095] Let the voltage across capacitor Cb8 be V at the (n-1)th time. n-1 In the nth iteration, the voltage across the multi-channel capacitor Csn is charged to V. ref1 Formula 5 is obtained:
[0096] C s *V ref1 +C b *V n-1 =Vn *(C s +C b (5);
[0097] In the formula, V n Let Cb be the voltage value of capacitor Cb8 at the nth time.
[0098] Simplifying formula 5, we obtain formula 6:
[0099]
[0100] In the formula, C B The value of capacitor Cb8 is the reference capacitor, which is a known quantity; C S It refers to the size of the multi-channel capacitor Csn.
[0101] Furthermore, after obtaining Formula 6, it includes:
[0102] set up Solving formula 6, we get formula 7:
[0103] V n =k1V n-1 +k2V ref1 (7);
[0104] Construct a geometric sequence as shown in Formula 8:
[0105]
[0106] Solving for the equation, we obtain Formula 9:
[0107]
[0108] Furthermore, after obtaining Formula 9, it includes:
[0109] In Formula 9, V0 is the voltage across capacitor Cb8 during circuit initialization. Since capacitor Cb8 is depleted to zero during initialization, V0 = 0. Solving Formula 9 based on V0 = 0, we obtain the formula...
[0110] Formula 10:
[0111]
[0112] according to k1+k2=1 yields formula 11:
[0113]
[0114] In the formula, V n The voltage is known to be V. ref ;n is the voltage across capacitor Cb8 reaching V.ref The number of times is a known quantity; V ref1 It is the voltage value of the constant voltage source in the circuit, and it is a known quantity.
[0115] The value C of the multi-channel capacitor Csn is obtained using formula 11. S .
[0116] The following embodiments are further illustrations of the present invention, but the scope of the present invention is not limited thereto.
[0117] This embodiment is first based on the detection circuit of a single-channel capacitor Cs 2, such as... Figure 2 The process of measuring the capacitance of the touch channel is illustrated below:
[0118] (1) During circuit initialization, only switches DISC13 and DISC24 are closed, while all other switches are open. After the capacitance of the touch channel capacitor Cs (single-channel capacitor Cs 2) and the reference capacitor Cb (capacitor Cb 8) are released to 0, switches DISC13 and DISC24 are then opened.
[0119] (2) When switch CLKA 5 is closed, the constant voltage source Vref19 charges the single-channel capacitor Cs 2, and the voltage of the single-channel capacitor Cs 2 reaches V. ref1 .
[0120] (3) Open switch CLKA5, close switch CLKB 6 and switch CLK 7, and determine whether the voltage of capacitor Cb 8 exceeds Vref. If it exceeds Vref, FPGA unit 1 outputs a high level and the measurement ends. Otherwise, start the cycle again from step (2).
[0121] The values of Vref1, Vref, and capacitor Cb8 are all known, and the value of single-channel capacitor Cs2 can be calculated using the formula.
[0122] It should be noted that in the detection circuit based on multi-channel capacitor Csn, the process of measuring the capacitance of the touch channel is the same as above, except that the capacitance of the touch channel is multi-channel capacitor Csn.
[0123] In this embodiment, the single-channel capacitor Cs2 and the multi-channel capacitor Csn are collectively referred to as capacitor Cs. The calculation process for capacitor Cs is as follows:
[0124] The voltage across capacitor Cb8 at the (n-1)th time is V. n-1 Then, in the nth time, the voltage across capacitor Cs is charged to V. ref1 Then, capacitors Cs and Cb are shorted together, and the following equation can be derived:
[0125] C s *Vref1 +C b *V n-1 =V n *(C s +C b );
[0126] The revised version is as follows:
[0127]
[0128] set up Resolve the above formula:
[0129] V n =k1V n-1 +k2V ref1 ;
[0130] Construct a geometric sequence:
[0131]
[0132] It can be found that:
[0133]
[0134] V0 is the voltage value of capacitor Cb8 during initialization. During circuit initialization, the switch discharges all the charge from capacitor Cb8, resulting in a voltage of 0 across it, therefore V0 is 0. Based on this information, the above equation can be further simplified:
[0135]
[0136] according to k1+k2=1, therefore:
[0137]
[0138] In the above formula, V n The voltage is known to be V. ref n is the voltage across capacitor Cb when the voltage reaches V. ref The number of times is a known quantity. C B Let Cb be the capacitance value, which is the reference capacitance and a known quantity. V ref1 It is the voltage value of the constant voltage source in the circuit, and it is a known quantity. There is only one variable, C. S Therefore, the touch channel capacitance C can be calculated using the above formula. S Size.
[0139] In this embodiment, the single-channel capacitor Cs2 is replaced with a multi-channel capacitor Csn in the aforementioned detection circuit based on a single-channel capacitor Cs2, and a comparator 12 is added to each channel, thus obtaining a detection circuit based on a multi-channel capacitor Csn, which allows two channels to be enabled simultaneously, such as... Figure 3 As shown, each comparator 12 is independent, thus forming a multiplexed enable switch. The multiplexed capacitor Csn contains several individual capacitors Cs 2. When a corresponding channel is enabled, the comparator 12 of that channel will close. When both channels are enabled, the corresponding comparator 12 closes, and the capacitors on these two channels are effectively connected in parallel.
[0140] In this embodiment, a selection switch is added to the right side of each channel in the detection circuit based on multi-channel capacitors Csn, thereby obtaining the touch button detection circuit based on multi-channel capacitors of the present invention. This embodiment is described using the single-channel capacitor Cs113, selection switch SC114, selection switch SC215, and enable switches S116 and S217 in the multi-channel capacitor Csn as examples. Figure 4 As shown.
[0141] exist Figure 4 In this circuit, the single-channel capacitor Cs113 corresponds to the two terminals of the touch button. Unlike the detection circuit based on multi-channel capacitor Csn, where one terminal of the multi-channel capacitor Csn is directly connected to ground, in this circuit… Figure 4 In this configuration, both terminals are connected to the touch channel. When a hand touches the touch button, the capacitance between the finger and ground (human body equivalent capacitance) is measured to determine whether the finger has actually touched the touch button. In this embodiment, the human body equivalent capacitance is obtained as follows:
[0142] (1) Selector switches SC215 and SC114 are both connected to TS channel 18, that is, in Figure 4 In the middle, selector switches SC114 and SC215 are both connected to the upper end to measure capacitance;
[0143] The equivalent circuit for this step is as follows: Figure 5 As shown, the measured value Val3 = C1 + C2;
[0144] In the formula, C1 is the equivalent capacitance of the human body, and C2 is the parasitic capacitance of PAD2 to the earth.
[0145] (2) Selector switch SC215 is grounded, and selector switch SC114 is connected to TS channel 18, i.e. Figure 4 In the middle, connect selector switch SC215 to the lower end and selector switch SC114 to the upper end to measure capacitance;
[0146] The equivalent circuit for this step is as follows: Figure 6 As shown, the measured value Val1 = C1 + C3;
[0147] In the formula, C3 is the parasitic capacitance between PAD1 and PAD2.
[0148] (3) Selector switch SC215 is connected to TS channel 18, and selector switch SC114 is grounded, i.e. Figure 4 In the middle, connect selector switch SC215 to the upper end and selector switch SC114 to the lower end to measure the capacitance.
[0149] The equivalent circuit for this step is as follows: Figure 7 As shown, the measured value Val2 = C2 + C3.
[0150] Since Val1, Val2, and Val3 are known quantities, what we need to obtain in this embodiment is the capacitance between the finger and the ground (the equivalent capacitance of the human body), i.e., C1. Therefore, we can obtain:
[0151] C1=(Val1+Val2+Val3) / 2-Val2;
[0152] The above algorithm can successfully cancel out C3 and C2, greatly improving the anti-interference capability of touch buttons.
[0153] The above embodiments are merely preferred embodiments of the present invention and should not be construed as limiting the scope of protection of the present invention. Any non-substantial changes and substitutions made by those skilled in the art based on the present invention shall fall within the scope of protection claimed by the present invention.
Claims
1. A touch button detection circuit based on multi-channel capacitance, characterized in that, include: FPGA unit, multi-channel capacitor Csn, switch DISC1, switch DISC2, switch CLKA, switch CLKB, switch CLK, capacitor Cb, constant voltage source Vref1, constant voltage source Vref, and comparator; One end of the multi-channel capacitor Csn is connected to one end of the switch DISC1, the switch CLKB, and the switch CLKA, respectively, and the other end of the multi-channel capacitor Csn is grounded. The other end of switch DISC1 is grounded, the other end of switch CLKA is connected to the positive terminal of constant voltage source Vref1, and the negative terminal of constant voltage source Vref1 is grounded; the other end of switch CLKB is connected to one end of capacitor Cb, switch DISC2 and switch CLK respectively, and the other end of capacitor Cb and switch DISC2 is grounded. The other end of the switch CLK is connected to the positive signal input terminal of the comparator, the negative signal input terminal of the comparator is connected to the positive terminal of the constant voltage source Vref, the negative terminal of the constant voltage source Vref is grounded, and the output terminal of the comparator is connected to the FPGA unit. Each of the multiple capacitors Csn is equipped with a selection switch, which is used to select whether to ground or connect to the TS channel of each channel. Each TS channel is equipped with an enable switch, which closes after being enabled.
2. The touch button detection circuit based on multi-channel capacitance according to claim 1, characterized in that, When the multi-channel capacitor Csn is used to enable only one of the capacitors, the size of the one capacitor can be obtained by controlling the switches DISC1, DISC2, CLKA, CLKB, and CLK.
3. The touch button detection circuit based on multi-channel capacitance according to claim 1, characterized in that, The multi-channel capacitor Csn is used to enable two of the capacitors simultaneously, and the magnitude of the coupling capacitance to ground of the two channels can be obtained.
4. The touch button detection circuit based on multi-channel capacitance according to claim 3, characterized in that, The multi-channel capacitor Csn is used to eliminate the coupling capacitance to ground of the two channels by controlling the selection switches on the two channels when two channels are enabled simultaneously.
5. A method for detecting touch buttons based on multi-channel capacitance, comprising using the detection circuit described in any one of claims 1-4, characterized in that, Includes the following steps: Enable two of the multiple capacitors Csn in the detection circuit simultaneously; After connecting one selection switch and the other selection switch on two of the capacitors to the TS channel, the capacitance is measured to obtain the first capacitor; After grounding one of the selection switches and connecting the other selection switch to the TS channel, the capacitance is measured to obtain the second capacitance. Connect one selection switch to the TS channel, and ground the other selection switch. Measure the capacitance to obtain the third capacitance. The equivalent capacitance of the human body is obtained based on the first capacitor, the second capacitor, and the third capacitor, and detection is performed based on the equivalent capacitance of the human body.
6. The touch button detection method based on multi-channel capacitance according to claim 5, characterized in that, Obtaining the equivalent capacitance of the human body includes: Based on the first capacitor, the second capacitor, and the third capacitor, the parasitic capacitance between PAD1 and PAD2 and the parasitic capacitance of PAD2 to the ground are canceled out, the equivalent capacitance of the human body is obtained, as shown in Formula 1, Formula 2, Formula 3, and Formula 4: Val2 = C2 + C3 (1); Val1 = C1 + C3 (2); Val3 = C1 + C2 (3); C1=(Val1+Val2+Val3) / 2-Val2 (4); In the formula, Val3 is the first capacitor, Val1 is the second capacitor, Val2 is the third capacitor, and Val1, Val2 and Val3 are all known quantities; C1 is the human body equivalent capacitance, C2 is the parasitic capacitance of PAD2 to the earth, and C3 is the parasitic capacitance between PAD1 and PAD2.
7. The touch button detection method based on multi-channel capacitance according to claim 5 or 6, characterized in that, When measuring capacitance, the following are included: Circuit initialization: Close switches DISC1 and DISC2, and keep all other switches in the open state. After releasing the charge of the multi-channel capacitor Csn and the capacitor Cb to 0, disconnect switches DISC1 and DISC2. When the switch CLKA is closed, the constant voltage source Vref1 charges the multi-channel capacitor Csn until its voltage reaches the voltage value V. ref1 Disconnect switch CLKA, close switches CLKB and CLK, and determine whether the voltage value of capacitor Cb exceeds the voltage value V. ref ; If so, then according to the voltage value V ref1 The voltage value V ref And the size of the capacitor Cb is used to obtain the size of the multi-channel capacitor Csn; If not, repeat the above steps until the voltage value of capacitor Cb reaches the voltage value V. ref .
8. The touch button detection method based on multi-channel capacitance according to claim 7, characterized in that, When obtaining the value of the multi-channel capacitor Csn, the following steps are included: Let the voltage across capacitor Cb be V at the (n-1)th time. n-1 At the nth time, the voltage of the multi-channel capacitor Csn is charged to V. ref1 Formula 5 is obtained: C s *In ref1 +C b *In n-1 =V n *(C s +C b ) (5); In the formula, V n The voltage value of capacitor Cb at the nth time; Simplifying Formula 5, we obtain Formula 6: In the formula, C B The value of the capacitor Cb is the reference capacitor, which is a known quantity; C S It is the size of the multi-channel capacitor Csn.
9. The touch button detection method based on multi-channel capacitance according to claim 8, characterized in that, After obtaining Formula 6, the following is included: set up Solving Equation 6, we get Equation 7: In n =k1V n-1 +k2V ref1 (7); Construct a geometric sequence as shown in Formula 8: Solving for the equation, we obtain Formula 9:
10. The touch button detection method based on multi-channel capacitance according to claim 9, characterized in that, After obtaining Formula 9, the following is included: In Formula 9, V0 is the voltage value of capacitor Cb during circuit initialization. Since the charge of capacitor Cb is released to 0 during circuit initialization, V0 = 0. Solving Formula 9 based on V0 = 0 yields Formula 10: according to k1+k2=1 yields formula 11: In the formula, V n The voltage is known to be V. ref ;n is the voltage value of the capacitor Cb reaching V. ref The number of times is a known quantity; V ref1 It is the voltage value of the constant voltage source in the circuit, and it is a known quantity; The value C of the multi-channel capacitor Csn is obtained using formula 11. S .
Citation Information
Patent Citations
Capacitive sensor system
CN102273075A
Touch detection method of capacitive touch screen and detection circuit
CN102830882A