Build a 6DoF Controller for a Fraction of the SpaceMouse’s Price
This DIY 6DoF controller uses magnetic sensors and 3D-printed flexures to rival a SpaceMouse for a fraction of the cost.
Anyone who’s spent time with 3D design knows how frustrating the workflow can be. Standard keyboard-and-mouse setups weren’t built for this kind of work, so you’re stuck memorizing tons of shortcuts and constantly moving your hands back and forth. It’s awkward, slows you down, and interrupts your creative flow.
As a result, many advanced users eventually invest in a SpaceMouse to work more efficiently. But those devices don’t come cheap, and not everyone wants to pay the premium. To get around that, engineer and YouTuber Salim Benbouziyane created his own DIY version, offering a more affordable alternative.
In his latest project, Benbouziyane takes things a step further with a complete redesign of his earlier prototype, introducing a second-generation, fully functional 6-degrees-of-freedom (6DoF) controller. Unlike his original attempt, which relied on a single magnetic sensor, this new version uses a trio of high-precision 3D magnetic sensors arranged in a triangular configuration. This setup allows the device to capture motion across all axes — translation and rotation — bringing it much closer to the performance of commercial offerings.
To make it work, two neodymium magnets are embedded in the control knob, and their movement is tracked by the three sensors, each capable of detecting magnetic fields along the X, Y, and Z axes. Combined, they generate nine streams of data, which are processed to calculate precise 6DoF input. Powering the device is a compact microcontroller board, the Seeed Studio XIAO RP2040, chosen for its small footprint and native USB HID support.
Mechanically, the design revolves around a custom 3D-printed flexure that acts as a spring, allowing the knob to tilt and return smoothly to center. Switching from earlier materials to PETG improved performance, offering the durability and consistency needed for repeated use. The internal structure was carefully modeled using parametric design tools, enabling rapid iteration and fine-tuning of stiffness and motion.
One of the biggest engineering challenges came from the sensors themselves. Because each unit shares the same fixed I2C address, they can’t normally coexist on a single communication bus. Benbouziyane worked around this limitation during prototyping by selectively powering each sensor at startup, allowing them to be assigned unique addresses in software.
On the software side, the device replicates the USB HID descriptors of a commercial SpaceMouse. As such, the controller is recognized natively by existing drivers on Windows and macOS. This means it works seamlessly with popular applications like Fusion 360, Blender, and KiCad — no custom plugins required.
Benbouziyane also gave plenty of attention to the finishing touches. The base is weighted with embedded steel pellets to prevent slipping, while resin-printed external components and epoxy detailing give it a polished, professional look. LED indicators and side buttons round out the feature set.
While minor issues like slight signal crossover remain, the end result is a highly capable, low-cost alternative that demonstrates just how far DIY hardware can go in replicating professional tools.