Introduction: Space Mouse With Arduino Micro *UPDATE*
Hello Makers!
I love 3D cad design and one of the most common panel I use while designing is...View.
I often need to spin the object around, zoom in and out, slice it and so on.
There are amazing professional 3D mice you can buy, but they are not cheap. They usually cost from £150 up.
So...I built my own one! With a couple of extra features because....why not.
The Space Mouse has a joystic with push button integrated and 3 independent customizable buttons.
The functions I use in my setup are:
- Joystic = rotate view (free orbit)
- Quick joystic press = home view
- Press and move = zoom
- Button 1 = slice view
- Button 2 = show/hide constraints
- Button 3 = delete
Supplies
- 3D printer
- Arduino Micro
- Joystic module
- M2.5 x 6 bolts
- 1.5 mm screws
- M2.5 threaded inserts
- Soldering iron
Step 1: The Design and Parts
The design is pretty simple: the base holds all the components and the lid closes them in.
This helps when you have to put the components together and makes the parts easy to print.
The objects to print are: base, lid, buttons holder and 3 buttons extensions. I decided to extend normal pbc push buttons instead of using panel mount units to keep the design compact and as low cost as possible.
The total cost of this project is £15-20 which is pretty good compared to £160 you have to pay for a proper space mouse.
I also included a file to print 4 small washers to hold the joystick module to the base.
I used 0.12 mm layer resolution for all parts except the top which is 0.06 to get a smooth finish straight out of the printer.
I would suggest to use 40 mm/s max, this will make the printing process slower but more accurate.
Step 2: Simplified Version Without Buttons
If you don't have buttons (or you just don't want them) you can use this semplified version.
Step 3: Assembly
The first step is to put the Arduino in.
The base has the Arduino footprint already in place. Just push 4 or more headers (they should come with the board) into the print and place the board on top. Be quick when you solder the pins on the Arduino board, if you keep the soldering iron on the header too long you will start melting the 3D printed base.
After this, we have to connect the buttons and the joystic module.
Using a small gauge wire connect the three buttons in series for the common line (GND), and three single wires for the signals (in my case they are digital pins 7,8 and 9). I used the internal pullup function of Arduino to avoid resistors.
The button plate part has small holes to guide you while positioning the buttons. Use the soldering iron to heat up the pins a bit to help them take their place into the print.
When the buttons are ready, place the button module on the base using two 1.5 mm screws.
Now connect the joystic module (VCC to VCC, GND to GND, X to A0, Y to A1, Switch to digital pin 10) and connect it to the base using 1.5 mm screws and the small washers if you need them.
I designed the joystick mounting points with many holes in order to be used with different joystick module brands. They are all very similar but the dimension might vary slightly.
Next use the soldering iron to gently push the threaded inserts into the top holes of the base. Be gentle and use a knife or a tool to hold the inserts down while pulling back the soldering iron.
Finally place the lit on top and bolt it on with four M2.5 x 6 mm bolts.
I also painted it black with metal finish effect.
Step 4: Test and Use
Finally the Space Mouse is complete!
I tested it in Autodesk Fusion 360 and Autodesk Inventor. It works perfectly, sensitivity is good, not too fast or too slow. The response is immediate and precise.
Pros: It doesn't require specific drivers, cable or equipment. It can be easily configured to work with any software uploading the right sketch. And it is cheap.
Cons: It is a bit light; I will add some lead inside as soon as possible to prevent it from moving on the table. I am currently working on a software to switch from mouse to space mouse automatically to prevent conflict in movements.
I uploaded an Arduino sketch configured for Inventor and my pref. settings. You can change the buttons or function according to your software hotkeys.
You can also find a federence of keyboard declaration here:
https://www.arduino.cc/reference/en/language/funct...
If the main mouse is annoying you too much, try this free software:
It creates a second mouse (in switched mode) so you can use both mouse and space mouse independently.
If you like this project, check out the extended Creative Console!
https://www.instructables.com/Creative-Console-for...
Hope you enjoy the project!
Attachments

Participated in the
3D Printed Contest
159 Comments
Question 3 days ago
Ciao Stefano, bell'idea creare un space mouse alla portata di tutti in termine anche di costi.
E soprattutto complimenti per il progetto.
Avrei solo una domanda.. Come hai configurato il dispositivo si Autodesk? Io utilizzo Fusion 360, hai qualche consiglio in merito? Ti ringrazio
3 years ago
Reply 8 months ago
Hello, I like your project. I ask you to share for free your schemas, stl and arduino code. I like you add a rotary encoder on top of joy.
Thanks
Reply 2 years ago
Hello, I am interested in building this hardware. StefanoS48's one looks great but I was looking for something more your image file is showing. I mean the top rotating button can be use to zoom or to rotate on z-axis.
Have you improved your version ?
Reply 2 years ago
Reply 2 years ago
Have you tested your version? Can you share stl files?
Reply 3 years ago
Hi! I didn't get your message...my project is Arduino based, what do you mean by "Tell me if you can code for an arduino board, otherwise I can not write the code"???
Reply 3 years ago
I make the mouse in your likeness, but in Arduino you need to fill in the code in order for the mouse to work on the computer. Everything is well described in your project but there is no code for arduino. Or am I misunderstanding something?)
Reply 3 years ago
The code is in the instructable, .ino file
Reply 3 years ago
2 years ago
Great design, did you of anybody else manage to make this work for solidworks?
Reply 2 years ago
Yes, I did, I did another arduino program and everything works great. I can send you the code in the message
Reply 9 months ago
Hi, I know this was months ago but could you send me the code for solidwoks too?
Thanks
Reply 9 months ago
Hey Frenkey, sorry to disappoint you but I lost all the files in a hard drive failure :/ maybe some other maker can give you a modified version of my code?
Reply 1 year ago
Hi, I know this was months ago but could you send me the code for solidwoks too?
Thanks
Reply 1 year ago
Hello, Would you like to send the code to me to? Thanks in advance!
Reply 2 years ago
Yes please, that would be very nice!
Reply 2 years ago
I don't personally use Solid Works, but it should work fine with any software. Just change the hotkeys
2 years ago
On my side I updated the software in order to better fit my personnal needs under Fusion 360.
My version of the software is available there: https://github.com/freeasabeer/SpaceMouse
With this software the Space Mouse has the following modes available:
- normal: moves the mouse pointer as with a normal mouse
- pan: Fusion 360 pan mode (moves by simulating holding the middle mouse button)
- rotate: Fusion 360 rotate mode (rotates part by simulating holding SHIFT key + middle mouse button)
- zoom: Fusion 360 zoom mode (zooms in/out by simulating rolling the middle mouse button)
The 3 space mouse buttons have the following functions:- button 1 (Left): simulates a left mouse button
- button 2 (Middle): toggles between default, pan and rotate modes
- button 3 (Right): simulates the ESC key
Joystick switch functions:To zoom in: while keeping the joystick pressed, push the joystick.
To zoom out: while keeping the joystick pressed, pull the joystick.
When the joystick switch is released, the space mouse switches back to the previous mode that was active (normal, pan, rotate).
Reply 2 years ago
Great job!