DIY trackball with twist-to-scroll

Overview

DIY trackball with twist-to-scroll

This repository contains design files and code that can be used to make a fully programmable four-button USB trackball that can scroll by rotating the ball around the vertical axis. It achieves that by having two optical sensors.

Here's a video demonstrating the twist-to-scroll function.

Trackball photo

It uses the following components:

  • 57.2mm billiard ball
  • two PMW3360 optical sensors
  • RP2040+PMW3360 PCB
  • PMW3360 breakout PCB for the second sensor
  • button switch mount PCBs
  • 3D printed case
  • Omron D2FC switches (or similar)
  • 2.5mm zirconium oxide (or silicon nitride) bearing balls
  • M3x4 screws for mounting the main PCB and assembling the case
  • M2x4 screws for mounting the buttons and the secondary PCBs
  • 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.

The twist-to-scroll function is a work in progress, but it already works pretty well. High resolution scroll is supported (on Windows and in some cases on Linux).

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. The top and bottom parts don't need supports, the buttons do.

Exploded view

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

Insides of the case

You might also like...
Arduino/ESP32 firmware for DIY haptic gloves. Officially compatible with LucidVR gloves.
Arduino/ESP32 firmware for DIY haptic gloves. Officially compatible with LucidVR gloves.

Arduino/ESP32 firmware for DIY haptic gloves. Officially compatible with LucidVR gloves.

DIY Zigbee CC2530 Motion sensor (AM312/ AM412/ BS312/ BS412), Temperature /Humidity /Pressure sensor (BME280), Ambient Light sensor (BH1750), 2.9inch e-Paper Module
DIY Zigbee CC2530 Motion sensor (AM312/ AM412/ BS312/ BS412), Temperature /Humidity /Pressure sensor (BME280), Ambient Light sensor (BH1750), 2.9inch e-Paper Module

How to join: If device in FN(factory new) state: Press and hold button (1) for 2-3 seconds, until device start flashing led Wait, in case of successfu

DIY Zigbee CC2530 Motion sensor (AM312/ AM412/ BS312/ BS412), Temperature /Humidity /Pressure sensor (BME280), Ambient Light sensor (BH1750), 2.9/2.13/1.54 inch e-Paper Module
DIY Zigbee CC2530 Motion sensor (AM312/ AM412/ BS312/ BS412), Temperature /Humidity /Pressure sensor (BME280), Ambient Light sensor (BH1750), 2.9/2.13/1.54 inch e-Paper Module

How to join: If device in FN(factory new) state: Press and hold button (1) for 2-3 seconds, until device start flashing led Wait, in case of successfu

DIY Smart Blinds controller for ESP8266

Window blinds to home assistant DIY window blinds controller software for ESP8266 (Wemos D1) to control existing window blinds using servos. The full

A simple DIY project that will make oldschool POCSAG pagers/beepers work again
A simple DIY project that will make oldschool POCSAG pagers/beepers work again

Arduino POCSAG Transcoder Features Message types: Tone, Numeric, Alphanumeric 4 encodings: Latin, 2xLatin/Cyrillic, Cyrillic Data rates: 512, 1200, 24

My DIY 3 Axis Camera Slider Project
My DIY 3 Axis Camera Slider Project

3Axis Camera Slider My DIY 3 Axis Camera Slider Project Authors NEWTech-Creative * Myles Newton GitHub YouTube Original project inspiration from * Raj

DIY Word Clock ver. 1.01
DIY Word Clock ver. 1.01

DIY Word Clock ver. 1.01

Bau Bau is a DIY 4 legged quadruped robot inspired for construction robotics course.

Bau-Bau-Robot Bau Bau is a DIY 4 legged quadruped robot inspired for construction robotics course. In this course, we are looking forward to solve a p

YUIOP60Pi DIY Keyboard Firmware

YUIOP60Pi - DIY keyboard with PGA2040 firmware Requirements PICO SDK (v1.2.0) cmake compiler or so How to build $ make Output: build\yuiop60pi.uf2 Har

Comments
  • 3D source files

    3D source files

    Hi, would you mind uploading the source files for the 3D models? At the moment I'm just trying to put a USB C port cutout in the wall instead of the hole for the cable, but it's a bit tricky to manually patch the cable hole closed. Alternatively, if you could just upload an STL for the bottom part without the cable hole that would make it a lot easier to edit it with a custom port cutout.

    I was mostly able to do it with some hacky editing but it comes out a bit weird in the slicer and I'm not sure if it might cause problems when printing :-/ image

    opened by JonnyHaystack 5
  • Why a work in progress?

    Why a work in progress?

    I like your design. It looks like a cross between the Logitech Trackman Marble Mouse and the Kensington Slim Blade with the best features of each. I'm thinking of building one. You mention that the scrolling is a work in progress. I'm curious why you think that is and what needs to be improved. Do you think it is good for regular use or should I plan to do some work on it first. Thanks for the design.

    opened by Steve-Wax 3
  • Add USB C version

    Add USB C version

    Hello again 😄 I just put together my trackball last night, and the USB C mod has worked out perfectly! I thought other people might also prefer this to hardwired cable, so I thought I'd share this back to your repo with the modified file and some info on parts and assembly. I also included a file with no cable cutout just to make it a bit easier for people to put in whatever cutout they want, but if you prefer I can remove that file.

    I'm also planning to try and modify the top shell to be able to use BTUs instead of static bearings. If that goes well, I will share the results of that too.

    opened by JonnyHaystack 0
Owner
Jacek FedoryƄski
Jacek FedoryƄski
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 trackba

Jacek FedoryƄski 176 Dec 24, 2022
Scroll pos - Provides some additional functions to ScrollController to define item position relative to the screen.

Scroll Position Provides some additional functions to ScrollController to define item position relative to the screen. A live version is available her

Kevin Vuilleumier 11 Nov 13, 2022
It creates a random word by mixing two English common words into a single one, each one with the first character in capital letter. It also allow you to scroll down infinitely without repeating the same word twice.

startup_namer A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if

Samuel Cobas 2 Feb 3, 2022
The ball is the trackball

The ball is the trackball This is Arduino code and 3D-printable models for a Bluetooth trackball in which all the electronics are inside the ball.

Jacek FedoryƄski 132 Dec 28, 2022
Devterm keyboard & trackball firmware

DevTerm Keyboard Firmware How to install Install Arduino STM32 hardware package on your Arduino IDE https://github.com/rogerclarkmelbourne/Arduino_STM

SeongChan Lee 23 Dec 24, 2022
imGuIZMO.quat is a ImGui widget: like a trackball it provides a way to rotate models, lights, or objects with mouse, and graphically visualize their position in space, also around any single axis (Shift/Ctrl/Alt/Super)

imGuIZMO.quat v3.0 imGuIZMO.quat is a ImGui widget: like a trackball it provides a way to rotate models, lights, or objects with mouse, and graphicall

Michele Morrone 276 Dec 28, 2022
Import of the DIY Dynamic Template v2, retrieved from the Internet Archive

Dynamic Templates This is a copy of the D*I*Y Planner Dynamic Template application that was posted to diyplanner.com/node/6210 back in 2009,

Trammell Hudson 21 Aug 7, 2022
ESP32 based DIY word clock project

Wordclock ESP32 based DIY wordclock project TL;DR: check out this ✹ demo video ✹ Another take on the classic DIY word clock. This one requires a laser

null 41 Dec 26, 2022
DIY LCD touchscreen for Home Automation

HA SwitchPlate HASPone The HASPone is a DIY touchscreen controller you can mount into a standard North American work box. It connects to your home aut

null 318 Dec 30, 2022
Arduino firmware for DIY haptic gloves. Officially compatible with LucidVR gloves.

lucidgloves-firmware This repo contains the arduino firmware as well as the STL files for Prototype 3 of the LucidVR glove prototype. This is a finger

null 1.6k Jan 9, 2023