C12 Embedded systems in MicroPython and C · Practice
Debouncing
Problems dealt one at a time, with new numbers every time. The kinds you miss come back more often, and you can keep going as long as you like.
Check
A button's contacts bounce 2 times on every press and 2 times on every release. How many falling edges does a fast program see for 3 presses?
Check
A debouncer samples every 2 ms and accepts a level after 3 equal samples in a row. About how long after the contacts settle does it react?
Write units the way you normally would: 1.5 ms, 1500 µs and 0.0015 s are the same answer.
Check
A hardware debouncer uses 10 kΩ and 0.1 µF. What's its time constant?
Write units the way you normally would: 1.5 ms, 1500 µs and 0.0015 s are the same answer.
Check
The worst bounce measured is 5 ms. With a safety margin of 1.5×, what stable time should the debouncer require?
Write units the way you normally would: 1.5 ms, 1500 µs and 0.0015 s are the same answer.
Check
Someone presses a button 10 times a second. How far apart are the presses?
Write units the way you normally would: 1.5 ms, 1500 µs and 0.0015 s are the same answer.
Check
A debouncer samples every 2 ms and needs 3 equal samples in a row.
(a)
At most how long after the contacts settle does it react?
Write units the way you normally would: 1.5 ms, 1500 µs and 0.0015 s are the same answer.
(b)
What is the fastest press-and-release rate it can follow, needing a full count for each?
Check
A debouncer ignores the button for 50 ms after each accepted press.
(a)
At most how many presses a second can it accept?
(b)
Can it keep up with a person pressing about 7 times a second (1 for yes)?
Check
Falling edges for 2 presses bouncing 1 times each way?
Check
Reaction time, 2 samples at 4 ms?
Write units the way you normally would: 1.5 ms, 1500 µs and 0.0015 s are the same answer.
Check
τ for 22 kΩ and 0.47 µF?
Write units the way you normally would: 1.5 ms, 1500 µs and 0.0015 s are the same answer.
A kind of problem counts as solid once you've got it right on the first try twice in a row. Back to the lesson · Practice every topic in C12