Author Topic: NKRO vs. non-NKRO... what's different inside?  (Read 6369 times)

0 Members and 1 Guest are viewing this topic.

Offline SLM

  • Thread Starter
  • Posts: 37
NKRO vs. non-NKRO... what's different inside?
« on: Fri, 15 January 2010, 23:41:06 »
So I've reading through some threads about NKRO boards which lead to this question... So what's different inside a NKRO board that makes it NKRO vs. non-NKRO boards?  Can a non-NKRO board be converted to NKRO?  I've a few references to resistors or diodes on the switches which leads me to believe that it shouldn't be that hard to take a standard board, say a Cherry G80-3000 with blues and make it NKRO... or is there more to it than that?  Yes, no?

Offline InSanCen

  • Posts: 565
NKRO vs. non-NKRO... what's different inside?
« Reply #1 on: Sat, 16 January 2010, 01:15:40 »
AFAIK, it's the matrix rather than the controller in most cases (I think cases like the DAS transposition errors are controller based though). The matrix as standard, cannot detect more than x number of keys at a time, and adding a diode to each switch alleviates this. If you are thinking about adding them yourself, that's a lot of diodes, and will only work on PCB based boards, and not membrane boards like the M's.

I might be be doing this, just for a laugh, on my Wang 724 as I am already  replacing all the switches anyway, so adding diodes isn't going to create that much extra work.

http://geekhack.org/showwiki.php?title=Island:6731&&highlight=diodes+NKRO
« Last Edit: Sat, 16 January 2010, 01:17:53 by InSanCen »
Currently Using :- IBM M13 1996, Black :
Currently Own :- 1391406 1989 & 1990 : AT Model F 1985 : Boscom 122 (Black) : G80-3000 : G80-1800 (x2) : Wang 724 : G81-8000LPBGB (Card Reader, MY) : Unitek : AT102W : TVS Gold :
Project's :- 122 key 1389620 Wireless ESP32 :
'Pooter :- Xeon E5-2680v4 : Machinist MR9A : 2x16GB DDR4 : Radeon RX6600 : NVME & Spinning rust :

Offline Rajagra

  • Posts: 1930
NKRO vs. non-NKRO... what's different inside?
« Reply #2 on: Sat, 16 January 2010, 04:28:55 »
Also, adding diodes may or may not help things, depending on how the firmware is programmed.

For example, if you press 4 keys that form a square on the matrix, the firmware will almost certainly treat this as an error condition. It has no way of knowing you've added diodes, so will still think you've pressed 3 keys and the 4th is a ghost condition.

However, what will happen if you press 3 keys in a square, after adding diodes? If you are lucky, the firmware will treat this as OK, and the keyboard will work a lot better than before - you will have minimum 3 key rollover, and most of the time larger combinations will work. But if you are unlucky, the firmware will be too smart for its own good, and still detect those 3 keys as an error condition.

It would be a good idea to do some tests before adding diodes to every switch.

Offline ch_123

  • * Exalted Elder
  • Posts: 5860
NKRO vs. non-NKRO... what's different inside?
« Reply #3 on: Sat, 16 January 2010, 05:03:00 »
How exactly do Diodes give a keyboard the magical powers of NKRO?

Offline quadibloc

  • Posts: 770
  • Location: Edmonton, Alberta, Canada
  • Layout Fanatic
    • John Savard's Home Page
NKRO vs. non-NKRO... what's different inside?
« Reply #4 on: Sat, 16 January 2010, 06:06:35 »
Quote from: ch_123;151253
How exactly do Diodes give a keyboard the magical powers of NKRO?


The real question is how on Earth a keyboard without diodes even manages to work.

Basically, a typical (non-capacitative) keyboard is a switch matrix. You have a bunch of typewriter keys which are momentary contact normally open single-pole single-throw switches. Like a doorbell.

And the way they're wired is this: there are wires going by rows and columns, one of the two connectors on each switch is wired to a row, and the other one is wired to a column.

The keyboard controller is connected to the columns, and can tell if a column is connected to electrical power. It is also connected to the rows, and applies electrical power to each one in turn.

So if the switch in row 5 and column 3 is pushed down to close it, when a voltage is applied to row 5, it will come out on column 3.

Assume for the sake of illustration that the controller either connects +5 volts, or a high-impedance state, to the rows.

The columns are then connected to ground through a resistance in the controller, and if current flows through that resistance, this means a voltage has been detected.

What happens when more than one button is pushed at the same time?

If no two buttons that are pushed are in the same column, there is no problem. When voltages are applied to each row in turn, each column will only show a voltage if it is connected to that row by a button that was pushed, so the keyboard controller will properly detect which buttons are pushed in every row.

But if two buttons are pushed in the same column, then when a voltage is applied to the row in which one of those buttons is located, it travels through the two closed switches, first from row to column, and then from column to row, so that the matrix acts as if the keyboard controller applied the voltage to both of the rows in which these two buttons were located.

Note that you have a positive voltage from the keyboard controller, flowing into the row wire, through the first button from its row contact to its column contact, and then incorrectly energizing a second row wire by flowing from the column contact to the row contact of the second button.

So if we added a diode to every one of the buttons, so that when the switch was closed, it was only possible for current to flow from the row wire to the column wire, and not back from a column wire to a row wire, it wouldn't be possible for two buttons in the same column to make buttons in a row not currently being scanned still be detected.

Offline SLM

  • Thread Starter
  • Posts: 37
NKRO vs. non-NKRO... what's different inside?
« Reply #5 on: Sat, 16 January 2010, 09:17:54 »
Ok, so after reading the Wiki that InSanChen linked to and quadibloc's post it looks like it's really not a doable mod without a custom controller.  Just cutting the traces and adding the diodes and jumper wires won't do any good unless you can get a specific controller that's programmed properly.  Do I have this right?

Offline JBert

  • Posts: 764
NKRO vs. non-NKRO... what's different inside?
« Reply #6 on: Sat, 16 January 2010, 14:05:01 »
Yes, you can't do without a controller replacement or firmware upgrade (impossible for most keyboards as the firmware is readonly).
IBM Model F XT + Soarer's USB Converter || Cherry G80-3000/Clears

The storage list:
IBM Model F AT || Cherry G80-3000/Blues || Compaq MX11800 (Cherry brown, bizarre layout) || IBM KB-8923 (model M-style RD) || G81-3010 Hxx || BTC 5100C || G81-3000 Sxx || Atari keyboard (?)


Currently ignored by: nobody?

Disclaimer: we don\'t help you save money on [strike]keyboards[/strike] hardware, rather we make you feel less bad about your expense.
[/SIZE]

Offline pex

  • Posts: 145
NKRO vs. non-NKRO... what's different inside?
« Reply #7 on: Sat, 16 January 2010, 14:54:29 »
Quote from: InSanCen;151240
AFAIK, it's the matrix rather than the controller in most cases  [...] and will only work on PCB based boards, and not membrane boards like the M's.


So all this time you guys thought it would be funny if I spent some time and $15 dollars to get my M some NKRO, instead of telling me this?
Ж®Cherry G80-8113 (someday I hope to have one that reads magstripes, rfid cards, and smartcards), broken \'98 42H1292 Model M, some other Model M from a decade before that, 30 more keyboards in a box, 4 more lying here or there
Destroying Sanctity: my Model M project. Status: Dead.

Offline JBert

  • Posts: 764
NKRO vs. non-NKRO... what's different inside?
« Reply #8 on: Sat, 16 January 2010, 15:14:16 »
Well, in theory it's not impossible. It's just too hard to call it practical.
IBM Model F XT + Soarer's USB Converter || Cherry G80-3000/Clears

The storage list:
IBM Model F AT || Cherry G80-3000/Blues || Compaq MX11800 (Cherry brown, bizarre layout) || IBM KB-8923 (model M-style RD) || G81-3010 Hxx || BTC 5100C || G81-3000 Sxx || Atari keyboard (?)


Currently ignored by: nobody?

Disclaimer: we don\'t help you save money on [strike]keyboards[/strike] hardware, rather we make you feel less bad about your expense.
[/SIZE]

Offline pex

  • Posts: 145
NKRO vs. non-NKRO... what's different inside?
« Reply #9 on: Sun, 17 January 2010, 04:53:20 »
I hadn't stopped by recently until yesterday, and I did get this feeling that there was a whole lot more wealth here.  It was pretty impressive.  Of course, there was a great emotional toll as I read through projects, each one building and then killing some romanticized notion of easy NKRO in my head.

My site is down because my host's maintenance period went awry and I failed to have a good system to put up a mirror, but it will be back.  The material of the page was not too substantive, and most musing will be on geekhack at http://geekhack.org/showthread.php?t=4095 where I had two objectives, fixing whatever it was that was wrong with the Model M I had found, and giving the Model M the blessing of NKRO.
Ж®Cherry G80-8113 (someday I hope to have one that reads magstripes, rfid cards, and smartcards), broken \'98 42H1292 Model M, some other Model M from a decade before that, 30 more keyboards in a box, 4 more lying here or there
Destroying Sanctity: my Model M project. Status: Dead.

Offline SLM

  • Thread Starter
  • Posts: 37
NKRO vs. non-NKRO... what's different inside?
« Reply #10 on: Sun, 17 January 2010, 09:39:21 »
Thanks for the information.  I was sort of figuring there was more to it than just adding the diodes or I'd think most if not all the higher end boards would get NKRO.  Doing a PCB with surface mount diodes couldn't add all that much to the cost of the PCB but the wiring would most likely be hand work (or necessitate a two or more layer PCB) and add a significant cost.  That kinda explains why the Filco's with NKRO are so much more than the non-NKRO version.

Like JBert said, not impossible but definitely impractical.

Offline SLM

  • Thread Starter
  • Posts: 37
NKRO vs. non-NKRO... what's different inside?
« Reply #11 on: Sun, 17 January 2010, 11:43:04 »
Quote from: ripster;151495
It costs Filco less than $1 in diodes and stripping out a few ghosting subroutines in the firmware.


Which adds up to a $25.00 dollar premium on the price of the board.  Ah, such is economics I guess.

Offline SLM

  • Thread Starter
  • Posts: 37
NKRO vs. non-NKRO... what's different inside?
« Reply #12 on: Sun, 17 January 2010, 12:41:19 »
'Cuz "Google it noob" is fun to say? Lol!

Offline ch_123

  • * Exalted Elder
  • Posts: 5860
NKRO vs. non-NKRO... what's different inside?
« Reply #13 on: Mon, 26 July 2010, 20:18:56 »
Quote from: quadibloc;151256
The real question is how on Earth a keyboard without diodes even manages to work.

Basically, a typical (non-capacitative) keyboard is a switch matrix. You have a bunch of typewriter keys which are momentary contact normally open single-pole single-throw switches. Like a doorbell.

And the way they're wired is this: there are wires going by rows and columns, one of the two connectors on each switch is wired to a row, and the other one is wired to a column.

The keyboard controller is connected to the columns, and can tell if a column is connected to electrical power. It is also connected to the rows, and applies electrical power to each one in turn.

So if the switch in row 5 and column 3 is pushed down to close it, when a voltage is applied to row 5, it will come out on column 3.

Assume for the sake of illustration that the controller either connects +5 volts, or a high-impedance state, to the rows.

The columns are then connected to ground through a resistance in the controller, and if current flows through that resistance, this means a voltage has been detected.


But how does the controller know which row the current originated from?

Offline PAINKILLER

  • Posts: 51
NKRO vs. non-NKRO... what's different inside?
« Reply #14 on: Tue, 27 July 2010, 03:41:24 »
Thanks for the warm welcome and deleting my account and long post. Oh well, figure it out yourself.

Offline Rajagra

  • Posts: 1930
NKRO vs. non-NKRO... what's different inside?
« Reply #15 on: Tue, 27 July 2010, 05:41:58 »
Perhaps if you'd put as much thought in to your original choice of user name as you did into the content of the post, things would have been different?

Offline gr1m

  • Posts: 439
NKRO vs. non-NKRO... what's different inside?
« Reply #16 on: Tue, 27 July 2010, 13:18:01 »
I hope you saved the post because it actually did contain good info.

Offline PAINKILLER

  • Posts: 51
NKRO vs. non-NKRO... what's different inside?
« Reply #17 on: Tue, 27 July 2010, 13:19:30 »
Well I hope someone can recover it...

Offline SLM

  • Thread Starter
  • Posts: 37
NKRO vs. non-NKRO... what's different inside?
« Reply #18 on: Wed, 28 July 2010, 23:19:08 »
Quote from: PAINKILLER;206848
Well I hope someone can recover it...


Yea, I missed it.  Anybody got it?

Offline British

  • Posts: 292
NKRO vs. non-NKRO... what's different inside?
« Reply #19 on: Thu, 29 July 2010, 02:36:17 »
Google cache is your friend...
Quote
Hi all.
I found this nice site when looking for info about this elusive exotic groundbreaking technology that allows users to use more than 2 fingers at a time on a keyboard. I needed it for a game with planes, which obviously requires a lot of controls (I don't use a joystick - I can fly better with a keyboard, believe it or not). A week ago I dug up this 1987 Oemmax/Ortek MCK-101A, blue complex alps, and found that it had the best rollover characteristics of all the other (membrane) keyboards I had around - it is a non-blocking, but ghosting keyboard. Detecting some random phantom keys from time to time is much less of a problem in my case than having my cannons "jam" in the most tense moment Nevertheless, sometimes I got some bad phantom presses, so I decided to mod it. When I first read inornate's modification article I too thought it can't be that simple with any controller. I checked the voltage through a switch's leads and it only read 0.05V on a multimeter (I don't have an oscilloscope) while the forward voltage for those diodes is 0.6-0.7V, so it didn't look very promising at that point.
So here's what I did. You can follow the same path to see how n-key moddable is your keyboard: first, I took some random diodes and tried shorting a switch's leads with one (try reversing polarity). Key press detected! So at that point I found out that scanning voltage is enough to go through the added diode. Then, I took 3 diodes and shorted 3 keys that I knew would normally produce a certain phantom key (or in regular blocking keyboards - one of those 3 keys would have been undetected). No phantom key! So today I bought some standard (through hole mounting type) 1N4148 and some LL4148 (that's how the SMD version diodes, like those in the article, were listed) and started soldering. I plan to only mod the keys that I use in that game and might trigger a phantom key, not all of them. And I only use these SMD ****s in places where I have 2 leads close enough to solder to. This PCB has a jumper wire somewhere near every switch, which makes things easier. I can and do avoid soldering directly to traces. Then on some places you're better off rewiring a whole row/column of the matrix. That's what I did with one row, with 7-keys on it, and something strange happened. When I tested it, it would only register up to 3 keys pressed on this row. A 4th press would release the earlier 3. Something was up with the voltage drop from the added diodes. There were about 20 diodes originally on the board - one for every row/column, but since I put a diode on every "exit" from that particular row, the original diode was no longer necessary so I just shorted it out. That fixed it. That original diode is the same 1N4148 type so now as far as the controller is concerned - it reads the same voltage and current as before so everything is OK (correct me if I'm wrong).
So this is the way to go with this keyboard. I checked the controller - its a Intel P8049 general purpose (not made specifically for keyboards) microcontroller, so other keyboards, even with the same controller may work differently. You gotta check and see. If forward voltage becomes an issue again/in other keyboards, there are other types of diodes that should work. Someone with more knowledge in electronics than me should suggest some.
So far I've modded 18 keys and they no longer cause any phantom keys. In combination with unmodded keys though, phantoms and unpresses can still occur sometimes.
I will keep you up to date if I find out something else.

PS: Maybe I should of posted this in the article's comments, but this topic is more recent. Maybe the whole topic should be merged there.

Offline gr1m

  • Posts: 439
NKRO vs. non-NKRO... what's different inside?
« Reply #20 on: Thu, 29 July 2010, 02:38:01 »
I actually snooped around and couldn't find the cached version of it.

Offline PAINKILLER

  • Posts: 51
NKRO vs. non-NKRO... what's different inside?
« Reply #21 on: Thu, 29 July 2010, 19:47:36 »
I just did a 3 diode test on an anti-ghosting keyboard (2kro, blocking, like most keyboards) and I've got bad news. Unless someone comes up with a way to disable the anti-ghosting, adding diodes won't do ****. Diodes only work for the "low-tech" old or custom controller ghosting boards.

Offline Rajagra

  • Posts: 1930
NKRO vs. non-NKRO... what's different inside?
« Reply #22 on: Fri, 30 July 2010, 12:35:30 »
Quote from: PAINKILLER;207681
I just did a 3 diode test on an anti-ghosting keyboard (2kro, blocking, like most keyboards) and I've got bad news. Unless someone comes up with a way to disable the anti-ghosting, adding diodes won't do ****. Diodes only work for the "low-tech" old or custom controller ghosting boards.


So it didn't even improve it to 3kro? Shame. That would be quite a useful improvement.

It's odd if it doesn't. That means they used a problem-detecting algorithm that checks for keyboard states that would never be generated without diodes (keys on 3 corners of a rectangle held down.)

I quite believe it though. Too many programmers fail to reduce a task to its simplest definition, they just charge in using brute force methods.

Offline PAINKILLER

  • Posts: 51
NKRO vs. non-NKRO... what's different inside?
« Reply #23 on: Fri, 30 July 2010, 15:56:54 »
Yeah, it seems any such simple way to implement anti-ghosting would preclude nkro capability. Obviously they would go for the simplest way. I don't exclude the possibility that some manufacturers would implement a more complex anti-ghosting algorithm, which would still allow nkro if diodes are added, but why would they do that? I suppose manufacturers just disable anti-ghosting in the firmware for nkro models. I think the only reason a manufacturer would go for a complex algorithm would be if they produce both 2kro (anti-ghosting) and nkro models and want to use the same firmware for both. I guess this makes sense with non-programmable controllers or if they don't want to bother... So a 3 diode test on a 2kro keyboard that is known to have a nkro version has a relatively good chance of success. The other thing that they may have done is to have something outside the controller enable/disable anti-ghosting. A comparison of the PCBs of 2 same model keyboards - one 2kro version and one nkro version would reveal that and allow easy modding. If neither of those 2 things is successful, then it's the firmware that is different and I guess nothing can be done to mod that keyboard.