matrix keyboard, needs a few tricks  - Page 1
Forum section: electronics / general

author: legacy
author_rank: Super Contributor
timestamp: November 02, 2015, 11:24:56 am
content: hiI have recycled a keyboard from a laptop, it has two headers, the first with 15 wires, the second with 18wire, so it seems a matrix 15x18, implementing a full QWERTY keyboard.Which is the best way to interface and decode?

author: legacy
author_rank: Super Contributor
timestamp: November 02, 2015, 04:55:15 pm
content: I've never seen how a laptop's internal keyboard interface with the motherboard, today I understood that in laptops the keyboard controller circuitry is located on-motherboard, so the keyboard connects directly with a matrix cable and directly handled by a custom controller-chip.

author: legacy
author_rank: Super Contributor
timestamp: November 02, 2015, 05:00:20 pm
content: I wander how good is the following64 keys: 2x PCF8574128 keys: 1x PCF8574 + 1x PCF8575256 keys: 2x PCF8575

author: PA0PBZ
author_rank: Super Contributor
timestamp: November 02, 2015, 08:06:56 pm
content: Some thoughts:- 15 x 18 is 270 keys, seems a bit on the high side?- Use a controller from an old AT keyboard and convert the scan codes into the proper codes?- If the rows or columns are just pulled high one by one you could use a shift register and use only one (or 2 for a reset) I/O port for that.

author: legacy
author_rank: Super Contributor
timestamp: November 02, 2015, 08:12:56 pm
content: Quote from: PA0PBZ on November 02, 2015, 08:06:56 pmof course, 101 keys expected, I still have to reverse the matrix, I physically have two headers of 15 and 18 wiresQuote from: PA0PBZ on November 02, 2015, 08:06:56 pmI need to design a project from scratch in order to recycle the laptop chassis.Quote from: PA0PBZ on November 02, 2015, 08:06:56 pmI guess what happens about SHIFT+KEY, CTRL+KEY, etc

author: Ian.M
author_rank: Super Contributor
timestamp: November 02, 2015, 08:19:23 pm
content: All the left and right shift/ctrl/alt keys and Fn and Win keys usually have individual lines. You can do two key rollover on a plain switch matrix, but if you have three keys down, with two in the same row, and two in the same column, unless each switch in the matrix has its own series diode (not practical for membrane matrix keyboards) you get a phantom key-press at the intersection of the row and column that only have one key pressed out of the set of three. Thus if the user is going to press multiple shift keys, they cant be part of the main matrix.

author: kfitch42
author_rank: Frequent Contributor
timestamp: November 02, 2015, 08:57:41 pm
content: Quote from: legacy on November 02, 2015, 11:24:56 amI think this covers most of what you are asking. Both the implied question of REing the keyboard, and the question of decoding a matrix keyboard (where "best" is defined as easy to implement, since you didn't explicitly define "best" in your context):http://playground.arduino.cc/Main/KeypadTutorial

author: nidlaX
author_rank: Frequent Contributor
timestamp: November 02, 2015, 11:21:51 pm
content: Here are a few excellent keyboard controller firmwares for the Atmel AVR:1. Hasu's TMK Firmware:Github,Tutorial2.Soarer's Keyboard Firmware3.chrisandreae's Keyboard FirmwareYou can also check out Deskthority and Geekhack for some inspiration on DIY projects!