• Stars
    star
    231
  • Rank 173,434 (Top 4 %)
  • Language
    C++
  • Created almost 3 years ago
  • Updated almost 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

DIY trackball with two balls

DIY two-ball trackball

This repository contains design files and code that can be used to make a fully programmable two-ball, three-button USB trackball that looks like this:

Trackball photo

It uses the following components:

  • two 38mm billiard balls
  • two PMW3360 optical sensors
  • main PCB
  • second sensor PCB
  • button switch mount PCBs
  • 3D printed case
  • Omron D2FC switches (or any switches with the same footprint)
  • 2.5mm zirconium oxide (or silicon nitride) bearing balls
  • M3x4 screws for mounting the main PCB
  • M2x4 screws for mounting the buttons and the secondary PCBs
  • 3x10mm wood screws for assembling the case
  • USB cable (cut off the device end and solder the wires directly to the PCB)

The main PCB uses the RP2040 chip from Raspberry Pi. The firmware supports remapping of ball and button functions using a configuration tool without the need to recompile the source code. All the configuration is stored on device, so the configuration tool is only needed to change the settings, not during normal use.

Each ball can be configured to control the cursor or to scroll, with independent CPI setting. High resolution scroll is supported (at least on Windows).

Configuration tool UI screenshot

So far I only tested the configuration tool on Linux, but it should in theory run on Windows and Mac as well. I will try to provide ready-to-use packages in the future.

The provided UF2 file can be used to flash the firmware onto the device. When first connected, a "RPI-RP2" drive will show up and you flash the chip by copying the UF2 file to that drive. If you want to flash it again, hold the BOOT button and press the RESET button on the board.

I printed the case parts with 0.2mm layer height and no supports, though you might want to enable supports for the top part if you're having trouble printing it without them.

Exploded view

The pin numbers are defined at the top of trackball.cc.

Insides of the case

More Repositories

1

hid-remapper

USB input remapping dongle
JavaScript
1,035
star
2

flatbox

Low profile hitbox-layout fightstick
C
667
star
3

rp2040-pmw3360

RP2040+PMW3360 PCB and code
C
276
star
4

scroll-ring-trackball

DIY trackball with scroll ring
C++
184
star
5

trackbowl-mk2

The ball is the trackball
C++
156
star
6

screen-hopper

Smart KVM switch
C
136
star
7

twist-to-scroll-trackball

DIY trackball with twist-to-scroll
C++
107
star
8

pmw3360-breakout

Breakout board for PMW3360 optical mouse sensor
94
star
9

gamepad

Arduino PC/PS3 compatible gamepad
C++
67
star
10

magellan-spacemouse

Adapter to use RS-232 Magellan/SpaceMouse with modern software
C
37
star
11

nxt-remote-control

Control Lego Mindstorms NXT robots from Android devices via Bluetooth
Java
32
star
12

mouse-multiplexer

Two mice, two cursors
C++
28
star
13

quake3-proxy-aimbot

Quake 3 Proxy Aimbot
Python
27
star
14

hat-mouse

Bluetooth input device using an orientation sensor
C++
23
star
15

paaas

PlayStation controller authentication as a service
C
22
star
16

mouse-switch-mount-pcb

Helper PCB for mounting mouse button switches
21
star
17

radial-controller

DIY Surface Dial
C
21
star
18

zero-latency-gamepad

Zero latency gamepad POC
C
15
star
19

notificationface

Wear OS watch face displaying notification icons
Kotlin
14
star
20

wheel-adapter

PS5 adapter for old Logitech wheels
C
10
star
21

spaceball-2003

Adapter to use Spaceball 2003 with modern software
C
10
star
22

ikea-tradfri-google-assistant

Google Assistant support for IKEA TRÅDFRI lights
Python
8
star
23

meet-mute-button

Mute button/status indicator for Google Meet
C++
8
star
24

usb-rubber-ducky-mouse

USB "rubber ducky" with mouse input
C
6
star
25

gt7-rpm-lights

DIY RPM lights for Gran Turismo 7
C
5
star
26

trackbowl

Bluetooth trackball with all the electronics inside the ball
C++
5
star
27

slimbox-bt

Wireless game controller firmware
C
4
star
28

latency-tester

C++
3
star
29

darkroom-tray-timer

Darkroom tray timer
C++
2
star
30

ms-paint-chart

Plotting sensor data with MS Paint and Bluetooth HID
C++
2
star
31

blinkenlights

Add blinking lights to your Linux box with a Raspberry Pi Pico
C++
2
star
32

pico-nunchuk

USB adapter for a Wii Nunchuk
C
2
star
33

darkroom-enlarger-timer

Darkroom enlarger timer
Dart
2
star
34

hippopaint

JavaScript
1
star
35

pico-morse

Morse code USB keyboard
C
1
star
36

human-trackball

Use a gym ball as a Bluetooth mouse!
C++
1
star
37

force_webconfig

CMake
1
star
38

timecube

Time tracking wifi cube
Python
1
star