Customizable USB Macropad
The purpose of a macropad is to increase the speed and efficiency of navigating your PC. That's why for the Let There Be Speed contest, I thought it would be a perfect choice! I designed this macropad to be super simple and easy to build/use, and you should feel free to adapt on it however you like! For my macropad, I used an Arduino Uno R4 WiFi. You can also use an Arduino Pro Micro, Arduino Leonardo, or Arduino R4 Minima. I've included 3D models designed for each. Claude wrote the code, but the ideas were all my own. I did the 3D modeling for the body of the macropad, but the cases for the Arduinos were found on Thingiverse (Links in the Supplies section).
Supplies
Things You Need:
-1x flip switch
-1x USB-C or Micro-USB data cable depending on Arduino
-1x Arduino R4 Minima, R4 WiFi, Leonardo, or Pro Micro
-1x 3D printed enclosure (Files below)
-Hot glue (Optional but recommended)
-Wire stripper or precision blade
-Arduino IDE (Software)
Code:
https://github.com/Severandom/USBMacropad/
Links to Sources:
You'll also need to 3D print some parts. Here they are:
3D Modeling
This isn't really a step in the assembly, but I wanted to show my design process! First, I took measurements of the buttons and switches and designed an enclosure for the macropad. Then, I found files for a suitable case for each Arduino online and incorporated them into the enclosure. I used Tinkercad for all my 3D modeling, as it's particularly easy to use when uploading files and incorporating them into existing designs. Placing a Workplane on the angled face of the macropad's enclosure also made it super easy to position the holes for each button.
Top Assembly
To get the top piece ready, first strip some jumper wires so you can attach them to the buttons and switch. I used red and black, but since these are just switches, it doesn't matter what color you use. Next, strip the end of one wire on each switch so you can connect it to the common ground. Unscrew the washer and hex nut from each button and place them in the top of the enclosure. Flip it over and screw on the hex nuts to secure the buttons to the enclosure. The switch snaps into place. When I built my macropad, I added a blob of hot glue where each wire connects with a switch/button. You could solder the wires or use electrical tape, but I wanted a less permanent and quicker solution.
Code
In order to install the code on your Arduino, first copy it from my GitHub page. Then, install Arduino IDE on your PC and paste the sketch. Plug in your board via a USB cable, and select its communications port from the dropdown in the top left. Click the "Upload" arrow, and you're good to go!
Bottom Assembly
This is probably the most simple of the steps. All you need to do is drop your Arduino into the bottom of the enclosure. I used a few screws to attach mine, but this isn't necessary.
Grounding
The wiring for the macropad is actually pretty simple! Each button or switch has two legs, and you need to make sure that every button and switch has at least one leg connected to ground. You can do this easily by twisting together all the stripped black wires from Step 2. Then, twist another wire into the bundle and plug it into any port labeled "GND" on the Arduino. You should put some tape around the joint to make sure it doesn't short anything out.
Wiring
Now that all of the wires are grounded, the remaining wire on each button/switch should be connected to the Arduino's digital pins as follows. The button position is based on what it looks like from the outside. Additionally, this is where you'll decide what side of the macropad you want your USB port to be on. There are two different wiring pictures attached, and you can use either.
-Top left button: Pin 2
-Top right button: Pin 3
-Bottom left button: Pin 4
-Bottom right button: Pin 5
-Switch: Pin 7
Completion and Shortcuts
To complete the assembly of the macropad, slot the top piece into the bottom! It shouldn't be too difficult to join or separate the top and bottom piece. If it doesn't fit for some reason, you can also sand it down some. Once done, you can plug it into your PC and enjoy! The button assignments in my code are:
-Top left: Copy
-Top right: Paste
-Bottom left: Undo
-Bottom right: Redo
-Switch: Turn on/off macropad
Feel free to change them as you like!
Notes/Final Thoughts
Overall, I think this project was a lot of fun! This was one of my first fully-fledged Arduino creations, and the macropad has worked great! I think in a future design I might add a few more buttons or fillet the edges on the 3D model, but I'm super pleased with how it came out. If you build one, post a Make so I can see how it went! Thanks for reading my Instructable and happy building!