Author Topic: Converting a Toshiba T5200 laptop keyboard to USB  (Read 35861 times)

0 Members and 1 Guest are viewing this topic.

Offline lowpoly

  • Thread Starter
  • Posts: 1749
Converting a Toshiba T5200 laptop keyboard to USB
« on: Wed, 20 August 2008, 13:27:21 »
I bought a Toshiba T5200 back in the day when it was new. Must have been around 1990. It's a 386/20 laptop without batteries, built in power supply, red plasma VGA screen and two ISA card slots, one full length, one half length. For a short time it was the fastest desktop computer in the world if you believe Byte magazine. It was astronomically expensive, around $16000 using today's conversion values. I worked for a Toshiba dealer at that time and got it for the reseller price. Still much, but it was fully tax deductable and that came handy at the end of the year.





After several years of use it had been replaced by a faster desktop. I had another look at it lately and discovered that the keyboard was made by Alps with mechanical switches and full size keycaps.



When you bought it you also got a keycap set for your language that contained a keycap puller and also a keycap inserter. And keycaps of course:



Keycaps are double injection molded. The keycap I pulled here looks like it's triple injection molded. Doesn't make any sense so it might be a production fault. Every oversize key except CapsLock has these wire supports, 12 in all. That switch has no Alps label, btw.

Keys are linear, no click, no tactile but very light action (except space which has a second spring).

The keyboard matrix is directly connected to the mainboard with a flat cable with 27 wires. Common for a 8 x 16 matrix. There is no logic on the keyboard itself beside a diode for each key.



So if I wanted to make the keyboard USB connectable I had to add a new controller which is shown here:



First step was to decipher the matrix. Which of the 27 connections were the rows, and which the columns? This was actually pretty easy and simplified by the fact that all keys had a number and the rows and columns sort of followed these numbers:



The yellow rectangle shows a 4 pin switch with its diode. the two pins in the middle are the switch, the two at the bottom act as a bridge, maybe to help with routing.

Not long and I had an Excel sheet of all characters with 8 rows and 12 columns. The rows and columns had to be translated to the controller connections, then a flat cable had to be made. The controller had a 2x16 connector using a 1.27mm grid (1/20"). Soldering the cable to the connector pins was the hardest part and I had to do it twice because I had misinterpreted the pin order.

A text file had to be modified to program the controller. Then the key matrix could be uploaded to the controller by connecting the keyboard to USB with the programmer software running.

A short test showed that some keys were missing. In the Excel sheet I could see that they all belonged to row 0 which turned out to be soldered to the wrong pin. Corrected that and everything works as expected.

The controller has another port for ps/2 connection. The 'board should have full nkey rollover with that considering that each key is in line with a diode.

The diodes were the breaking point of the whole project. If they had been put in backwards there would have been no way to make this work beside de-soldering and re-soldering all the diodes.


Miniguru thread at GH // The Apple M0110 Today

Offline aon

  • Posts: 16
Converting a Toshiba T5200 laptop keyboard to USB
« Reply #1 on: Wed, 20 August 2008, 14:36:32 »
Nice project. I had a T2000 as a kid, and IIRC it had a pretty nice keyboard, too (although probably not alps switches, since it's considerably smaller).

Offline Chloe

  • Posts: 679
  • Switch Kitten
Converting a Toshiba T5200 laptop keyboard to USB
« Reply #2 on: Thu, 11 December 2008, 07:14:33 »
Hi lowpoly, I've been thinking about trying the KC8000 controller. I assume this will work with any keyboard. Is it simply plug and play once you've worked out the matrix and soldered the pins?

Offline lowpoly

  • Thread Starter
  • Posts: 1749
Converting a Toshiba T5200 laptop keyboard to USB
« Reply #3 on: Thu, 11 December 2008, 07:35:36 »
Basically yes. You will also have to 'program' the matrix by typing key values into a text file. These are not the standard keycodes but internal controller codes you take from a supplied table. Start the software, load the text file, connect the controller to usb and the download will happen automatically. I don't remember if the programming can be done with ps/2 only, I only had the usb cable.

The controller is supposed to work for membrane, short travel, rubber, long travel and other keyboards (citing from the description).

If you order it try to arrange some sort of pre-payment. The cable, shipping, and the cash on delivery charge really added up. Maybe this doesn't apply for intl. shipping.

I ended up de-soldering the cable connectors from the pcb for my current project so I could have done without the cable. Made things easier though.

Miniguru thread at GH // The Apple M0110 Today

Offline lowpoly

  • Thread Starter
  • Posts: 1749
Converting a Toshiba T5200 laptop keyboard to USB
« Reply #4 on: Thu, 11 December 2008, 07:37:42 »
Basically yes. You will also have to 'program' the matrix by typing key values into a text file. These are not the standard keycodes but internal controller codes you take from a supplied table. Start the software, load the text file, connect the controller to usb and the download will happen automatically. I don't remember if the programming can be done if you only have the ps/2 cable.

Citing from the description, the controller is supposed to work for membrane, short travel, rubber, long travel and other keyboards.

If you order it try to arrange some sort of pre-payment. The cable, shipping, and the cash on delivery charge really added up. Maybe this doesn't apply for intl. shipping.

I ended up de-soldering the cable connectors from the pcb for my current project so I could have done without the cable. Made things easier though.

Miniguru thread at GH // The Apple M0110 Today

Offline Chloe

  • Posts: 679
  • Switch Kitten
Converting a Toshiba T5200 laptop keyboard to USB
« Reply #5 on: Thu, 11 December 2008, 07:51:46 »
Thanks for the info. :) It sounds like the hardest part will be working out the matrix. If the switches are not numbered, how would you do this? I've just emailed InduKey, I hope it won't cost too much.

Offline lowpoly

  • Thread Starter
  • Posts: 1749
Converting a Toshiba T5200 laptop keyboard to USB
« Reply #6 on: Thu, 11 December 2008, 08:05:15 »
The second time I did the matrix deciphering was on my Cherry project board and the switches were not numbered. It was easy as well. You need a continuity tester that beeps so you don't always have to look back and forth. Number the connectors on your 'board. Then press one key down with a small weight so it stays pressed. Now check for continuity by trying every connection with every other. I just scratch over the contacts. The first one can be found faster if you follow the circuit paths. After that, switches that lay close together are usually next to each other at the contacts. It follows a pattern, as soon as you find that it's done in no time.

Miniguru thread at GH // The Apple M0110 Today

Offline lowpoly

  • Thread Starter
  • Posts: 1749
Converting a Toshiba T5200 laptop keyboard to USB
« Reply #7 on: Thu, 11 December 2008, 08:06:40 »
As for price, I think the controller was about Euro 50,- but with cable, shipping etc. it was more like Euro 80,-.

Miniguru thread at GH // The Apple M0110 Today

Offline Chloe

  • Posts: 679
  • Switch Kitten
Converting a Toshiba T5200 laptop keyboard to USB
« Reply #8 on: Thu, 11 December 2008, 13:50:11 »
Thanks lowpoly, that was really helpful.