this is my first post here, even though I've been a long time lurker. A few month ago, I bough a vintage PS/2 Trackball from the CH Products brand. I must say that I'm very impressed by the quality of this device. It well derserves its title of "Model M of the trackballs".
The trackball was advertised as being the PS/2 variant, but unfortunatly it is not. In fact, it uses a pretty old connector and protocol called : BUS mouse.
The bus mouse connector is very similar to the PS/2, with the same 5/16" diameter, but it as 9 pins instead of 6. I can't blame the seller, as PS/2 and BUS can easily been mixed up.
Unlike PS/2, serial or USB devices, absolutly NO LOGIC is done on the device side. BUS mouse devices send the raw data from the optomechanical encoders and buttons to a decoding card on the computer side. The connector has the following pins:
- XA (X axis encoder channel A)
- XB (X axis encoder channel B)
- YA (Y axis encoder channel A)
- YB (Y axis encoder channel B)
- Switch 1
- Switch 2
- Switch 3
Fortunatly, all is not so bad:
- The cable is connected to a header so that changing it will be easier.
- The pinout is provided on both manual and PCB
- The controller is an 8bit PIC16C55 with a DIP28 package.
How do the encoders work:
They are based on quadrature encoders and consists on a shaft wheel and 2 optical sensors per axis. When the shaft spins, it generates 2 electrical signals phased out by 90 degrees
(image courtesy of Dynapar)
The picture below, shows that there're 3 achievable count speed:
- x1 if you count on channel A rising edge only
- x2 if you count on channel A rising edge and falling edge
- x4 if you count on both channel A and B rising and falling edges
(image courtesy of Dynapar)
After several tests using an Arduino Mega 2560 rev2 board, I bought a Teensy++ 2.0 as it supports the HID protocol.
At the moment, it is connected it to the BUS Mouse cable header.
The quadrature encoders are handled by interrupt, on both FALLING and RISING transitions. Buttons states are handled by the background loop and updated every 10 microseconds, along with relative coordinates updates if anything happend on the encoders side.
The video below shows a quick demonstration of the trackball in use.
What's left to do:
Next step will be to either put the Teensy inside the trackball case or use it as as inline adapter. The later option would require a 3D printed case.
Another cool option, that would match the retro-tech theme of this project, would be a controller board. Bus mouse pointing devices were used with specific controller board (like the one pictured below), where all the logic were done.
The basic idea would be to connect the Teensy to an internal USB header of the motherboard and run the required pins the a connector attached to a PCI bracket. A PCB, with the Teensy socketed into it, could be used for a genuine retro look .
Kind of link the pictured Microsoft InPort card, but with the Teensy in place of the PIC and a blank / dummy PCIe connector to secure the board in place.