Need help designing the PCB for my keyboard
-
- Location: United Kingdom, England
- Main keyboard: Razer Blackwidow '13 ult
- Main mouse: Zowie FK 2014
- Favorite switch: I can't decide!
- DT Pro Member: -
Hello,
I've tried following this guide: wiki/KiCAD_keyboard_PCB_design_guide but I found it too hard. There's a lot of steps the author expects us to know, and I'm getting errors that aren't addressed.
I've tried messing around with the tutorial files too but I can't figure out the PCBnew thing at all.
Isn't there a way for me to configure the pieces around? To reposition the premade Cherry pieces?
I need some software that will allow me to load the switch files (CHERRY_PCB_100H.kicad_mod), and position them.
I've tried following this guide: wiki/KiCAD_keyboard_PCB_design_guide but I found it too hard. There's a lot of steps the author expects us to know, and I'm getting errors that aren't addressed.
I've tried messing around with the tutorial files too but I can't figure out the PCBnew thing at all.
Isn't there a way for me to configure the pieces around? To reposition the premade Cherry pieces?
I need some software that will allow me to load the switch files (CHERRY_PCB_100H.kicad_mod), and position them.
- regack
- Location: USA
- Main keyboard: IBM Model M (22 JAN 1986)
- Favorite switch: For customs: Cherry MX Green
- DT Pro Member: -
Kicad is really a suite of individual tools for the PCB design workflow. Eeschema is where you lay out the schematic for your design, then using that logical layout in PCBNew you turn the logical deisgn into a physical one. The MOD files like CHERRY_PCB_100H.kicad_mod are footprints for physical devices (a single Cherry MX switch in that case). You don't really work with them directly - they load up as library elements into PCBNew, where you can pick and place them down.RadikulRAM wrote: Hello,
I've tried following this guide: wiki/KiCAD_keyboard_PCB_design_guide but I found it too hard. There's a lot of steps the author expects us to know, and I'm getting errors that aren't addressed.
I've tried messing around with the tutorial files too but I can't figure out the PCBnew thing at all.
Isn't there a way for me to configure the pieces around? To reposition the premade Cherry pieces?
I need some software that will allow me to load the switch files (CHERRY_PCB_100H.kicad_mod), and position them.
There was a tutorial a few years ago that bpiphany wrote (I'll see if I can find it) that's what I used to get started. It might be a little bit dated, since Kicad has been updated/changed since then, but fundamentally it's the same.
Really, the only (free) way to use those .MOD files to configure/place those pieces around to make a PCB is to learn kicad/pcbnew.
Edit:
I think the Wiki is the tutorial that bphipany wrote, but there isn't a link to the tutorial files on there (that I saw, during my cursory glance). It might be easier to start with the tutorial files : https://github.com/BathroomEpiphanies/K ... d-Tutorial
Then you can sort of open those and follow along.
If you feel like punishing yourself, you can review the not-particularly-good intro I put together a few years ago : https://github.com/regack/depot/tree/master/basics - there are three subdirectories of files to work with and a .PDF that goes through some real basics, but it's not particularly well done.
Last edited by regack on 09 Sep 2016, 19:37, edited 1 time in total.
- DiodeHead
- Location: Spain
- Favorite switch: Gateron white
- DT Pro Member: -
i'm not sure if this is the anwser your looking for, but for what i understood, what you need is to make your plate design in a cad program ( i use Qcad, its easy to use ) so you can position your switches, then you import that dfx file into a kicad layer so you use it as a guide and its easier for you to position the actual pcb switches models.
Also, in kicad, on the switch properties on pcbnew i think you can tell the position by writing the actual coordinates you want them to be.
To make a keyboard takes a lot of work and design time, thats why mine is still in the design phase.
Also, in kicad, on the switch properties on pcbnew i think you can tell the position by writing the actual coordinates you want them to be.
To make a keyboard takes a lot of work and design time, thats why mine is still in the design phase.

-
- Location: United Kingdom, England
- Main keyboard: Razer Blackwidow '13 ult
- Main mouse: Zowie FK 2014
- Favorite switch: I can't decide!
- DT Pro Member: -
Alright guys, I found a tool that creates a plate for you here:
http://builder.swillkb.com/
Whether it's accurate or not I don't know but basically you use this website: http://www.keyboard-layout-editor.com/ to design your KB, and then copy the raw data to http://builder.swillkb.com/ that then builds it.
Not exactly what I was looking for, as I was thinking of making my KB PCB mounted. But I could just use a plate mount and hand wire the keys.
As for what Diodehead wrote yeah I'm basically looking for a CAD design. Problem is I'm not good with any CAD software to actually create the MX switchs with all of the wholes in the correct place, and then accounting for the keycap positioning too. I coulndn't find any pre designed keycap pieces for any CAD software, but there are some for Kicad (which I suck at using).
@Regack, I'm gonna try kicad again lets see if I can manage it now
EDIT:
I did better this time on Kicad, but I couldn't position the pieces on the grid very accurately and gave up.
http://builder.swillkb.com/
Whether it's accurate or not I don't know but basically you use this website: http://www.keyboard-layout-editor.com/ to design your KB, and then copy the raw data to http://builder.swillkb.com/ that then builds it.
Not exactly what I was looking for, as I was thinking of making my KB PCB mounted. But I could just use a plate mount and hand wire the keys.
As for what Diodehead wrote yeah I'm basically looking for a CAD design. Problem is I'm not good with any CAD software to actually create the MX switchs with all of the wholes in the correct place, and then accounting for the keycap positioning too. I coulndn't find any pre designed keycap pieces for any CAD software, but there are some for Kicad (which I suck at using).
@Regack, I'm gonna try kicad again lets see if I can manage it now
EDIT:
I did better this time on Kicad, but I couldn't position the pieces on the grid very accurately and gave up.
- regack
- Location: USA
- Main keyboard: IBM Model M (22 JAN 1986)
- Favorite switch: For customs: Cherry MX Green
- DT Pro Member: -
RadikulRAM wrote: Alright guys, I found a tool that creates a plate for you here:
http://builder.swillkb.com/
Whether it's accurate or not I don't know but basically you use this website: http://www.keyboard-layout-editor.com/ to design your KB, and then copy the raw data to http://builder.swillkb.com/ that then builds it.
Not exactly what I was looking for, as I was thinking of making my KB PCB mounted. But I could just use a plate mount and hand wire the keys.
As for what Diodehead wrote yeah I'm basically looking for a CAD design. Problem is I'm not good with any CAD software to actually create the MX switchs with all of the wholes in the correct place, and then accounting for the keycap positioning too. I coulndn't find any pre designed keycap pieces for any CAD software, but there are some for Kicad (which I suck at using).
@Regack, I'm gonna try kicad again lets see if I can manage it now
EDIT:
I did better this time on Kicad, but I couldn't position the pieces on the grid very accurately and gave up.
Swill's plate building tool is great. You can download the CAD after it's done and move things around if you want, but if you order something directly from the output, it does work fine. Fine positioning with Kicad is difficult, you really have to change the grid spacing to make it easier, and even then it will require a fair amount of math to position things properly. It's also possible once the keys are roughly aligned to edit the files by hand or with a script to fix the positions.
If you're going to hand-wire, then using the keyboard-layout-editor followed by swill's plate tool will yield good results.
- DiodeHead
- Location: Spain
- Favorite switch: Gateron white
- DT Pro Member: -
Yes, playing with the grid spacing is also very important to get a little more freedom of movement.
But now something come to mind, the way he did it is a very nice design path, i did almost the same, start with keyboard layout editor, then create the plate with swillkb and the last bit would be awsome if kicad had some kind of plugin that let you auto position the switches to a imported layer with the plate.
It´s something worth looking into. :{
But now something come to mind, the way he did it is a very nice design path, i did almost the same, start with keyboard layout editor, then create the plate with swillkb and the last bit would be awsome if kicad had some kind of plugin that let you auto position the switches to a imported layer with the plate.
It´s something worth looking into. :{
-
- Location: United Kingdom, England
- Main keyboard: Razer Blackwidow '13 ult
- Main mouse: Zowie FK 2014
- Favorite switch: I can't decide!
- DT Pro Member: -
How do I set a custom value for the grid spacing? Mine is already snapping.
EDIT:
Go into Dimensions and set a value in mm, then use grid becomes this.
This works great for 1u keys (19.05mm), but now I can't position my 1.75u keys. I tried changing the value of my grid to accommodate the 1.75u size (1.75*19.05) but it still doesn't work.
I also set it to 75% of 1u, but that doesn't align either.
EDIT2:
My Origin is 50.8 for X and Y. What does the origin mean? Should it be something else?
-
- Location: US
- DT Pro Member: -
I have a python script that will create a kicad project, schematic and board based on the output of keyboard layout editor:
https://github.com/mechkeys/mechkeys/bl ... /layout.py
You still have to do the tedious process of creating a matrix in the schematic editor, and then the more fun process of turning that into pcb traces, but it does take care of the layout of the pcb and a decent starting schematic.
https://github.com/mechkeys/mechkeys/bl ... /layout.py
You still have to do the tedious process of creating a matrix in the schematic editor, and then the more fun process of turning that into pcb traces, but it does take care of the layout of the pcb and a decent starting schematic.
-
- Location: Finland
- Main keyboard: ergoDox
- Main mouse: zowie ec2
- Favorite switch: brown
- DT Pro Member: -
Origin does not matter. You should set the grid to 19.05 divided by 8.RadikulRAM wrote:How do I set a custom value for the grid spacing? Mine is already snapping.
EDIT:
Go into Dimensions and set a value in mm, then use grid becomes this.
This works great for 1u keys (19.05mm), but now I can't position my 1.75u keys. I tried changing the value of my grid to accommodate the 1.75u size (1.75*19.05) but it still doesn't work.
I also set it to 75% of 1u, but that doesn't align either.
EDIT2:
My Origin is 50.8 for X and Y. What does the origin mean? Should it be something else?
-
- Location: Stockhom, Sweden
- Main keyboard: Symmetric Stagger Board
- Main mouse: Kinzu
- Favorite switch: Topre
- DT Pro Member: -
I commonly set the position of the topmost leftmost key at (50.5mm,50.8mm) when designing mainboard PCBs. Because that is 2" and easy to navigate back to. And it doesn't interfere with the KiCAD page boarders. The 19.05mm/8=2.3815mm or 0.75"/8=0.09375" grid is very handy when placing switches. If I need a finer grid, to place diodes and other stuff, I usually switch to the 0.025" grid. Working with as few grids as possible makes it easier to put components back where they belong if you accidentally move them or try moving them around for other reasons.
KiCAD used to have a base length unit of 0.0001" which lead to rounding of the 0.09375" units. Now they have switches to a base length unit of 1µm, in which all earlier 0.0001" positions can be expressed exactly, is in a proper units system, and should be enough for everyone...
When I design things in mm like my controllers I usually set the origin at (5mm,5mm) and use a mm grid. It's just easier to think in mm, and the headers are in mm pitch anyway.
Addendum: The plain text file formats of KiCAD lends itself quite straightforward to scripting. Placing components by scripting, or building complicated composite components to start with, is very much doable. That's for the grad school class though =)
KiCAD used to have a base length unit of 0.0001" which lead to rounding of the 0.09375" units. Now they have switches to a base length unit of 1µm, in which all earlier 0.0001" positions can be expressed exactly, is in a proper units system, and should be enough for everyone...
When I design things in mm like my controllers I usually set the origin at (5mm,5mm) and use a mm grid. It's just easier to think in mm, and the headers are in mm pitch anyway.
Addendum: The plain text file formats of KiCAD lends itself quite straightforward to scripting. Placing components by scripting, or building complicated composite components to start with, is very much doable. That's for the grad school class though =)
- 7bit
- Location: Berlin, DE
- Main keyboard: Tipro / IBM 3270 emulator
- Main mouse: Logitech granite for SGI
- Favorite switch: MX Lock
- DT Pro Member: 0001
No way I will ever port my stuff to the new KiCAD crap!

When will they change it the next time?

The goal is the Gerber files, so I will write a tool myself that shortcuts all of those intermediate formats, so no painful GUI must be involved anymore!


When will they change it the next time?

The goal is the Gerber files, so I will write a tool myself that shortcuts all of those intermediate formats, so no painful GUI must be involved anymore!

- sinusoid
- Location: Europe
- DT Pro Member: -
https://www.youtube.com/watch?v=zK3rDhJqMu0
This is the tutorial that got me started. I don't know if there were any significant changes to KiCad since, but it's very concise.

This is the tutorial that got me started. I don't know if there were any significant changes to KiCad since, but it's very concise.
Awwww, all that student workforce at CERN going to waste

-
- Location: Stockhom, Sweden
- Main keyboard: Symmetric Stagger Board
- Main mouse: Kinzu
- Favorite switch: Topre
- DT Pro Member: -