Maker.io main logo

How To Build a Custom Macropad

226

2025-05-20 | By Zach Hipps

License: See Original Project 3D Printing Solder / Desoldering

 

Last year, my teammate, Ian, dropped some serious knowledge in a custom keyboard class ‎I attended, and I was hooked. I saw the light, and that light was a grid of customizable ‎buttons. Sure, you could buy a kit, and sure, DigiKey even sells macropad kits, but where's ‎the fun in that? If you thought I was just going to buy a kit, you clearly haven't been paying ‎attention. ‎

macropad_1

macropad_2

A macropad is basically a custom mini keyboard on steroids. You can assign any shortcut ‎or keypress that you want to any button. Are you a creative type? Think brush sizes and ‎filters at your fingertips. Are you an engineer? Well, we can program those complicated CAD ‎keyboard shortcuts that have you twisted like a pretzel to one button press!‎

button_3

I am an engineer, and Fusion 360 and KiCad are the software I use the most. I wanted to ‎speed up my workflow, so Ian and I sat down and sketched out a schematic. First up, we ‎needed to choose the microcontroller. We landed on the RP2040, specifically the Seeed ‎Studio Xiao RP2040 module for its flash, GPIO pins, and the fact that it has a built-in USB-C ‎connector. Now, the RP2040 has plenty of GPIO, but we did not want to limit ourselves. We ‎added an I/O expander because the more buttons, the merrier. Then, we started adding the ‎key switches. We landed on a 4x5 matrix, giving us 20 buttons and because knobs are fun ‎to turn, we added two rotary encoders. Next up, we thought about lighting because what's a ‎macropad without RGB LEDs? We went with SK6812s, reverse-mounted for ease of ‎assembly. Finally, because we're always about going the extra mile, we added a linear ‎potentiometer.‎

pot_4

pot_5

pot_6

After some schematic cleanup, Ian worked his magic on the PCB board layout. Let me tell ‎you, it was a thing of beauty. We even threw in an I2C Qwiic connector for an OLED display ‎because I like having options. I went to DigiKey to place an order for all the parts I would ‎need for this project.‎

While I waited for the PCBs, I did a little experimenting with the Seed Studio Xiao RP2040 ‎and the Arduino IDE. I found a library from Adafruit, and it turns out that reading key ‎presses is surprisingly simple. It emulates a keyboard by using the HID (Human Interface ‎Device) protocol, and in no time, you're typing numbers with a test key switch. Cool, right?‎

testkey_7

testkey_8

testkey_9

testkey_10

When the PCBs arrived, they looked great. I set up my workstation, used the stencil to apply ‎solder paste, and got to work placing the SMD components. KiCad's Interactive BOM plugin ‎made component placement a breeze. After placing all the parts, I slid them into my DIY ‎reflow oven, which I had built in a previous video. After the reflow was done, it was time for ‎testing. I began using tweezers and Vial’s IDE to test each set of button pads since I still ‎needed to solder on the key switches. That's where things got interesting. The buttons ‎tested great until rows four and five; that is where things went south. It turns out pull-down ‎resistors are important. A few of them were misaligned from the reflow oven. After a little ‎soldering iron fix, I was back in business with fully working buttons.‎

pcb_11

pcb_12

pcb_13

pcb_14

Next up, I needed to install the key switches. The world of key switches is a rabbit hole. ‎There are so many different types of key switches. I went with some general-purpose ones, ‎but the options are endless. Before I could solder on the key switches, I needed to work on ‎the case. The case will help align the key caps, so they don’t end up getting soldered crooked ‎and looking wonky. I fired up Fusion 360 and designed one to be 3D-printed. While I was ‎designing my case, I realized that my OLED display didn’t fit where I had planned for it to go ‎between the two rotary knobs. I decided to make it an optional add-on at the top of the ‎enclosure in case I decided later that I didn’t want to use it.‎

install_15

install_16

install_17

After the case finished printing, I hand soldered all the key switches, rotary knobs, and ‎linear potentiometer. Now, it was time for keycaps. Because I could, I 3D printed them in ‎multicolor, with icons for each shortcut I wanted. Who has a good enough memory to ‎remember what each button does without labels?‎

solder_18

solder_19

solder_20

solder_21

solder_22

Then, the moment of truth: time for programming the firmware. You have options when ‎programming macropads. You could just use open-source software QMK, which would be ‎great if you were mass-producing macropads or didn’t plan on changing firmware often. ‎Since I want to edit the keys and adjust the settings on the fly, I landed on Vial, which is a ‎QMK GUI, and I started assigning shortcuts. Fusion 360 shortcuts, to be precise. And then, ‎because I always need a Byte Sized Engineering special touch, I added a special button ‎feature. A button that... well, you'll have to watch the video to find out.‎

program_23

program_24

program_25

But seriously, this macropad is a game-changer. It's all about customization, about making ‎your workflow faster and smoother, and if you're not dancing by the end, you're doing it ‎wrong.

制造商零件编号 102010428
XIAO RP2040
Seeed Technology Co., Ltd
制造商零件编号 4960
NEOPIXEL REVERSE MOUNT RGB LEDS
Adafruit Industries LLC
制造商零件编号 SN74LV1T34DBVR
IC BUFF NON-INVERT 5.5V SOT-23-5
Texas Instruments
制造商零件编号 C1608X7R2A103M080AA
CAP CER 10000PF 100V X7R 0603
TDK Corporation
制造商零件编号 CC0603KRX7R7BB104
CAP CER 0.1UF 16V X7R 0603
YAGEO
制造商零件编号 1N4148W
DIODE STANDARD 75V 250MA SOD123
SMC Diode Solutions
制造商零件编号 TCA9555RTWR
IC XPNDR 400KHZ I2C SMBUS 24WQFN
Texas Instruments
制造商零件编号 SM04B-SRSS-TB
CONN HEADER SMD R/A 4POS 1MM
JST Sales America Inc.
制造商零件编号 RMCF0603FT10K0
RES 10K OHM 1% 1/10W 0603
Stackpole Electronics Inc
制造商零件编号 PTA6043-2010CIB103
SLIDE POT 10K OHM 0.25W TOP 60MM
Bourns Inc.
制造商零件编号 PEC11R-4215F-S0024
ROTARY ENCODER MECHANICAL 24PPR
Bourns Inc.
MX RGB, BLACK STEM, FULL TRAVEL
制造商零件编号 MX2A-11NA
MX RGB, BLACK STEM, FULL TRAVEL
Cherry Americas LLC
制造商零件编号 RMCF0603FT4K70
RES 4.7K OHM 1% 1/10W 0603
Stackpole Electronics Inc
制造商零件编号 4210
JST SH 4-PIN CABLE - QWIIC COMPA
Adafruit Industries LLC
制造商零件编号 24606
SPARKFUN QWIIC OLED DISPLAY (0.9
SparkFun Electronics
Add all DigiKey Parts to Cart
Have questions or comments? Continue the conversation on TechForum, DigiKey's online community and technical resource.