Lily58: Building a Split Keyboard

Introduction

For the past few weeks, I’ve been working on building a custom split keyboard. This post documents the entire process, including previous attempts, mistakes I made along the way, and the lessons I learned.

Past attempt (2021)

I once shared a post about building my first mechanical keyboard, though that was mostly just assembling pre-bought parts. In 2021, I discovered the Lily58, an open-source keyboard. I ordered a build kit from Keyhive, which was shipped from the US and ended up being quite expensive due to customs fees. After receiving the kit, I spent a few hours working on it and posted a journal entry about the partial build. That’s when I realized I had missed ordering some essential components—build plates, a case, and a TRRS jack.

Video from 2021. Abandoned it after soldering one half of the keyboard when I was missing a few parts.

The build

I paused the build in 2021 until taking it up again in August this year.

I have kept all the resources for the build like PCBs, firmware that I flashed, STLs for plates and case etc. in a repo here

1. Printing the PCB

I have put the gerber files here.

I got the PCB printed online through a PCB fabrication company (LionCircuits). They also helped me fix some of the defects which I had no clue about.

This costed me around 6k INR (around 70 USD) for 6 plates. I can make 3 keyboards using these. I could’ve reduced the cost by half here by using the default green solder mask. The black one costed me more.

pcb

Render of the gerber

You can see the printed PCB through some other images later in the post.

2. Soldering the diodes

Soldered 58 of 1N4148W for each key slot on the PCB.

Tricky thing about these is to solder them in the correct alignment. These are frustratingly small to work with (read: don’t have soldering experience). I made a few mistakes working with these like soldering a few of them incorrectly aligned and loose solder which caused some of the keys not working in the final build, but it was easy to fix.

58 of these 1N4148W diodes. They are super small and need to be soldered in the correct orientation.

diodes

1N4148W diodes soldered

3. Soldering the switch sockets

These are the sockets on which the key switches go. They were comparatively easier to solder than the diodes.

I made a big mistake here. Instead of soldering the two halves in mirror orientations, I accidentally soldered both as if they were the right half. The correct method was to solder one half, then flip the other half laterally (inverted) before soldering it. Unfortunately, I didn’t notice this until after I had already soldered all the diodes and sockets, so I had to desolder everything and start over on the correct side.

They kind of sit in place in the PCB holes so they are easy to solder.

sockets

Switch sockets

4. Arduino and friends

Soldered Arduino Pro Micro, TRRS jack and the reset switch.

I made a mistake soldering the pin headers—they didn’t go all the way through the board, but I didn’t notice and soldered them anyway. Once they were in place, I realized my mistake, but I couldn’t fully desolder them. I tried using a desoldering pump and wick, but they didn’t work. I then heated the pins and tried pulling them out with my Swiss Army knife’s pliers, which damaged the board. Some copper traces inside the PCB came off along with the pins. In the end, I had to switch to a different board to continue.

There's an OLED module on top of Arduino Pro Micro in this image.

arduino

Soldered Ardunio Pro Micro, TRRS Jack and Reset Switch

5. Putting the plates and switches

I printed the plates for the keyboard which I found at serverwentdown/lily58-3d with my 3D printer. For key switches, I used Cherry MX brown switches. I wanted to try some linear switches but I already had these with me.

3D printed the plates. Credits to serverwentdown/lily58-3d for open sourcing the designs.

plates

With the 3D printed plate

plates

With key switches

6. Flash the firmware

I flashed the firmware before putting any keycaps so that I can easily without disassembling entirely resolve any issues with incorrectly soldered diodes, socket or bent key switch pins.

I used the QMK Firwmare, an open-source firmware for microcontrollers for keyboards.

I have kept my firmware file, code, keymaps etc. here.

7. Testing the keyboard

After flashing the firmware, I tested the keyboard and found that about 10 keys were not working. I identified and resolved several issues:

  1. Misaligned diodes: Some diodes were installed incorrectly. I had to invert and resolder them.
  2. Loose solder joints: A few diodes and sockets weren’t soldered properly. I resoldered the ones that looked questionable.
  3. Header pin soldering for Arduino: Although the header pins appeared fine visually, they weren’t making proper contact. After reinforcing the solder on each pin individually, a few issues were resolved.
  4. Replacing sockets, diodes, and switches: Each key on the PCB relies on these three components. For the keys that still didn’t work after resoldering, I replaced the sockets, diodes, and switches, which fixed the issues for 1–2 defective keys.

In hindsight, using a multimeter would have made troubleshooting much easier and saved me a lot of time.

8. Putting the keycaps

I didn’t spend much time choosing the keycaps. I just ordered the first ortholinear profile keycaps I came across since there weren’t many options available anyway. They look clean and simple, which works for me.

lily58

Left half with keycaps

9. The case

I came across a few designs on Maker World, but the widest variety—low profile, high profile, different wall configurations, etc. was available with the Manta58. I decided to print one of the low-profile designs on my 3D printer, and here’s a timelapse of the process.

3D printed the case. Credits to Capsule Deluxe for open sourcing the designs.

10. Final build

lily58

Lily58

lily58

Lily58


Build cost

Here’s a breakdown of the cost of all of the components that were required for the build.

Component Cost (INR) Cost (USD) Image
PCB ₹1000 $12.00
Arduino ProMicro ₹1000 $12.00
OLED module ₹600 $7.20 see Arduino image (black screen)
Key Sockets ₹500 $6.00
1N4148W diodes ₹100 $1.20
Key Switch ₹1900 $22.80
Keycaps ₹2500 $30.00
TRRS Jack ₹100 $1.20 see Arduino image
TRRS Cable ₹300 $3.60 see connecting cable in the final build
Tact Switch ₹20 $0.24 see Arduino image (Reset Switch)
M2 Spacers ₹200 $2.40 -
M2 Screws ₹100 $1.20 -
Total ₹8300 ~$100  

Additionally, I 3D printed plates and case that used around 150g of filament (PLA) that costs around ₹150 (~$2). I’ll conveniently not factor in the cost of the 3D printer itself

Retrospection

Things I would do differently / what I could’ve done better

  1. Shitty soldering work: I’m not too bothered by this since I know I’ll improve with more experience.
  2. Insufficient research on the build: I didn’t dive deep enough into the build process and logistics, which also led to me missing some crucial parts in 2021.
  3. Gave up too soon in 2021: This ties into the previous point. Looking back, I realize that with just a bit more effort, I could have completed the build back then, but for some reason, I didn’t follow through.

Fulfillment

  1. After a long time there was no LLM that was used to assist with my work. I felt a sense of accomplishment that I would feel during completing a college hobby project, the one you build after learning a new language / framework.
  2. Bringing something functional into existence: Software gives the feeling of bringing something logical into existence through your imagination and instructions to the computer. Working with this kind of hardware gave a similar experience, albeit in a more tangible form. They were pieces of electronics a few weeks ago and building them into one of the programmer’s most used tool is super cool.