Rack Mountable Macro Key Controller

by CHWTT in Circuits > Computers

157 Views, 1 Favorites, 0 Comments

Rack Mountable Macro Key Controller

Screenshot 2025-05-07 at 9.31.31 AM.png

This is a DIY programmable macro controller that can be mounted in a standard 19-inch rack. It was inspired by the Elgato Stream Deck Studio, and I think that it's a really awesome piece of equipment.


I want to be upfront about one thing though, because this may make or break this project for you: The code for this project is practically nonexistent. I have a basic demo code that I sketched up for my video, but nothing remotely close to a full program that's ready to be posted. All of that goes to say, this is a tutorial for the hardware part of this project. To make it work, you'll need to program it yourself, so make sure you are able to do that before embarking on this.

Supplies

Electronic Components:

1x Arduino Due

32x 10K 1/4W Resistors

32x Standard Cherry MX Keyboard Switches - Any ones will work, I used some Gateron Reds for mine becuse they're nice switches and they were cheap.

2.54mm Pin Headers - Need 2x 1x3, 2x 1x4, and either 2x 2x10 or 4x 1x10

2x 128x64 I2C OLED Display

2x Potentiometer with Knobs

2 packs of Female-to-Male Jumper Wires

1x Micro-USB Male to Female USB-C Cable


Mechanical Components:

7x M3x20 bolts with nuts

8x M3x6 bolts

4x M3x12 bolts

2x M3x12 bolts with nuts

An M3 Bolt Kit will have all of the above screws.

8x M2x12 Bolts with nuts


Custom PCB - Here you can go to my shared project on PCBWay's website to get the gerber files to order the custom PCB for this project. Transparency: PCBWay is my YouTube sponsor.

Custom Aluminum Case - Attached to this instructable are two .step files, one for the main part of the aluminum case, and one for the back part. I ordered these parts from PCBWay using their sheet metal manufacturing service, and if you're making this project yourself, I'd highly recommend that you do the same. If you are, here are some basic settings for when you order: Aluminum 5052 material, standard thickess of 2.5mm, and then you can choose your surface finish. I chose a bead blast and anodized blue finish, and I think that the bead blast and anodized finish is the right move for this project. The bead blast finish gives it a nice smooth texture and the anodizing gives you some pretty sweet color options.

3D Printed Parts - Attached to this instructable are all of the .stl files for the 3D printed parts of this project. There's a mounting tray for the arduino, a mounting bracket for the USB-C port, button caps, and a model for a small spacer that's needed for mounting the main PCB. You need three of the small spacers, 32 of the button caps, and only one of each of the other parts. If you don't have a 3D printer, PCBWay can 3D print for you.

Watch the Video!

The Elgato Stream Deck Studio is Really Expensive - So I Built My Own

I made a YouTube video on this project, and I highly recommend you watch it before going any further in this process. It gives a great idea of what you're in for if you're making this project, and you also get to watch me build it. Having that background knowledge can be incredibly helpful, so watch the video first!

Solder the Components to the PCB

Screenshot 2025-05-07 at 3.10.44 PM.png
Screenshot 2025-05-07 at 3.12.30 PM.png
Screenshot 2025-05-07 at 3.14.45 PM.png

Solder the resistors, pin headers, and the switches to the PCB. It's important to solder the 10K resistors to the PCB first, otherwise you won't easily be able to solder them once the switches on. Additionally, some of the switches will need their corners minorly clipped so that the screws that go into the middle of the PCBs will clear the switches.


Also, some of the switches won't go in perfectly straight the first try. I'd recommend soldering one pin of each switch, and then reflowing that solder while straightening out the switch with your finger. Then, once the switch is perfectly straight, you can solder the second leg.

Prep the Potentiometers and OLED Displays

Screenshot 2025-05-07 at 5.53.13 PM.png
Screenshot 2025-05-07 at 5.54.28 PM.png

To prep the potentiometers, I cut off the pin parts of their legs in order to make sure they wouldn't risk shorting against the metal case. Then, I soldered female jumper wires into the hole sections of each terminal on the potentiometers.


Then, you can solder some more female jumper wires to the two OLED displays. However, since we are using two displays, it's important that they both have different I2C addresses. There's usually a small SMD resistor on the back of the displays that can be used to change the I2C address of the screen, and so on one of my displays, I moved this resistor and one of the displays showed up as a different address than the standard one so that I could address them individually.

Tap Holes in the Chassis

Screenshot 2025-05-07 at 5.59.01 PM.png
Screenshot 2025-05-07 at 5.59.29 PM.png

There are a few holes in the sheet metal chassis that should be tapped before we can continue with the assembly of this project. The four holes in the bottom of the chassis where the Arduino mounts need to be tapped, and the three holes on the end of each chassis that allow the lid to mount to the main part of the chassis also need to be tapped. All ten of these holes need to be tapped with M3 threads.

Mount the Components in the Front Panel

Screenshot 2025-05-07 at 6.01.26 PM.png
Screenshot 2025-05-07 at 6.01.38 PM.png
Screenshot 2025-05-07 at 6.02.05 PM.png

Next, you can mount all of these components to the front panel of the aluminum case.


The PCB is easy to mount, as you only need 7 M3x20 screws with matching nuts, as well as three of the 3D printed spacers. The four screw holes at the end of the PCB don't need the spacers, and you can just put the screws through them and tighten the nuts. However, make sure not to tighten them too much, otherwise you risk bending the PCB significantly. A small amount of bend is good, to keep the buttons firmly pressed against the front case, but just be cautious of how much you tighten these screws down.


Then, for the three screws more in the middle of the PCB, make sure you put the spacers on the screws on the back of the PCB, where you'll then tighten the nut down on top. Ensure that the cutout in the spacer is oriented so that the resistor fits into it, and then you can tighten the nut on top of the spacer. These can be tightened down decently firmly, as they shouldn't be able to bend the board too much.


Then, the potentiometers can be tightened into place with their included washer and nut, and there is a small cutout that a tab on the potentiometer should fall into to lock its orientation into place.


Finally, the two OLED screens can be mounted with the usage of four M2x12 screws and nuts per display.

Mount the Arduino

Screenshot 2025-05-07 at 6.03.23 PM.png
Screenshot 2025-05-07 at 6.03.35 PM.png

Next we'll mount the Arduino Due to the chassis. There is a 3D printed mounting tray for doing this, and this tray can be mounted to the chassis with the use of 4 M3x6 screws.


Then, the Arduino can be mounted to this tray with the use of four more M3x6 screws.

Mount the Usb Port

Screenshot 2025-05-07 at 6.05.15 PM.png
Screenshot 2025-05-07 at 6.06.35 PM.png
Screenshot 2025-05-07 at 6.06.47 PM.png

Now we'll use the small male Micro-USB to female USB-C cable to put a USB-C port on the back of the enclosure. There's a small 3D printed piece that you can slip the Micro-USB end through, and then you can thread the rest of the cable through until the USB-C end gets held in place by the plastic piece. If you want, you can put some hot glue in here just to make sure that the USB-C end doesn't go anywhere when unplugging the cable, although the fit should be decently tight already.


Then, this whole assembly can be mounted to the case's back panel with the use of two M3x12 bolts and nuts.

Wire Up the Main PCB to the Arduino

Screenshot 2025-05-07 at 6.08.53 PM.png
Screenshot 2025-05-07 at 6.11.50 PM.png
Screenshot 2025-05-07 at 6.12.07 PM.png

This part is probably the trickiest part of the whole process. Use the female-to-male jumper wires to make the connections from the main PCB to the Arduino. At this point you can also plug the OLED screens and potentiometers into the main PCB. I've provided the schematic and a pinout guide to help you make all of the right connections.


The switches just need to connect to digital pins, I connected SW1 to pin 22 and SW32 to 53 with all of the other switches in between. SDA and SCL for the displays connect to SDA and SCL on the Arduino, and Pot 1 connects to A0 with Pot 2 on A1. +3.3v and GND should be self-explanatory.


Note: My build looks different than yours will, because I soldered up a whole custom wiring harness for mine. This was a big mistake. Making that thing was terrible, just use the jumper wires for yours.

Close the Case

Screenshot 2025-05-07 at 6.18.56 PM.png
Screenshot 2025-05-07 at 6.19.25 PM.png

Put the top case on, and plug the Micro-USB end into the Arduino's native USB port. This is the port that's closest to the back of the enclosure.


Then, on the ends of the enclosure, you can use some M3x12 screws to screw the lid to the main body. I didn't make the design friendly for tolerances, and so even though PCBWay's tolerances are very tight, there's a chance that not all three holes will line up perfectly. This is fine, however, and you only need two screws on each end to keep the enclosure assembled and feeling just as sturdy as it should.

Press on Some Keycaps

Screenshot 2025-05-07 at 6.20.34 PM.png

Finally, you can press some 3D printed keycaps onto the switches. You can even design your own, I just designed some super simple ones however. This part can be quite satisfying to do, and my girlfriend thoroughly enjoyed helping with this.

You're Done!

Screenshot 2025-05-07 at 6.21.45 PM.png

You're all done at this point! Now it's time for you to figure out exactly how you want to program the functionality of each button, display, and knob, and you'll be off to the races with a super slick rack mountable control panel!