My wrists are getting rather tired of moving off my keyboard. I would like to have a small trackball that can sit below the keyboard spacebar and allow me to move the mouse with sufficient convenience and accuracy to eschew a traditional mouse entirely.
Options like a modified Ploopy nano exist, but cost far too much for what I'd like to pay. The goal is to get the total parts cost under $10. Ideally under $5.
The trackball is currently missing some critical functionality: Clicking and scrolling.
Since I'm already using HID-remapper to change the trackball direction, I might as well use the RP2020-Zero's GPIO pins to add the missing functionality.
I wired up a 5-way directional switch and concealed USB-A port to the RP2020-Zero and set up the switch to function as the left, middle, and right clicks, as well as scroll toggle. That still leaves two directions unassigned. When scroll toggle is turned on, moving the trackball functions as scrolling, rather than pointing.
The wiring is still a mess, and I need to rework the housing, but for a prototype it works well.
I accidentally destroyed the PCB's of five mice while working on this, salvaging the sensor chips out of them. I was able to power up one of the sensor chips with a bunch of dupont wires and a breadboard. It might be possible to stick them in a smaller 3d printed housing and save some space, possibly even combine the halves back into a single unit. That remains to be seen. I rather like the split half idea, as it goes well with my keyboard.
Using an off-the-shelf mouse sensor comes with a challenge: Since I'm flipping the sensor upside down, then rolling a ball on top of it, the X axis is inverted. Not ideal for a daily-driver trackball. I also want the ball to be able to be used in different orientations, and with buttons in a separate module.
Software axis remapping programs and drivers exist, but are finicky, especially on certain platforms.
Despite my poor soldering skills, it worked, and I was able to remap and invert the X axis without issue.
That should solve the hardware cost problem. Replaces one ~$15 component with two $2 components.
Now to figure out how to add buttons, then design an enclosure that allow reorienting the trackball and separating out the buttons to allow usage with split keyboards.
In an attempt to bring the cost down, I attempted to harvest the internals of some cheap mice.
Finding a good candidate mouse proved challenging, as to minimize the footprint, it needs to be possible to cut off the buttons, scroll wheel encoder, and any unneeded components to make the resulting PCB as small as possible. both vertically and horizontally.
I went through a number of old, cheap Dell and Microsoft mice, then a selection of wired mice from AliExpress.
The sensor has an integrated USB controller, and no external capacitors, resistors, diodes, oscillators, or anything else. Just a PCB, sensor, lens, and a red LED. The USB wiring is also neatly to the side of the sensor, rather than too far in front or behind the sensor.
There are a few cheaper mice on AliExpess, but I haven't found any others with such an ideal layout.
This sensor also seems much more forgiving than the last one, which had very particular distance requirements. It works right out of the gate with my janky trackball assembly, and also handled me hovering my finger over the sensor.
A quick cardboard rig later, and I was able to use the mouse in the same fashion as a Blackberry trackpad. This might be a worthwhile direction for future investigation? It's surprisingly enjoyable to use.
The first version worked, but wasn't easy to daily drive due to the lack of bearings, static or otherwise.
I grabbed some cheap 3mm ceramic bearings, and after a great deal of trial and error, rigged up a working case.
The smoothness is now good enough to use for my programming job.
I also played around with different options for the trackball itself. The original phenolic resin ball has a medium weight and good smoothness. A steel bearing is heavier and a bit more satisfying, but isn't always as precise due to its reflectiveness. I've settled on an POM ball. Cheap, light, and precise. Almost too light, but for me at least I've found it to be the best option.
The cost is still too high. If sourcing the components from Alibaba, it still comes to around $12 for the whole assembly.
I disassembled it, cut off the button wires, and stuck it in the case. The components are friction-fit, but can't be pushed in all the way for the lens to work.