Mechanical Keyboard
Making a mechanical keyboard with leds
Created by
Lingfeng Wang
Tier 3
9 views
0 followers
Timeline
Lingfeng Wang
added to the journal ago
Wrote KMK Code
I was able to put my keyboard layout into the KMK code.

The LED currently is a very simple controller that just sets it all of them to a light cyan. This will be expanded on once tested.
Lingfeng Wang
submitted Mechanical Keyboard for review ago
Iamalive ⚡🚀
requested changes for Mechanical Keyboard ago
Please include a screenshot of the shipping option you choose for your pcb. Additionally, please choose a cheaper option/color for your keyboard switches.
Lingfeng Wang
submitted Mechanical Keyboard for review ago
technical_.
requested changes for Mechanical Keyboard ago
Please specify the amounts of components you need in your BOM. The word diodes is very ambiguous for the amount of diodes you want to order.
Lingfeng Wang
submitted Mechanical Keyboard for review ago
Tanook ⚡🚀
requested changes for Mechanical Keyboard ago
Hello! Please include the BOM in the readme, as well as the schematic. u also get 45 pieces, but the keeb is 67 pieces. Other than that, looking good!
Lingfeng Wang
submitted Mechanical Keyboard for review ago
Lingfeng Wang
added to the journal ago
Finished V2 of the CAD
I was able to finish the new cad, with the new pcb, stabilizers, and a new pcb mounting method.


Previously, I had the pcb bolted into the case, but now I just have it slide in, and the top and bottom go together to clamp on it.
I'm still not sure how to clamp the two sides together, but that can come later after I have finished making sure everything works IRL.

nimit 🚀
requested changes for Mechanical Keyboard ago
You do not have a PCB screenshot in the repo! Also, your microcontroller sits on the opposite side of your switch. When the mcu is soldered, you will not be able to solder the switch or vice versa! Please move your MCU and check the 3D viewer in kicad to see these issues
Lingfeng Wang
added to the journal ago
Added Extra Key
Looking at some 60% keyboards, I realised that I needed an extra key in order to make it fit with my keycap set.

I added the key, and did some rerouting.

Lingfeng Wang
submitted Mechanical Keyboard for review ago
Lingfeng Wang
added to the journal ago
Finished PCB V2
I finished the new PCB, with a pro micro rather than an elite-pi.

I wanted to use an elite-pi rp2040 as the controller, but I could not find any online without expensive shipping, so I had to switch to the rp2040 pro micro, because it also has enough pins.


The pro micro will actually be underneath the pcb, but with the same orientation.
Lingfeng Wang
added to the journal ago
Finished PCB
I was finally able to finish the PCB today!

I also fixed the LEDs, so they go where they should be now.

Next, I need to fix the cad for my new pcb, and I should be good to go. I also updated my BOM.
Lingfeng Wang
added to the journal ago
Rework Part 1
I started redoing the pcb, with a different matrix and different chip.

I chose to replace this with an elitepi, because it has usb-C, 25 GPIO pins, and has a small form factor that fits on my board.
I also moved it to the back so I can plug directly into the board instead of having an extension cable.

The CAD has leds in the wrong spot other than the green one, because I made a couple edits to the footprint.

Lingfeng Wang
added to the journal ago
LED rework
To try to put everything on one pcb, I decided to mount the leds upside down, like this

I had to make a custom footprint, because kicad did not have one previously.


Next, I need to redo the matrix to make wiring simpler, switch to a rp2040.
koeg 🚀
requested changes for Mechanical Keyboard ago
Hi! Are you getting the cheapest shipping on JLC? Try using global direct shipping. Also, do you have a specific reason for making a separate PCB for the LEDs, instead of just placing them on the main PCB with the switches and the rp2040? I have sent you a DM regarding this. Besides this, everything looks good!
Lingfeng Wang
submitted Mechanical Keyboard for review ago
Lingfeng Wang
added to the journal ago
Rendered CAD
I rendered the CAD (to make the banner look pretty)
Nothing else was changed, which is why this took 0.1 hours. As for the keyboard, it is still being worked on.

alexren ⚡🚀
requested changes for Mechanical Keyboard ago
Hey! I'm returning this as you're missing a LOT of things! you're missing a proper README, PCB files, etc. I would go over the blueprint requirements again and also ask in #blueprint for help!
Lingfeng Wang
submitted Mechanical Keyboard for review ago
Lingfeng Wang
added to the journal ago
Updated PCB
I had to move all the holes on the pcb to the bottom.

This took a lot less time than I expected, and this was actually pretty easy. After some CAD imports, I was done.
Lingfeng Wang
added to the journal ago
CAD Case
While doing the CAD, I realised that a lot of the mounting holes were actually misplaced.

So, I had to go back to kicad and fix those.
Once those were fixed, I made the case of the keyboard.

It took quite a while to get all the parts together, and I had to try a couple different sizes.
So after looking at some keyboards online, I noticed that they had the leds under the keycap.

Looking at most keycaps, such as the one in the CAD, they do have a clear part there. That made me realise I needed to redo the PCB to move all the leds to the bottom, because they used to be on the top... (My switches are actually upside down)


(the white circle is the led hole)
Well I know what I'll be doing for the next couple hours...

Lingfeng Wang
added to the journal ago
Starting CAD
To start, I made/found/imported all the CAD I would need.
I imported the pcbs from kicad, and split them up into two files


I also did a quick CAD of the rp2040 pcb.

I also imported a switch CAD, from this link: https://grabcad.com/library/kailh-polia-switch-cherry-mx-compatible-1

Lastly, I cadded the USB port of the rp2040.

Lingfeng Wang
added to the journal ago
PCB Design
To start off, I put all the keys in their positions.

Then, I made a drawing of all the LEDS I wanted, and started placing them

Getting in the leds was quite a squeeze, and I had to move around a lot of the diodes.

Only after hours, did I finish wiring the keys

It partly took this long because I was lazy and didn't put the keys in a good position, so I had to basically restart and redo all of the layout again.
When I started doing LEDs, I realised there was genuinely no space. So, I decided the best way to go would be to cut out holes in this pcb, and to stack two on top of each other for LEDS. This should also be pretty easy, so I got ahead to doing that.

It may not look pretty, but it does work! (or at least it should...)
The two pcbs are connected with a 3pin header, and I'm just going to hope that everything goes right.
Lingfeng Wang
added to the journal ago
PCB Schematic
I finished the schematic for the pcb, but not the actual pcb itself.

When doing it, I realised that the rp2040 does not have enough GPIO pins for 67 keys, so I opted to use a waveshare rp2040-tiny, which has 20 GPIO pins.
I currently use 19 :(
Now, I am moving onwards to the pcb design.
Lingfeng Wang
added to the journal ago
Design Ideas
Before I started the actual design, I wanted to write out my goals for this project:
I knew that a keyboard requires a case, a pcb, switches, keys, but not much more.
Having found no guidance online, I decided to plan this out step by step.

To start, I looked at how keyboards worked. I decided on a 60% keyboard, because it would be the easiest to make.
I wanted my keyboard to be light purple, so I choose switches and keycaps for this.
For the switches, I honestly picked random switches and hopefully they sound good :P

And for keycaps, I chose a random purple set.

I also wanted to have RGB lights, so I will probably be using SK6812mini (online said it works)

It seems that a seeed xiao rp2040 is the most popular choice, so I will be using those too.

Having planned out all the parts, it was finally time to plan out the build.
This will be the layout, with 67 keys. hehe.

- I will follow the HackPad tutorial for the pcb
- I will figure out how to CAD the case on my own...
Lingfeng Wang
started Mechanical Keyboard ago