Sick of wires? Me too!
I love my funky Unicomp Model M keyboard which I picked up at the closing sale of a Bed, Bath, & Beyond of all places. Even got a kitty cat and green keys to boot!
After reorganizing my desk, the only thing holding me back was the PS/2 cable for that darned keyboard.
Hardware?
A little thinking later, I figured I could jam a Seeed Studio Xiao ESP32-C3 in there with a little battery (the Xiao includes a battery charging circuit) and hook it up directly to the circuit board of the keyboard via the connector for the cable.
Luckily, the Unicomp’s circuitry is 3.3v compatible! I initially thought I’d need to do some buck boosting and logic level shifting, but that’s not necessary. So, the bill of materials is literally just the Xiao, a Lipo battery, a power switch, and a couple of wires. Easy stuff!
SHOW and TELL
PS…
As an aside, I’d normally want to use a Raspberry Pi Pico W because that’s my jam, but it turns out that CircuitPython doesn’t include an implementation of the ps2io
library. Plus, bluetooth is finicky on the onboard module. An ESP32 just seemed like the better choice in this case. However, I probably should have picked the ESP32-S3 variant of the Xiao for native USB support! We’re limited to serial communication on the C3 which was less fun. :'(
CODE!
And since we’re using trusty CircuitPython, the code is a piece of cake too! Bluetooth Low Energy (BLE) is a bit scary for me, but the Adafruit CircuitPython BLE library makes it (relatively) easy.
As far as the PS2 side is concerned, Tod Kurt’s (@todbot) work with ps2io
helped me sort that out real quick.
The only thing that is missing right now is support to read LED states from the BLE HID connection. That’s a library-level issue that’s being worked on at the moment to hopefully sort that out.