A dual-frequency dual-value detection method for touch

By adopting the dual-frequency and dual-value detection method in the capacitive touch button detection method, using dynamically changing frequency points and sorted touch values ​​for filtering and judgment, the problems of false triggering and slow response under strong magnetic interference are solved, and higher anti-interference ability and sensitivity are achieved, and hardware costs are reduced.

CN119543905BActive Publication Date: 2025-04-15WUXI I CORE ELECTRONICS
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510090479.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-21
Publication Date
2025-04-15
Estimated Expiration
2045-01-21

AI Technical Summary

Technical Problem

The existing capacitive touch button detection methods are prone to error triggering or slow response in a strong magnetic interference environment, resulting in increased hardware costs and stagnation of iteration of chip technology.

Method used

The dual-frequency and dual-value detection method is used to scan the touch through two dynamically changing frequency points, and the touch values ​​are sorted after multiple acquisitions to obtain the maximum, intermediate and minimum values, and combined with these values, first-level filtering and key state determination are performed to improve anti-interference ability and sensitivity.

Benefits of technology

It effectively suppresses the occurrence of false triggering under strong interference, and at the same time improves the response sensitivity of touch buttons, reduces hardware costs, and makes the detection system more reliable in related reliability tests.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119543905B_ABST
    Figure CN119543905B_ABST
Patent Text Reader

Abstract

The present invention belongs to the technical field of capacitive touch buttons, and particularly relates to a dual-frequency dual-value detection method applied to touch. It includes: initialization setting; using two frequency points for touch scanning respectively, and the two frequency points are dynamically changing frequency points; after collecting touch values ​​at the two frequency points for multiple times, averaging the multiple touch values ​​at the two frequency points respectively, performing a first-level filtering, and the average value is used for subsequent key state determination; by calculating the current touch average value of the two frequency points minus the last touch average value, the difference is obtained, and it is determined whether the difference is greater than a preset noise threshold; the touch average values ​​of the two frequency points are respectively subtracted from the corresponding base values ​​to obtain the difference; judging the noise state of the current key; updating the base value of the current key; the present invention solves the problem that single frequency point detection is susceptible to strong magnetic interference and multiple fixed frequency points respond slowly, while improving resistance to strong interference and sensitivity, it can reduce hardware costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of capacitive touch buttons, and in particular relates to a dual-frequency dual-value detection method applied to touch. Background Art

[0002] In recent years, with the rapid development of capacitive touch button detection technology at home and abroad, more and more button application fields are using touch buttons. Compared with the traditional mechanical button method, only a light touch of the finger is needed to achieve a fast and sensitive control effect. However, in actual use, especially in the field of home appliances, the power supply system comes from the alternating current of the power grid, and there are various high-frequency interferences in the external environment. In order to reliably and quickly identify the touch state, the current solution is to increase the hardware cost and use the touch method library to provide corresponding solutions.

[0003] The existing touch detection method mainly performs multiple detections of a single frequency point on the touch button or a single detection of multiple fixed frequency points. The maximum and minimum values ​​are removed by comparison, and then the average value of the remaining data is obtained. The data is filtered according to the relationship between the average value and the noise value detected by the system, and the filtered value is compared with the touch reference value of the external environment. When the difference between the two is greater than the set finger press threshold, it is considered that the finger is pressed. When the difference is lower than the set finger release threshold, it is considered that the finger is released, thereby achieving the effect of obtaining the touch state.

[0004] As the application environment becomes more and more complex, higher and higher requirements are put forward for the anti-interference performance and sensitivity of the touch method (for example, the CS experiment needs to pass the 10V dynamic and static, 15W high-power walkie-talkie test). The touch button cannot be triggered by mistake under strong magnetic interference, and fast button response is required. Among the existing touch detection methods, the first single frequency point multiple detection method is susceptible to strong magnetic interference, resulting in abnormal jitter of the touch raw data, and the reliability cannot be guaranteed, resulting in abnormal touch triggering; the second multiple fixed frequency point single detection method, although it can differentiate the data jitter caused by strong magnetic interference, is still susceptible to strong magnetic interference due to the fixed frequency point, and the singleness of the touch detection value is compared, resulting in slow response of the touch button, or it takes a long time to trigger the touch. In view of the problems of the above methods, most of the current solutions can only avoid electromagnetic interference by adding a power filter circuit on the PCB; and in the design process of integrated circuit chips, the design cannot adopt a more sensitive touch detection method, which makes it difficult to upgrade the chip, and ultimately leads to increased costs and stagnation of chip technology iteration.

[0005] like Figure 1 The structural block diagram of the capacitive touch button system shown in the figure MODIt is the equivalent capacitance of the touch button, and forms a switched capacitor circuit with the logic switches SW1 and SW2. ADJ It is a current source used to charge the touch button and equivalent capacitor. SW is the switching frequency of the touch key system. This frequency can generate fixed, dynamically distributed and uniformly distributed frequencies, which are used to periodically switch and control switches SW1 and SW2, and make them present an alternating state of switch closure. After the touch system is enabled, SW1 and SW3 are disconnected, and the current source firstly applies current to C MOD Precharge to a voltage close to V TH When C MOD Voltage greater than V TH When the voltage is high, the comparator outputs a flip signal. After the system senses the signal, it switches SW1 and SW2 alternately through Fsw, selectively turning C P Connecting to the ground or touch channel generates a discharge current, which causes a slight change in the touch channel voltage. The Sigma-Delta converter collects the channel voltage and generates a resistor (R B ) modulated bit stream. In order to keep the average channel voltage at a steady-state value (V TH ), the converter maintains the average leakage current (I B ) matches the front-end bleeder current. The converter stores the bit stream during the key scan (the scan time is determined by the PWM timer), and the accumulated result is a digital output value (called the raw count), which is related to C P The finger touches C P Increase C f , the raw count will also decrease proportionally. By comparing the change in the raw count based on the steady state with the predetermined threshold, the algorithm can determine whether the button is in the ON (touched) or OFF (not touched) state. Figure 1 The working principle of the structure and the method of touching the key.

[0006] exist Figure 1 Under the working principle of , the method of filtering the touch button data is to perform a series of processing such as averaging and multiple confirmation debouncing on the collected original touch data. At the same time, it is also necessary to adaptively adjust the environmental reference value within the noise range and without pressing keys to ensure that the reference value can automatically follow the changes in the environment. However, this touch button detection method has serious defects. That is, even after the single frequency or dual-frequency detection data passes the average algorithm, the touch data still jitters abnormally, and the system is prone to false touches or cannot effectively identify touch presses.

[0007] In addition, by using 10V CS conduction interference amplitude and 0.15M-230M interference frequency band, the touch jitter differences under three touch frequencies are obtained respectively, among which Figure 2It is the touch jitter difference with fixed frequency under 10V conducted interference. Figure 3 It is the touch jitter difference using normal distribution frequency points under 10V conducted interference. Figure 4 It is the touch jitter difference with evenly distributed frequency points under 10V conducted interference. Figures 2 to 4 It can be seen that since the three frequencies are generated by the same clock source, in the case of conducted interference CS, the touch differences of the three frequencies show abnormal jitters of different levels at almost the same interference moment. Therefore, even if a fixed frequency or two different dynamic frequencies are used, there is still a probability of false touch or insensitive keystrokes if only the average value calculation method is used. Summary of the invention

[0008] The purpose of the present invention is to provide a dual-frequency dual-value detection method for touch. The present invention proposes a method of dual dynamic frequency points and dual-value detection, which solves the problem that single frequency point detection is susceptible to strong magnetic interference and multiple fixed frequency points have slow response. While improving resistance to strong interference and sensitivity, it can reduce hardware costs, making the entire detection system easy to pass relevant reliability tests.

[0009] In order to solve the above technical problems, the present invention provides a dual-frequency dual-value detection method applied to touch, comprising the following steps:

[0010] Step S101: Initialization settings;

[0011] Step S102: two frequency points are respectively used for touch scanning, and the two frequency points are dynamically changing frequency points;

[0012] Step S103: After collecting touch values ​​at two frequency points for multiple times, the multiple touch values ​​at the two frequency points are averaged and filtered, and the average value is used for subsequent key state determination;

[0013] Step S104: Calculate the difference between the current touch average value of the two frequency points and the last touch average value, and determine whether the difference is greater than a preset noise threshold;

[0014] Step S105: Subtract the touch average values ​​of the two frequency points from the corresponding base values ​​to obtain a difference. If the difference is greater than the key press threshold, jump to step S108; if the difference is less than or equal to the key press threshold, jump to step S106;

[0015] Step S106: Determine the noise state of the current key. If the noise state is 0, jump to step S107; if the noise state is 1, jump directly to step S102;

[0016] Step S107: Update the base value of the current key, and then jump to step S102;

[0017] Step S108: The average value of the current frequency point is judged to be pressed and the counter is incremented by 1, and then the average value of the two frequency points is added to obtain the sum value. If the sum value is greater than the preset number of key confirmations, it is determined that the key is actually pressed, otherwise jump to step S102.

[0018] Preferably, the step S101 specifically includes: initializing the registers used by the touch key module to provide a basic state.

[0019] Preferably, in step S102, the two frequency points are respectively dynamically changing frequency points of normal distribution and uniform distribution.

[0020] Preferably, in step S104, determining whether the difference is greater than a preset noise threshold specifically includes: if the difference is greater than the preset noise threshold, noise exists; if the difference is less than the preset noise threshold, noise does not exist, and the noise state is used as a subsequent base value update condition.

[0021] The present invention also provides a dual-frequency dual-value detection method applied to touch, comprising the following steps:

[0022] Step S201: Initialization settings;

[0023] Step S202: using two frequency points to perform touch scanning respectively, and the two frequency points are dynamically changing frequency points;

[0024] Step S203: after collecting the touch value of each frequency point for multiple times, sorting the acquired touch values ​​corresponding to each frequency point to obtain the maximum value, the middle value and the minimum value of the touch;

[0025] Step S204: The maximum touch value, the middle value and the minimum touch value of the two frequency points are averaged by the current value and the previous value respectively, and a first-level filtering is performed; wherein the middle value and the minimum value after averaging are used for subsequent key state determination;

[0026] Step S205: Calculate the difference between the current maximum touch value and the current minimum touch value of the two frequency points, and determine whether the difference is greater than a preset noise threshold;

[0027] Step S206: Subtract the touch intermediate values ​​of the two frequency points from the corresponding base values ​​to obtain the difference. If the difference is greater than the key press threshold, the intermediate value of the current frequency point is judged to be pressed by 1, and then jump to step S209; if the difference is less than or equal to the key press threshold, jump to step S207;

[0028] Step S207: Determine the noise state of the current key. If the noise state is 0, jump to step S208; if the noise state is 1, jump directly to step S202;

[0029] Step S208: Update the base value of the current key, and then jump to step S202;

[0030] Step S209: Subtract the touch minimum values ​​of the two frequency points from the corresponding base values ​​to obtain the difference. If the difference is greater than the key press threshold, the minimum value of the current frequency point is judged to be pressed by 1, and then jump to step S210; if the difference is less than or equal to the key press threshold, jump to step S207;

[0031] Step S210: Add the middle value judgment press counter and the minimum value judgment press counter of the two frequency points to obtain a sum value. If the sum value is greater than the preset number of key confirmation times, it is determined that the key is actually pressed, otherwise jump to step S202.

[0032] Preferably, the step S201 specifically includes: initializing the registers used by the touch key module to provide a basic state.

[0033] Preferably, in step S202, the two frequency points are respectively dynamically changing frequency points of normal distribution and uniform distribution.

[0034] Preferably, in step S205, determining whether the difference is greater than a preset noise threshold specifically includes: if the difference is greater than the preset noise threshold, noise exists; if the difference is less than the preset noise threshold, noise does not exist, and the noise state is used as a subsequent base value update condition.

[0035] Compared with the prior art, the present invention has the following beneficial effects:

[0036] 1. The present invention modifies the traditional filtering method of using multiple frequency points to find the average value, uses multiple dynamic frequency points for filtering, and adds a new touch value to assist in determining the key pressing state. In this way, in the case of strong interference, false triggering of the touch key can be avoided and whether the key is pressed can be sensitively detected. That is, by adding two dynamically changing frequency point detection and average value filtering methods, false triggering caused by conducted interference during the CS experiment can be effectively suppressed, thereby improving reliability.

[0037] 2. The present invention collects the touch values ​​of two frequency points multiple times, and then sorts the touch values ​​corresponding to each frequency point to obtain the maximum value, the middle value and the minimum value. In the case of strong interference, the difference between the middle value and the base value is similar to the average value in the above case, which has a good function of suppressing false triggering, but the touch sensitivity is poor; while the difference between the minimum value and the base value is closer to the difference of human hand touch, which can effectively improve the touch sensitivity, but while the reaction sensitivity is improved, it is easy to be falsely triggered. Therefore, the present invention combines the two values ​​for touch judgment, so that in the case of strong interference, the judgment system will not be falsely triggered, and can also sensitively respond to key touch. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 It is a structural block diagram of an existing capacitive touch button system.

[0039] Figure 2 It is a schematic diagram of touch jitter difference under existing fixed frequency.

[0040] Figure 3 It is a schematic diagram of touch jitter difference under the existing normal distribution frequency.

[0041] Figure 4 It is a schematic diagram of touch jitter difference under existing uniformly distributed frequencies.

[0042] Figure 5 This is a flow chart of the method provided in Example 1 of the present invention.

[0043] Figure 6 This is a flow chart of the method provided in Example 2 of the present invention. DETAILED DESCRIPTION

[0044] The present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. The advantages and features of the present invention will become more apparent from the following description. It should be noted that the accompanying drawings are in very simplified form and in non-precise proportions, and are only used to conveniently and clearly assist in explaining the purpose of the embodiments of the present invention. Embodiment 1

[0045] like Figure 5 As shown, the embodiment of the present invention specifically provides a dual-frequency dual-value detection method applied to touch, and the filtering method and key determination process thereof are as follows:

[0046] Step 101: Initialize the registers used by the touch key module to provide a basic state.

[0047] Step 102: two dynamically changing frequency points are used for touch scanning, the two frequency points are respectively normally distributed and uniformly distributed, and the frequency points can effectively reduce the influence of strong interference of fixed frequency on the original touch data, and can also reduce the radiation disturbance generated to the outside.

[0048] Step 103: After collecting touch values ​​at two frequency points for multiple times, the multiple touch values ​​at the two frequency points are averaged and filtered, and the average value is used for subsequent key state determination.

[0049] Step 104: Calculate the current average touch value of the two frequency points minus the last average touch value to obtain the difference, and determine whether the difference is greater than the noise threshold set in advance. If it is greater, there is noise; if it is less, there is no noise. The noise status is used as the update condition of the subsequent base value.

[0050] Step 105: Subtract the touch average values ​​of the two frequency points from the corresponding base values ​​to obtain a difference. If the difference is greater than the key press threshold, jump to step 108; if the difference is less than or equal to the key press threshold, jump to step 106.

[0051] Step 106: Determine the noise state of the current key. If the noise state is 0, jump to step 107; if the noise state is 1, jump directly to step 102.

[0052] Step 107: Update the base value of the current key, then jump to step 102

[0053] Step 108: The average value of the current frequency point is judged to be pressed and the counter is incremented by 1, and then the average values ​​of the two frequency points are judged to be pressed and the sum is obtained. If the sum is greater than the number of key confirmations set in advance, it is determined that the key is actually pressed, otherwise jump to step 102.

[0054] According to the above embodiments, it is found that adding two dynamically changing frequency point detection and average value filtering methods can effectively suppress false triggering caused by conducted interference during the CS experiment and improve reliability. Embodiment 2

[0055] However, since the method provided in the above-mentioned embodiment 1 only uses the average value of each frequency point as the value for key judgment, this will cause the touch pressing signal under strong interference to be suppressed, thereby reducing the touch response sensitivity under this condition. In order to solve this problem, embodiment 2 of the present invention is further optimized based on this embodiment 1.

[0056] like Figure 6 As shown, the filtering method and key determination process after optimization and improvement in Embodiment 1 of the present invention are as follows:

[0057] Step 201: Initialize the registers used by the touch key module to provide a basic state.

[0058] Step 202: two dynamically changing frequency points are used for touch scanning, the two frequency points are respectively normally distributed and uniformly distributed, which can effectively reduce the influence of strong interference of fixed frequency on original touch data, and at the same time reduce the radiation interference generated to the outside.

[0059] Step 203: After collecting the touch value of each frequency point for multiple times, the touch value corresponding to each frequency point is sorted to obtain the maximum value, the middle value and the minimum value.

[0060] Step 204: The maximum touch value, the middle value and the minimum touch value of the two frequency points are averaged by the current value and the previous value respectively, and a first-level filtering is performed, wherein the middle value and the minimum value after averaging are used for subsequent key state determination.

[0061] Step 205: Calculate the current maximum touch value of the two frequency points minus the current minimum touch value to obtain the difference, and determine whether the difference is greater than the noise threshold set in advance. If it is greater, there is noise; if it is less, there is no noise. The noise state is used as the update condition of the subsequent base value.

[0062] Step 206: Subtract the touch intermediate values ​​of the two frequency points from the corresponding base values ​​to obtain the difference. If the difference is greater than the key press threshold, the intermediate value of the current frequency point is judged to be pressed and the counter is incremented by 1, and then jump to step 209; if the difference is less than or equal to the key press threshold, jump to step 207.

[0063] Step 207: Determine the noise state of the current key. If the noise state is 0, jump to step 208; if the noise state is 1, jump directly to step 202.

[0064] Step 208: Update the base value of the current key, and then jump to step 202.

[0065] Step 209: Subtract the minimum touch values ​​of the two frequency points from the corresponding base values ​​to obtain the difference. If the difference is greater than the key press threshold, the minimum value of the current frequency point is judged to be pressed and the counter is incremented by 1, and then jump to step 210; if the difference is less than or equal to the key press threshold, jump to step 207.

[0066] Step 210: Add the middle value judgment press counter and the minimum value judgment press counter of the two frequency points to obtain the sum value. If the sum value is greater than the number of key confirmations set in advance, it is determined that the key is actually pressed, otherwise jump to step 202.

[0067] The study found that after collecting the touch values ​​of two frequency points multiple times, the touch values ​​corresponding to each frequency point are sorted to obtain the maximum value, the middle value and the minimum value. In the case of strong interference, the difference between the middle value and the base value is similar to the average value in the above case, which has a good function of suppressing false triggering, but the touch sensitivity is poor; and the difference between the minimum value and the base value is closer to the difference of human hand touch, which can effectively improve the touch sensitivity, but while the reaction sensitivity is improved, it is easy to false trigger. Therefore, the present invention combines the two values ​​for touch judgment, so that in the case of strong interference, the judgment system will not falsely trigger, and can also sensitively respond to key touch. After actual testing, the improved filtering algorithm and the method of double-value judgment of touch button pressing can perfectly solve the problems of false triggering and sensitivity deviation of touch buttons in strong magnetic interference scenarios.

[0068] The above description is only a description of the preferred embodiments of the present invention, and is not intended to limit the scope of the present invention. Any changes or modifications made by a person skilled in the art in the field of the present invention based on the above disclosure shall fall within the scope of protection of the claims.

Claims

1. A dual-frequency dual-value detection method applied to touch, characterized in that: The steps include: Step S101: Initialization settings; Step S102: two frequency points are respectively used for touch scanning, and the two frequency points are dynamically changing frequency points; Step S103: After collecting touch values ​​at two frequency points for multiple times, the multiple touch values ​​at the two frequency points are averaged and filtered, and the average value is used for subsequent key state determination; Step S104: Calculate the difference between the current touch average value of the two frequency points and the last touch average value, and determine whether the difference is greater than a preset noise threshold; In the step S104, determining whether the difference is greater than a preset noise threshold specifically includes: if the difference is greater than the preset noise threshold, noise exists, and the noise state is 1; if the difference is less than the preset noise threshold, noise does not exist, and the noise state is 0; the noise state is used as a subsequent base value update condition; Step S105: Subtract the touch average values ​​of the two frequency points from the corresponding base values ​​to obtain a difference. If the difference is greater than the key press threshold, jump to step S108; if the difference is less than or equal to the key press threshold, jump to step S106; Step S106: Determine the noise state of the current key. If the noise state is 0, jump to step S107; if the noise state is 1, jump directly to step S102; Step S107: Update the base value of the current key, and then jump to step S102; Step S108: The average value of the current frequency point is judged to be pressed and the counter is incremented by 1, and then the average value of the two frequency points is added to obtain the sum value. If the sum value is greater than the preset number of key confirmations, it is determined that the key is actually pressed, otherwise jump to step S102.

2. A dual-frequency dual-value detection method for touch according to claim 1, characterized in that: The step S101 specifically includes: initializing and setting the registers used by the touch key module to provide a basic state.

3. A dual-frequency dual-value detection method for touch according to claim 1, characterized in that: In the step S102, the two frequency points are respectively dynamically changing frequency points of normal distribution and uniform distribution.

4. A dual-frequency dual-value detection method applied to touch, characterized in that: The steps include: Step S201: Initialization settings; Step S202: using two frequency points to perform touch scanning respectively, and the two frequency points are dynamically changing frequency points; Step S203: after collecting the touch value of each frequency point for multiple times, sorting the acquired touch values ​​corresponding to each frequency point to obtain the maximum value, the middle value and the minimum value of the touch; Step S204: The maximum touch value, the middle value and the minimum touch value of the two frequency points are averaged by the current value and the previous value respectively, and a first-level filtering is performed; wherein the middle value and the minimum value after averaging are used for subsequent key state determination; Step S205: Calculate the difference between the current maximum touch value and the current minimum touch value of the two frequency points, and determine whether the difference is greater than a preset noise threshold; In the step S205, determining whether the difference is greater than a preset noise threshold specifically includes: if the difference is greater than the preset noise threshold, noise exists, and the noise state is 1; if the difference is less than the preset noise threshold, noise does not exist, and the noise state is 0; the noise state is used as a subsequent base value update condition; Step S206: Subtract the touch intermediate values ​​of the two frequency points from the corresponding base values ​​to obtain the difference. If the difference is greater than the key press threshold, the intermediate value of the current frequency point is judged to be pressed by 1, and then jump to step S209; if the difference is less than or equal to the key press threshold, jump to step S207; Step S207: Determine the noise state of the current key. If the noise state is 0, jump to step S208; if the noise state is 1, jump directly to step S202; Step S208: Update the base value of the current key, and then jump to step S202; Step S209: Subtract the touch minimum values ​​of the two frequency points from the corresponding base values ​​to obtain the difference. If the difference is greater than the key press threshold, the minimum value of the current frequency point is judged to be pressed by 1, and then jump to step S210; if the difference is less than or equal to the key press threshold, jump to step S207; Step S210: Add the middle value judgment press counter and the minimum value judgment press counter of the two frequency points to obtain a sum value. If the sum value is greater than the preset number of key confirmation times, it is determined that the key is actually pressed, otherwise jump to step S202.

5. A dual-frequency dual-value detection method for touch as claimed in claim 4, characterized in that: The step S201 specifically includes: initializing and setting the registers used by the touch key module to provide a basic state.

6. A dual-frequency dual-value detection method for touch as claimed in claim 4, characterized in that: In the step S202, the two frequency points are respectively dynamically changing frequency points of normal distribution and uniform distribution.

Citation Information

Patent Citations

  • Capacitance type anti-interference detection device and detection method for touch key

    CN109428579A

  • Digital detection system, chip and detection method of capacitive touch key

    CN113867577A