Building a custom ergo split keyboard
Mechanical keyboards are, without a doubt, more popular than they've ever been. This also means that there are tons of different designs and form factors to choose from when buying a new board. But which keyboard is the best? This obviously is a very subjective question, but some keyboards do have concrete benefits when it comes to ergonomics.
Enter the ergo split. Ergo splits consist of two separate keyboards, usually connected by a TRRS-cable. This allows them to adapt to different body sizes and helps to reduce wrist and shoulder strain. Although some come with a staggered layout, it is very common that ergo splits have an ortho-linear layout, meaning that the keys are aligned in a grid.
I decided to go with a fully open-source ergo split called the "Lily58 Pro", which, unlike its non-pro counterpart, has hot swap socket support for mx- and choc-style switches. Like the name suggests, it has 58 keys which is a nice medium size in my opinion. It is also very customizable, allowing for full firmware control via qmk as well as later upgrades, such as RGB-underglow, encoder support and OLED-displays.
Ordering the parts
Since the Lily58 is a fully open-source board, it is possible to print the PCB yourself and order all the necessary electronics components. Nevertheless, for simplicity's sake, I decided to buy a prepackaged DIY-kit from mechboards, which also includes a nice see-through acrylic case.
The lube and keycaps came from candykeys. The switches were bought from a relatively new site: keygem. I went with Gateron Milky Blacks since I wanted to try linear switches and was looking to build a quiet-ish keyboard.
To fully assemble the board, you'll need some basic electronics equipment. Not everything on this list is necessary, but it will definitely help with soldering and completing the build without any issues.
With that out of the way, here's what you'll definitely need:
- a decent soldering station with variable temperature and a fine tip
- some fine solder (I used 0.6mm lead-free solder)
- fine tweezers or a pair of pincers to hold the components while soldering
- a phillips-head screwdriver
And here's what I'd also recommend getting to make things easier:
- a flux pen or some flux paste
- some solder wick and a solder pump in case you mess up
- a multimeter to check the diodes, continuity, etc.
In case you also want to lube your switches you will also need:
- a switch opener (a 3D-printed one works fine)
- some lube (depends on your switch-type, I used Krytox 205 G0)
- a fine nylon brush
Ok, now we're finally ready to start soldering and building!
Assembling the PCB
Make sure you have a proper working environment (clean, non-plastic surface e.g. wood) with all the needed equipment close to you. Inspect the PCB for any damages or missing pads.
I'd recommend reading the official build guide, linked in the "References"-section at the bottom of this page, to get a clear understanding of the entire build process.
Diodes and hot swap sockets
Let's start with the smallest part: the SMD diodes. Don't let their small size intimidate you, they're not that difficult to solder. Start off by applying a small amount of solder to one of the diode solder pads. A bit of flux makes for a nice even solder distribution. Then solder one leg of the diode to the PCB by placing the diode onto the pre-tinned solder-pad and reflowing the solder. Make sure that you get the orientation right!
Your multimeter should have a diode testing mode that you can use to check the diodes.
Soldering the hot swap sockets is easy. Start by checking which pads you will be using according to your switch style.
Use the same technique as when soldering the diodes. I gave every socket a little wiggle to check for bad solder jobs. There should be no (or just very minute) movement.
TRRS-jacks and reset switches
Now onto some through-hole soldering. The TRRS-jacks and reset switches are a 5 minute job. Start of by placing the components into the corresponding holes. You can secure them with some masking tape. Then, flip the board around and solder the legs to the PCB. Don't use too much solder as the solder may flow into the TRRS-jack, potentially destroying it. You can check for continuity once everything is soldered on.
MCU and OLED
Depending on what MCU you plan to use, soldering can be bit different. If you chose the Elite-C, like I did, you'll most likely need to solder the pin headers to the MCU. Don't forget to use flux to avoid shorting any pins.
FrontsideStart off by shorting the OLED-jumpers with some solder-bridges. Make sure that you have continuity as the MCU will sit on top these connections!
Continue by placing the MCU onto the pin header, the long pins going through the PCB. The ATmega should be facing towards the PCB. Like with the TRRS-jack and reset switch, you can hold the MCU in place with some masking tape.
Heat up the pad and pin simultaneously and then add a little bit of solder. Leave the tip of the iron on the pad until the solder has flown around the pin evenly. The finished joint should have a conical shape. Repeat this process for all pins.
Once the header is solder to the MCU, repeat the same process for the PCB-side connection. Make sure not short any pins to the nearby holes, as this can lead to various issues (see the "issues faced" section).
Next, push your OLED's pins through the corresponding holes in the PCB. The screen shouldn't be pressed against the MCU. Optimally, it should be barely floating over it. Solder the pins on the backside.
Congrats! You're done soldering (if everything works right off the bat of course).
Flashing the firmware
Now it's time fire up your PC. Install qmk, i.e. either the toolbox or the build/CLI environment. I'm going to be using the CLI since I use Linux.
Start of by installing qmk. There is an AUR package if you're an arch user.
yay -S qmk
Continue by setting-up the qmk environment. This will create a directory, usually in
~/qmk_firmware, with all the necessary make files and source code
Now, let's compile the firmware and flash our board. The make command depends on your board/MCU, and has this
sudo make board_name:profile_name:bootloader. Remember that both sides need to
be flashed separately. I'd recommended trying the default firmware first, to rule out any hardware defects.
cd ~/qmk_firmware sudo make lily58:default:dfu
Replug your board and check if it boots up. If the flash fails, try pressing the reset switch. If both boards boot up correctly, connect the TRRS-cable (while the board is disconnected from power) and check if all keys are being recognized. For this, short the switch pads on the top side of the PCB (or alternatively insert a switch into the socket). Using a online key-tester helps to speed this up.
The remaining assembly is pretty straight forward. Start of by screwing in the OLED-protector standoffs (the longer ones) into the PCB. Continue by screwing in the smaller standoffs into the switch plate and place four switches into it (one in each corner) for alignment. Slowly push the switches into their sockets.
Do not over-tighten the standoff screws, as the acrylic may break!
Flip the board around and screw the bottom plate into the standoffs. Finally install the OLED-protector and the remaining switches as well as the keycaps. Be careful not to bend the switch-pins during installation.
You're done! Open up a beer and celebrate your self-built keyboard ;)
The great thing about having a self built keyboard is that it's easy to add extra features. Since most keyboards don't use all pins on the MCU (especially if you're using an Elite-C), you can solder lights, speakers, haptic motors, etc. to these. Some boards even have special pins or pads for optional features, like the OLED display or RGB-underglow on the Lily58, which makes things even easier.
Keep in mind that the USB-port can only supply so much current (about 500mA).
Nevertheless, here's what I added to my board, apart from the OLED-screens.
I think that RGB-lighting can look very tacky and cheap when overdone. That's why I decided to add RGB-underglow, which is much more subtle than per-key RGB-lighting. Also, since even the cheapest gaming keyboards feature some form of backlighting, RGB-backlight keys make a keyboard look, at least in my opinion, a bit cheap. Enough rambling, let's solder some LEDs!.
First off, I read up on the supported LEDs by qmk and inspected my board, to see what size the LED-strip had to be. I went with generic IP30 WS2812B LED-strips. The IP rating is important because my case doesn't allow for thick LED-strips with a plastic shielding. I re-used the wires that came with the LEDs.
Soldering the LEDs is pretty straight forward: start off by cutting the strip to size, in my case 2 strips of 5 LEDs each. Then, solder jumper wires to the pads, while making sure to attach them to the right end of the strip (WS2812 LEDs are directional, look for the arrow near the DIN pad, which indicates the data-flow direction).
Before soldering the LEDs to your board, test each strips by loading the backlighting-drivers in your firmware (more info here) and holding the strips to the designated VCC, DIN and GND pins (place the wires onto the pads and then connect power to avoid accidental shorts). If all LEDs light up, you should be golden and can proceed by soldering the wires to the board.
This how my board turned out:
Bonus points for the coiled cable ;)
If you're interested in customizing the qmk firmware or actually need to change the default ansi layout, then check out my qmk firmware guide. In this short intro to qmk, I go over the basic structure of a qmk firware directory and show some concrete customization examples, e.g. custom OLED-Logos and animations
Here's a list of all the issues that I faced when building my Lily58:
- shorted MCU header with nearby unused header hole, preventing the MCU from booting. VCC → GND
- bent a couple of switch pins. Luckily they could be bent back.