Menu Home

Recycling a Laptop for use as a portable/compact (KVM/RKM) console

NOTE: This is a project that has been on the backburner for some time. Below are just some notes.

Introduction

So I decided I needed to convert a dead laptop into a portable/compact KVM console. Why? Why not? Actually it’s because I have a smaller 3/4 height rack cabinet, so I need something svelte to allow me to cram more equipment in there. Sure there are other well ingrained rack/datacentre console options such as this:

portableconsole.jpg

and this:

rkm.gif

However the first option is rather clunky, not as portable as I’d like – sometimes it’s not even portable enough even in a tidy datacentre – and anyway, I don’t really have the space for it. The second option , while damn cool and providing epenis+200 is just too expensive for what I need, ranging in price from NZD$1200 and upwards. Plus they’re not too comfortable to use for long periods, something that *may* be required from me. Being racked in one particular area of the rack cabinet confines you to one position, usually standing. If I need to sit down, I’d like to but still be able to work. I think there’s a few datacentre workers out there who feel the same.

The other thing is that I’m tired of working on a client’s PC and having to dig out a spare monitor, keyboard and mouse – or even worse, having to unplug my monitor, keyboard and mouse from my main PC. If I had something laptop sized with a KVM cable coming out of it, I could just hook it straight in, plug it up to power (for the monitor) and be immediately able to interface with my client’s PC for troubleshooting. The best of both worlds if you will.

At first I googled to see if anyone else has had the same idea and actually gone through with it. No dice. There were some damn interesting laptop mods out there though.

So I decided to go through with it myself and post the results here.

First of all, I had to get a readily available but outgoing laptop. As it turns out, one of my employers clients is going through a hardware refresh project, and were throwing out dozens of Compaq Armada E500’s. I was able to weasel a couple out of them, so my thanks go to a particular oil company that you can be sure of.

Keyboard

Keywords: Armada E500 Keyboard, Compaq SPS 154877-001, SMsC FDC37N971

If you’re just going to interface with one machine, you could do something like this. Unfortunately, I can’t be doing that as it goes against the plug and play nature required – I cannot have this device dependant on any software. As it turns out, doing the keyboard is the hardest part of this project as there is no real internal keyboard standard – so I can’t just rip apart a standard keyboard and plug my laptop keyboard into the encoder PCB and expect it to work. You’d think economics would have made it relatively so, but alas it appears not.

Thankfully, though, MAME and its kin has spun off a rather sizeable partial-underground arcade machine hacking community, so there’s plenty of information to sift through, with lots of nuggets of information that are useful towards reverse-engineering your hardware.

Basically there are two components that we are concerned with: 1) the physical Keyboard itself; an electrical PCB or printed circuit membrane (typically mylar) that outputs signals generated by key presses, and 2) the Keyboard encoder; the microcontroller and PCB that converts signals received from the keyboard’s interface and converts them to a PS/2 or USB signal that will spit up a useful datastream to almost any computer. Unfortunately the mapping between the two components is often done via matrices, which you can read more about here on howstuffworks and at the soon to be linked extremetech article.

You will have to map out a keyboard matrix (map the keyboard’s electrical layout) and either map out an encoder matrix and do some hardware conversion to get the two communicating electrically, or you can cough up some money for a premade programmable controller like these:
http://www.hagstromelectronics.com/products/
http://www.spaceinvaders.uk.com/
http://www.audonelectronics.swinternet.co.uk/index-page6.html
http://www.vetra.com/Encoder2.htm
http://www.arcade66.homestead.com/files/index.html

Alternatively, you can design your own, or make something like the buttonbox.

Unfortunately for us, the keyboard encoder for the E500, and I think most laptops, is embedded into the SuperI/O chipset. In our case on the E500, we have the SMsC FDC37N971. Finding information for this chipset from google is like drawing blood from a stone, but you can find the odd pdf for the FDC37N972 SuperI/O however. It’ll no doubt be very close to the FDC37N971 and it looks like a chipset that does everything. What we want to know is does it even bother to internally convert the keyboard’s signals to anything remotely usable? Such as a PS/2 stream?

blockdiag.jpg

pindiag.jpg

Well, judging by the PDF, we can extrapolate some important information, namely that the keyboard can address up to a 16 x 8 matrix, giving 128 possible key combinations. It also uses KS1 pins 0-7 (the 8 part of the matrix perhaps) and KS0 pins 0 to 13. It also appears to use GPIO4 and GPIO5. That’s 16 pins (KS0-KS12, GPIO4 and GPIO5), hence a 16 x 8 matrix. However, our keyboard has 27 traces in use, so something doesnt add up, so let’s investigate further and see what we can find.

The FDC37N972 incorporates a high-performance 8051-based keyboard controller; a 512k byte Flash ROM interface; four PS/2 ports;

Further digging provides this useful nugget:

8042 style Keyboard Controller Host Interface

So we can conclude that the E500 is compatible with either an 8042 style encoder, such as that built into the 8051.

Could we just remove the SuperI/O chipset and use it? Possibly, if you had the equipment or could source another one. In my opinion, it’d be a bit overkill having all the idle capability though. Then again with enough determination and skill, you could possibly use one of these to add that extra polish to your recycling mod – such as controlling LED’s.

keyboardmylar.jpg
Mapping the E500 Keyboard Matrix

keyboard.jpg
The Mylar connector only uses 27 of the 30 traces, so the pinout below will reflect that

Unfortunately, mapping the keyboard matrix is (for the first few times at least) a tough and time consuming task, and may just be the thing that makes you give up on a project like this. If you are, however, using an E500 for your mod, then here’s all the info you need.

Firstly, showing which pin pairs relate to which key:

kbpinouts.jpg

That’s the product of two nights of multimeter work, following traces, scratching my head and sacrificing one E500 keyboard to the IT Gods. When set out graphically, it looks something a little like this:

keyboardlg.jpg

And the keyboard matrix itself looks a little something like this:


1 9 10 11 12 13 21 22 23
2 Z ~ A Q 1 F3 F2 LS
3 C Esc D E 3 F1 Tab F5
4 T B 4 R F10 G V 5
5 Fn
6 LS
7 LC
8 LA
14 Ins F6 Home Down Space
15 . L O 9 Win RS
16 Enter ; P 0 ] F8 /
17 , End K I 8 PgDn F7 â??
18 Y N 7 U J H M 6
19 F12 [ Menu F10 BkSpc F11 Up
20 X Caps S W 2 F4
24 RC
25 RA
26 RS
27 \ Right = Del F9 Left PgUp

This is the closest matrix I can figure out. The SuperI/O Chipset only accounts for 24 traces (16 x 8 ) and the keyboard has 27. This means we have 3 extraneous traces that we can live without. Fn is never going to be used, so that’s gone. Left Shift and Right Shift are mapped elsewhere, so the respective circuits that meet with trace 1 can also go. There, we are now down to 24 pins… things are starting to come together. Unfortunately the above is an odd matrix – the trace numbers are not sequential on either axis (where typically they should be, but this is Compaq whose engineering was anything but typical), and it appears to be a 15 x 9 matrix, which in itself could be an anomoly.

Video

You have two choices when you get to the video segment of this mod. Unfortunately the power, controller etc for a laptop LCD are often embedded on the motherboard, which is probably one of the reasons you’re recycling your laptop in the first place. And if the motherboard is still working, we can still come to a couple of conclusions – you’re

So your choices are this: Use your own controll er, voltage regulator etc OR get a standard LCD and chop it into the laptop’s casing. Unfortunately controllers and voltage regulators and the like tend to be pricey, however in saying that, there is a project (may need to scroll down a little) that is nearing completion of a custom controller interface with the plans to be released online soon. The fortunate thing here is, thanks to all those “DIY projector!!1 LOL” articles that recycle laptop LCD panels, controllers tend to be easy to find.

The cheaper and easier way to go IMHO is to get a second hand LCD monitor of a similar size to what your laptop has/had and chop it in. If you are recycling a laptop with a 12″ – 14″ LCD, you might be s.o.o.l unless you go with the controller method.

Mouse/Trackpad

Keywords: Synaptics Touchpad TM41PUK324, Compaq SPS 135227-001, Armada E500 Touchpad

Fortunately the E500’s trackpad has an onboard ASIC and is pin compatible with PS/2, which makes this by far the easiest part of this modification. After finding this thread on the mp3car forums, I got involved and with their help I mapped it out. The interfacing order is this:

Pin 4/Orange: +5v
Pin 3/Brown: CLK
Pin 2/Red: DATA
Pin 1/Black: GND

You may also like to directly solder the grounding cable from your donor KVM cable directly to the ground rail on the trackpad, though it should work fine without this grounding.

4 replies

  1. This is an excelent IDEA!!!!

    Thanks a lot.

    I have a question, I have two notebook keyboards (1 from Thinkpad 560 and another from a Acer but I don't remember the model). Do you know how figure out what is the pinout of the flat cables ?

    Best Regards,
    Ignacio

  2. Hi Ignacio,
    you’ll have to spend a lot of time with a multimeter, put one probe on a pinout point and use the other probe to go through each key on the mylar sheets. As above, this is very time consuming to map out which pinout pairs correspond to which key!

    Hope that helps

    Rawiri

  3. Alternatively you could use something like this:
    http://www.startech.com/NOTECONS01

    Which lets you use any current laptop as a portable console.

    Obviously it would be cheaper to use old (perhaps free) laptops as a screen only type device, but many people don’t have the time or ability to make them. The other issue I could see being troublesome is that you’ll require a power outlet as batteries on old laptops are typically really weak and don’t last long.

  4. I have a T42 thinkpad keyboard. I figured out how to use the Trackpoint as a PS/2 mouse. On the circuit board of the trackpoint, pad 1 is the pad closest to the edge of the board:

    Pad Pin Function
    ——————————-
    1 5 RST
    2 1 RXD
    3 2 TXD
    4 4 INT1/CLK
    5 8/3 GND
    6 14/22 VCC/AVCC
    7 24 INT0/CLK
    8 27 Middle key
    9 27 Middle Key
    10 27 Middle key

    The driver chip is a TPM754 by Philips. Connect TXD/INT0 by 4.7k to VCC, RST to GND and use a keyboard PS/2 cable to connect VCC/GND/TXD/INT0 to your PC. That’s it.

    Now I’ll have to figure out the keyboard matrix, but I’m getting no beeps so far. I’ll post the progress.

    Cheers

    Klaus