ZMK-ThinkPad - Part 1: Project inception and mapping the T470 keyboard
Table of Contents
The T470 keyboard connector problem
I’ve had a spare ThinkPad T470 (or maybe T480) keyboard sitting in pristine condition in a unmarked groceries bag in a moving box for the past 10 years. I could never proceed with it because just like most Lenovo contraptions, the connectors almost impossible to get.
T470 (and T480) actual connectors are:
- KBD:
HIGHS_FC5AF361-1151H - TrackPoint:
HIGHS_FC1AF121-1151H
Top contacts. KBD is 36-pin 0.5mm pitch, TrackPoint is 12-pin 1mm pitch.
If anyone happens to know where to get these from, I’d love to get them as well.
Then one day, I was doing parts inventoring, and colour me surprise, the 36-pin FFC cable fits perfectly in a 40-pin FFC connector. A generic 40-pin FFC connector just happens to fit.
This revived an old itch of mine: making a keyboard controllers.
Starting with the keyboard matrix
Technology has advanced since 2014. Now we have nRF52840 with dual USB + BLE, and the ZMK project, and AI!
Feeding Codex my ambition, it maps out a list of jumper wire connection from the nRF52840 DK to the breakout board. Long gone are the days of manual Excel spreadsheets and meticulous datasheet reading.
The breakout board starts pin 1 from the right of the FFC connector. Every pin is reversed compared to ThinkPad T470 schematic, but eventually it connects. The quick check was the FN key as it sits on its own -HOTKEY pin.
After a short while, the matrix was scanned ☺️. I am thankful that all keys could actually be mapped.
The ZMK-ThinkPad project
The goal of the ZMK-ThinkPad project goal is a standalone controller, with both USB and Bluetooth support. My wishlist includes: USB-C, Logitech 3-connection easy pairing for BLE, a nice 3D-printed case, and all the easy macros I can make.
It will include a 1s LiPo charging circuit.
Does this need a custom PCB?
Yes and no.
Why “no”:
- Power is hard. Dev boards are tested.
- I haven’t done an electronics project in over a decade.
Why “yes”:
- Dev boards typically use LDOs (linear) to help with costs, whereas in a custom board, we can use proper buck-boost converters that can use more of the available voltage range.
- T470 and T430 needs a lot of pins. This table shows the number of pins a keyboard layout needs accumulatively:
| Scope | nRF52840 GPIO |
|---|---|
| Keyboard matrix only | 24 |
| Matrix plus Fn key | 25 |
| Complete T470 keyboard, TrackPoint, LEDs and backlight controls | 38 |
| Add three BLE-profile LEDs | 41 |
| Add battery ADC and USB-C current detection | 43 |
A total of 43 pins,
- Most devbo that supports this many already uses their respective BLE SOMs and are massive in size. They typically breakout pins by double 2.54mm headers, so tall.
- We need 5V converters sprinkled throughout the board for LED, backlight and TrackPoint.
There is a balance to be struck: size vs complexity. At the moment, I prioritise size.