Sparky wrote: ↑20 Apr 2020, 23:35
The best way to check your keyboard's scan rate is to measure the scan rate with an oscillocope, frequency counter, logic analyzer, some multimeters, etc. That site you linked to is worthless. It listed a keyboard with a 1.5ms matrix scan interval at 20ms.
latency is harder to test, you can only compare it to some other device of a known latency, or make your own latency tester to measure it directly. a keyboard with a 1.5ms scan interval might still have 10 to 20ms of debouncing, and 1 to 10ms of usb polling latency.
You can measure overall latency with a high speed camera, but it's pretty tedious and includes more than just the keyboard. You need many samples, and you can only really compare two keyboards, you can't find the absolute latency of a single keyboard with that method.
I agree.
Very tough to standardize automated keyboard latency testing.
Even different strike ferocities may not map to different human-finger responses -- sometimes different keybaord are latency-optimized to strong finger force versus a light finger force.
I think there's an opportunity to automate this with Arduino jerry-rigs.
Earth gravity is a known "constant" that helps automation -- force-wise and time-wise. So here:
<Random Brainstorm>
- Imagine clear plastic tubes (Home Depot standard) with standardized weights inside them (Ball bearing? Metal cylinder? Needs experimentation. Make sure tube breathes (e.g. drill side-holes at bottom) to avoid the plunger effect interfering with gravity math)
- Solenoid effect (railgun effect) can raise weights back upwards to reset drop height. (Or even magnet on a belt, but I'd try solenoid effect to raise object -- simpler and no moving parts).
- Turn off an millisecond-accurate electromagnet to drop object. Earth gravity is a known constant. (Or use vibration sensor on bottom of keyboard to detect strikes.)
- Theoretically, could even be inside a coil, aka solenoid, to eliminate a motorized-electromagnet raise of a ball bearing. Drop heights for a finger-width ball bearing would be quite shallow (just few centimeters) but it would have knowable mathematics due to known Earth gravity, upon turning off electromagnet to drop the ball bearing.
- Bounce tuning may be needed. For example, 2nd electromagnet at the bottom that turns on suddenly at the end of the drop (known gravity constant). This will control your bounciness of your ball bearing or metal weight. This can be tuned to an industry standard value theoretically to match finger bounciness, or even catch a mid-air first-bounce of ball bearing, for a brief-bounce test.
- Could eve support multiple drop heights to simulate different finger-strike ferocities.
- Add a cheap force sensor (if desired) to self-monitor forces if desired.
- Add a photodiode sensor (if desired) at bottom to self-monitor accuracy of rig.
- Occasionally measure this with camera to verify accuracy. Otherwise, just trust the math (subtract gravity-drop time from electromagnetic deactivation time). You could use a photodiode at the bottom as a double-verification for gravity behaviours, as a self-verifying element.
</Random Brainstorm>
Then publish it all as a standard sub-$100 hobbyist automated keyboard lag testing rig instructions. Buy the list off Amazon, build to instructions, and have results that can be successfully compared between keyboards.
It doesn't have to be perfect, but would be millisecond accurate with the right optimizing. It could automatically log data for 3 different strike velocities too, since the vertical drop height can vary to simulate that.
Swing-bar approaches can be done too (e.g. a pole with an outstretched object that rotates to strike a key). But I love simplifying things
because vertical gravity is a known latency. Swing bars can also drop (e.g. drop forward towards the keyboard), though the math for a swingbar is a bit different. Or one can use a photodiode to monitor a keystrike, but that's harder for a swingbar approach than a drop approach. A microphone/force/vibration sensor on the keyboard can stand-in.
It may not be perfectly debounce-accurate, so some optimizing may be necessary, to make sure it accurately mimics the bounciness of a human finger.
It doesn't test other parts of the lag chain, but may reasonably measure keyboard lag for multiple finger strike ferocity effects.
This rig doesn't have to be perfect. Just need SpaceX-style brilliance to come up with something. Like my cheap pursuit camera invention successfully standing-in for a $30,000 motion-blur-measurement rig in accuracy.
I'd love to see standardized keyboard-latency test rigs that are millisecond accurate.