Cherry removes debounce almost entirely!

Everything about latency. Tips, testing methods, mouse lag, display lag, game engine lag, network lag, whole input lag chain, VSYNC OFF vs VSYNC ON, and more! Input Lag Articles on Blur Busters.
User avatar
Ghilbi
Posts: 26
Joined: 31 May 2015, 01:21

Re: Cherry removes debounce almost entirely!

Post by Ghilbi » 31 May 2015, 01:30

There talking about the scan rate not the debounce times. The method their using for scanning is nothing new, debounce is still <4ms for cherry switches. Optical switches if you want to remove debounce entirely :arrow: https://www.massdrop.com/buy/bloody-b640

Sparky
Posts: 682
Joined: 15 Jan 2014, 02:29

Re: Cherry removes debounce almost entirely!

Post by Sparky » 31 May 2015, 09:44

Ghilbi wrote:There talking about the scan rate not the debounce times. The method their using for scanning is nothing new, debounce is still <4ms for cherry switches. Optical switches if you want to remove debounce entirely :arrow: https://www.massdrop.com/buy/bloody-b640
You don't need optical switches to remove the debounce delay. With a normal electrical switch you don't need to wait until the switch stops bouncing to know whether it's on or off, you just need to listen for the maximum duration of any single bounce. According to this post, that's about 50µs for cherry switches(you'd have to characterize whichever switches you use): https://geekhack.org/index.php?topic=42 ... #msg855693

I'll elaborate a bit on how I would build a low latency keyboard with mechanical switches. Say you want to build yourself a full size 104 or 105 key keyboard, and you choose a microcontroller with 25 IO pins. You use 3 for status LEDs. That gives you 22 pins for the key matrix, so you choose 7x15. You set up a table in memory with each of the 104 keys and a timestamp for the most recent time it was pressed, and set up the USB ISR to report every key pressed since the last interrupt or since the last full matrix scan, whichever is longer. Now we actually start scanning the key matrix. You apply power to one of the 7 rows for 50µs while continuously reading the 15 input pins(basically a while loop to bitwise OR your input pins with a local variable).When the 50µs is up, you update the timestamp for all the keys that were pressed in that 50µs and move on to the next row. For extra credit, you can synchronize the key matrix scan with the USB ISR, so each section of keys gets consistent latency, and you can prioritize what you want to minimize latency on(like WASD). If ~0.4ms from the matrix scan is still an intolerable maximum, you can use a microcontroller with more pins and a matrix with fewer rows.

flood
Posts: 929
Joined: 21 Dec 2013, 01:25

Re: Cherry removes debounce almost entirely!

Post by flood » 31 May 2015, 23:12

haven't googled but is there anyway to have analog debouncing without affecting actuation lag?

Sparky
Posts: 682
Joined: 15 Jan 2014, 02:29

Re: Cherry removes debounce almost entirely!

Post by Sparky » 01 Jun 2015, 00:35

flood wrote:haven't googled but is there anyway to have analog debouncing without affecting actuation lag?
I don't think the debouncing is analog, the switch is binary, after all. I think it's just the multiplexing that's "analog". The marketing materials are absolutely worthless for figuring out what they're trying to do, but it's pretty obvious the motivation for it is to save a few cents per board on BOM cost. Surface mount diodes are 1.2 cents each, and 0.5% tolerance resistors are 0.4 cents each. (on digikey anyway, I'm sure cherry can get a better deal from the manufacturer).

If they're using simple powers of 2 multiplexing, they'd be limited to about 6 keys per pin before the precision resistors would start to get more expensive than diodes, due to the tolerance needed on the most significant digit to keep it's uncertainty from washing out the least significant digit. They could be using some more complicated multiplexing method, but that would make it a pain to code and debug.

I wonder how much of the savings on diodes gets used on a more capable microcontroller? I can't imagine the old ones having 18ish ADC pins. Anyone know what vendor Cherry likes to use for their microcontrollers?

I'm curious how cherry deals with debouncing multiple keys simultaneously, I can't imagine it being as consistent as a normal matrix with diodes.

Sparky
Posts: 682
Joined: 15 Jan 2014, 02:29

Re: Cherry removes debounce almost entirely!

Post by Sparky » 07 Jun 2015, 00:11

Here's the datasheet for one of the new keyboards, but it doesn't list latency. http://cherrycorp.com/wp-content/upload ... 0-15-3.pdf

A few interesting notes:

"all keys are read simultaneously". That probably means they're using the normal powers of 2 type of multiplexing.

Most of the keys are limited to a single backlight color.

USB only, no PS/2.

No actual specification for latency. Just the marketing wank "fastest keyboard ever".

User avatar
Ghilbi
Posts: 26
Joined: 31 May 2015, 01:21

Re: Cherry removes debounce almost entirely!

Post by Ghilbi » 09 Jul 2015, 02:48

Is the actuation point measured from the bottomout point or the point at which you start the press?
(answer: http://www.tomshardware.com/reviews/mec ... 955-3.html)

Post Reply