Author Topic: Help with rewiring a vintage keyboard  (Read 2400 times)

0 Members and 1 Guest are viewing this topic.

Offline andCoffee

  • Thread Starter
  • Posts: 55
Help with rewiring a vintage keyboard
« on: Mon, 04 May 2015, 18:50:06 »
Hey guys,

So I bought a Zenith z-120 keyboard off of eBay so that I could give it a go at rewiring and building a case. 

It arrived today and the PCB attached seems to be in pretty good shape.  I'd like to be able to use the pins straight from the PCB into the Teensy instead of desoldering and rewiring with a grid.  Unfortunately it's a little tricky testing every pin and trying to figure out which keys activate which pair.  Is there a program for the teensy that will let it tell you solder it up then tell you which pins are activating with each key press?

Or maybe someone has a pin-out for this specific board?  I think it's the same as the Z-100 board. 

Offline Wilba

  • * Maker
  • Posts: 464
  • Location: Melbourne, Australia
  • Keyboard Stuff Person
    • wilba.tech
Re: Help with rewiring a vintage keyboard
« Reply #1 on: Mon, 04 May 2015, 18:54:28 »
Take a high-resolution photo of the bottom of the PCB showing tracks and I can give you an opinion.

Offline andCoffee

  • Thread Starter
  • Posts: 55
Re: Help with rewiring a vintage keyboard
« Reply #2 on: Mon, 04 May 2015, 19:16:50 »
Thanks.  Hopefully this is high res enough: http://i.imgur.com/XvDqStW.jpg

I can't get a great look at the top of the PCB but there doesn't appear to be any microchips.  Though I'm not sure what the cluster of 2x4 solder points about a quarter of the way down the photo is doing. 

Also, there might be a small problem with the PCB right at the two bottom-most solder points for the ribbon cable.  There is a little bump there that doesn't look great, but I figure it wouldn't be that hard to just follow the traces and jump them with a couple pieces of wire.
« Last Edit: Mon, 04 May 2015, 19:20:40 by andCoffee »

Offline Wilba

  • * Maker
  • Posts: 464
  • Location: Melbourne, Australia
  • Keyboard Stuff Person
    • wilba.tech
Re: Help with rewiring a vintage keyboard
« Reply #3 on: Mon, 04 May 2015, 19:42:07 »
Yeah that looks like a pretty standard old-school matrix... single-sided PCB, no diodes, a few jumper wires. You should be able to connect those ribbon cables to a Teensy and use TMK, after configuring it for the same size matrix.

Have a look at what I did for a Dolch PAC: https://geekhack.org/index.php?topic=71291.msg1726681#msg1726681

Do the same with Inkscape and your photo - you can then work out how it's wired. IMHO it's quicker than testing with a multimeter and you end up with a wiring diagram in the end. Note the solder joints that aren't the close pairs under a switch - they will be jumper wires on the top side, check continuity between solder joints to verify they are where you think.

Offline andCoffee

  • Thread Starter
  • Posts: 55
Re: Help with rewiring a vintage keyboard
« Reply #4 on: Mon, 04 May 2015, 19:57:47 »
Thanks for the help.  It's my first keyboard project, but I'm pretty excited to dive in.  The old school cross-shaped linear Alps feel great with the big sculpted terminal keys.

Offline Findecanor

  • Posts: 5036
  • Location: Koriko
Re: Help with rewiring a vintage keyboard
« Reply #5 on: Mon, 04 May 2015, 22:03:33 »
The Teensy has only 25 I/O lines. That PCB has more. You will need to use a Teensy++ or use some multiplexer or decoder or similar together with a Teensy.

Offline andCoffee

  • Thread Starter
  • Posts: 55
Re: Help with rewiring a vintage keyboard
« Reply #6 on: Tue, 05 May 2015, 00:01:17 »
The Teensy has only 25 I/O lines. That PCB has more. You will need to use a Teensy++ or use some multiplexer or decoder or similar together with a Teensy.

Thanks.  I ordered a Teensy 2.0++

Offline andCoffee

  • Thread Starter
  • Posts: 55
Re: Help with rewiring a vintage keyboard
« Reply #7 on: Thu, 07 May 2015, 04:24:32 »
Just in case anyone ever digs up this post looking for similar information that I was looking for, I spent a couple hours mapping out the PCB and decoding the keyboard matrix.  Here is what I found.  Looking at the keyboard with the keys facing up toward you, the 1-20 rows refer to the first 20 wire ribbon cable, with the 1-10 columns referring to the 10 wire ribbon cable.  Wires 19 and 20 seem to have something to do with the reset key, passing through some sort of inverter gate to connect to each other.  I'm not exactly sure. 


Offline andCoffee

  • Thread Starter
  • Posts: 55
Re: Help with rewiring a vintage keyboard
« Reply #8 on: Thu, 07 May 2015, 04:41:21 »
One more quick question if anyone is still checking out this thread: If I wire it up to the current ribbon cable, because of the lack of apparent diodes, does that mean I can only press one key from each column/row at a time?  Just trying to determine if I should plan for that when assigning any modifier keys that might need to be pressed at the same time for certain functionality.  If that's the case, I might just need to desolder the PCB entirely...

Offline Wilba

  • * Maker
  • Posts: 464
  • Location: Melbourne, Australia
  • Keyboard Stuff Person
    • wilba.tech
Re: Help with rewiring a vintage keyboard
« Reply #9 on: Thu, 07 May 2015, 06:17:34 »
One more quick question if anyone is still checking out this thread: If I wire it up to the current ribbon cable, because of the lack of apparent diodes, does that mean I can only press one key from each column/row at a time?  Just trying to determine if I should plan for that when assigning any modifier keys that might need to be pressed at the same time for certain functionality.  If that's the case, I might just need to desolder the PCB entirely...

No. The simple explanation is, if you press two keys that are diagonally adjacent in the matrix, it will cause a false triggering, or some keys won't work. e.g. in the matrix you showed, pressing A and X together might trigger S or Z, or if the firmware is smart, will block and ignore S or Z presses.

I think TMK has some handling for matrices without diodes, and this matrix looks so sparse that you should not have problems holding down Ctrl+shift+<any key>, etc.



Offline andCoffee

  • Thread Starter
  • Posts: 55
Re: Help with rewiring a vintage keyboard
« Reply #10 on: Thu, 07 May 2015, 11:57:49 »
Thank you again for your help.

One last question: do you know if this would be a problem in the case of pressing ctrl and fast repeat together? They are diagonal, but there is no opposite diagonal to get confused with.

Offline Wilba

  • * Maker
  • Posts: 464
  • Location: Melbourne, Australia
  • Keyboard Stuff Person
    • wilba.tech
Re: Help with rewiring a vintage keyboard
« Reply #11 on: Thu, 07 May 2015, 19:25:35 »
Actually I didn't really explain ghosting very well before. It takes more than two presses to cause the problem.

Example with pictures: http://www.dribin.org/dave/keyboard/html/ghosting.html

If you connected a diode-less matrix like this to default TMK firmware (i.e. it assumes there are diodes and ghosting could happen), then you would probably never have any issues with ghosting, i.e. I can't see any common three-key combos that would cause a false trigger of a fourth key.



Offline andCoffee

  • Thread Starter
  • Posts: 55
Re: Help with rewiring a vintage keyboard
« Reply #12 on: Thu, 07 May 2015, 20:14:41 »
Awesome.  Thank you, that makes a lot more sense.  Looks like the only potential problems I could run into is during fast gaming if I pressed W, S, and A (or D) at the same time, but really there shouldn't ever be a reason to press W and S at the same time in the first place. 

Offline Wilba

  • * Maker
  • Posts: 464
  • Location: Melbourne, Australia
  • Keyboard Stuff Person
    • wilba.tech
Re: Help with rewiring a vintage keyboard
« Reply #13 on: Thu, 07 May 2015, 20:31:23 »
This is a better explanation of some of this: http://deskthority.net/wiki/Rollover,_blocking_and_ghosting

I'm guessing that the reason they put the shifts and controls on the same column is to avoid ghosting, and maybe even do blocking on the rest of the matrix only... i.e. maybe it's 2KRO in the rest of the matrix, but they have special case handling for column 1 to allow those mods to work.