Arduino Hot-Key Button Panel

by seanhodgins in Circuits > Arduino

28084 Views, 229 Favorites, 0 Comments

Arduino Hot-Key Button Panel

IMG_3917-Edit-3.jpg

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!

Watch the Video!

DIY Arduino Hot-Key Panel

Get the Parts and Tools.

2_Buttons.gif
2_Solvent.gif

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.

Materials:

Tools

If you have a 3D printer and would like to 3D print the file, skip to Step 6.

Cut the Acrylic

3_CutAcrylic.gif

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.

Drill the Holes!

4_PunchHoles.gif
4_DrillHoles.gif

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.

Glue Your Cut Pieces

5_Glu.gif
Glu_2.jpg
Glu_3.jpg
Glu_4.jpg
Glu_5.jpg

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)

3D Print the Body

6_3DPrint.gif

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

Cut the Acrylic Front Panel

7_CutAcrylic.gif

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.

Drill the Button Holes

8_DrillHoles.gif

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.

Glue in Front Panel

9_Glue.gif

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.

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.

Solder on Pin Headers

11_Solder.gif

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.

Make the Connections

Schem.jpg

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


Downloads

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.

Enjoy Your Hot-Key Panel!

14_Panel.gif

Use the time you save to sit back and enjoy the Hot-Key panel you just made. You rock!

Support These Projects!

downloads_logomark_color_on_white@2x.png
Youtube200.jpg

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.

SeanHodgins on YouTube

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.

Sean Hodgins on Patreon