Introduction: DIY Macro Pad Keyboard Build From Scratch With Custom PCB and Mechanical Switches

About: Elecrow is an open hardware facilitation company based in Shenzhen. To make your making and innovation easier, we offer various development platforms, modules, tools, electronics components, and other open-sou…

This is a 12-key macro keyboard with a potentiometer, an OLED module, three illuminated LEDs, and custom keycaps. This macro keyboard is running CircuitPython firmware on Raspberry Pi Pico.

Next, let us start to learn how to design such a macro keyboard step by step!

Supplies

Step 1: Customized PCB Board

It just so happened that elecrow officially launched a $1 PCB customization service. As long as the size of the customized PCB board is within 10 cm by 10 cm, it only costs one dollar to realize the customization.

You only need to enter www.elecrow.com in the browser, find the "PCB & PCBA special promotion" page on the main interface, click to enter and pull down the page, find the "Quote Now" option, click to enter, and then you can place an order.

This is the PCB board drawing I designed and the actual PCB board I got.

Step 2: Fixed Male & Female Headers

Turn the PCB board to the back (the side marked with "TOP" on the PCB is the front side), and place two 20pin female headers in the two rows of solder holes on the inner side, and then turn it over to the front side for soldering.

In the same way, place two 20pin male headers on the two rows of solder holes on the outer side of the front of the PCB, and turn them over to the back for soldering.

Step 3: Install Raspberry Pi Pico

Plug the Raspberry Pi Pico into the female headers on the back of the PCB board.

Step 4: Fixed Mechanical Switches

Align the 12 mechanical switches one by one and insert them into the corresponding soldering holes, and turn them over for soldering.

Step 5: Fixed Potentiometer

In the same way, align the pins of the potentiometer and insert it into the corresponding solder hole on the PCB, and turn it over for soldering.

Step 6: Fixed OLED Module

Here we need to use another custom PCB expansion board.

Align and insert the pins of the OLED module into the corresponding soldering holes of the PCB expansion board, and turn it over for soldering.

Step 7: Fixed LED

Insert the three LEDs into the corresponding soldering holes in the order of the positive electrode on the left and the negative electrode on the right, and turn them over for soldering.

Step 8: Fixed PCB Expansion Board

Align the PCB expansion board with the pin header of the PCB board and insert it, and fix the two together perfectly.

Step 9: Design 3D Structures

Step 10: Assembled

Assemble the PCB board and the 3D printed casing in order, and finally tighten and fix them with four screws.

Step 11: Put on the Keycap

Install all the keycaps to the mechanical switch one by one in sequence.

Step 12: Programming and Testing

Test procedure 1: LED running water light flickers

Test procedure 2: OLED module displays time in real time

Test procedure 3: mechanical switch key value output test

Test procedure 4: read the analog value of the potentiometer

The complete program is not provided here, and those who are interested can design and write it according to the above four test programs.

Step 13: Digression

Elecrow is about to launch a mechanical keyboard promotion in February 2023, as long as the PCB board of this theme can get a big discount, please look forward to it!