akaiyuki

{:title "Lily58 Keyboard Build" :layout :post :tags "Electronics" }

Lily58 Keyboard Build Guide

I have a lot of issues with carpal tunnel because of my job and the nature of my hobbies, so I looked into ergonomic keyboards. Eventually, I found out about split keyboards and learned that they're more ergonomic because the user's hands can rest in a natural position, resulting in less strain. Therefore, I ended up buying the Lily58 keyboard kit. As the name suggests, it contains 58 keys, with both ends having 29 keys each.

Lily58 vs. Other Keyboards

The Lily58 is a very different keyboard, as mentioned, it is a split keyboard, so there are two halves. The placement of the keys is different too. Many keyboards come in the staggered layout, which just means that the rows are aligned parallel, but the columns aren't. The Lily58 comes in a column-staggered layout, which just means that the columns are parallel, but the rows aren't. I really like the column-staggered layout, since I know what finger I have to use for each key, and it feels very natural for me.

Building Process

Parts needed:

Tools needed:

I chose MAIYUM Tin Lead Rosin Core solder with a diameter of .8 mm, others suggest .6 mm for precision but .8 does the job fine. I wouldn't suggest using lead-free solder since they have a higher melting point. This may lead to issues with sensitive components like the microcontroller.
partsAll the parts
Before soldering, I would make a mental note or add a piece of tape to distinguish which side is which. This is to prevent soldering the same side twice.

Soldering Diodes

Solder the diode wire pointing in the direction of the arrow symbol on the board like so:
diodedLine on diode should be aligned with arrow
I would start by applying solder on one pad of every diode
Then with tweezers solder one side of the diode, using the side that has the solder to make it easier to secure. Afterwards, solder the other side of the diode.
diodesPCB with diodes soldered

Soldering the sockets

You want to solder the sockets on the same side as the diodes. I did the same approach with the sockets as the diodes. I added solder on one side and then placed the socket.
socketsWhat PCB with presolder should look like. Afterwards, I held the socket in place and soldered the side with the pre-solder to secure it. Then I applied solder on the other end and checked for wiggling, to make sure it's a firm connection. After I repeated the same step for all the sockets, I started soldering the AUX port and reset switch.
socketsPCB with sockets & diodes

Soldering Audio jack and reset switch

The audio jack and reset switch are soldered on the opposite side of the board. The side they're on is supposed to be the top part of the board, with the diodes and sockets being the bottom side. For both components you have to turn the board over to solder the pins. The aux ports should be on the right for both sides.
auxHow AUX jack should be placedThe reset switch can just be soldered in the "RESET" area of the board.

Installing the Pro Micro

The Pro Micro is personally the thing that gave me the most trouble. I had to buy a few replacements because I didn't properly solder them and ruined them because of how fragile they are added with my inexperience with soldering electronics.I started by connecting the pins to a breadboard to hold the pins securely, but this is completely optional. I then soldered the pins to the microcontroller, you need to insert the microcontroller on the short side of the header pins, and then you solder every pin. The microcontroller should also be upside down (the micro USB port should be on the bottom)
breadboardHow microcontroller should lookAfter I had the pins soldered to the controller, I placed the microcontroller on the same side as the audio jack and reset switch. The microcontroller pins should be placed in the section with a rectangle around it. I made sure the microcontroller was inserted all the way and afterwards I added solder around the pins on the bottom of the board.
frontFront side components installed

Adding the switches

Now that the hard part was out of the way, it was time to add the switches. I inserted one switch in the 4 corners of the top plate in order to secure the position of the plate, and then I filled the rest of the board. Afterwards, I added the key caps and screwed the case onto the PCB.

Adding the Firmware

Now that I had everything installed on the PCB, it was time to add the firmware to the keyboard. I used the QMK tool on Linux to install the key map. I did this for both sides separately, using the command doas make lily58:custom:avrdude in the qmk_firmware directory. Once it said Detecting USB port, reset your controller now ... I clicked on the reset switch on the board to write the key map. I used a custom key map because I use the Colemak keyboard layout and I also moved some things around. You can do this by going into the qmk_firmware/keyboards/lily58/keymaps/default directory and changing the keymap.c file. I followed this guide to figure out what key codes worked, and then I just used the original command to write to the board. However, if you don't plan to add any special modifications to the key map, you can just use doas make lily58:default:avrdude to install the default QWERTY key map and go from there.

Final Steps

After the firmware has been written, you can connect the two PCBs together and connect the micro USB cable to the computer. Everything should've worked, but I had a few issues. A few keys didn't respond, and the issues were that I soldered the sockets wrong, so I had to either add more solder to the joint, or I had to replace the socket because I had damaged it. For one key, I soldered the diode in the wrong direction so I had to desolder it, turn it around, and resolder it for it to work. Building the keyboard took me around 4 hours to build.final