Build Your Own 3D Mouse for the Price of a Sandwich
Ripple Qubits built a $10 SpaceMouse clone using a Raspberry Pi Pico and a magnetometer, offering 3D designers high-end control on a budget.
Anyone who has done some 3D design work knows how painful this process can be. The traditional keyboard and mouse setup simply was not created with these workflows in mind. So, to get by, you’ll have to remember loads of keyboard shortcuts and constantly shift your hands from keyboard to mouse. This is all very cumbersome and severely decreases productivity. It also hinders the flow of creativity.
Ultimately, most power users end up buying a SpaceMouse to improve their efficiency. However, these devices are expensive, and not everyone wants to shell out the cash for one. So, engineer and YouTuber Ripple Qubits designed his own DIY version of a SpaceMouse that costs about $10 in parts.
The build is centered around a Raspberry Pi Pico microcontroller. This tiny board serves as the controller for every input, reading sensors and switches while presenting itself to a computer as a standard USB mouse and keyboard. Ripple Qubits chose it for its low price and strong compatibility with CircuitPython, which makes rapid development and debugging much easier than writing bare-metal firmware.
The input surface itself is a custom macro pad. Rather than designing a printed circuit board, the switches were hand-wired into a traditional keyboard matrix. Each mechanical key switch has a diode soldered to it and is connected in rows and columns to the Pico’s GPIO pins. By scanning the matrix, the microcontroller can detect which buttons are pressed while using far fewer pins than wiring each switch individually.
The “SpaceMouse” functionality comes from a magnetometer connected over I2C. A knob containing a small magnet sits above the sensor. As the user pushes, pulls, or tilts the knob, the magnetic field changes, allowing the Pico to calculate direction and intensity of movement. This provides six degrees of freedom — translation and rotation in 3D space — similar to commercial navigation controllers.
Rotary encoders allow timeline scrubbing or parameter adjustments, while a small joystick offers directional input. RGB WS2812B LEDs provide visual feedback, indicating which operating profile is active. The case and switch plate were 3D printed, and all components were wired back to the Pico by hand.
Getting the sensor working correctly turned out to be the hardest part. The magnetometer had to be precisely oriented; even a slight misalignment caused movements to register diagonally. The creator solved this by adding rotation math in software and implementing a dead zone so the cursor would not drift when untouched.
The firmware relies on CircuitPython and the Adafruit HID library, which lets the device masquerade as a normal keyboard and mouse. For example, pushing the knob sends a “Shift + Middle Click” command, triggering orbit mode in programs like Fusion 360. Dedicated macro keys handle common commands such as Select All, Cut, Copy, and Paste.
If you’d like to get better control over your 3D design software without splurging on a SpaceMouse, be sure to give the video a close watch.
R&D, creativity, and building the next big thing you never knew you wanted are my specialties.