It all started with the Model M.
If you ask people what the perfect keyboard is, it probably won't be long before someone says "Go with the Model M." It's got the classic PC layout, which makes sense since the Model M basically defined the "classic PC layout"; it can withstand decades of use (literally!) because of the solid construction and the brilliant design; and, best of all, it's readily available on eBay and from several other vendors. The Model M has a devoted Internet following, with some people collecting dozens of them for no good reason other than to diminish the supply for the rest of us. But I think I can make a compelling argument that I love the Model M more than anybody else does.
The only problem with the design of the Model M is that it was done in 1984, according to IBM's copyright on the back, and 1984 was over a decade before the introduction of USB. At this point, I have more computers that lack PS2 ports than computers that include them, and that's kind of sad to me. (Also, the inclusion of a PS2 port on recent motherboards did not actually guarantee that the Model M would work on them; apparently the logic board that came in the Model M draws approximately 112mA at idle, which is about 100x more than most PS2 keyboards.)
Now, the solution that most sane people adopt to fix the lack of USB on the Model M is purchasing a PS2-to-USB adapter (which can be had for roughly $10 to $20 USD). And if you happen to be a little crazier than normal, you might try something like Ico Doornekamp's "almost native" mod where you desolder the PS2 connector, and solder a PS2-to-USB adapter inside the case directly to the logic board. (I even tried that myself, with some level of success!)
For some reason, though, I wasn't fully satisfied with that. I mean, it worked all right, but mine would randomly stop working after a few hours, requiring me to unplug and re-seat the USB connection to get the keyboard to come back. And I always thought "Somebody should just design a real USB-native logic board for these keyboards already."
Well, it took me a year and a half to get around to it, but nobody else stepped up.
My friend Cliff started fooling around with some Atmel AVRs for his own nefarious purposes. He was showing me some of the cool things that people have gotten working on these chips... including a full USB stack. Hell, a Dane who goes by the name Spaceman Spiff even built a new logic board (with a firmware based on that same AVR-USB stack) for his Commodore64 keyboard.
With Cliff's help, I learned enough about circuit design and PCB layout to make a working logic board in EAGLE. I ordered some parts and put together a prototype on some perfboard. For the firmware, I started with Spiff's c64key project - hey, he practically did all the work for me! - with some simple modifications; the Commodore 64 keyboard has its keys arranged in a matrix with 8 rows and 8 columns, and keys on the Model M are in a matrix with 16 rows and 8 columns.
Once the changes necessary to support the Model M's key matrix were in place, I successfully generated the first real USB events directly from keypresses on an actual Model M keyboard.
Unfortunately, Spiff's firmware didn't handle ghost keys. I actually started generating unintentional ghost-key presses during normal use, so I had to implement a decent ghost key prevention algorithm.
And now it works. Arguably, better than it ever did with a PS2-to-USB adapter - some of the adapters I've used have had problems with ghost keys being handled incorrectly.
I have two keyboards with perfboard prototypes in them working perfectly. I've placed an order with batchPCB for a prototype based on the design linked below - I'll update this page as soon as I get the first actual printed circuit board from them, and let everyone know how it works. (And, assuming that the PCB layout I've drawn up does actually work, I'll be placing orders for more; I don't have dozens of these keyboards, but I do have a few, and of course I want this new board in all of them!)
If anybody is interested in ordering the components to make one of these themselves, feel free to contact me for part numbers - I can send you the part numbers I ordered from Mouser.
Officially, the Atmel AVRs can't do USB well enough to pass a USB certification test - at least, not with the current firmware and circuit design. USB has very strict voltage and timing requirements, or so I'm told, and also, my firmware does no error handling at all. However, it's Good Enough that it works on every single USB host I've tried, including (in no particular order) every PC I have, under Windows XP and also under Linux, as well as my MacBook running OS X, and my PS3 and my Xbox 360. I would be very surprised, at this point, to find a USB host that this keyboard does not work with.
This logic board was originally conceived with an ATmega32 in mind, running at 16MHz; in reality, the current prototypes are working fine with ATmega16s running at 12MHz. The board layout still reflects the original intention, and at some point I'll either update it to reflect reality or fix the software so that it can run at 16MHz (which - right now at least - it can't.)
| File | Description |
|---|---|
| rump-board.png | PNG image of board layout |
| rump-schematic.png | PNG image of schematic |
| rump-1.0.tar.gz | Firmware source code |
| rump.brd | EAGLE board layout |
| rump.sch | EAGLE schematic |
If you want to follow the development on the firmware (which is likely to be pretty uneventful now that there aren't any major bugs left to fix that I know of) you can track the git repository.
git-clone git://github.com/clee/rump.git
My name's Chris Lee (clee to my friends), and I'm an addict. I love the Model M and I'm not ashamed to admit it. Feel free to email me with any comments or questions you might have!