NOTE: This is a project that has been on the backburner for some time. Below are just some notes.
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:
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.
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:
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?
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.
Mapping the E500 Keyboard Matrix
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:
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:
And the keyboard matrix itself looks a little something like this:
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.
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.
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.