I’ve been using an ergonomic keyboard for a few years now. Specifically, one of several models of the Matias Ergo Pro. I say “one of several” because a few of these have broken on me. Luckily, Matias support has been easy to work with and have sent me replacements and given me discounts. While my most recent keyboard has had no issues, I am left with a pile of old keyboard hardware. Most of the issues were with USB in the right half of the board, so the left halves of the are presumably fine. Let’s make something out of them!
The keyboard halves are connected though a 3.5mm TRRS jack. I reached out to Matias to ask what protocol they used, but was told the left half of the boards didn’t contain any active circuitry and simply “expanded the key matrix.” Multiplexing all of those keys on only 4 connections is impossible so I was a bit suspicious. Lo and behold: when I cracked open the enclosure I found a microcontroller. Oh well. Can’t expect them to give me design secrets just like that.
The MCU in question is a SN8F26E65 by SONIX. Looking at the datasheet I found the following pinout:
According to the pinout, the halves could be using I2C or UART (pins 27/28). I thought I2C was more likely for chips communicating inside a singular product. I hooked up my logic analyzer and got the following:
Almost entirely gibberish – not very encouraging. And hey look – no clock! That’s weird. I only get pulses on that line when I press CAPSLOCK. Could these actually be RX and TX lines?
It’s a UART, with data only sent back to RX when the left keyboard half has to turn the CAPS light on. I futzed around until I determined the baud rate and encoding. Here’s what I came up with:
The pattern relating press to release is
RELEASE = PRESS XOR C0. I plan to use this information to make a module that I can connect the keyboard half to (without modifying the original hardware). Then I can potentially make another useful keyboard! Stay tuned for updates.