I learned to type sometime in the 80’s on a manual typewriter and presumably this is why I am fixated on mechanical keyboards. If you’re not much of a touch typist (or keyboard geek) you’re probably not aware that modern (inexpensive) keyboards are an abomination unto typing.
The IBM Model M keyboard is perhaps the most famous clicky keyboard with manufacturing spanning 1984 until the late 90’s and a company purchased the manufacturing line and still produces a variant to this day. Their enduring popularity and sometimes surprising price tag on the second hand market is testimonial to their design and build quality.
Modern day mechanical keyboards are manufactured and popular with typists, gamers, and aficionados. Das Keyboard offer undeniable quality for Mac, PC and Linux. They even offer an uber-geeky blank keycap variant to totally confound your visual based two fingered typing coworkers. Due to their specialist and somewhat niche market however these keyboards cost twenty times that of a cheap membrane keyboard.
History lesson and personal typing preference aside however I’m also a fan of retro computers so when I learned of a project to modify a keyboard from the late Steve Jobs NeXT computer company into a modern functioning USB device I was more than interested.
As I didn’t have a somewhat rare NeXT keyboard in my junk box I tracked down an older Apple mechanical Extended Keyboard II for a tenth of the price of a second hand Model M.
NeXT used a proprietary communication protocol to link their keyboard and computer, and early Apple did exactly the same thing with Apple Desktop Bus (ADB) – an early ancestor to our modern day device independent USB protocol.
Whilst there have been various commercial ADB to USB adapters produced over the years building one from scratch proved to be a much more satisfying experience.
After purchasing a Teensy 2.0 USB development board I downloaded the necessary software
- Teensy Loader
- Crosspack to compile on my Mac
- Source Code
I cannot thank the Geekhack crew enough for providing this source code for others to utilise. They saved me hours of reverse engineering and hardware sniffing and made this project a breeze.
Unlike the super-friendly Arduino IDE I had to manually build and compile my own firmware from the command line before flashing it to the device using Teensy Loader. Presumably because I was using a newer version of the compiler than the author I received a build error:
make: *** [obj_adb_usb/common/xprintf.o] Error 1
which was rectified by modifying the code in config.h to include a new conditional
/* key combination for command */
#ifndef __ASSEMBLER__
#include "adb.h"
#include "matrix.h"
#define IS_COMMAND() ( \
matrix_is_on(MATRIX_ROW(ADB_POWER), MATRIX_COL(ADB_POWER)) \
)
#endif
Be sure to keep the original endif below the code block when pasting the patch.
Update 02/06/2014 Somehow I missed the Teensyduino extension which provides a more familiar GUI for those not wanting to experiment with the command line. Thanks Nantonos!
The Teensy board needed to be connected to the keyboard power 5v, ground, and signal. As I placed the board inside my keyboard case (now you see why size is important) I didn’t need any further modifications. Other people modifying this keyboard who placed a significant length of wire (such as an ADB cable) between the keyboard and Teensy needed a pullup resistor between the signal and power lines. I had to use a 1K resistor when testing using a breadboard and external cable, but after placing the Teensy inside the keyboard with virtually no wire length it became unnecessary.
Connect the keyboards ADB (data) pin 1 to Teensy pin F0, pin 3 to Teensy VCC (5v) and pin 4 to Teensy GND (ground). If you need a pullup resistor (in the 1-10k range, you may need to experiment) it will link ADB pins 1 and 3.
High quality ALPS keyswitches are what make all the difference
ADB socket removed, wires tapped in to the circuit board and heatshrunk ready to attach to the Teensy
Teensy connected to USB and ready to be installed. I wrapped it in insulation and tucked it out of harms way.
47cm wide and weighing in at 1.7kg. Amusingly the MBP it is attached to weighs 2.02kg.
I love the coloured old apple logo top left and whilst it certainly creates the distinctive clacking sound of a mechanical keyboard it is not unbearably loud and coworker irritating. Perhaps Jethro Carr could have used one and avoided the banning of his beloved Model M’s.
If you would like to hear the sound of this keyboard head on over to Shawn Blanc’s article.
Edit 17/02/2014 I have just made another of these keyboards as I’ve become accustomed to using them and felt I was missing out at while I was at work. I had a bit of difficulty tracing the ADB pin outs this time as it was a slightly different keyboard (Apple Extended) A great reference is the ADB Apple Desktop Bus pinout
http://10fastfingers.com/typing-test/english is a quick little typing speed website. I’m a bit out of practice, but even so managed 98 Word Per Minute on this new (old) keyboard.
Jesse Vincent decided to go a step (well, actually MANY steps) further with a keyboard virtually from scratch http://keyboard.io
A great slideshare explaining some of the many processes involved http://www.slideshare.net/obrajesse/building-a-keyboard-from-scratch
Nice one Jesse.
Jeff Atwood famous for a few things including Coding Horror http://www.codinghorror.com/blog/2013/08/the-code-keyboard.html has teamed up to make what is probably my dream keyboard: http://codekeyboards.com/
While I do love the one I’ve brought back to life, backlighting would be a huge improvement. Chopping off the keypad would also be quite handy.
I was puzzled by the phrase “had to” in “Unlike the super-friendly Arduino IDE I had to manually build and compile my own firmware from the command line”.
You can, if you want, but you don’t *have* to. You just install the Arduino IDE and then add the Teensyduino extension so it knows about Teensy board as well.
Wonder how I missed that? At first I thought it must have been a new extension but its been around for a long time… thanks for pointing that out, I’ll update the post
Nice post over on Jack Yan’s blog about his recent keyboard purchase. Introducing the Cooler Master Storm Quick Fire TK Cherry MX Brown http://jackyan.com/blog/2015/04/farewell-manhattan-switching-to-the-cooler-master-storm-quick-fire-tk-cherry-mx-brown/
I think they no longer use cherry mx blue switches and switched to long hua switches in the late 2016.