geekhack

geekhack Projects => Making Stuff Together! => Topic started by: yzdnegel on Thu, 17 June 2021, 04:16:51

Title: Possible to replace TKL microcontroller?
Post by: yzdnegel on Thu, 17 June 2021, 04:16:51
I read a deskthority article about the cooler master S PBT which I have: https://deskthority.net/viewtopic.php?t=16537

They mentioned that the microcontroller could be replaced with a teensy, "The Masterkeys is not 100% customizable but the detachable controller makes it hacker-friendly and it shouldn't be too difficult to put a teensy inside."

Im just wondering if anyone has tried replacing the microcontroller for TKL keyboards. It doesn't seem to be a common mod/hack for keyboards. Some pointers on how to get started would be greatly appreciated!  :D
Title: Re: Possible to replace TKL microcontroller?
Post by: Leslieann on Thu, 17 June 2021, 04:39:40
You just need to figure out what pin goes to each row and column, then wire it just like you would for a hand wired board and then do up the firmware.
You can draw power from there or the port.

Beware, this will be a project if you've never done a hand wired board before and you may just want to see if someone offers a pre-made aftermarket programmable controller.
Title: Re: Possible to replace TKL microcontroller?
Post by: Findecanor on Thu, 17 June 2021, 04:53:22
Several years back, user bpiphany here made and sold a replacement controller circuit board for the predecessor to this keyboard: the QuickFire Rapid, and a few others. But looking at pictures I could find online of the circuit boards, they don't look compatible.
I would guess that something like that might have been what Matt3o was thinking of when he had made that comment.

To make something like that yourself, you would first have to trace what every pin goes to, to reverse-engineer the keyboard matrix. And also trace which pins goes to the USB connector and LEDs.
Dozens of people have done that with other keyboards (especially vintage ones that used to have older types of interface plugs/protocols), but it is not a common mod, no.
Title: Re: Possible to replace TKL microcontroller?
Post by: suicidal_orange on Thu, 17 June 2021, 05:29:32
I replaced the controller on a full size Ducky with no socketed controller, it just took time.  If your PCB is green like the one linked it will be comparably easy to map it and you have a centralised place to connect all your wires rather than having a spider web going all over the place.

What you need to do is work out what's connected to what.  Hopefully (and from what I can see in the link) all the right pins are connected and all the left ones are.  So start on either left or right pin and follow the traces (including the vias which I'm pretty sure are staple shaped so you know where they go) and in a spreadsheet note what's connected to what.  So across the row you might have Q 2 W I 3 E 4 R U 5 O P as one connected group, then A S C D F X J K L ; on the next row and so on.  When you've done all of one side start on the other, changing something on the spreadsheet to make it unique (font and/or background colour) so maybe 2 and A are both red, 3 and S blue.  When every key is coloured you need to sort them so all the reds are in one column and the blues in another (etc.)

Pretty sure all the same colour dots are connected in this pic, it's just a quick example.

[attach=1]
Title: Re: Possible to replace TKL microcontroller?
Post by: yzdnegel on Thu, 17 June 2021, 16:43:22
I replaced the controller on a full size Ducky with no socketed controller, it just took time.  If your PCB is green like the one linked it will be comparably easy to map it and you have a centralised place to connect all your wires rather than having a spider web going all over the place.

What you need to do is work out what's connected to what.  Hopefully (and from what I can see in the link) all the right pins are connected and all the left ones are.  So start on either left or right pin and follow the traces (including the vias which I'm pretty sure are staple shaped so you know where they go) and in a spreadsheet note what's connected to what.  So across the row you might have Q 2 W I 3 E 4 R U 5 O P as one connected group, then A S C D F X J K L ; on the next row and so on.  When you've done all of one side start on the other, changing something on the spreadsheet to make it unique (font and/or background colour) so maybe 2 and A are both red, 3 and S blue.  When every key is coloured you need to sort them so all the reds are in one column and the blues in another (etc.)

Pretty sure all the same colour dots are connected in this pic, it's just a quick example.

(Attachment Link)

Damn, thanks a lot! This will be a fun summer project for sure  :D