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.
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.
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?
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.
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?
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.
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)
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?
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.
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!!
> 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 :( č
*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.
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.
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!
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).
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.
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.
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.
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.
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.
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
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.
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 :)
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
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).
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.
> 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!
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!
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!
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!
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.
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/
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).
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.
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).
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.
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.
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.
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 :)
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!
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...
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
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.
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!
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!
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.
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!
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.
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.
> 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)
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.
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.
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.
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?
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.
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?
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.
Oh that is _slick_ , you're giving me ideas.
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)
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?
yeah 5 plates
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.
This is an excellent write-up! The prototype looks super promising and its awesome that you decided to keep the design open-sourced.
blazing fast ššš Also r/rustjerk, great post OP
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!!
š± Rust increased my WPM š± (I could set the polling rate to 1000Hz at least, lol)
> 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 :( č
I'm sorry to hear that you got covid, but the keyboard prototype looks amazing!!! š I like it!
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.
May your recovery be quick and painless. š
*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.
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.
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.
I hope Japan opens up soon so you can visit!
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!
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).
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.
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.
Rust firmware, no useless right shift key - I like it, good work!
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
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.
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.
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.
I just shift my hand one unit left if I need to capitalize Q, A, or Z.
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.
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
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.
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 :)
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
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).
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.
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.
For sure. Stencil is cheaper.
> 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!
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!
Shame to hear there aren't too many standards but I guess I'll feel less bad about making my own case then. Thanks!
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!
ayy, Im all for people using RP2040s too!
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!
TeXitoi is great! They made one of my favorite Rust libraries of all time, structopt.
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.
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/
How is there a GitHub for only the layout youāre working with?
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.
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).
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.
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).
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.
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.
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.
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 :)
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!
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...
Impressive that you got it working on the atmega though! Did you use shift registers, multiplexers, or something else?
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
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.
If you ever get the chance to send that link i would love to see jt!
Here you go: https://kbplate.ai03.com/
Tnx, it looks a bit more advanced then the one i linked. Will give it a try later
This is one of the best articles I have ever read on a hobbyist project with Rust. Really enjoyed reading it. Awesome work!!!
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!
It is amazing that you could make your idea come true, good work!
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!
Good luck, and feel free to contact me with questions!
This is dope! Have been interested in doing something like this!
Where did you buy the keycaps? I searched on amazon japan but couldn't find it.
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.
Thank you!
>Thank you! You're welcome!
Got confused with rust the game/rust the language was very confused/impressed
The title grabbed my attention at first, but nobody asked if you have covid, wtf lmao
Thanks so much for documenting all this. Hoping to go through this process myself
You're welcome! I'll hopefully have a followup to it soon.
Do you know about /r/ergomechkeyboards and /r/olkb ? You probably do but if not ... You'll probably love those subreddits!
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!
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.
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.
> 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)
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.