Deep-Dive Series // 6 Steps

Handwiring a Custom Keyboard

No PCB required, just build a fully custom matrix from scratch

Difficulty

Advanced

Time

6–10 hours

Steps

6 stages

Every file for this build is up on GitHub, the plates, the case and the firmware

Our GitHub

Before You Build

Gather everything below before you start and the whole build goes a lot smoother. The printable parts are on GitHub, so you only need to buy the hardware.

No Case // The Sandwich

There is no case in this build. Our boards are a sandwich, a 3D printed top plate and a 3D printed bottom plate with the whole handwired matrix pressed in between, held together by screws at the corners. That is deliberate. Handwiring goes wrong in ways a beginner or a STEM maker cannot always predict, and a sealed case turns every loose joint into an afternoon of surgery. Undo the screws, lift the top plate, and the entire matrix is in front of you, ready to fix and bolt back together.

Component Manifest

Component Qty Specification
MX-compatible switches Per layout Any MX switch works
Pro Micro ATmega32U4 1 Programmed via Arduino IDE
1N4148 diodes 1 per switch Through-hole diodes
Hookup wire (24 AWG) ~5m Multiple colors strongly recommended
Top and bottom plates 2 3D printed, laser cut, or custom-made

Tools Required

01

Soldering iron

02

Solder

03

Wire strippers

04

Flush cutters

05

Multimeter (continuity mode)

Build Steps

Work through these in order. Anything you need to download along the way, the plates, the case and the firmware, is already waiting for you on GitHub.

01

Step 1 of 6

Mount Switches in the Top Plate

Mount all switches in your top plate. They should snap in firmly with a click. This is your last chance to finalize the layout, so take your time and make sure every position is correct before wiring. Keep the bottom plate aside for now; it goes on once the matrix is wired and tested.

Pro Tip

Sketch your layout on paper and number rows/columns before you start wiring.

Mount Switches in the Top Plate
Step 1, Mount Switches in the Top Plate

02

Step 2 of 6

Solder Row Diodes

Solder one 1N4148 diode to the bottom pin of each switch. The cathode (black stripe) must point toward the row wire, keeping the direction consistent on every switch. Bend the diode body close to the pin, solder, and clip the excess lead.

Pro Tip

Wrong diode direction on even one switch will make a whole row ghost, so check every stripe before soldering.

Solder Row Diodes
Step 2, Solder Row Diodes

03

Step 3 of 6

Wire the Rows

Run a wire horizontally across each row, soldering to each diode cathode. One continuous wire per row is fine, just loop, strip, solder, and continue. Keep wires tidy and close to the switches.

Pro Tip

Use one wire color for all rows and a different color for all columns.

04

Step 4 of 6

Wire the Columns

Run a wire vertically through each column, soldering to the top pin of each switch. One wire per column. The row wires connect to diode cathodes; column wires connect directly to switch pins. These two must never touch.

05

Step 5 of 6

Connect to Controller

Connect each row wire and each column wire to a GPIO pin on your Pro Micro. Document every connection, row N → pin X, column N → pin Y. You will need this exact mapping in your Arduino sketch. Use a consistent numbering scheme.

Pro Tip

A spreadsheet mapping matrix positions to pin names makes the Arduino sketch much faster to write.

Connect to Controller
Step 5, Connect to Controller

06

Step 6 of 6

Flash Arduino Firmware & Validate Matrix

You do not have to write the sketch from scratch. Every board's firmware is on GitHub to start from, and the Keymap Editor will generate one for any matrix size straight from your browser. Open it in the Arduino IDE, set your matrix size and pin assignments (rowPins, colPins arrays) to match your wiring, upload to the Pro Micro, and test every key in a keyboard tester, looking for missing keys or ghosting, which usually means a bad diode joint.

Pro Tip

Add Serial.println() debug output to identify dead rows/columns quickly during testing.

Join the Discussion

Stuck on a step, got a tip, or just finished your build? Drop it in our form. We read every single one and it helps us make the guide better.

Leave a Comment →