Space Mouse With Arduino Micro *UPDATE*
by StefanoS48 in Workshop > 3D Printing
68511 Views, 400 Favorites, 0 Comments
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
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.
Simplified Version Without Buttons
If you don't have buttons (or you just don't want them) you can use this semplified version.
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.
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!