Introduction: Arduino Hot-Key Button Panel
At first I was just going to make a single Hot-key button so I could control my laptop without having to roll my chair over to it. Then I remembered I had a bunch of these "arcade" style buttons so I figured, why not make a panel of buttons? These are great for programming all sorts of commands for quick access. This project uses the Adafruit Trinket M0 to act like a keyboard and trick your computer by mimicking key presses. The video goes into detail on how the program works as well as two different methods to build the body. This instructable covers both ways to build it!
Step 1: Watch the Video!
Step 2: Get the Parts and Tools.
You can choose between two different ways to build it depending on the tools at hand. They both require the same tools, except one requires the use of a 3D printer.
I also use longer different buttons in the video, but I will link suggested shorter ones which will be easier to solder and install. If I was to rebuild this I would go with the ones I have listed. They are also available at Adafruit so you can get them when you get the trinket.
- 1/8" Acrylic
- Acrylic Bonding Liquid
- 5 x Arcade Buttons from Adafruit
- Adafruit Trinket M0
- Stick on Rubber Feet
- Pin Headers
- CA Glue(If using 3D printer)
If you have a 3D printer and would like to 3D print the file, skip to Step 6.
Step 3: Cut the Acrylic
If you don't want to use a 3D printer, start here.
I have provided a template you can download if you would like to just print, cut out, and paste the template onto the acrylic and cut on the lines. There are also dimensions if you would just like do the measuring yourself. Some of them are a little arbitrary, so just go to the nearest mm(its because the acrylic is 6.35mm thick and I used CAD software).
Cut out all of the pieces on the miter saw to get nice straight cuts.
If you have a laser cutter, I have also provided a DXF file.
Step 4: Drill the Holes!
The buttons are 28mm in diameter where the threads are. I used a forstner bit on a drill press to get a very clean cut. The forstner bit makes a huge mess, but it works really well. Use the template to punch where the hole center is, it really helps.
Drill out all 5 holes.
Step 5: Glue Your Cut Pieces
I used an acrylic solvent to weld the pieces of acrylic together. This is by far the best method to glue the plastics together. CA glue can work too, but it will likely break down the road.
Assembled in the steps shown above.
Make sure its square!
The next few steps are for the 3D printed version, so skip ahead to install the Buttons.(Step 10)
Step 6: 3D Print the Body
If you are going the 3D printer route(and skipped the other steps) it is a good idea to start the 3D print early as it will take a while. Download the STL from Thingiverse Here: https://www.thingiverse.com/thing:2765302
Step 7: Cut the Acrylic Front Panel
The 3D printed part requires the front piece to be cut out of acrylic for a better look. Use the template above and print at 100% - I cut it out using a miter saw. Any way you can get straight cuts will work, acrylic is pretty forgiving.
Step 8: Drill the Button Holes
The front panel requires you to drill holes where the buttons go. The diameter of the button where the threads are is 28mm. I used a forstner bit in a drill press to get clean straight holes. It makes a mess but works well. Take your time and use a centering punch to mark the holes before you drill. The template makes it simple.
Step 9: Glue in Front Panel
I used a thick CA glue to hold in the front panel. Place a good amount on the ledge that holds the panel and glue it down. Wait for the glue to set before installing the buttons.
Step 10: Install the Buttons
Disassemble the buttons and install them in the holes you drilled. Tighten down the jam nut on the back. Really couldn't get a good angle on the camera for this, but its straight forward.
Step 11: Solder on Pin Headers
I used jumpers instead of the correct spade connectors. Because of this, I soldered on Pin headers to each of the buttons. On one side of the button you can solder on 2 pins so you can join the grounds together and they can all share a common ground.
I used different buttons, so yours will look different than what it in the video. They will be easier than what I had to deal with.
Also, don't forget to solder on the pin headers to the Trinket. Install them upside down so you can use double sided tape to stick the trinket in the case.
Step 12: Make the Connections
One side of the buttons will all go to ground on the trinket. The other side of each button will go on pins, 0,1,2,3,4 on the Trinket. They will each have their own IO so that you can program which button is being pressed.
Stick the Trinket somewhere inside of the body allowing access to the USB port. I made a small 3D printable mount for it, but not everyone has a 3D printer.
Images in Schematic obtained via Adafruit.com
Step 13: Program the Firmware
This step expects that you know how to program a Microcontroller. If not, Adafruit has a good tutorial on how to get the Trinket M0 working on your computer. Find it here: https://learn.adafruit.com/adafruit-trinket-m0-circuitpython-arduino/arduino-ide-setup
Load up the Arduino IDE and download the program from the GitHub: https://github.com/IdleHandsProject/diy_hotkey_panel
The video explains in detail how the program works, and I suggest you watch it so that you can easily see where you have to modify the code for your own Hot-Keys.
Step 14: Enjoy Your Hot-Key Panel!
Use the time you save to sit back and enjoy the Hot-Key panel you just made. You rock!
Step 15: Support These Projects!
I appreciate you following along with my project and watching my video. Hopefully this Hot-Key panel will improve your own productivity and you can make even more with the time you save.
If you think I have earned it, consider subscribing to my YouTube. I will have plenty of new projects coming out.
and if you really think this project is amazing, and want to support future projects, consider becoming a Patron. I occasionally send my patrons circuit boards and cool projects I have available.
Second Prize in the
Remote Control Contest 2017