4 ms·
> "Regardless of keyboard type, key switches are mechanically imperfect and are subject to contact bounce..." This is completely not true. For example, my Ris
by riskable 5y ago
> "Regardless of keyboard type, key switches are mechanically imperfect and are subject to contact bounce..."
This is completely not true. For example, my Riskeyboard 70 (https://gfycat.com/alienatedflatcanvasback https://gfycat.com/alienatedflatcanvasback) analog hall effect keyboard does not have contact bounce. This is because it's entirely analog and contactless.
Instead what it uses is programmed hysteresis: You can set your own completely arbitrary point of actuation as well as the `release_threshold` (it's in the config). The way it works is like this: Once you go past the point of actuation (a certain amount of millivolts changed from the resting value) that is considered a keypress but it won't consider it a keyrelease until you go past the original point of actuation plus whatever the release threshold is.
So if your resting mV (from the analog hall effect sensor) is 2000, your actuation threshold is 250, and your release threshold is 50 a keypress would work like this:
* Physical key is pressed and as it moves down the length of travel the mV reading from the sensor changes (goes up or down depending on the pole of the magnet).
* Once the difference from the resting value is greater than the actuation threshold (250) that's considered a keypress. At this point the sensor would be reading 1750 (the point of actuation).
* If the user kept the key pressed exactly at the point of actuation there's a chance that the keypress could "bounce" because the mV value goes up and down ("voltage wobble") on its own depending on the noise on the PCB and in the environment.
* The user releases the key and once the mV reading goes above 1750+*<release_threshold>* (1750+50) the key is considered released and a keyrelease event is sent.
My keyboard uses an STM32F401CEU6 running at 84MHz. The ADC runs at half that (42MHz) and is setup to read all 72 sensors (70 keys + an analog rotary encoder built into the PCB) in 0.160ms. It does this every millisecond to meet the USB spec's 1000Hz polling rate.
I assume the other analog keyboards feature similar methods and would have greatly reduce latency over traditional mechanical keyboards.
For reference (only) I have uploaded the Riskeyboard 70 firmware to github if you're curious to see how it all works (it's written in Rust): https://github.com/riskable/riskeyboard70/ https://github.com/riskable/riskeyboard70/
The keyboard uses 3D printed Void Switches (my magnetic separation design). Chyrosran22 did a teardown video recently going over the switches and their parametric nature here: https://youtu.be/H_Ym9528awM https://youtu.be/H_Ym9528awM
- michaelgrafl 5y agoThis is mentioned in the article.