"Rowless matrix" keyboard design

Hak Foo

03 Jun 2014, 05:23

I've been pondering alternatives to the whole "scan a grid of switches, wire diodes everywhere", and came up with the following thought:

Apologies for the terrible ASCII art, and the fact I can't figure out how to draw the symbols for ground or a switch in ASCII art. :)

Code: Select all

[Controller]
    |
    |
    *----||----[switch]--*
    |                    |
    |                    |
    *----||----[switch]--*
    |                    |
    |                    |
    *----||----[switch]--*
    |                    |
    |                    |
    *----||----[switch]--*
    |                    |
    |                    |
    *----||----[switch]--*
                         |
                     [possibly a diode to prevent feedback]
                         |
                       [ground]
Each "column" of the board would be done this way.

The trick is that each of the capacitors is a different value, most likely in a powers-of-two arrangement. You could then read all the switches in a "column" by reading the capacitance off the controller line and A/D converting it to a bit pattern.

Note that I use capacitors simply because the math's easier with them in series-- you could do resistors in series instead, in values designed to make the math easy.

Now, what benefits does this have?

* Potentiallly simpler wiring, especially on one-layer PCBs.

* Uses fewer controller pins. I figure it's probably feasible to do 6 switches per column, if we can reliably read the circuit with 1-2% accuracy.

At six switches per column, a 104-key layout requires only 18 controller lines. A conventional rows-and-columns layout would probably be 16x7, if not more, requiring 23 lines. For some of the project boards, where we're at the limits of the signal lines available on the controller, it might be valuable.

The drawbacks, however:

* It turns a largely digital problem into a much more analogue problem-- the switch sticks part way open and it acts like another switch is held down.
* It's doubtful most off-the-shelf microcontrollers are designed for this model of sensing.

Has it ever been done before? Any further discussion?

User avatar
Muirium
µ

03 Jun 2014, 12:36

I think this is essentially the same as a standard diode matrix.

I read Soarer's documentation for his controller, and he does it like this. He probes entire columns or rows (it's up to the user to choose, he calls them "strobes") simultaneously, letting the voltages settle for a little while, then reads off the values along the other axis ("senses") which returns an entire row or column of switch states. Then he goes to the next strobe and repeats. Altogether, this is very fast (you can run at several hundred Hz) and handles the dirty reality of switch contacts: which "bounce".

As far as I understand, your system would need just as many controller pins (you have to drive a column as well as read the rows) and adds analogue complexity. But maybe I'm misunderstanding.

Edit: scrap that. Coming back to the computer with some coffee, I realize what you're doing. The ASCII art bamboozled me. This time I just read the words! You are doing something different, then, but I still think it has problems handling scratchy real-world switches instead of idealized ones. Also, pins aren't all that precious. We have multiplexers and plenty enough speed to use them.

Capacitance can certainly make NKRO matrices. IBM relied on it instead of diodes with the Model F and beam spring boards. But it was an inherent part of the switch design, anyway, so didn't require discrete components all over the matrix, just like diodes.
Last edited by Muirium on 03 Jun 2014, 14:13, edited 1 time in total.

Findecanor

03 Jun 2014, 14:11

Microsoft used resistors printed on membrane for some Sidewinder gaming keyboards. They have a live patent on that so you aren't allowed to use it.

User avatar
Icarium

03 Jun 2014, 16:58

I don't quite understand how using a cap on every switch is easier than using a diode on every switch.

User avatar
ne0phyte
Toast.

03 Jun 2014, 17:02

You need less pins, but you also need a controller with lots of ADC pins and I could imagine that reading the state takes longer too.

User avatar
Icarium

03 Jun 2014, 17:09

Oh, I see. Well, it might be an idea for a completely custom controller but I'm not sure if you could do it with a Teensy and wiring up rows and columns isn't that big of a deal. Still I like the idea, somebody should try. :)

User avatar
ne0phyte
Toast.

03 Jun 2014, 17:11

I'm sure that would work just like you can build a basic DAC using only resistors (resistor ladder).
But are there even suitable microcontrollers with 10+ analog pins?

User avatar
E TwentyNine

03 Jun 2014, 17:43

Findecanor wrote:Microsoft used resistors printed on membrane for some Sidewinder gaming keyboards. They have a live patent on that so you aren't allowed to use it.
He wouldn't be allowed to sell it. He could use it all he wants and even sell plans using the technology.

Not sure I'm seeing the advantage though. Suppose it's a bit less wiring but a more complex controller setup.

Findecanor

03 Jun 2014, 19:46

E TwentyNine wrote:He wouldn't be allowed to sell it. He could use it all he wants and even sell plans using the technology.
Yes, of course. That is what I really meant, but I fumbled it up. :oops:

quantalume

03 Jun 2014, 19:53

What about designing an intelligent switch with its own, programmable key code? All the keys could communicate on the same pair of wires like I2C. Crank up the bit rate and have some sort of collision detection and recovery algorithm.

User avatar
ne0phyte
Toast.

03 Jun 2014, 20:04

quantalume wrote:What about designing an intelligent switch with its own, programmable key code? All the keys could communicate on the same pair of wires like I2C. Crank up the bit rate and have some sort of collision detection and recovery algorithm.
That would be super expensive, extremely complex and it probably wouldn't work anyway.
Lots of us reach 80 or even 100+ WPM which translates to 8 or more keys per second. I2C works with a master who asks a client to send, so if everyone just starts sending that's not even I2C anymore :mrgreen:
Each switch would need its own controller that remembers the time (when and how long) the key was pressed and waits until the keyboard master controller asks it to send it's status.

Whats wrong with using a matrix? :lol:

Paralel

03 Jun 2014, 20:17

Findecanor wrote:Microsoft used resistors printed on membrane for some Sidewinder gaming keyboards. They have a live patent on that so you aren't allowed to use it.
Could you link to that patent? I'd be interested in reading it.

User avatar
7bit

03 Jun 2014, 20:47

I suggest a controller in each switch, that is connected to a main-controller. If you hit a key, a data packet is submitted to the main-controller ...
:o

This way, LEDs can be accessed individually without any extra wiring and diodes and capacitors are a matter of history.
:ugeek:

Extra points if the switch controllers can be used to forward signals from adjacent switch controllers. This way you don't need a keyboard matrix anymore, just wire them in a few chains.
:evilgeek:

User avatar
Muirium
µ

03 Jun 2014, 21:25

Forget matrices, forget controllers, forget even plates and cases: we have thought this thing before!

http://deskthority.net/keyboards-f2/puz ... t5498.html

I'd like one built from magnetically latched shiny metal cubes. And LCD displays for the legends.

User avatar
7bit

03 Jun 2014, 21:46

So we need to add wireless transmission and can skip the PCB!
:o

Now, all we need is a metal plate in a specific size to have everything between a HyperMicro and a Hyper7.
:ugeek:

User avatar
ne0phyte
Toast.

03 Jun 2014, 21:52

7bit wrote:So we need to add wireless transmission and can skip the PCB!
:o

Now, all we need is a metal plate in a specific size to have everything between a HyperMicro and a Hyper7.
:ugeek:
So that means that the HyperMicro will be wireless? :mrgreen:

User avatar
Icarium

03 Jun 2014, 21:54

Congratulations on re-inventing the ErgoDex. :)

User avatar
7bit

03 Jun 2014, 22:02

All you need to order will be enough HyperSwitches and a wireless to PS/2 or USB converter, called HyperPlug.
:o

Or maybe you just use the WLAN.
:shock:

quantalume

03 Jun 2014, 22:48

7bit wrote:All you need to order will be enough HyperSwitches and a wireless to PS/2 or USB converter, called HyperPlug.
We will, as soon as your bot is set up to take the orders. ;)

Post Reply

Return to “Keyboards”