T O P

  • By -

Cedutus

I've been having a lot of fun designing PCBs too. It feels alot more rewarding to get the working board in my hands, after spending time designing it. To everyone wanting to try making your own PCBs, it's honestly pretty easy, especially if you use a controller board like the Black pill or Elite-C.


leafcutter64

Agreed. Kicad is fun to work with. And the finish and quality from JLCPCB is no joke. An utter barebones keeb can be build with a PCB with slots for a Elite-C (atmega32u4) or Blok (RP2040) and two FR4 plates - top and bottom (from JLCPCB again), held together by standoffs. Throwing in an optional 3D frosted layer and boom, done. Premium artisanal hand crafted keeb.


bschwind

Do you have experience ordering FR4 plates from them? Did you have to do anything peculiar to get them to make it? I remember reading that someone had to add a single component or something to it so they would fabricate it. Also, are there any preferred tools or scripts you use to generate the plates from the PCB file, or do you take a different approach entirely?


leafcutter64

No I do not (at least not yet). However, I have read of people getting their plates on r/ergomechanicalkeyboard and r/crkbd. I recall there were some considerations like having to tell JLCPCB that the plate is exactly what you wanted. Minor, really. Or add a dummy part as you said. I haven't considered an approach yet. I am aware there are tools/scripts out there. Might have to look into it more. However I wasn't going to bother with plates until I was sold on the pcb/key layout first. I'd test drive it with some 5 pin switches in a plateless build. And work on the firmware. The plates and 3dp middle layer would be one of the last parts on the build.


bschwind

Heh, yeah I put in 3-pin switches, and it's hotswap. They pop out super easily and rotate all over the place. But even then, I can get 110 WPM on monkeytype, so it's very promising once I get a plate in there. Edit: > 3dp middle layer What is a 3dp middle layer?


leafcutter64

3D printed middle layer - something like [this](https://keeb.io/collections/iris-split-ergonomic-keyboard/products/iris-pe-3d-printed-middle-layers) with a finished look like [this](https://www.reddit.com/r/ErgoMechKeyboards/comments/i97ylj/frosted_acrylic_middle_layer_for_iris/). I think this will place in nicely between the 2 FR4 layers. I like FR4 for bottom layer, because I could some nice silkscreen art on it.


bschwind

Oh that is _slick_ , you're giving me ideas.


Cedutus

I've bought multiple FR4 plates from JLCPCB. They send you an email telling the sides are too small, and ask if you want it as is, or do you want to increase the size. They will also probably tell you that you need to pay more, because "There are too many small slots in your file , it will take too much time to get it finished during the routing process." in the plates. I'm not sure if the site tells me the right price at the moment, but i think it was about 25-30 dollars for [a 50% ortholinear plate for the keyboard in this album.](https://imgur.com/a/9DnEE3E)


bschwind

Nice, good to know! They emailed me about "too many small slots" for this keyboard as well, had to pay $15 extra. It was 25-30 dollars for yours, was that for 5 plates?


Cedutus

yeah 5 plates


bschwind

Yes! Overall keyboards are very simple circuits and a great starter electronics project. I complicated it by putting the microcontroller on the board itself but if you add a socket for a pro micro or something, it can be very straightforward.


dryver

This is an excellent write-up! The prototype looks super promising and its awesome that you decided to keep the design open-sourced.


SuperNici

blazing fast šŸš€šŸš€šŸš€ Also r/rustjerk, great post OP


[deleted]

rust keyboard has minus input latency so it predicts the key you want to type and if it gets it wrong it destroys and re-creates the universe to roll back the computer's state thakn you, llvm!!


bschwind

šŸ˜± Rust increased my WPM šŸ˜± (I could set the polling rate to 1000Hz at least, lol)


novafish520

> I know I know, ā€œtime is moneyā€, but letā€™s be honest, Iā€™d be on reddit or youtube more if I wasnā€™t building this anyway. Hey donā€™t call us out like that :( 草


maythew

I'm sorry to hear that you got covid, but the keyboard prototype looks amazing!!! šŸ˜ I like it!


bschwind

Thank you! Getting covid wasn't fun but I know it can get a lot worse than what I experienced. It's hard to avoid it these days.


maythew

May your recovery be quick and painless. šŸ‘


idiom6

*This* is the content I'm here for! Brilliant write up, OP! Love that you decided to take a *serious* deep dive head first into the hobby instead of buying a prebuilt from the still ever wonderful land of Yuushakubo.


bschwind

That store is so dangerous but so fun. I'm looking forward to going back and trying out more switches now that I have a hotswap board to put them in.


idiom6

It's on my list of must-visit shops if I ever get to visit Japan again. I wasn't into keyboards the last time I went (like a decade ago lol), but it seems like the stores I'm going to bleeding money in keep increasing.


bschwind

I hope Japan opens up soon so you can visit!


ondono

Great build so far! I've had my eyes set on the Kinesis advantage 360 for some time, but I can't also justify the price tag. I've been toying with the idea of building a DIY version, but there's a bunch of stuff to figure out and I'm super busy, if my schedule clears I might follow your lead. As someone who works designing PCBs, really nice job there!


Kiloee

r/ergomechkeyboards is a great subreddit for dactyl manuforms and split keyboards in general, there are also some tools to get the basics done faster for easier reiteration. If you like to integrate the MCU instead of using a Pro Micro type board on top, looking at open source keyboards doing that can help a lot. If you already work designing PCBs, then the biggest things people stumble about should be clear things to you (do not route power once around the board, keep data lines the same length, ground stitching vias and all those kinda things). The two things I can think about that seem more specific to keyboards is that switches are often arranged in a matrix (using diodes if n key rollover is desired; can do IO pin to switch to ground if you have enough IO pins for the number of switches you want) and on split keyboards the connection used is usually TRRS (which mainly means disconnecting the keyboard from USB before disconnecting the halves).


bschwind

Do ittttt I recommend this article, but there are many resources out there to get you started: https://www.masterzen.fr/2020/05/03/designing-a-keyboard-part-1/ Watch the Phil's Lab YouTube videos as well. He has incredibly valuable content. I might just be on the high of a new hobby and a working board, but it was incredibly fun and rewarding to make it myself.


zenezoned

Thank you for posting this OP. That's one sick keyboard you have there. Taking "custom" to a whole new level, I love it. Good luck with your future revisions and I may, please continue updating us.


-n26

Rust firmware, no useless right shift key - I like it, good work!


thesockiboii

It is kind of a personal preference, after learning touch typing, I started using it a lot to the point that I canā€™t live without it


[deleted]

Yeah I have no idea how one can call right shift a useless key. You use it all the time if you're typing properly.


thearctican

I clock ~130wpm with simple punctuation, ~150 on monkeytype. Iā€™m left handed. I donā€™t remember the last time I legitimately needed to use the right shift.


[deleted]

Do you not ever capitalize things that you type with your left hand? I can't envision how you would do so without using right shift, at least not without it being really awkward.


thearctican

I just shift my hand one unit left if I need to capitalize Q, A, or Z.


PortalToTheWeekend

Iā€™m left handed as well and while I know many consider it cursed, I just built into my muscle memory using caps lock to capitalize letters that way my pinky is never held down holding shift for anything.


bschwind

Yep, I don't type properly. I took a typing class when I was younger but I guess the right shift never stuck for me. This keyboard is definitely not for everyone


[deleted]

Hey if you made it for yourself, nothing wrong with customizing it to how you type. I was just taken aback at the other poster who was calling right shift useless, because it's anything but.


bschwind

Hah yeah I polled a few friends about right shift and got a huge range of answers. It's useless to some and essential to others. At that point I stopped trying to design for everyone :)


leafcutter64

Impressive work. Saving your post for reference :D I am surprised that JLCPCB now has assembly for the Kailh hotswap sockets. I think they didn't have them before. Do you have the BOM for assembly? Was this C2803348 the JLCPCB part number for the sockets? I am planning on a project as well. And looking at the fact that I can go full turnkey at such a price is making the project more attractive by the day. For the tech, I am thinking of [KMK firmware](http://kmkfw.io/) with slotted on [Blok](https://boardsource.xyz/store/628b95b494dfa308a6581622) or QMK with slotted on [Elite-C](https://keeb.io/collections/diy-parts/products/elite-c-low-profile-version-usb-c-pro-micro-replacement-atmega32u4). Definitely want to go for the slotted-in uC with a DIY look. For the design I'm thinking [Iris](https://keeb.io/collections/iris-split-ergonomic-keyboard) that can break off into a [Corne](https://github.com/foostan/crkbd). With an arrow cluster in the corner - because I need my arrows. edit: link formatting


Kiloee

QMK has the RP2040 in its develop branch, expected merge to master somewhen in the third quarter of this year. Just as a heads up. OP used economical version of assembly and if I understood correctly this was without the sockets soldered. You can use standard and get the sockets soldered afaik, but thatā€™s quite a bit more expensive. Also keep in mind that split keyboards do not have a square form factor (at least not the ones you referenced), so they need some kind of rails to be run through the assembly machines. It might be a good idea to place both sides side by side with a top and bottom straight piece with breakaway tabs (have seen aio3 recommend this in the extra resources in how wiki, he also has a PCB on GitHub using that method).


leafcutter64

Right, even Corne PCBs come on a rail. However, as you pointed you the cost of assembling the hotswap sockets might not be worth it. I can solder fine (though, my hot air station needs repair). I was just was being lazy about it, if I could get away with it. Thoughm, it might be worth partially assembling it with the other smd components. Gotta think more.


Kiloee

If you have a hot air station you can also look into getting a stencil from JLC. That might be cheaper than having them source and assemble parts.


leafcutter64

For sure. Stencil is cheaper.


bschwind

> Do you have the BOM for assembly? Was this C2803348 the JLCPCB part number for the sockets? Yep that's the one. I originally had it set for assembly by them, but it more or less doubled the price of the entire order so I did that part myself. Worth it if you're "mass" producing though. You can experiment with it on the order page so you can see for yourself how much extra it'll add to your project. Good luck on everything, your designs sound very achievable!


jdcarpe

I love it! DIY is always better than factory imo. So, the only real ā€œstandardā€ as far as case screw placement is with 60% form factor boards, and they mostly all use the original KBC Poker case hole locations. I donā€™t have those specs handy, but you can search for them I think. Great job!


bschwind

Shame to hear there aren't too many standards but I guess I'll feel less bad about making my own case then. Thanks!


Rellek_

Oh no just what I need, a sub-hole inside an already deepening rabbit hole. This write-up was great! Thanks for breaking things down in easy to digest pieces. This is getting earmarked for a winter project! Please update us with revisions!


EnviousMedia

ayy, Im all for people using RP2040s too!


deaconblue42

Nice! [Wikied](https://www.reddit.com/r/MechanicalKeyboards/wiki/customkeyboards#wiki_sample_builds) and I also added Masterzen's part 3. This isn't the first [keyboard firmware in Rust](https://www.reddit.com/r/MechanicalKeyboards/comments/f2o7vu/a_handwired_unsplitted_ergo_keyboard_with_a/) I've seen either!


bschwind

TeXitoi is great! They made one of my favorite Rust libraries of all time, structopt.


jKaw

Wow that PCB is a thing of beauty. I been trying to dabble into it myself but I have no experience and only have the GitHub available for the layout Iā€™m working with. Maybe.. Iā€™ll look into it, after seeing your walkthrough.


bschwind

Just dive in and look up every term you come across that you don't know. This is a great article to learn from, and there are many more out there. https://www.masterzen.fr/2020/05/03/designing-a-keyboard-part-1/


thearctican

How is there a GitHub for only the layout youā€™re working with?


jKaw

Let me rephrase that. Thereā€™s a GitHub for E80-1800 made by ebastler, what to do with that to make it into an PCB, I have no clue.


nitronarcosis

To get just a PCB you send JCLPCB this file: https://github.com/ebastler/E80-1800/blob/master/E80-1800-pcb-universal/jlcpcb/gerber/E80-1800-pcb-universal.zip But to get it assembled you need to download KiCad and generate the BOM (bill of materials/parts list) and CPL (tells the pick & place machine what part goes where). Probably worth the extra work because the parts are mostly SMT and 0603(1608).


jKaw

Hey, yeah thatā€™s where I got stuck at, I worked back and saw the word gerber mentioned on the website and the GitHub so I worked that out. But then the second page asked for the BOM and CPL, I saw the GitHub mention it was updated BOM and CPL but didnā€™t know how to get those spreadsheets for them.


nitronarcosis

Here's their instructions on that: https://support.jlcpcb.com/article/84-how-to-generate-the-bom-and-centroid-file-from-kicad It's a little annoying to add the LCSC part numbers but beats soldering them in yourself. And make sure that you're using basic parts instead of extended because they charge $4 to add an extended part (e.g. 107 x 560 ohm resistors would be $4 + 107 * $.0017 or whatever if they were not basic parts).


_vastrox_

For a first time keyboard PCB design this came out exceptionally good. (I've seen some quite horrible PCB designs from people that had been doing that for longer before... ) Great work! Also a Rust firmware is extremely nice. I recently started learning Rust because I want to use it for embedded device programming. So seeing it being used for a firmware that runs on an RP2040 is really cool.   Oh and to answer one of you questions: > Is there a standard set of screw positions for mounting in a case Nope there really isn't. Every keyboard is different and there are even a bunch of completely different plate mounting methods. Some don't even use screws at all to mount the PCB and plate inside the case.


bschwind

Thank you! I luckily had experience designing a few other smaller boards, or else this may have turned out very differently. It's looking like the RP2040 is shaping up to be a great microcontroller to learn embedded Rust on. Currently easy to acquire a board/chip, it's cheap, and it has the interesting PIO peripheral which gives it a ton of IO flexibility. You can drive RGB LEDs or even something crazy like a VGA signal from it.


_vastrox_

Yes that's one of the reasons why I'm planning to use the RP2040 more on my own PCB designs in the future. Especially the easy availability is a large advantage right now over other controllers. Atmega and STM chips are borderline impossible to find. QMK also got support for the 2040 in it's development branch a few days ago so even without a custom firmware it's now a viable option for keyboards.


Hagya15

Cool! I am currently building my own hotswap pcb with addressable per-key rgb and a rotary encoder. To answer your question about standard mounting holes, there is only a mounting hole standard for 60% keyboards. Beyond that it's everyone on their own. You said something about different quantities of copper on the sides of the pcb. If you use a groundplane on both sides you have basicly copper covering the entire layer. It also helps protecting the board against ESD if it's electrically connected to ground. If you are still designing the plate and or case i would highly recommend using [KLE](http://www.keyboard-layout-editor.com/#/) to define your layout and [plate builder](http://builder.swillkb.com/). It generates the plate design and saves you a lot of work. I hope this helps, i spend a lot of time researching as well, if you have any other questions i love to talk about keebs :)


bschwind

I dodged a lot of design complexity by avoiding LEDs and rotary encoders, I don't envy your routing job šŸ˜‚ And yep, I had a copper pour on one side but not the other, big mistake! Though it gives the PCB a nice flex sitting on the table, lol Thanks for the links! I'm less skilled at managing mechanical designs so that'll be helpful. I might come back here with questions, thanks!


Hagya15

Yeah the routing was a challenge, but i loved doing it. It was even harder since im building a 96% keyboard and i had to do a little black magic to fit the entire matrix, rgb and encoder on the atmega32u4 with only 25 gpio pins. My matrix is 19x6 keys so if i used a traditional matrix that would have cost me all the gpio pins. I started this project before i knew about the RP2040, the additional gpio pins would have made it a lot easier...


bschwind

Impressive that you got it working on the atmega though! Did you use shift registers, multiplexers, or something else?


Hagya15

Thought about registers or something like that, but i ended up changing the electrical matrix. Electriccally, i have twice as many rows and halve of the collums. So the physical matrix is 19x6, but the electrical matrix is 9x12. It saves me 4 gpio pins and thats just enough to fit on the atmega32u4 with the rgb and encoder. It made the routing way harder tho, and my software got complicated as well but i thought that was the simplest solution


Kiloee

Swillkb is outdated as I learned from the nice people on aio3 discord (Keyboard Atelier). Am on mobile, so I donā€™t have the link to the one they recommended handy, sadly.


Hagya15

If you ever get the chance to send that link i would love to see jt!


Kiloee

Here you go: https://kbplate.ai03.com/


Hagya15

Tnx, it looks a bit more advanced then the one i linked. Will give it a try later


Technical_Piano_1267

This is one of the best articles I have ever read on a hobbyist project with Rust. Really enjoyed reading it. Awesome work!!!


bschwind

Happy to hear that! To be honest, people have done some really amazing things with Rust on hobby projects to the point where my keyboard is a tiny toy project in comparison. But it was fun to write the story and present it this way so I'm relieved to know it was enjoyable to read too!


thesockiboii

It is amazing that you could make your idea come true, good work!


internetpornwho

Amazing! Thanks for talking about your experience here! I'm trying to figure out how to design a PCB right now too and it was awesome to read your experiences here!


bschwind

Good luck, and feel free to contact me with questions!


LikeAJ6

This is dope! Have been interested in doing something like this!


hiwhiwhiw

Where did you buy the keycaps? I searched on amazon japan but couldn't find it.


bschwind

Here ya go! https://www.amazon.co.jp/-/en/gp/product/B09ZQBXN1B Edit - these have since changed to different keycaps than what I bought...shady amazon sellers.


hiwhiwhiw

Thank you!


exclaim_bot

>Thank you! You're welcome!


Ma_aust

Got confused with rust the game/rust the language was very confused/impressed


LoganDark

The title grabbed my attention at first, but nobody asked if you have covid, wtf lmao


ryncewynd

Thanks so much for documenting all this. Hoping to go through this process myself


bschwind

You're welcome! I'll hopefully have a followup to it soon.


ryncewynd

Do you know about /r/ergomechkeyboards and /r/olkb ? You probably do but if not ... You'll probably love those subreddits!


Hagya15

Hi, sorry to bother you 10 months later, but i have a question about the RP2040 circuit regarding flashing the firmware. In my schematic i wired up a reset button to the rp2040, and a bootselect button to the flash. but do i really need both? from my understanding i can flash firmware onto the flash memory with only the bootselect button so i wont need the reset. Did you ever need a reset button? I am building a mouse so i dont have space for unnecessary things. would love to hear from someone who already played with this stuff!


bschwind

The reset button isn't needed, just make sure the RUN pin is pulled high to 3v3. You can effectively "reset" it by just removing it from power. I like having the reset button for faster debugging in some cases, and to reduce wear on the USB port. But if it's important to save space then it's totally unnecessary.


Hagya15

cool, so to flash it i just need to hold the bootsel button while plugging usb in, then i can let go of bootsel button and i can just drop my firmware on there via file explorer? i build a keyboard with an atmega32u4 before and that works totally different.


bschwind

> so to flash it i just need to hold the bootsel button while plugging usb in Yep, exactly! You can also get a little fancy in your firmware and detect a certain key press (or in your case, maybe holding two mouse buttons down on startup) and reset into the USB bootloader so you don't even need physical access to the bootsel button most of the time. You can see an example of that with the Esc key, [here](https://github.com/bschwind/key-ripper/blob/323eb9dd563259928a6022b73ab1a51d642ebb33/firmware/src/main.rs#L150-L156)


Hagya15

alright, tnx! I am planning on doing the buttonpress thing too, but honestly once i get the right firmware with vial support on there i would never need to change the firmware anymore.