Saturday, August 8, 2020

Making a converter for the Apple Macintosh M0110a Keyboard from Hasu's TMK Firmware and an Arduino Pro Micro

Oof haven't posted in awhile. And yet another silly keyboard project. Work has been absurdly busy lately, and really sucking all of my mental (and sometimes emotional) bandwidth. Hopefully I can get back on track with fun projects again soon. It's felt more of a chore lately, which scares me. It's normally such a relaxing thing to be creating and creative.

The Apple Macintosh M0110a keyboard is a classic beauty with Alps SKCC white linear switches. These have a larger required depress force than the Alks SKCC green switches. So far I have noticed they are a little less smooth, but perhaps that is keyboard specific (mine did have some cruft that I unenthusiastically purged for an hour).


I have chosen to use the Arduino Pro Micro which is based off of the ATMega32u4 because they are hella cheap.

You will want to use the following diagram
Jack fig
This is the pinout with respect to the socket on the back of the keyboard case. Buy one of the 4P4C jacks, and strip the wires. Then, with everything plugged in, confirm continuity to make sure you have the right signals. The clock line should hook up to PD1 and data should hook up to PD0. These are the IO ports on the Atmega microcontroller. On the board I linked above, these are pins 2 and 3 respectively (the numbers shown on the silk screen). Then because the wires are long, I have wired up two pull-up resistors from those pins to 5V as well.

Use this command to find the serial port: ls /dev/tty*
Tty comes form the word 'Teletype.' This command basically shows the available terminals, or serial ports, or other ports from my understanding. You can plug and unplug the microcontroller to see which port it belongs to

Clone the git repository, and change directory to the M0110a directory. You can flash the device with this command:

avrdude -p atmega32u4 -P /dev/tty.usbmodem14201 -c avr109 -U flash:w:m0110_usb_rev1.hex


This will load the currently built firmware to the device. If you want to edit and rebuild then use these make commands with the provided make file:
$ make -f Makefile.rev2 clean
$ make -f Makefile.rev2 [KEYMAP={intl|spacefn}]
Also, the TMK firmware generator linked above will generate these files as well for you. You can then edit the keymap with the web interface and use the hex file that generates (a lot easier!).

If you want to re-load firmware, then (with the arduino powered on) ground the reset pin twice until it shows up in ls TTY. This will only appear temporary, as the device will put itself into bootload mode. Make sure to flash quickly :)

Here's what the keyboard looks like after I cleaned it up a fair amount.
During the cleaning process.. you can see the Alps SKCC switches:
The designers left a little window for the intel chipset running this thing. Date code 1980! 
Here it is sitting next to my IBM Pingmaster 4704 terminal keyboard:























1 comment:

  1. Just tried setting this up and I got everything flashed and wired but the Arduino wont detect on Windows Mac or Linux, any suggestions.

    ReplyDelete