I Made my own Space Mouse for Fusion 360 using Magnets (DIY)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
this video is sponsored by Groovemade more on them later. As I spend more time in CAD for my different projects as a hobbyist I find myself struggling repeatedly with one thing in particular navigation this is mostly my fault because I keep jumping between workstations and I keep forgetting how to get around in each environment So today we're going to try and prove that experience by building this input device. let's get to it while researching CAD input devices the 3D connection space mouse was the first device that caught my attention having never used one before I became curious about its inner workings and whether it was possible for me to create something similar in function on my own so I watched a tear down video and it appears that it's utilizing some sort of optical sensor and what I would assume is a lot of math to translate and rotate the motion of the knob that is mounted on a spring system this gives you the ability to control the viewport camera in all directions with 6 degrees of freedom a simple twist left to right a push up and down will correspond to a given orbit pan or zoom direction now before I dive too deep in over complicated things as I tend to do often I need to clearly define the features I want and any constraints I have to make this little project quick and manageable what I needed to be able to do is intuitively orbit and pan without thinking too much about it have a shortcut button to go back to the home view and another one to fit the view to screen and lastly I want to preferably use parts I already have on hand okay so first I went rummaging through the piles of sensors and modules I bought and never used to see if I had something useful for this project in and I found this a three axis magnetometer that is not sensitive enough to be used as a compass but can accurately measure nearby magnetic fields in three dimensions one of the applications suggested by the manufacturer is actually a joystick interesting quickly hooked it up via the STEMA connector to the RP2040 and tested it out with a little neodymium magnet it seems to be working great although I will need to do something to get rid of all that noise so the idea here is to make some kind of spring system similar to the real 3D connection space mouse that moves around the magnet or the sensor here is what I came up with I used three compression springs and three extension ones to counter the force and suspend this top piece I quickly realized that I definitely need some kind of weighted base to prevent this thing from sliding around while using it I will keep that in mind for the final design for now I just glued it to this heavy ceramic coaster to be able to test it out for the code I added some filtering and a crude calibration to calculate the offsets on my first pull even though the springs will re-center when you let it go we might have some slight variations so what I did is take some measurements at the start average them and use those values to offset readings later now that we can detect Motion in three axes let's take it a step further and use it to orbit and plan inside Fusion 360. I first looked into doing this using a custom add-in and control the camera directly via the python API well it seems very promising at first and I was very excited to try it out but I barely made any progress and I quickly realized that it will take more time and a lot more involvement the simpler approach would be to mimic what a mouse and keyboard would normally do to perform those actions within Fusion I found a few projects from the community on Instructables that took similar routes and it was certainly helpful to see how others solve these problems I will link them below if you want to check them out using the keyboard and mouse libraries we can pretend to be a normal HID device and map the magnet motion to the mouse movement and keyboard presses we need for each action the way it's implemented right now is I'm using the X and Y axes to orbit around and to pan you have to press down slightly on the Z axis to move around at the same time kinda like grabbing the canvas with your hand next up we need to add two buttons for the home view and fit to the screen shortcuts It was then when I realized that Fusion 360 doesn't have keyboard shortcuts for views and there's no way to define them by default at the time of this recording so to get around this I will use something I found earlier while looking into the python API in add-ins Fusion 360 allows you to define keyboard shortcuts for commands so what we'll do is Define a new command using a stripped down add-in boilerplate to send the camera to the home View and then assign a keyboard shortcut to that command and then we can send keystrokes once the button is pressed simply enough and it works pretty well for fit to the view I found out later that there is a shortcut which is simply double click the middle Mouse button so I will send that the same way on the button press alright with this prototype now working the only remaining task is to design a more permanent enclosure to be able to test it out in its final form I jumped back into Fusion 360 and made this model around the two little boards and the Springs I had I also made sure to leave enough space in the base to add some points later as I mentioned before it's now time to send this to the 3D printer [Music] [Music] foreign I printed this base with 5% infill only to be able to add these steel balls in the spaces in between the infill and entrap them inside before the final layers hopefully it would be heavy enough to prevent the device from sliding around [Music] [Music] I did some finishing to enhance the surfaces on the visible Parts if you want to check out this process in detail you can watch my previous build video that I will link here somewhere [Music] [Music] It's time to assemble this thing together but before that I'm very excited to talk to you about today's sponsor Groovemade I've been a huge fan for many years and I was delighted when they reached out to me to send me a few pieces for my setup having a beautiful workspace inspires me to do the best of my work these accessories are meticulously crafted from premium materials and they are beautifully designed there's a lot to choose from to put together the ultimate workspace I'm really happy how my revamp turned out go check them out to upgrade your setup and get 10 off using my link below or using Code Salim 10 at checkout thank you Grovemade for your support and back to the assembly [Music] I used several heated inserts as usual to be able to take this apart as many times as I need [Music] [Music] [Music] [Music] [Music] [Music] [Music] at this point I decided to add some lights to the stem area to have a halo around the knob for some visual interest I used these small LEDs from Adafruit that I harvested from an old project I will link all the parts and bits I used in the write-up [Music] both buttons in the slots and route the wires from the channels I left for that intent [Music] [Music] finally I hold it all down and then screw in the weighted base to the stem and middle section [Music] that's it it's ready and here is the final result [Music] [Music] foreign [Music] thank you for making it to the end of the video I will be testing the device myself to see if it's helpful for me or not I already have some ideas to improve it already maybe even make it Wireless add an IMU to complete six degrees of freedom I'm not sure yet I will share all the project files down below as usual it's not 100% complete and polished but it's a good place to start if you want to make one yourself thank you so much for watching and I will see you in the next one
Info
Channel: Salim Benbouziyane
Views: 974,426
Rating: undefined out of 5
Keywords: 3d printing, fusion 360, spacemouse, diy, maker, rp2040
Id: iHBgNGnTiK4
Channel Id: undefined
Length: 12min 12sec (732 seconds)
Published: Fri Jun 23 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.