Blueprint

Mechanical Keyboard

Making a mechanical keyboard with leds

Created by Lingfeng Wang Lingfeng Wang

Tier 3

9 views

0 followers

Timeline

Lingfeng Wang Lingfeng Wang added to the journal ago

Wrote KMK Code

I was able to put my keyboard layout into the KMK code.

image

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 Lingfeng Wang submitted Mechanical Keyboard for review ago

Iamalive 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 Lingfeng Wang submitted Mechanical Keyboard for review ago

technical_. 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 Lingfeng Wang submitted Mechanical Keyboard for review ago

Tanook 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 Lingfeng Wang submitted Mechanical Keyboard for review ago

Lingfeng Wang 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.

image

image

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.

image

nimit 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 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.

image

I added the key, and did some rerouting.

image

Lingfeng Wang Lingfeng Wang submitted Mechanical Keyboard for review ago

Lingfeng Wang Lingfeng Wang added to the journal ago

Finished PCB V2

I finished the new PCB, with a pro micro rather than an elite-pi.

image

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.

image
image

The pro micro will actually be underneath the pcb, but with the same orientation.

Lingfeng Wang Lingfeng Wang added to the journal ago

Finished PCB

I was finally able to finish the PCB today!

image

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

image

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 Lingfeng Wang added to the journal ago

Rework Part 1

I started redoing the pcb, with a different matrix and different chip.

image

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.

image

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

image

Lingfeng Wang 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
image

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

image
image

Next, I need to redo the matrix to make wiring simpler, switch to a rp2040.

koeg 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 Lingfeng Wang submitted Mechanical Keyboard for review ago

Lingfeng Wang 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.
image

alexren 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 Lingfeng Wang submitted Mechanical Keyboard for review ago

Lingfeng Wang Lingfeng Wang added to the journal ago

Updated PCB

I had to move all the holes on the pcb to the bottom.
image
This took a lot less time than I expected, and this was actually pretty easy. After some CAD imports, I was done.

Lingfeng Wang 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.
image
So, I had to go back to kicad and fix those.

Once those were fixed, I made the case of the keyboard.
image
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.
image

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)
image
image
(the white circle is the led hole)

Well I know what I'll be doing for the next couple hours...

image

Lingfeng Wang 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
image
image

I also did a quick CAD of the rp2040 pcb.
image

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

Lastly, I cadded the USB port of the rp2040.
image

Lingfeng Wang Lingfeng Wang added to the journal ago

PCB Design

To start off, I put all the keys in their positions.
image
Then, I made a drawing of all the LEDS I wanted, and started placing them
image
Getting in the leds was quite a squeeze, and I had to move around a lot of the diodes.
image

Only after hours, did I finish wiring the keys
image
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.

image
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 Lingfeng Wang added to the journal ago

PCB Schematic

I finished the schematic for the pcb, but not the actual pcb itself.
image
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 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.

image

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
image

And for keycaps, I chose a random purple set.
image

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

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

Having planned out all the parts, it was finally time to plan out the build.

This will be the layout, with 67 keys. hehe.

image

  1. I will follow the HackPad tutorial for the pcb
  2. I will figure out how to CAD the case on my own...

Lingfeng Wang Lingfeng Wang started Mechanical Keyboard ago