CAD mouse / Spacemouse using Hall Effect Sensors 3D model thumbnail

CAD mouse / Spacemouse using Hall Effect Sensors

by John Crombie · via Printables
FormatSTL
CategoryElectronics
LicenseCC BY-NC-SA
UploadedMar 13, 2026
⬇ 1.5k downloads ❤ 653 likes 👁 17.6k views

Description

A 6 degrees of freedom mouse for CAD programs using cheap linear hall effect sensors for position measurement. August 21 2025 For information: I am currently using the TPU spring version in the smaller case. See: https://www.printables.com/model/1087923-hall-effect-spacemouse-cad-mouse-with-tpu-springs There is also a 3D printed TPU wave spring version documented on the projects GitHub springs page which I have also put in the smaller case. See https://github.com/ChromeBee/Hall-Effect-Sensor-CAD-Mouse-Spacemouse/tree/main/Springs I would suggest checking these out before deciding which version to make. They are all based on this version with minor variations so you can try them all with little reworking required. March 13 2026 For information : InnerBushman has designed an alternative TPU spring and magnet plate combination that works very well and allows for a even smaller case to be used. Check it out at: https://www.printables.com/model/1566497-alternative-tpu-suspension-for-spacemouse A demo video of the device in use. Just trying to encourage people to build it. (Two times actual speed.) Parts list Arduino Pro Micro 8 of (SS) 49e linear hall effect sensors 4 of 10x5x3mm Neodymium magnets 8 of servo sockets and leads 3 of 6x6x5mm small tactile switches 1mm diameter piano wire cut into 8 lengths of 8mm each and 4 lengths of 15mm (paper clip wire?) 8 of 0.2x12x4mm tension springs ( wire diameter 0.2mm, total length 12mm, length of spring portion 4mm and OD of 4mm M4 bolt 40mm in length fully threaded. ( thanks to @onolox_728550 for pointing out that I missed this) 2 or 3 off M4 nuts. Top nut optional. 4 of M3x20mm bolts to hold on bolt plate and set space between sensor plate and magnet plate. 12 of M3 nuts for the bolts above. 10 of M3x4mm heat press brass inserts 2 of M3x8mm to hold on knob 4 of M3x6mm bolts to hold on base 4 of M3x6mm or M3x8mm bolts to hold on case heat shrink tubing or insulation tape or liquid insulation to protect the wire to wire solder joints This started as a thought project based on the Teaching Tech $20 CAD mouse code. This code works with the 3D ConneXions device driver so any program that works with the 3D Connexions Spacemouse will work with his $20 CAD mouse and also this one. If it hadn't been for his project and the resulting code, I wouldn't have even considered this. This is a link to his project - https://www.printables.com/model/864950-open-source-spacemouse-space-mushroom-remix Luckily the thought project turned into a real one as I did my research. Assembly and demo video The mouse is made up of several layers or plates. The bottom plate holds the Arduino pro micro. This needs to be wired to the sensors and switches. The wiring diagram is below. 📷 Image redacted — claim this model to add your own media The numbers on the sensors indicates the Analog to Digital converter pin they are connected to. The order was chosen so that with the USB socket to the back of the mouse and sensors 6 & 7 also to the back of the mouse, sensors 2&3 and sensors 8&9 are on the side of the Arduino board that they need to be connected to. I am using servo sockets to hold the hall effect sensors, however the default wiring colours for servo connectors doesn't match what is needed for the sensors. The middle pin on a servo is 5v and the connector wlll normally have a red wire to this, however it is ground on the sensor. With the angled side face up and the legs towards you, The left most pin is VCC, the middle pin ground and the right most pin the output. I swapped the VCC and GND wires on the servo sockets to avoid confusion. 📷 Image redacted — claim this model to add your own media To reduce the wires connected directly to the Arduino, I have joined the the VCC pins of each pair together, also the GND pins and a GND wire for a switch. Then joined the 4 wires of VCC wires from the sensor pairs together to a single wire to go to the Arduino and the same with the GND wires. To make sure that the wires weren't too long and to make things easier to wire. I attached the M4x40mm bolt to the bolt plate and the bolt plate to the sensor plate. I then mounted the sensors in their appropriate holders and held them all in place with an elastic band. This is what is shown in the picture above. The band was also useful for holding wires I didn't need at the time out of the way. 📷 Image redacted — claim this model to add your own media These are then wired to the Arduino pro micro together with the sensor and switch output wires. The Arduino is then mounted to the 3d printed Arduino plate and held in place with a short length of filament. 📷 Image redacted — claim this model to add your own media An M4x40mm bolt is then attached to the Bolt plate and this attached to the Arduino plate using M3x20mm bolts 📷 Image redacted — claim this model to add your own media 4 of the 0.2x12x4mm tension springs are attached to the bolt plate. These fit in the slots on the centre column and are held in place with short (8mm) lengths of 1mm diameter piano wire. A second set of nuts is added to the 20mm bolts holding on the bolt plate, then the sensor plate is placed on top and the sensors slotted into place together with the switches in to their holders. 📷 Image redacted — claim this model to add your own media Loading the software on to the Arduino pro micro and setting debug level to 1, we can ensure, by bringing a magnet close to each sensor, that the sensor works, is correctly connected and which pole of the magnet is being presented to it. The numbers should decrease when the north pole is the one brought closest to the sensor. Once we have identified the north pole of the magnet we can glue 4 10x5x3mm magnets into the magnet holder with the north pole facing downward (the side with the slot in the middle of the space for the magnets. The slot is to help remove the magnets if needed). 📷 Image redacted — claim this model to add your own media Once the magnets are glued in we can add m3 x 4mm heat pressed brass inserts on the magnet holder and the case also the base if it is going to be used. I just used a soldering iron to push these into the corresponding holes. 📷 Image redacted — claim this model to add your own media The diagram above shows the location of the brass inserts. Now we need to mount the magnet plate to the mouse. It goes over the M4 bolt and the springs attached to the bolt plate have to be mounted to the slots in the magnet plate using 4 x 15mm lengths of 1mm diameter piano wire. 📷 Image redacted — claim this model to add your own media 4 more of the tension springs are attached to the magnet plate in the same slots. A second M4 nut is added to the M4 bolt and the wire holder is put on top. 4 more pieces of piano wire of 8mm in length are placed on the wire holder and the springs lifted and fitted on these. Once fitted we need to adjust the height and tension of the magnet plate. Lift the wire holder further up the M4 bolt and adjust the M4 nut underneath to hold it in place. It needs to be high enough so when the knob is mounted to the magnet plate and the case is on, the knob can move freely. So the wire holder should be about 10mm from the top of the M4 bolt. Next adjust the height of the sensor plate so there is a gap of 5-6mm between the sensor plate and the magnet plate. These are just starting points and can be adjusted later if needed. 📷 Image redacted — claim this model to add your own media An optional washer and M4 nut can be placed on top. Set debug level to 2 in the code and upload it. Now test the movement of the magnet plate and verify that numbers go both up and down on all sensors. The base is intended to be a weighted base and should be filled with something heavy and non metallic. I was thinking of cement, epoxy resin or modeling clay. I have found it is not really needed but if the springs you are using are stronger than mine, you may want to use it. Plus I think it looks better with the base. Mount the base (if you are using it) using M3x6mm bolts and the knob using M3x8mm bolts. 📷 Image redacted — claim this model to add your own media Now make sure the knob is high enough so that when the case is put on the knob is clear of the case and there is sufficient movement in all directions. If not, further adjust the top nuts on the M4 bolt. Next put the buttons in the holes in the case and place the the case over the mechanism aligning the cutout for the USB connector with the connector on the pro micro. Bolt the case in place using either M3x6mm or M3x8mm bolts. The CAD Mouse/Spacemouse is now complete. The code / Arduino sketch for this mouse is a variation of the one from Teaching Tech and can be found on GitHub at https://github.com/ChromeBee/Hall-Effect-Sensor-CAD-Mouse-Spacemouse/tree/main I have put it on GitHub to give version control. You can also find the Fusion 360 design file and a STEP file of the design there to modify as you wish. The Arduino now needs to be setup to emulate the Spacemouse. This is the same process as the Teaching Tech model and is covered on their Open Source spacemouse model's Printables page at https://www.printables.com/model/864950-open-source-spacemouse-space-mushroom-remix Please follow the process detailed there. The process is also covered in the comments in the Arduino sketch. It involves setting up a custom Arduino board that the 3D connexion software recognises as a Spacemouse Pro Wireless. @Andun_HH also covers this in great detail on his Github page. https://github.com/AndunHH/spacemouse In my code, the buttons are setup by default so that in Fusion 360 the right button gives a top down view. the middle button gives the right hand view and the left button gives the front view. Pressing both the left and right buttons at the same time brings up the 3D connexions configuration menu for the current program. Thanks to CAD Jungle for their tutorial on CADing a CAD mouse. I used the design as is for the knob and the case is heavily based on their design info. https://youtu.be/_Ve7vnxdjTI?si=D83bhB-htYD0CXX5 And thanks to Rodrigo Alvarez for his Spacenavigator teardown. It is very interesting. https://www.alvarez-engineer.com/2022/03/20/spacenavigator-teardown/ but most of all thanks to Teaching Tech for the inspiration. Now over to all you open source modellers and designers to take this and make it even better. I challenge you. Update 19-Aug-2024: I have added a magnet plate with a wider gap for springs using 0.3mm wire. Update 19-Nov-2024: When I printed the initial knob and cap, they were a tight fit. I have since printed a more decorative version and the cap was a loose fit. I'm not sure if this was because it was a fresh reel of PLA or because it was multi colour. It hasn't been much of a problem, just that the cap may fall off if I invert the mouse. I have finally gotten around to addressing the issue and created a “TPU cap keeper” to be printed in TPU. This fits to the inside of the cap and holds it firmly to the rest of the knob while still being removable. If your cap is loose, you may want to try this as well 📷 Image redacted — claim this model to add your own media
magnet spacemouse cad 6dof spacemushroom

Originally published on Printables