Print Profile(3)



Description
ballin
An open-source 4-button USB trackball powered by the RP2040.
Remixed from jfedor's Trackball d/e on Printables.
The original trackball had 2 buttons, I added 2 more for a total of 4 buttons. I had the 4 buttons map to left click, right click, scroll, and three finger swipe (for changing desktop on mac). You can customize the buttons in the source code: https://github.com/SamIAm2000/ballin-rp2040-trackball. Full build instructions can also be found in the Github repo.
Details
Uses Jacek Fedorynski's original PMW3360 trackball firmware and PCB RP2040+PMW3360
3D models remixed from here
The four buttons map to Left Mouse Button, Right Mouse Button, Mouse 4, and Mouse 5. The original model only had 2 buttons, which was not adequate to implement scrolling and swiping functionality on top of the basic left and right clicking.
With the addition of two other buttons, you can map software on your computer to enable scrolling and swiping behaviors when you hold certain mouse buttons. I'm personally a fan of using [Mac Mouse Fix](https://github.com/noah-nuebling/mac-mouse-fix) on all my Mac computers to map Mouse 5 to scrolling when dragged, and Mouse 4 to the 3 fingered swipe that allows you to switch between desktops and spaces and mission control.
Alternatively, if you want hardware scrolling programmed on the trackball instead of your computer, you can also modify the source code for the trackball.
Fabrication
Requires:
- 57.2mm billiard ball
- PMW3360 optical sensor
- PCB from here: https://github.com/jfedor2/rp2040-pmw3360
- 4 micro switches for mice
- 3 2.5mm zirconium oxide (or silicon nitride) bearing balls
- 2 M2x5 screws for securing the switch plates to base
- 4 M3x4 screws for securing PCB to base
- 3 M3x12 flat head screws
- USB cable Note: this should be a USB-A cable with the standard 4 wires. Using a USB-C cable might work, but since USB-C generally relies on a handshake before providing power, the trackball would not directly work if you plugged it into your computer with a USB-C cord unless you have a dongle in between.
3D printing
I 3D printed the parts at .20 layer height, no supports needed. I used 40% sparse infill for the top part to get some rigidity and heft. The base I printed at standard 15% sparse infill.
For the plates that hold the micro switchees, depending on your 3D printer's tolerances, the holes might not be big enough to fit the micro switch legs. I would suggest to first try widening them with some tweezers, if that doesn't work, adjust the X-Y hole compensation by + .1mm maybe. It's better for the holes to be tight and grip onto the switches well than to be too loose and have your switches wobble around.
Soldering button pins
Another thing to note is which pins on the PCB you solder your mouse buttons to. In the current compiled trackball.uf2, I have the pins for the buttons defined as thus below. If you use different pins, you would need to modify this code in code/src/trackball.c.
```
#define TOP_LEFT 16 // Mouse 5
#define TOP_RIGHT 28 // Mouse 4
#define BOTTOM_LEFT 17 // Mouse 1
#define BOTTOM_RIGHT 26 // Mouse 2
```
Compiling and Flashing
Refer to the full instructions on the github repo











Comment & Rating (0)