

Trackball
Code for a trackball I'm building from scratch
- Size
- 35.6 × 27.9 mm
- Copper layers
- 2
- Thickness
- 1.6 mm
- Parts
- 9
- Nets
- 20
- Pads
- 44
- Tracks, vias
- 59, 0
- Routed
- Yes
- KiCad
- KiCad 5 (file 20171130)
- Created
- 27 Jan 2015
- Updated
- 15 Apr 2026
Overview
Trackball is an open-source printed circuit board by monroewilliams, from the monroewilliams/trackball repository on GitHub. It is a 2-layer board of 35.6 × 27.9 mm with 9 parts on 20 nets, routed with 59 tracks and 0 vias.
Its parts include 2 switches and 1 IC. It belongs with the keyboards and input boards and the SAM D and SAM boards of this library.
README
README.mdThis is the code to run a trackball I'm building for myself.
It's currently based around either a Seeeduino XIAO or the very similar Adafruit QT Py, and a couple of optical mouse sensor breakout boards. I've built two so far, one using these ADNS-9800 boards, and one using these PMW3360 breakout boards.
Update January 2025
As an alternative to off-the-shelf microcontrollers and sensor boards, I've created a custom main board and sensor breakouts that can be ordered from a PCB creation/assembly service (I've been using JLCPCB). The KiCad files and the files need to order them from JLCPCB are in their own repositories on github.
Details on the custom boards are here.
Update January 2026
I've refined the model for the main body of the trackball to be less of a brick and more of a hollow shell, which leaves much more room inside for wire routing, etc. The cable outlet at the front of the shell now also provides an option for a hard-mounted usb-c plug, or similar clones
I added an updated version of the button carrier. Its design is a bit more refined overall, but the main feature is that it allows you to avoid soldering wires to the microswitch by accepting a 3-pin JST XH female connector.
I also added an option to modify the sensor transform for a left-handed build. To make use of this, print mirrored versions of the main body and bottom plate (most slicers have an option to do this at slicing time), and define LEFT_HANDED when compiling trackball.cpp to modify the sensor transform. The env:rp2040_mwtrackball_left_handed section in platformio.ini demonstrates this.

History
I started this project because my favorite ergonomic trackball, the Trackman Marble FX, is basically no longer viable. I really like the shape of it, but it's PS/2 only, has a number of issues with tracking and durability, and has become really hard to find/expensive. I have a small collection of them, most of which have broken over the years.
I decided to build my own trackball with a shape that fits my hand similar to the old Trackman Marble FX, and incorporated a feature from the Kensington Slimblade (probably my second favorite, although not for its ergonomics): twisting the ball in the Z axis acts like a scroll-wheel (complete with clicky sounds produced by a piezo speaker).
To be able to sense rotation in all three axes, it needs to use two mouse sensors, positioned at different points around the ball.
I'm quite happy with the current state of the project. I prefer using this trackball to any other I've used at this point, which is saying something. :)
The hardware directory contains the OpenSCAD files for the printed plastics. The src directory has the code. If you want to see how all the parts fit together, you can go straight to the assembly guide.
BUILD
I'm building this with PlatformIO/VSCode. The root of the repository should open directly with VSCode.
I do my work on Mac OS X, so I don't know if there will be any issues using it on Windows or Linux.
Parts
9| Qty | Value | Footprint | References |
|---|---|---|---|
| 5 | Conn_01x02 | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | B1, B2, B3, B4, B5 |
| 2 | Conn_01x06 | Connector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_Vertical | S1, S2 |
| 1 | Piezo | Buzzer_Beeper:Buzzer_12x9.5RM7.6 | LS1 |
| 1 | SeeeduinoXIAO | Seeeduino XIAO KICAD:Seeeduino XIAO-MOUDLE14P-2.54-21X17.8MM | U1 |
Similar boards
- 2 layers103 × 30.5 mm

- 2 layers31.8 × 47.6 mm

- 2 layers24 × 27.3 mm

Expansion Card Retrofit
FrameworkComputer/ExpansionCards
Reference designs and documentation to create Expansion Cards for the Framework Laptop
9 parts1.1kCC-BY-4.0 - 2 layers15.6 × 17.3 mm

SKR Mini TFT Thermistor Board
VoronDesign/Voron-Hardware
Cool Hardware designed by the Voron Design group
9 parts1.1kGPL-3.0 - 2 layers39.1 × 49.5 mm

Learnoliver
hackclub/OnBoard
💡 Join 1,000 teenagers and make your first PCB with a $100 grant!
9 parts915 - 2 layers17.4 × 16.9 mm

- 2 layers9.8 × 108 mm

- 2 layers

Keyboard after
adamws/kicad-kbplacer
KiCad plugin for automatic keyboard's key placement and routing
9 parts547GPL-3.0
Questions
How big is the Trackball PCB?
It measures 35.6 × 27.9 mm and has 2 copper layers, 1.6 mm thick.
What parts does the Trackball use?
9 parts. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
Where can I download the Trackball KiCad files?
From the monroewilliams/trackball repository on GitHub, at the commit this page was made from: the board is kicad/Trackball/Trackball.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.
Can I use the Trackball design in my own project?
Its repository states no licence, so its author keeps all rights: ask monroewilliams before reusing the design.