Author Topic: Keyboard matrix help.  (Read 2442 times)

0 Members and 1 Guest are viewing this topic.

Offline leandre.north

  • Thread Starter
  • Posts: 35
Keyboard matrix help.
« on: Fri, 13 March 2015, 14:33:21 »
I can't find any tutorials online showing me how to solder all the switches together and the attach a Teensy controller. I want to make a 60%, and I want to know how you guys found out. Thanks :)

Offline MrRooks

  • * Destiny Supporter
  • Posts: 209
  • Location: The burbs
  • Always be knolling
Re: Keyboard matrix help.
« Reply #1 on: Fri, 13 March 2015, 14:40:53 »

Offline leandre.north

  • Thread Starter
  • Posts: 35
Re: Keyboard matrix help.
« Reply #2 on: Fri, 13 March 2015, 15:03:21 »
How about this?

http://pcbheaven.com/wikipages/How_Key_Matrices_Works/

First google result ;)
Thanks and I understand, a bit. I find it really difficult to understand how it works. I really need some real life pictures.

Offline phishy

  • Posts: 120
Re: Keyboard matrix help.
« Reply #3 on: Fri, 13 March 2015, 15:32:17 »

Offline leandre.north

  • Thread Starter
  • Posts: 35

Offline MrRooks

  • * Destiny Supporter
  • Posts: 209
  • Location: The burbs
  • Always be knolling
Re: Keyboard matrix help.
« Reply #5 on: Fri, 13 March 2015, 15:55:16 »
How about this?

http://pcbheaven.com/wikipages/How_Key_Matrices_Works/

First google result ;)
Thanks and I understand, a bit. I find it really difficult to understand how it works. I really need some real life pictures.

Think of the wiring like a spreadsheet or a table.

You have rows and columns. If you look in the "A matrix in real life" on that page it shows a little drawing with the controller and some switches, while it's not real life pictures, it is an accurate representation of how it's wired. Each yellow dot is a switch. Each switch has a corresponding row and column. You can see all of row 1 is on pin 1 but the columns are on A B C D. When you press the top left button it completes a circuit from pin A to pin 1. The firmware sees a signal from A-1 and it will send the appropriate keycode based on your layout.


When you configure the keyboard firmware you have to tell it how your individual matrix is wired. The pins you pick on the teensy don't matter, just pick pins and take notes. Once it's all wired up you have to edit the firmware code to tell it what pins you picked for your matrix.

just be sure all of your diodes are facing in the same direction. I don't even think the direction matters as long as they are all the same. I say this because it can be reversed in the firmware. If you pick a direction that's different from what you load on the teensy, it's as easy as flipping it in the firmware assuming you put them all in the same direction.

Give that article a thorough read and let me know if you have any questions.

Offline leandre.north

  • Thread Starter
  • Posts: 35
Re: Keyboard matrix help.
« Reply #6 on: Fri, 13 March 2015, 15:56:53 »
How about this?

http://pcbheaven.com/wikipages/How_Key_Matrices_Works/

First google result ;)
Thanks and I understand, a bit. I find it really difficult to understand how it works. I really need some real life pictures.

Think of the wiring like a spreadsheet or a table.

You have rows and columns. If you look in the "A matrix in real life" on that page it shows a little drawing with the controller and some switches, while it's not real life pictures, it is an accurate representation of how it's wired. Each yellow dot is a switch. Each switch has a corresponding row and column. You can see all of row 1 is on pin 1 but the columns are on A B C D. When you press the top left button it completes a circuit from pin A to pin 1. The firmware sees a signal from A-1 and it will send the appropriate keycode based on your layout.


When you configure the keyboard firmware you have to tell it how your individual matrix is wired. The pins you pick on the teensy don't matter, just pick pins and take notes. Once it's all wired up you have to edit the firmware code to tell it what pins you picked for your matrix.

just be sure all of your diodes are facing in the same direction. I don't even think the direction matters as long as they are all the same. I say this because it can be reversed in the firmware. If you pick a direction that's different from what you load on the teensy, it's as easy as flipping it in the firmware assuming you put them all in the same direction.

Give that article a thorough read and let me know if you have any questions.
Thanks! Will read and contact you if I have any question. You are super helpful!

Offline abjr

  • Posts: 171
  • Location: Connecticut
    • abjr.org
Re: Keyboard matrix help.
« Reply #7 on: Fri, 13 March 2015, 15:59:08 »
jdcarpe has compiled a list of must-read threads here: https://geekhack.org/index.php?topic=69582.0 (It's a sticky in this sub-forum)

Specifically you should check out the "HAND WIRING A KEYBOARD MATRIX" section. The "BrownFox step by step" link in particular should be among your required reading.

Good Luck!

EDIT: I didn't realize phishy's post linked to the same thing. Oops!
« Last Edit: Fri, 13 March 2015, 16:02:08 by abjr »
CM QFR | magicforce 68 (Gateron) | magicforce 68 (Outemu) | Acros 6311-K

Offline jacobolus

  • Posts: 3661
  • Location: San Francisco, CA
Re: Keyboard matrix help.
« Reply #8 on: Fri, 13 March 2015, 22:06:46 »
There are also some good threads at Deskthority: http://deskthority.net/-f7/-t7192.html

Offline Yoe

  • Posts: 273
  • Location: Skellefteċ, Sweden
  • Alps & ISO <3
Re: Keyboard matrix help.
« Reply #9 on: Sat, 14 March 2015, 02:03:44 »
I found the threads below very helpful when building mine.

https://forum.lowyat.net/topic/3234902/all

http://deskthority.net/workshop-f7/how-to-build-your-very-own-keyboard-firmware-t7177.html

Good luck, and please post pictures! :)

Offline leandre.north

  • Thread Starter
  • Posts: 35
Re: Keyboard matrix help.
« Reply #10 on: Sat, 14 March 2015, 02:14:29 »
I found the threads below very helpful when building mine.

https://forum.lowyat.net/topic/3234902/all

http://deskthority.net/workshop-f7/how-to-build-your-very-own-keyboard-firmware-t7177.html

Good luck, and please post pictures! :)
The first one is gonna be a huge help. Thanks a bunch