Introduction: A Nifty 3D Printed Mouse Rocker
I work on two laptops most times when I'm working out of my home office. I have set my personal laptop to lock itself within the minimal time allowable when I leave it unattended. This is the way it's supposed to be for reasons of security.
But when I'm working on something and then divert my attention away from my laptop to work on the other machine for a short duration, or go to check on my 3D prints, the laptop locks. It's super annoying to login in countless times during the course of the day!
Therefore I needed something to keep the laptop from locking up whenever I'm actively working at my desk.
And for that, I built myself a mostly 3D printed, nifty little mouse rocker!
In this IBLE, I will walk through most of it. You can watch my video series on YouTube to see how the this gadget comes together.
Let's get that mouse rocking!
Step 1: The List of Parts
- A 3D printer, if you have one - best if it has a bed area of 200 mm x 200 mm
- PLA filament of your choice of color(s)
- 85 TPU Shore hardness flexible filament of your choice (if not you can use the adhesive pads listed below)
- A standard RadioShack Servo or equivalent with body dimensions 38.6 x 18.8 x 34.9 mm or equivalent (now that beloved RadioShack is long gone!)
- A Four-point Servo horn (or Servo-Cross as I call it) that comes packaged with the servo as shown on the RadioShack product page
- A Two-point horn will also do, but I haven't tested it out with my Rocker
- Wemos D1 Mini Micro-controller (optionally, you can use any other small factor micro-controller with a 5V output GPIO PIN if you're willing to modify the design to suit your application)
- M3 Button Head screws and nuts - If you have a pack like this one, it's awesome because it comes with an Allen wrench!
- If not, you'll need at least the following :
- M3 x 12 mm Button Head Screws - 6
- M3 x 16 mm Button Head Screws - 4
- M3 Nuts - 6
- M3 Nylon Philips head screws and nuts - they come in an assorted pack like this one - If not you'll need:
- M3 x 10 mm Philips head Nylon screws - 4
- M3 Nylon nuts - 4
- Bearings - 8x22x7 - 2
- Sound dampening adhesive pads (Amazon search "Clear Adhesive Bumper Pads")
- Male-to-Female Dupont cables - 3
- 1 power supply with a micro-USB cable that's rated for at least 2.1A - if not you will need to power your Servo separately from the Wemos D1 mini which kind of makes the whole thing less portable!
Other things you'll need are:
- STL files that need to be 3D printed - attached to the last step of this IBLE
- Precision screw driver set that is an easier alternative to using skinny Allen wrenches
- Philips head screw driver
- A Servo Tester to center your servo (Alternately, you can choose to write code to do the same)
- A Breadboard, and Dupont cables to hook up the Servo to the Servo tester
- If you don't have a power supply, you can use a powered USB hub that is capable of outputting 2.1 A with a micro-USB cable to power the Mouse Rocker
Step 2: Design Considerations & Highlights
The entire design was created in Fusion 360. The parts were designed to be individually printed even if you have a comparably smaller printer.
The largest parts of the Mouse Rocker are the Rocker surface, the Body/Frame and the Mat.
On smaller printers less than 200 mm x 200 mm, you could probably get away printing the Body vertically, but that would waste a tremendous amount of filament in the form of supports. The best way to print it is in it's natural position as seen in the pictures.
It isn't recommended to print the Rocker Surface vertically, as the rafts may compromise the smooth texture of the surface on which the mouse is supposed to slide - which is the whole point to begin with!
The Friction grip Mat is printed using flexible filament - but I found that it took too long to print. Instead, you can stick adhesive pads on the bottom once you have the Rocker assembled.
I've fused threaded Brass inserts into the two Rocker Arms so that I can mount the Rocker Surface flush with the Rocker arms and also not have to struggle with putting in the tiny M3 nuts on the underside.
You can look at Step 5 of my other IBLE for a closer look on how I've fused the threaded inserts into the 3D printed plastic
I designed a generic Servo Coupling to ensure a more positive drive between the servo horn and the Rocker arm that is driven by the Servo.You will see how the coupling comes together in my YouTube video series .
I predominantly solder the dual male-female combinations of the pin headers on the WeMos D1 Mini as it gives me maximum flexibility to prototype projects. Therefore, the simple fixture I designed works very well if you have the style of headers like the ones shown in the pictures here.
Step 3: Universal Application
I've tried to make the design as universal as possible with the following considerations in mind:
- Regardless of the type of mouse (wired or wireless, optical or mechanical), this design works for all types of mouse models as long as they fit the standard form factor.
- This design also works mini mouse designs that have a form factor smaller than standard mouse models
- Lastly, no fancy modification to the mouse by itself is required to get it to work with this Mouse Rocker
The only things you will probably need to keep in mind are the following:
- Keep the feet of the mouse and the Rocker surface clean
- The mouse is actively connected to the computer/laptop that you're working with
Step 4: The Code, the Wiring & Rocker Adjustments
The code is super simple. Flashing it into the WeMos D1 Mini is simple as long as you have your Arduino IDE configured to work with the Wemos D1 family of micro-controller boards. For instructions on how to set this up, visit this Wiki page.
Equally simple are the wiring instructions in the screen shot attached here.
Make sure that you've assembled the Mouse Rocker as elaborated in Part 2 of my YouTube video series.
To begin the adjustment, open the attached code in the Arduino IDE and follow these steps (refer to the line numbers in the images of the code attached here):
Adjust the Soft Center Angle
Practically, the Rocker surface will not be exactly parallel to the ground when it's assembled. To set it parallel to the ground you will need to adjust it in code as follows:
- On line 12, set the TEST_MODE value to True to put the program in test mode
- On line 14, set the ANGLE_SOFT_CENTER to a value around 90 degrees
- Place a mouse on the Rocker surface
- Flash the code into the Wemos D1 Mini, and let it run
- As the test mode has been enabled, the program will simply position the Rocker surface to the set angle and stop
- If necessary, play around with the ANGLE_SOFT_CENTER value until the Rocker surface is "near parallel" to the desk
- Flash the code and repeat the process until you're happy with the initial resting position of the Rocker Surface
Adjust the Rocking Angles
Now, that the center angle is set, it's time to adjust the rocking angles on either side of the this angle as follows:
- On line 12, set the TEST_MODE value to False to disable the test mode
- Adjust the ANGLE_ROCK_LEFT on line 15 and the ANGLE_ROCK_RIGHT on line 16
- Adjust the WAIT_TIME_MS to a reasonable value on line 17 (in my case, I set it to 5000 ms during adjustment, and then 15000 ms as a final value)
- Place a mouse on the Rocker surface
- Flash the code, and wait for the Servo to rock the mouse from side to side
- Make sure that the mouse pointer moves on your laptop screen as the mouse rocks!
- Adjust the two angles on lines 15 and 16 and repeat the steps above until you feel good about the rocking action
In my case, the final values for the center angle is 95, and the angles turned out to be 5 degrees on either side at 90 and 100 respectively.
Start with only 1-2 degrees at a time - otherwise the Servo will try to swivel the Rocker surface beyond the allowable physical bounds and you may end up straining or even damaging the servo!
Have a mouse connected to your laptop and place it on the Rocker Surface before each test to give you a realistic view of the behavior of the Mouse Rocker.
Step 5: Conclusion
I have been using the Mouse Rocker for more than a month and it continues to serve me well by performing its intended function!
I'm happy with it and definitely enjoyed putting it together!
Further, it was a great exercise in Fusion 360 and it's really satisfying to see how your design vision comes to life.
I've attached the STL files here that you can download and 3D Print.
I hope you have fun watching my YouTube video series and making one of your own.
Thanks and Happy Making and Keep the Flame Burning!