Author Topic: Keyboard matrix schematic question  (Read 4226 times)

0 Members and 1 Guest are viewing this topic.

Offline SAL36864

  • Thread Starter
  • Posts: 17
Keyboard matrix schematic question
« on: Tue, 16 March 2010, 05:04:46 »
My experience with circuits is minimal so this could be entirely wrong, but I am trying to figure out what the schematic for a keyboard matrix would look like, and how it functions. So...

Based on diagrams that I have seen of keyboard matrices it is basically a number of wires run horizontally and vertically. They are not connected except through switches, which if a diode is placed after, will prevent ghosting.

In operation, if a key is pressed it connects one of the vertical wires with one of the horizontal wires. When current is run through that vertical wire (it is scanned), it comes out the horizontal wire, and allows the key that was pressed to be determined.

So one question is, when a matrix is stated to be x by y, which is the rows and columns, does it matter? Also which of "x" and "y" is scanned, and which would be the output?

KB1.JPG, and KB2.JPG are what I would think such a schematic would look like, with KB2 being a close up.

Thanks

Offline SAL36864

  • Thread Starter
  • Posts: 17
Keyboard matrix schematic question
« Reply #1 on: Tue, 16 March 2010, 10:50:17 »
That, as far as I can tell, is pretty much what I thought. Also, I had read the link, but still was unsure.

I have found that website very useful but I am wondering what it means when it states the matrix for the example 2x2 looks "something (not exactly) like this". Also should there be resistors with the diodes, or in other parts of the matrix?

Based on what I know I would think that a 4x3 matrix would look like this:


The schematics that I have found online tend not to be very detailed regarding the parts that I am uncertain about (the area around, and including the switches). If you know any good, detailed, example of actual keyboard schematic I think that would help.

Rereading my first post, I think it is not clear that I understand that the schematic is a logical representation, not necessarily a representation of the physical layout.

Offline Rajagra

  • Posts: 1930
Keyboard matrix schematic question
« Reply #2 on: Tue, 16 March 2010, 11:06:38 »
It doesn't matter matter which of X and Y are scanned.

One thing missing from the above pictures is that each of the input lines may have a pull-up or pull-down resistor, so that if no keys are pressed they are kept in the "no keys pressed" state. But some chips may have that ability built into their input lines, so those resistors would not be needed. But it's still useful to imagine those resistors in place to visualise how it all works.

« Last Edit: Tue, 16 March 2010, 12:23:03 by Rajagra »

Offline Specter_57

  • Posts: 143
Keyboard matrix schematic question
« Reply #3 on: Tue, 16 March 2010, 17:45:28 »
..

You could also get yourself a cheapo crappy plastic keyboard and disassemble it down to its components...you will then see the row and column matrix switch membranes....

Example: this is a terminal keyboard, 122 keys...but the principle is the same...

http://geekhack.org/attachment.php?attachmentid=7237&d=1263155011

..........
Spec57
« Last Edit: Tue, 16 March 2010, 17:52:30 by Specter_57 »

Offline SAL36864

  • Thread Starter
  • Posts: 17
Keyboard matrix schematic question
« Reply #4 on: Wed, 17 March 2010, 13:30:12 »
Rajagra, thanks for the picture, and the information about the resistors is useful. I assumed that some should be in there somewhere.

Ripster, thanks for the Filco PCB picture.