Trackball Breakout

by Pimoroni

A tiny, RGBW-illuminated, clickable Trackball Breakout that's perfect for adding navigation or control to your Raspberry Pi or Raspberry Pi Pico projects.

We've taken a trackball module from everyone's favourite fruit-flavoured phone and added a bunch of clever engineering to let you build old-school interaction into your projects. As well as x/y directional tracking and click, we've added an RGBW (red/green/blue/white) LED right under the clear trackball to illuminate it and allow you to add visual feedback.

Use Trackball Breakout with an Arduino that supports USB HID to use it as a tiny mouse. Or why not use it as a colour/brightness control for an LED matrix breakout, or a navigation controller for a Cosmic Unicorn?

Because the trackball has a grippy rubber surface you can also use it with the trackball facing downwards and track it as it rolls on a surface, like a traditional roller ball mouse.

It's compatible with our fancy Breakout Garden system, where using breakouts is as easy just popping it into one of the six slots and starting to grow your project, create, and code. Trackball breakouts made after April 2024 are also Qw/ST compatible so they can be plugged into a whole range of different microcontrollers and HATs with Qwiic or STEMMA QT connectors.

Features

  • Mini trackball with click button
  • RGBW LEDs beneath trackball for illumination
  • Moulded plastic trackball casing
  • Mounting holes
  • Nuvoton MS51XB9AE MCU
  • I2C interface (address 0x0A/0x0B (cut trace))
  • Qwiic/STEMMA QT connector
  • 3.3V or 5V compatible
  • Reverse polarity protection
  • Compatible with Arduino
  • Compatible with Raspberry Pi computers (Python library)
  • Compatible with Raspberry Pi Pico (C++/MicroPython libraries)

Kit includes

  • Trackball breakout
  • 1x5 pin header
  • 1x5 right-angle socket header

We've designed this breakout board so that you can solder on the piece of right angle female header and pop it straight onto the bottom left 5 pins on your Raspberry Pi's GPIO header (pins 1, 3, 5, 7, 9).

Engineering

There's a remarkable amount of engineering packed into this diminutive breakout.

The trackball module itself has a tiny cylinder magnet at each corner that spins and is read by one of four Hall-effect sensors.

There's a tiny dome switch right under the trackball for detecting clicks, and four LEDs (red, green, blue, white) around the trackball to illuminate it.

We've designed and injection-moulded a plastic trackball casing to hold the module in place and protect it, and this can be popped off to clean the trackball or roller, or to replace the module if necessary.

There's an on-board Nuvoton MS51XB9AE MCU to read output from the trackball and dome switch, to control the LEDs, and to implement I2C.

Software

We've put together a Python library for Trackball Breakout that makes it simple to read directional values, click events, and set the LED colour. There's a handful of examples of how to read the direction and click, make the LEDs rainbow, and use it as a mouse in Raspberry Pi OS.

You can also use this breakout with Raspberry Pi Pico and other RP2040 boards, using C++ or Pirate brand MicroPython.

Notes

  • The trackball breakout only works reliably with I2C speeds up to 250kHz due to limitations in the Raspberry Pi's clock-stretching implementation.
  • Dimensions (click for image): 25x22x11mm
  • Older versions of this breakout use a Nuvoton N76E003AQ20 MCU.

25 customer reviews

8 months ago
great little tool. to conect to a pico(with kmk). works just need to find out how to read out the klick option!. and the RGBW i so damn cool!
by Westerhof about Trackball Breakout via REVIEWS.io
a year ago
First impression is very good: Build quality, haptic feeling and simple usage. I use it in my handheld project with Arduino.
by Samuel about Trackball Breakout via REVIEWS.io
3 years ago
I had a hard time getting the trackball working with evdev-mouse.py. The Github page has not been kept up to date and I had to do some digging to get it working. The main issue that stumped me was being told the INT pin isn't needed when in fact it needs to be connected to GPIO 4/pin 7. INT is required to run evdev-mouse.py. From my attempts, the simplified install doesn't work for Bullseye. Bullseye must be manually installed. Follow directions for manual install on the github page, then follow these modified directions for evdev-mouse.py to work on startup. cd examples sudo apt install python3-evdev sudo modprobe uinput sudo cp 10-trackball.rules /etc/udev/rules.d/ sudo udevadm control --reload-rules
by Matthew about Trackball Breakout via REVIEWS.io
3 years ago
There is an issue with the software perhaps, the Interrupt line toggles each time the sensor is used on the I2C Bus. Either don't use the Interrupt line, or else disable it after first use in your controller so it gets impervious to the Pin's constant toggling from the sensor. Then once done reading sensor data, reconnect the interrupt line. The sensor itself works nicely, and I've added it as a small mouse/button on my cyberdeck.
by Sagar about Trackball Breakout via REVIEWS.io
3 years ago
Delivery was quick and the trackball works perfectly. Currently using it on a wired build but it would be great to see a version usable on a wireless build without draining the battery too quickly. An excellent addition to my current keyboard nonetheless.
by Myles about Trackball Breakout via REVIEWS.io
3 years ago
Great product. Really enjoy using this little thing. Easy to setup, I'm currently using it with qmk firmware on a custom mechanical keyboard. I plan to use the zmk firmware to implement it in a wireless keyboard.
by nathan about Trackball Breakout via REVIEWS.io
3 years ago
It's good I didnt get started using it. But this is the only option when it comes to qmk supported tiny trackball modules. The shipping to mainland US is surprisingly quick with UPS though.
by Nguyen about Trackball Breakout via REVIEWS.io

4 user photos