Switch Edge Timing for Bounce-Free User Input Detection
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
User input devices such as keyboards and mice face issues with switch bouncing, which generates false signals due to the vacillation of moving parts, leading to misinterpretation of button clicks and phantom clicks.
Innovation Solution
A method and device that detect edges in the output signal from a switch, employing a dynamic masking period by counting down to a rest period and restarting the countdown upon each edge detection, ensuring that only transitions after the rest period are recognized as valid user inputs.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If a fixed masking period is used to filter bounce signals, then bounce signals are filtered out, but genuine quick successive clicks may be missed
Solution Approach 1:
The masking period is changed from a fixed value to a dynamic value that adapts based on the detected edge pattern. The timer restarts upon detecting further edges during the masking period, effectively extending the masking duration when bounce signals are present while allowing quick successive clicks to be detected when they occur after the actual state transition.
2Reliability
If the masking period is extended to ensure all bounce signals are filtered, then bounce signal filtering improves, but response time to genuine clicks increases
Solution Approach 1:
The system uses feedback from edge detections during the masking period to dynamically adjust the masking duration. When edges are detected, the timer restarts, extending the masking period only as long as needed to filter bounce signals. This feedback mechanism ensures that the masking period is extended minimally only when necessary, preserving response time for genuine clicks.
3Device complexity
If a simple edge detection method is used, then device complexity is reduced, but measurement precision of state transitions deteriorates
Solution Approach 1:
The system performs preliminary action by starting a timer upon detecting a first-to-second state edge, creating a predetermined masking period before the state transition is fully registered. This preliminary timing action allows the system to filter out bounce signals that occur during the masking period while still detecting genuine state transitions, improving measurement precision without requiring complex detection mechanisms.
Data Source
AI summary
According to various embodiments, there is provided a method for identifying a user input in a user input device, the method including: detecting edges in an output signal generated by a switch in the user input device; identifying a first-to-second-state edge as being indicative of a transition from a first state to a second state; counting down to a first rest period upon identifying the first-to-second-state edge; before completion of the counting down to the first rest period, restarting the counting down upon each detection of a further edge in the output signal; detecting a second-to-first-state edge in the output signal that occurs after completion of the counting down to the first rest period; and identifying the second-to-first-state edge as being indicative of a transition from the second state to the first state.


