Page 1 of 1
Trackpoint on ThinkPad USB keyboard
Posted: 26 Sep 2021, 11:14
by fraolt
I disassembled my
ThinkPad Wired USB Keyboard with TrackPoint.
Unlike the trackpoints on
this wiki page the trackpoint on the USB keyboard does not have a controller board itself. Instead it is directly connected to the keyboard controller.
- trackpoint.jpg (237.11 KiB) Viewed 43563 times
My assumption is that the mouse controller is on the left side of the following picture and it's connected via PS/2 to the main micro controller on the right side of the keyboard.
- controller.jpg (691.6 KiB) Viewed 43563 times
I would like to connect the keyboard and trackpoint to a teensy 3.2 (i.e. replace the original controller board) running QMK. The keyboard is almost done (you can find the current stage
here). But I'm not sure how to proceed regarding the trackpoint. It seems like I need a separate controller board. I found the SK8702, but it seems to be discontinued. Does anyone have any ideas how I could proceed?
Re: Trackpoint on ThinkPad USB keyboard
Posted: 26 Sep 2021, 14:04
by Findecanor
Have you read the numbers on the stick's controller chip and looked up what it does?
If that is a dedicated Trackpoint controller then it could speak PS/2, but I think it more likely to be a generic microcontroller in which case it is more probable that it will use I²C or SPI to the main controller — and a very special internal encoding of the bytes themselves.
Another detail on the board is that there is an unpopulated footprint for a voltage converter on board, which indicates that it probably uses 3.3V and takes 3.3V from the host as well.
I think the pressure sensors in trackpoints are resistive. In that case, should be able to connect the ribbon cable to ADC inputs on the Teensy 3.2. That would require quite some hacking in QMK though. The transfer function is not straightforward but there exists published documentation on the inner workings of older IBM Trackpoint modules..
Re: Trackpoint on ThinkPad USB keyboard
Posted: 26 Sep 2021, 14:22
by sharktastica
Findecanor wrote: ↑26 Sep 2021, 14:04
I think the pressure sensors in trackpoints are resistive. In that case,
should be able to connect the ribbon cable to ADC inputs on the Teensy 3.2. That would require quite some hacking in QMK though. The transfer function is not straightforward but there exists published documentation on the inner workings of older IBM Trackpoint modules..
They're strain gauge based, indeed. The negative inertia transfer function is detailed in the patent for TrackPoint III (US5570111A). I have some experience trying to emulate it through software, so I can assist with helping someone understand it if needed.
However, I did notice that the 2-piece TrackPoint module for T440/T450/T460/T470/T480, P52s, X240, X250, X260 X270 shown at the end of the DT wiki page on TrackPoint hardware has four connections like the shown loose TrackPoint. I wonder if it's worth the effort buying a keyboard assembly for one of those machines, soldering on a connector to the doner TrackPoint controller to connect the loose TrackPoint and then figuring out how to route the mouse buttons onto it? Once that's done, the little controller outputs PS/2 so getting it working with QMK should be a breeze.
Re: Trackpoint on ThinkPad USB keyboard
Posted: 26 Sep 2021, 21:07
by fraolt
Findecanor wrote: ↑26 Sep 2021, 14:04
Have you read the numbers on the stick's controller chip and looked up what it does?
No, I am not able to decipher it.
I tried to google some potential character combinations, but no luck.
Findecanor wrote: ↑26 Sep 2021, 14:04
If that is a dedicated Trackpoint controller then it could speak PS/2, but I think it more likely to be a generic microcontroller in which case it is more probable that it will use I²C or SPI to the main controller — and a very special internal encoding of the bytes themselves.
Another detail on the board is that there is an unpopulated footprint for a voltage converter on board, which indicates that it probably uses 3.3V and takes 3.3V from the host as well.
I read somewhere that Lenovo is basically using the same solutions in all their keyboards, i.e. letting a dedicated controller do the hard work and just connecting it as a PS/2 mouse. I guess that makes sense. I see that there are four traces going to the left controller. A thick trace (potentially VCC) and three thinner lanes (potentially clock, data, and reset).
sharktastica wrote: ↑26 Sep 2021, 14:22
They're strain gauge based, indeed. The negative inertia transfer function is detailed in the patent for TrackPoint III (US5570111A). I have some experience trying to emulate it through software, so I can assist with helping someone understand it if needed.
I'm a bit reluctant to go down that route. IMO the engineers at IBM/Lenovo did a really good job and the TrackPoint is leaps and bounds ahead of anything that their competition has come up with (including companies like DELL). I don't think I could replicate these results with my own implementation.
sharktastica wrote: ↑26 Sep 2021, 14:22
However, I did notice that the 2-piece TrackPoint module for T440/T450/T460/T470/T480, P52s, X240, X250, X260 X270 shown at the end of the DT wiki page on TrackPoint hardware has four connections like the shown loose TrackPoint. I wonder if it's worth the effort buying a keyboard assembly for one of those machines, soldering on a connector to the doner TrackPoint controller to connect the loose TrackPoint and then figuring out how to route the mouse buttons onto it? Once that's done, the little controller outputs PS/2 so getting it working with QMK should be a breeze.
I thought the same. I'm typing this on my T460 and I thought about replacing my ISO keyboard with an ANSI one, I'll probably throw in the few extra bucks and buy one from alibaba with a trackpoint (hopefully including controller).
BTW the mouse buttons are connected to the main controller not the one on the left.
Re: Trackpoint on ThinkPad USB keyboard
Posted: 03 Oct 2021, 14:07
by fraolt
fraolt wrote: ↑26 Sep 2021, 21:07
Findecanor wrote: ↑26 Sep 2021, 14:04
Have you read the numbers on the stick's controller chip and looked up what it does?
No, I am not able to decipher it.
I tried to google some potential character combinations, but no luck.
I got it now. The chip says:
717A1
HF372
7AV1
My google foo didn't bring up a datasheet though.
fraolt wrote: ↑26 Sep 2021, 21:07
Findecanor wrote: ↑26 Sep 2021, 14:04
If that is a dedicated Trackpoint controller then it could speak PS/2, but I think it more likely to be a generic microcontroller in which case it is more probable that it will use I²C or SPI to the main controller — and a very special internal encoding of the bytes themselves.
Another detail on the board is that there is an unpopulated footprint for a voltage converter on board, which indicates that it probably uses 3.3V and takes 3.3V from the host as well.
You are absolutely right! That's actually awesome news, because the teensy is operating at 3.3V as well.
fraolt wrote: ↑26 Sep 2021, 21:07
sharktastica wrote: ↑26 Sep 2021, 14:22
They're strain gauge based, indeed. The negative inertia transfer function is detailed in the patent for TrackPoint III (US5570111A). I have some experience trying to emulate it through software, so I can assist with helping someone understand it if needed.
I'm a bit reluctant to go down that route. IMO the engineers at IBM/Lenovo did a really good job and the TrackPoint is leaps and bounds ahead of anything that their competition has come up with (including companies like DELL). I don't think I could replicate these results with my own implementation.
I should however note that I very willing to send a trackpoint to someone willing and capable to implement an open source function for QMK.
fraolt wrote: ↑26 Sep 2021, 21:07
sharktastica wrote: ↑26 Sep 2021, 14:22
However, I did notice that the 2-piece TrackPoint module for T440/T450/T460/T470/T480, P52s, X240, X250, X260 X270 shown at the end of the DT wiki page on TrackPoint hardware has four connections like the shown loose TrackPoint. I wonder if it's worth the effort buying a keyboard assembly for one of those machines, soldering on a connector to the doner TrackPoint controller to connect the loose TrackPoint and then figuring out how to route the mouse buttons onto it? Once that's done, the little controller outputs PS/2 so getting it working with QMK should be a breeze.
I thought the same. I'm typing this on my T460 and I thought about replacing my ISO keyboard with an ANSI one, I'll probably throw in the few extra bucks and buy one from alibaba with a trackpoint (hopefully including controller).
The order is placed.
fraolt wrote: ↑26 Sep 2021, 21:07
BTW the mouse buttons are connected to the main controller not the one on the left.
That was wrong. The mouse buttons are connected to the trackpoint controller. They are routed on the bottom side of the PCB.
Thanks to Findecanor's hint that the controller is powered using 3.3V, I think, my next step is to cut the traces to the main controller and see if I can connect the trackpoint controller to the teensy.
Re: Trackpoint on ThinkPad USB keyboard
Posted: 05 Oct 2021, 19:56
by fraolt
Prior to cutting the traces I took a look at the firmware and - unfortunately - Findecanor was right: The communication is not PS/2, as the host is driving the clock.
I don't have the energy to reverse engineer the protocol, so I'll hope to find a 2-Piece-Trackpoint on the keyboard I ordered, and that I can use it on the USB keyboard.
Re: Trackpoint on ThinkPad USB keyboard
Posted: 10 Oct 2021, 20:32
by fraolt
Ok, I did some reverse engineering. Fun stuff, wrapping your head around pages of assembler.
The communication between the main controller and the trackpoint controller is using some bit-banging protocol.
This is a function that seems is called from what seems to be the main loop:
- On first call send 54h FCh to touchpoint controller
- On the next 75 calls do nothing
- On the calls after that get mouse state until everything is 0
- On the call after everything is zero send 54h C4h to touchpoint
- start from the top
The mouse state it gets by sending 55h. Then it reads five bytes from the touch point controller.
- The first byte is 80h
- The second byte seems to contain the mouse buttons
- The thirt byte seems to contain the x movement
- The fourth byte seems to contain the y movement
- The fifth byte is being discarded
Does that protocol ring a bell with anybody?
I'm not sure if this is worth pursuing.