Touch detection method, operation control device and storage medium for touch buttons

By employing a touch detection method with three coprime sampling frequencies and the concept of Fourier transform, the problem of unreliable touch button detection is solved, achieving stable and accurate button detection in complex environments, and reducing the complexity and cost of MCU design.

CN114938224BActive Publication Date: 2025-10-31GUANGDONG REAL DESIGN INTELLIGENT TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210533574.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-17
Publication Date
2025-10-31
Estimated Expiration
2042-05-17

AI Technical Summary

Technical Problem

In existing technologies, touch detection of touch buttons is not reliable enough, and it is prone to false triggering or failure to trigger, resulting in insufficient reliability. Furthermore, the MCU designs of different manufacturers cannot be adapted to complex application environments, which increases costs.

Method used

Touch data of the touch button is collected using three coprime sampling frequencies. The sampling data closest to the touch reference value is selected as the closest sampling data. The effective touch value is calculated, and the button state is determined by a preset trigger threshold and the number of effective triggers. Frequency analysis and interference filtering are performed by combining the idea of ​​Fourier transform.

Benefits of technology

It improves the reliability of touch detection for touch buttons, reduces interference, ensures the stability and accuracy of button detection in complex environments, and reduces the complexity and cost of MCU design.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114938224B_ABST
    Figure CN114938224B_ABST
Patent Text Reader

Abstract

This invention discloses a touch detection method, operation control device, and storage medium for a touch button. The method employs three coprime sampling frequencies to collect touch data from the touch button, obtaining first, second, and third sampled data. The closest sampled data to the touch button's reference value is selected from these three data points as the closest sampled data. Based on the closest sampled data and the reference value, the effective touch value of the touch button is calculated. If the sum of the effective touch value and a preset trigger threshold of the touch button is less than the reference value, the effective trigger count of the touch button is incremented by one. If the effective trigger count exceeds the preset trigger count, the touch button is determined to be pressed. This method improves the reliability of touch detection for touch buttons.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of button control technology, and in particular to a touch detection method, operation control device and storage medium for touch buttons. Background Technology

[0002] Currently, implementing touch button functionality based on MCU requires adding many reliability circuits such as anti-interference and temperature drift control to the MCU design. This significantly increases the cost of touch MCUs. Furthermore, different manufacturers have different design focuses for touch MCUs, making them unsuitable for very complex application environments. As a result, touch detection of touch buttons is not reliable enough, often leading to false triggering or failure to trigger, resulting in insufficient reliability. Summary of the Invention

[0003] The purpose of this invention is to at least solve one of the technical problems existing in the prior art, and to provide a touch detection method, operation control device and storage medium for touch buttons, which can improve the reliability of touch detection of touch buttons.

[0004] In a first aspect, embodiments of the present invention provide a touch detection method for a touch button, comprising:

[0005] Touch data from the touch button is collected using three coprime sampling frequencies to obtain the first sample data, the second sample data, and the third sample data.

[0006] Select the closest touch reference value of the touch button from the first sampled data, the second sampled data and the third sampled data, and use it as the closest sampled data;

[0007] The effective touch value of the touch button is calculated based on the closest sampled data and the touch reference value;

[0008] When the sum of the valid touch value and the preset trigger threshold of the touch button is less than the touch reference value, the valid trigger count of the touch button is incremented by one; when the sum of the valid touch value and the preset trigger threshold of the touch button is greater than or equal to the touch reference value, the valid trigger count is reset to zero; the initial value of the valid trigger count is zero.

[0009] When the number of valid triggers is greater than the preset number of triggers, it is determined that the touch button has been pressed.

[0010] The touch detection method for touch buttons provided in this embodiment of the invention has at least the following beneficial effects: By using three coprime sampling frequencies to collect touch data of the touch button, even if one sampling frequency is interfered with, the other two sampling frequencies, being coprime, are less or even unaffected by interference, making the sampled data more reliable; the sampled data with the smallest difference from the touch reference value is taken as the closest sampled data, and the effective touch value is calculated. The effective touch value is then compared with the touch reference value. When the sum of the effective touch value and the preset trigger threshold of the touch button is less than the touch reference value, that is, the difference between the effective touch value and the touch reference value is greater than the preset trigger threshold, it can be preliminarily determined that the touch button has been pressed, and the effective trigger count of the touch button is incremented by one; finally, when the effective trigger count is greater than the preset trigger count, the debouncing condition is met, thereby determining that the touch button has been stably pressed; the touch detection method provided in this embodiment of the invention can improve the reliability of touch detection of touch buttons.

[0011] In the above-mentioned touch detection method for touch buttons, the effective touch value is calculated in the following way:

[0012] when and , ;

[0013] when and , ;

[0014] when E=D;

[0015] Where E is the valid touch value, D is the closest sampled data, B is the touch reference value, and Y is the preset trigger threshold.

[0016] In the above-described touch detection method for touch buttons, the method further includes:

[0017] When the number of touch buttons whose sum of valid touch value and preset trigger threshold is less than the touch reference value exceeds half the total number of all touch buttons, the touch reference value of all touch buttons is reset to zero; wherein, the maximum number of responding buttons is less than half the total number of all touch buttons, and the maximum number of responding buttons is the number of touch buttons that are allowed to respond simultaneously.

[0018] In the above-described touch detection method for touch buttons, the method further includes:

[0019] When the number of touch buttons with a valid trigger count of non-zero is greater than the maximum number of responding buttons, all valid trigger counts are reset to zero; wherein, the maximum number of responding buttons is the number of touch buttons that are allowed to respond simultaneously.

[0020] In the above-described touch detection method for touch buttons, when the number of touch buttons identified as pressed exceeds the maximum number of responding buttons, the touch reference values ​​of all touch buttons identified as pressed are cleared to zero; wherein, the maximum number of responding buttons is the number of touch buttons that are allowed to respond simultaneously.

[0021] In the above-mentioned touch detection method for touch buttons, when one of the following conditions is met and the duration reaches a first preset time, the current valid touch value is assigned to the touch reference value;

[0022] Scenario 1: No touch button was pressed;

[0023] Scenario 2: The difference between the maximum and minimum values ​​of the first, second, and third sampled data is less than a preset noise threshold;

[0024] Scenario 3: The difference between the average of the maximum and minimum values ​​in the first sampled data, the second sampled data, and the third sampled data and the current touch reference value is less than half of the preset noise threshold.

[0025] The touch detection method for the touch buttons described above also includes: cyclically adjusting the sampling frequencies of the three coprime keys within a preset range in 2% increments.

[0026] In a second aspect, embodiments of the present invention also provide an operation control device, including at least one control processor and a memory for communicatively connecting to the at least one control processor; the memory stores instructions executable by the at least one control processor, the instructions being executed by the at least one control processor to enable the at least one control processor to perform the touch detection method for touch buttons as described in the first aspect embodiment above.

[0027] Thirdly, embodiments of the present invention also provide an electronic device, including the operation control device described in the second aspect of the embodiments above.

[0028] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing computer-executable instructions for causing a computer to perform the touch detection method for touch buttons as described in the first aspect embodiment above.

[0029] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the description, claims, and drawings. Attached Figure Description

[0030] The accompanying drawings are provided to further understand the technical solutions of the present invention and constitute a part of the specification. They are used together with the embodiments of the present invention to explain the technical solutions of the present invention, and do not constitute a limitation on the technical solutions of the present invention.

[0031] The present invention will be further described below with reference to the accompanying drawings and embodiments;

[0032] Figure 1 This is a flowchart of a touch detection method for a touch button provided in an embodiment of the present invention;

[0033] Figure 2 This is a flowchart of a touch detection method for a touch button according to another embodiment of the present invention;

[0034] Figure 3 This is a schematic diagram of the operation control device provided in an embodiment of the present invention. Detailed Implementation

[0035] This section will describe in detail specific embodiments of the present invention. Preferred embodiments of the present invention are shown in the accompanying drawings. The purpose of the drawings is to supplement the textual description with graphics, so that people can intuitively and vividly understand each technical feature and overall technical solution of the present invention, but they should not be construed as limiting the scope of protection of the present invention.

[0036] In the description of this invention, the use of "first" and "second" is for the purpose of distinguishing technical features only, and should not be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated or the order of the technical features indicated.

[0037] In the description of this invention, unless otherwise explicitly defined, terms such as "set up," "install," and "connect" should be interpreted broadly, and those skilled in the art can reasonably determine the specific meaning of the above terms in this invention in conjunction with the specific content of the technical solution.

[0038] This invention provides a touch detection method, operation control device, and storage medium for touch buttons, which can improve the reliability of touch detection for touch buttons.

[0039] The embodiments of the present invention will be further described below with reference to the accompanying drawings.

[0040] Reference Figure 1 A first aspect of the present invention provides a touch detection method for a touch button, including but not limited to steps S110 to S150:

[0041] Step S110: Use three coprime sampling frequencies to collect touch data of the touch button to obtain first sample data, second sample data and third sample data;

[0042] Step S120: Select the closest sampled data to the touch reference value of the touch button from the first sampled data, the second sampled data and the third sampled data, and use it as the closest sampled data;

[0043] Step S130: Calculate the effective touch value of the touch button based on the closest sampling data and the touch reference value;

[0044] Step S140: When the sum of the valid touch value and the preset trigger threshold of the touch button is less than the touch reference value, the valid trigger count of the touch button is incremented by one; when the sum of the valid touch value and the preset trigger threshold of the touch button is greater than or equal to the touch reference value, the valid trigger count is reset to zero; the initial value of the valid trigger count is zero.

[0045] Step S150: When the number of valid triggers is greater than the preset number of triggers, it is determined that the touch button has been pressed.

[0046] The touch detection method for a touch button provided in this embodiment of the invention collects touch data of the touch button using three coprime sampling frequencies. Even if one sampling frequency is interfered with, the other two sampling frequencies, being coprime, experience little or no interference, making the sampled data more reliable. The sampled data with the smallest difference from the touch reference value is taken as the closest sampled data, and the effective touch value is calculated. The effective touch value is then compared with the touch reference value. When the sum of the effective touch value and the preset trigger threshold of the touch button is less than the touch reference value, that is, when the difference between the effective touch value and the touch reference value is greater than the preset trigger threshold, it can be preliminarily determined that the touch button has been pressed, and the effective trigger count of the touch button is incremented by one. Finally, when the effective trigger count is greater than the preset trigger count, the debouncing condition is met, thus confirming that the touch button has been stably pressed. The touch detection method provided in this embodiment of the invention can improve the reliability of touch detection of touch buttons.

[0047] In the above-mentioned touch detection method for touch buttons, the effective touch value is calculated in the following way:

[0048] when and , ;

[0049] when and , ;

[0050] when E=D;

[0051] Where E is the valid touch value, D is the closest sampled data, B is the touch reference value, and Y is the preset trigger threshold.

[0052] The effective touch value E calculated using the above method is closer to the touch reference value B, which improves the reliability of touch judgment using the effective touch value E.

[0053] The touch detection method for the touch button described above further includes:

[0054] When the number of touch buttons whose sum of valid touch value and preset trigger threshold is less than the touch reference value exceeds half the total number of all touch buttons, the touch reference value of all touch buttons is reset to zero; where the maximum number of responding buttons is less than half the total number of all touch buttons, the maximum number of responding buttons is the number of touch buttons that are allowed to respond simultaneously.

[0055] Understandably, if the maximum number of responsive buttons is less than half the total number of all touch buttons, and the number of touch buttons whose sum of the effective touch value and the preset trigger threshold is less than the touch reference value exceeds half the total number of all touch buttons, it indicates that the touch buttons are subjected to strong magnetic interference. Resetting the touch reference value of all touch buttons to zero can improve reliability.

[0056] The touch detection method for the touch button described above further includes:

[0057] If the number of touch buttons with a valid trigger count of non-zero exceeds the maximum number of responding buttons, all valid trigger counts are reset to zero; where the maximum number of responding buttons is the number of touch buttons that are allowed to respond simultaneously.

[0058] It is understandable that if the number of touch buttons with a non-zero effective trigger count is greater than the maximum number of responding buttons, it indicates that the current environment is harsh. Resetting all effective trigger counts to zero can improve reliability.

[0059] In the above-mentioned touch detection method for touch buttons, when the number of touch buttons identified as pressed exceeds the maximum number of responding buttons, the touch reference value of all touch buttons identified as pressed is cleared to zero; where the maximum number of responding buttons is the number of touch buttons that are allowed to respond simultaneously.

[0060] It is understandable that if the number of touch buttons identified as pressed exceeds the maximum number of responding buttons, it indicates that some touch buttons are being interfered with by strong pulses. Resetting all touch reference values ​​to zero can improve reliability.

[0061] In the above-mentioned touch detection method for touch buttons, when one of the following conditions is met and the duration reaches a first preset time, the current valid touch value is assigned to the touch reference value.

[0062] Scenario 1: No touch button was pressed;

[0063] Scenario 2: The difference between the maximum and minimum values ​​in the first, second, and third sampled data is less than the preset noise threshold;

[0064] Case 3: The difference between the average of the maximum and minimum values ​​in the first, second, and third sampled data and the current touch reference value is less than half of the preset noise threshold.

[0065] The touch detection method for the touch button described above also includes: cyclically adjusting the sampling frequencies of the three coprime samples within a preset range in 2% increments.

[0066] Below, in conjunction with Figure 2 This paper introduces a touch detection method for a touch button according to a specific embodiment of the present invention.

[0067] The touch detection method for touch buttons includes four parts: data processing, button judgment, environment judgment, and baseline update.

[0068] First, there's the data processing section. For a specific touch button, three coprime sampling frequencies are used to collect touch data, resulting in first sample data D1, second sample data D2, and third sample data D3. Then, D1, D2, and D3 are compared with the touch reference value B of the touch button. The sample data closest to the touch reference value B is selected from these three data points; that is, the sample data with the smallest absolute difference from the touch reference value B is chosen as the closest sample data D. Then, based on the closest sample data D and the touch reference value... The reference value B is used to calculate the effective touch value E of the touch button. Specifically, if the absolute value of the difference between the closest sampled data D and the touch reference value B exceeds twice the preset trigger threshold Y of the touch button, then D and B are compared. If D is greater than B, then half of the difference between D and B is subtracted from D to calculate the effective touch value E; if D is less than B, then three-quarters of the difference between B and D is added to D to calculate the effective touch value E; if the absolute value of the difference between the closest sampled data D and the touch reference value B does not exceed twice the preset trigger threshold Y of the touch button, then the effective touch value E is equal to the closest sampled data D.

[0069] Next is the button detection section. The valid touch value E is compared with the touch reference value B. If the valid touch value E plus the preset trigger threshold Y of the touch button is still less than the touch reference value B, the valid trigger count of the touch button is counted once; otherwise, the count is reset to zero. When the count of valid triggers exceeds the preset trigger count, it is determined that the touch button has been pressed.

[0070] Next is the environmental judgment section. If the number of touch buttons whose sum of valid touch value E and preset trigger threshold Y is less than touch reference value B exceeds half the total number of all touch buttons, and the maximum number of responding buttons is less than half the total number of all touch buttons, then it is considered that strong magnetic interference has occurred, and the touch reference value B of all touch buttons is reset to zero to improve reliability; where the maximum number of responding buttons is the number of touch buttons that are allowed to respond simultaneously. If the number of touch buttons with a valid trigger count that is not zero is greater than the maximum number of responding buttons, then the current environment is considered to be severe, and the valid trigger count of all touch buttons is reset to zero to improve reliability. When the number of touch buttons identified as pressed exceeds the maximum number of responding buttons, then it is considered that individual buttons are subject to strong pulse interference, and the touch reference value of all touch buttons identified as pressed is reset to zero.

[0071] Finally, there is the baseline update section. Baseline update condition one: no touch button is pressed; Baseline update condition three: the difference between the maximum and minimum values ​​of the first sampled data D1, the second sampled data D2, and the third sampled data D3 is less than a preset noise threshold; Baseline update condition four: the difference between the average of the maximum and minimum values ​​of the first sampled data D1, the second sampled data D2, and the third sampled data D3 and the current touch baseline value is less than half of the preset noise threshold. When one of the above baseline update conditions is met and the duration reaches a first preset time, the touch baseline value B is updated, and the current valid touch value E is assigned to the touch baseline value B.

[0072] It should be noted that this invention innovatively introduces the concept of Fourier transform to process touch data from touch buttons. Fourier transform represents the ability to express a function satisfying certain conditions as a linear combination of trigonometric functions (sine and / or cosine functions) or their integrals. Specifically, it decomposes a signal curve into several sine curves. The frequencies of these sine curves represent the frequency variations of the original signal curve. In essence, it categorizes signals of different frequencies on the original signal curve, grouping signals at the same frequency onto a single sine curve. This results in several sine curves of different frequencies. Among these sine curves, some contain the information we need, while others do not. In simpler terms, it converts a time-domain signal into a frequency-domain signal for processing.

[0073] In this specific embodiment, touch data is collected from all touch buttons using three coprime sampling frequencies, with the frequency being finely adjusted in 2% increments within a defined range during each sampling period. Under normal touch operation, converting the touch data from the time domain to the frequency domain over a period of time reveals that interference from power supply ripple, temperature changes causing parasitic capacitance variations, etc., manifests as random frequency points and their harmonics in the frequency domain, while the data at other frequencies remains stable. During EMC testing of the touch module, this pattern becomes even more apparent. Since the test couples an interference signal with a frequency increment of 1% to the power supply, converting the touch data from the time domain to the frequency domain over a period of time shows that the interfered frequencies also change synchronously in 1% increments. Therefore, this embodiment uses three coprime sampling frequencies to collect touch data. The coprime nature of the frequencies ensures that if one sampling frequency is interfered with, the other two frequencies, being coprime, experience little or no interference. By comparing the data, the problematic frequency's data can be clearly filtered out. Secondly, by continuously incrementing by 2%, frequency dithering can be achieved, further increasing the probability of misalignment between the touch sampling frequency and the interference frequency, making the sampled data more reliable. Frequency dithering can also solve problems such as power interference and spatial radiation from the touch module. In addition, environmental interference is analyzed, such as strong magnetic interference, power supply jitter interference, voltage sag interference, and temperature shock interference, all of which undergo principle analysis, testing, and data processing. For example, strong magnetic interference, in the frequency domain analysis, will exhibit a large amplitude interference in certain frequency bands. If the touch frequency happens to be at an overtone point, it will cause abnormal changes in the change values ​​of most or even all touch buttons. Considering normal multi-button functionality, if more than half of the touch buttons show changes exceeding the set threshold (i.e., more than half of the buttons respond), and this button function is not active, it can be considered that strong magnetic interference is present. In this case, the touch reference value should be reset to zero, and the touch reference value should be updated again according to the above-mentioned reference update section.

[0074] The baseline update requires a stable state. If the environment is harsh or subject to interference, the baseline update will not be performed. Therefore, the baseline update step must meet the following conditions: 1) No touch button response; 2) The difference between the maximum and minimum values ​​of the three sampled data points of the touch button is less than a set noise threshold; 3) The difference between the average of the maximum and minimum values ​​of the three sampled data points of the touch button and the current baseline value is less than half the noise value; 4) Under the above three conditions, the number of debouncing iterations reaches a set value, typically 8 or 10. Once the conditions are met, the current valid touch value is assigned to the touch baseline value, thus completing the baseline update.

[0075] It is understandable that: 1) When a touch button responds, there is a difference between the touch reference value and the touch valid value. If the reference value is updated at this time, the difference will decrease, failing to meet the conditions for button response, resulting in button malfunction; 2) The current single button press situation is judged. If a certain frequency band is interfered with, the difference among the three sampled data of the touch button will be large. At this time, the environment is unstable, and the reference value is not updated; 3) The average of the three sampled data of the touch button at the current moment is compared with the touch reference value to determine whether the current environment is stable or under rapidly changing interference; 4) Touch data over a period of time is used to determine whether the current state is stable. Considering that the touch needs to adapt to rapid temperature and voltage changes, the time cannot be too long. Therefore, it is generally set to 8 debouncing cycles. If the above three conditions are met, the environment is considered stable, and the touch reference value can be updated. At the same time, the current touch valid value is directly assigned to the touch reference value, which can achieve the purpose of rapid update and reference following.

[0076] The specific implementation process of this invention is as follows: Touch data is collected using three coprime sampling frequencies. The value with the smallest difference from the current touch reference value among the three sampled data values ​​is taken as the current valid touch value. The current valid touch value is compared with the touch reference value. If the difference between the two exceeds the set trigger threshold, it is considered that the current touch button has been pressed. At the same time, it is necessary to determine whether the number of debouncing counts has reached a preset value. If it has, it is considered that the button is stably pressed, and the corresponding button is responded to. An environment judgment is performed to determine whether the current environment is stable. If an abnormality is detected in the current environment, corresponding abnormality handling is performed. A reference update judgment is performed to determine whether the reference value needs to be updated.

[0077] This invention, based on the concept of Fourier transform, utilizes three coprime sampling frequencies for touch data acquisition, effectively shielding most frequency band interference. It then selects the data closest to the touch reference value as the valid touch value. This allows for the extraction of interference-free, true data from a smaller sample size. Furthermore, this invention employs extensive experimental testing to collect data under various complex interference environments, simplifying it into three environment models and implementing targeted algorithmic processing, significantly improving reliability.

[0078] Reference Figure 3 A second aspect of the present invention also provides an operation control device 300, including at least one control processor 310 and a memory 320 for communicatively connecting to the at least one control processor 310; the memory 320 stores instructions executable by the at least one control processor 310, the instructions being executed by the at least one control processor 310 to enable the at least one control processor 310 to perform the touch detection method of the touch button as described in the first aspect of the present invention.

[0079] In addition, a third aspect of the present invention provides an electronic device including the operation control device as described in the second aspect embodiment above.

[0080] In addition, a fourth aspect of the present invention provides a computer-readable storage medium storing computer-executable instructions for causing a computer to perform the touch detection method of the touch button as described in the first aspect of the present invention.

[0081] It will be understood by those skilled in the art that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which may include computer storage media or non-transitory media and communication media or transient media. As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information such as computer-readable instructions, data structures, program modules, or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc DVD or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, as is known to those skilled in the art, communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

[0082] The embodiments of the present invention have been described in detail above with reference to the accompanying drawings. However, the present invention is not limited to the above embodiments. Within the scope of knowledge possessed by those skilled in the art, various changes can be made without departing from the spirit of the present invention.

Claims

1. A touch detection method for a touch button, characterized in that, include: Touch data from the touch button is collected using three coprime sampling frequencies to obtain the first sample data, the second sample data, and the third sample data. Select the closest touch reference value of the touch button from the first sampled data, the second sampled data and the third sampled data, and use it as the closest sampled data; The effective touch value of the touch button is calculated based on the closest sampled data and the touch reference value; When the sum of the effective touch value and the preset trigger threshold of the touch button is less than the touch reference value, the effective trigger count of the touch button is incremented by one; When the sum of the valid touch value and the preset trigger threshold of the touch button is greater than or equal to the touch reference value, the number of valid triggers is reset to zero; the initial value of the number of valid triggers is zero. When the number of valid triggers is greater than the preset number of triggers, it is determined that the touch button has been pressed; in: The effective touch value is calculated using the following method: when and , ; when and , ; when E=D; Where E is the valid touch value, D is the closest sampled data, B is the touch reference value, and Y is the preset trigger threshold; When one of the following conditions is met and the duration reaches the first preset time, the current valid touch value is assigned to the touch reference value; Scenario 1: No touch button was pressed; Scenario 2: The difference between the maximum and minimum values ​​of the first, second, and third sampled data is less than a preset noise threshold; Scenario 3: The difference between the average of the maximum and minimum values ​​in the first sampled data, the second sampled data, and the third sampled data and the current touch reference value is less than half of the preset noise threshold.

2. The touch detection method for touch buttons according to claim 1, characterized in that, The method further includes: When the number of touch buttons whose sum of valid touch value and preset trigger threshold is less than the touch reference value exceeds half the total number of all touch buttons, the touch reference value of all touch buttons is reset to zero; wherein, the maximum number of responding buttons is less than half the total number of all touch buttons, and the maximum number of responding buttons is the number of touch buttons that are allowed to respond simultaneously.

3. The touch detection method for touch buttons according to claim 1, characterized in that, The method further includes: When the number of touch buttons with a valid trigger count of non-zero is greater than the maximum number of responding buttons, all valid trigger counts are reset to zero; wherein, the maximum number of responding buttons is the number of touch buttons that are allowed to respond simultaneously.

4. The touch detection method for a touch button according to claim 1, characterized in that, When the number of touch buttons identified as pressed exceeds the maximum number of responding buttons, the touch reference values ​​of all touch buttons identified as pressed are cleared to zero; wherein, the maximum number of responding buttons is the number of touch buttons that are allowed to respond simultaneously.

5. The touch detection method for a touch button according to claim 1, characterized in that, Also includes: The sampling frequencies of the three coprime samples are cyclically adjusted within a preset range in 2% increments.

6. An operation control device, characterized in that, It includes at least one control processor and a memory for communicatively connecting to the at least one control processor; the memory stores instructions executable by the at least one control processor, which, when executed by the at least one control processor, enable the at least one control processor to perform a touch detection method for a touch button as described in any one of claims 1 to 5.

7. An electronic device, characterized in that, Includes the operation control device as described in claim 6.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions for causing a computer to perform the touch detection method for a touch button as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Key detection method and device

    CN101968530A

  • Touch key anti-interference method and circuit

    CN110971225A