I as an electronic technician who created 100+ own pcb prototypes (but not on KiCad) can say that this was so much fun to watch and I must say beginner friendly also. And you have explained almost everything in a very understandable way. Amazing job my friend! Subscribed. Keep the great work Edit: Don't leave so long gaps between your videos, upload more often :)
Couple of remarks 1. Kicad is now at version 8, you used ancient version 6.0. In 8 you do not need to export any netlist manually, it is being automatically tracked 2. USB-C shield should be connected to GND, not left floating, usb-c cables will connect GND to shield anyways (not sure if all of them) 3. Kicad has at least 3 plugins that can automatically generate gerbers to specific manufacturers, I personally use Fabrication Toolkit 4. For repeated layout like you have there is a plugin named "Replicate layout" which can make sure that diodes are perfectly aligned to every key (as long as you keep in hierarchical sheet)
Connecting shield to ground is not necessary on a keyboard it would introduce unnecessary noise to the electronics and if you wanted to filter the noise out it would cost more in components. All desktop computers already handle the shield connection so you don’t need to worry about it in this instance. Pretty much all drains are connected to the shield in these cables anyway though so none of it even matters.
@@funy0n583 It will not introduce any noise because shield is connected to ground via cable anyways and it will be connected to PC ground one way or another. Without shield however, ground is only connected via internal cable. Search for "Universal Serial Bus Type-C Cable and Connector Specification". You will find following text: Shield and GND grounds shall be connected within the USB Type-C plug on both ends of the cable assembly. Now check your devices, i can guarantee all of them have shield connected to GND on PCB.
I have to agree. The level of detail esp. related to the schematic design is either not slow enough or too detailed to make it approachable for most viewers. I understand that you warned that the viewers should have basic understanding of electronics but it seems to me a deeper knowledge about circuit design is necessary here. Now, how could this be improved? Most keyboard enthusiasts that are brave enough to step beyond just buying a kit and assemble it, I believe still do not have enough knowledge about circuit design. However there are some tools that can help, but explanation is still limited. This is I think where you can fill the gap. For schematics, there is ergogen, and for components there are premade boards (eg. pro micro). Even with those things, I found that there is limited information to eg. to which pin should I connect the rows, columns, indicator leds, oled screen. Then how to assemble them (eg. how to make the IC board hot swappable, not just the key switch). Then after the components are all assembled in the pcb or handwired, what to do? How do we flash the qmk thing? etc I do really appreciate this video series though, I think you put a lot of effort there. 👍🏼
@@CasualCodersOfficial I watched the video in expectation to see more about the micro-controller part as I lack knowledge around Atmega as HID. Making a PCB as you showed required quite some level of skills I would say - I can do it but I would not recommend this to anyone with only basic levels. Using Kicad and working with SMT parts looks too easy and beginners might tricked into buying a lot of stuff but ending up with an unfinished project. Many of us know how easy it is to screw up a footprint of a part and end up with a work around (in best case). Either the video should be long multi-part series with many hours of beginners friendly explanation of how to design PCB's and pick electronic parts (I think you don't aim for this) or the video should assume you already got these skills and express this assumption to the viewer. I hope you do not stop making content and really hope for part 3+ to see how the projects continues and if the boards gets a case?
@@posi_de Everything above is super helpful. Regarding HID, I never touched that, as it's all software side and handled by the QMK Devs. I do believe I touched on the fact that this isn't something I'd recommend to a beginner in part 1: ua-cam.com/video/IJxuzyO9b8M/v-deo.html Though that was more than a year ago now.When I initially started this, I wasn't expecting it to take as long as it did. This video series definitely falls into the category pointed out by @violetbob694 where it's more supplementary and hopefully useful to provide a direction to refine further searches. I don't have the time nor the ability to create the needed 10 hour course to adequately explain every single aspect of board layout and design. I can try to add some further references to the description if that'd be beneficial though.
Great guide, love that you stepped through and explained key combinations as you went through the whole process, bookmarking this for whenever I take the kicad dive from other paid softwares. Something you skipped over is setting trace widths, and you're using class defaults(though you did talk about it for the diff pairs). I would thicken all traces to switches, there's no reason to make them thin like high-speed data paths. If anything that little bit of extra trace capacitance, could help mitigate some switch debounce on occasion, but mostly for robustness. Also adding 'teardrops' features onto on all PTH and vias is a good thing to do as well, helps gradient the mechanical stress of hitting keys into a larger area so traces are less prone to hairline cracks developing right beside vias and large pad interconnects.
I think beyond the atmega328, stm32s are cheaper and easier to work with. I think you should also mention JLCPCBs standard parts library which which is LCSC parts but includes all the capacitors and resistors, so someone can possibly get all surface mount components assembled for very cheap. STM32F103C8T6 with some parallel in serial out shift registers I think is the best option as compared to getting a microcontroller with a GPIO pin per button. You can also configure the shift registers to clock and send data on interrupts and use hardly any of the processing time, while still getting update rates >200hz. Nicely made video though.
I tend to agree. I quite like ST's microcontrollers. Though, I'll almost always spring for an ESP32 instead. Unless I care about my power draw of course. I wish they were more power efficient. Fair point regarding LCSC and JLC for assembly. Does QMK Support a shift register based layout? Seems like a major over-complication when most people I've seen tend to be making smaller ~75% boards. I believe a standard switch matrix should fix the GPIO Issue in nearly all of those cases.
What about things like holes in the PCB for mounting hardware? You are probably going to want to have screws to hold the board in place and to hold the top and bottom shell together.
Waiting For next Part ... I also had a doubt, doing Btech in ECE (Electronics and Communication) is enough for this Venture ? or do we also need MTech ? and if yes, MTech in what subject ? Pls Help, I will Forever be Grateful !
I think the answer to this is yes, provided you're willing to learn and make some mistakes. PCB Design is one of those things that spans several disciplines. It covers electrical engineering with ohms law and electromagnetic. It covers mechanical engineering as you need to understand tolerances and how components come together in the real world. Depending on the project, it could branch into computer science and require the ability to write firmware for microcontrollers, etc. I think much of this can be picked up for free from the internet, but to really understand it (in my opinion) requires you actually do it. Use a 3D printer to print and build stuff, design and fabricate some PCBs to learn the process. Getting hands on is where it might have some cost, but it's certainly more accessible now than it was even a decade ago. Hope this helps!
I like the idea. it'd be a great [project to add to my DIY list as I am good at PCBs and most of the work is done by you. Now I need to see it working.
Great video again! Can you recommend any resources for larger switch matrix layouts? I want to make a full sized 109 key keyboard, plus some macro keys, but all the resources I've seen so far are for smaller 70%/80% boards. There's probably some clever way to handle the matrix where matrix columns cover multiple columns of keys of something, but without guidance I'll be reinventing the wheel.
When I made my keyboard (128 keys), I solved this issue with the AT90USB1286. It's the biggest AVR MCU Atmel makes. It's got 48 GPIOs and runs at 5v. Alternatively, you could make use of one of the high pin count STM32s like the F103Rx, F103Vx, or F103Zx microcontrollers. Note that these are 3v3 logic and not 5v. Here are the design files for my keyboard. github.com/CasualCodersProjects/Keyboard
@@CasualCodersOfficial ah awesome! So you threw enough IO at the problem to fix it? I'll definitely check out those chips and files. That'll be a great help, thank you
@@buzz1ebee Is the 48 GPIOs of that IC not enough? You might also be able to do something with shift registers, but I fear that may cause significant latency on any keys downstream of it. I was going to ask about the ESP32-S3/S2, but those are only 45 GPIO at most. That said, I'm not 100% certain which of the NRF SoC's you intended to use. I expect the chip with 48 IOs is the BGA one.
I would recommend using the 74HC165D, it’s a parallel in to serial out converter. You can connect it to the input of 8 buttons, and it only needs 3 pins. Since you can run these really fast and they’re stackable you can put two in series to read 16 inputs with three wires. If you’re looking for 109 buttons, you can just use 16 of these with the load and clock pins connected, and one data pin per chip. That way you only need 18 pins to read up to 128 buttons. The code isn’t too bad, just use interrupts to cycle each read and it’s like 50 lines
I unfortunately haven't got a clue about this. I'm just using QMK for this keyboard, so I only wrote a config file and no real code. Take a look at the STM32 HAL documentation for USB. Hopefully that might be able to provide some extra information? ST might have an appnote which provides some additional detail as well.
Route power, pour ground. It provides a reference for all the signals, aids in EMI/EMC, and prevents the board fab from having to etch away all the copper on the prepreg.
I wanted to make my own Arduino with an atmega2560 to be controlled via wifi with the esp32 and I would like to know if the process is the same for both the atmega2560 and the atmega 32u
Digikey's got a nice tutorial that I used when I was first getting started. It is a bit dated now, but it's all generally still aplicable. ua-cam.com/video/vaCVh2SAZY4/v-deo.html
That would be really cool, but I'm afraid it's rather impractical. I lack the design skills to make the body, and the suppliers for mouse sensors have a minimum order quantity of like 10,000.
I've never used eagle, but Eagle is now an autodesk product and costs $680 per year. I won't be using it. In addition, Kicad added some small auto-complete features in release version 7.0.0: www.kicad.org/blog/2023/02/Version-7.0.0-Released
I'd argue that an auto router would give worse results than routing by hand. Especially without loads of routing rules that could take a day or two to do.
Eagle is probably the worst PCB cad software up to date plus it is being discontinued, it will cease to exist in about a year or two, read the autodesk blog post about it. Abandonware.
Nah you tripping on god, KiCAD is much easier to use. Also KiCAD is a very well made software and not bloated like so many others like Altium. Only reason not to use KiCAD is if you need to use cadence and make something much more advanced.
Hi dear sir /madam can you please suggest me micro controller purchase website i need for my old keyboard micro controller here is micro controller number VS11K15A CAN YOY PLEASE TELL ME WHERE I CAN BUY THIS MICRO CONTROLLER 😊
This is actually a custom keyboard! None of that prebuilt rubbish that only requires switches but a whole custom unit. If only manufacturers allowed to create custom pcbs or custom units or that you can select the features and that they assembld it
you lost me at kicad... the workflow in kicad is not intuitive at all, and so overcomplicatd for absolutely no reason, and the dev's in their infinite obstenance have decided that a useful workflow, and UI should never be used.
2025 : making keyboard from scratch part 3
I as an electronic technician who created 100+ own pcb prototypes (but not on KiCad) can say that this was so much fun to watch and I must say beginner friendly also. And you have explained almost everything in a very understandable way. Amazing job my friend! Subscribed. Keep the great work
Edit: Don't leave so long gaps between your videos, upload more often :)
There's a far easier way to get the schematic to the PCB. In the PCB editor, top center, there's a button that says "Update PCB from schematic"
Beat me to it. It's also just F8
Couple of remarks
1. Kicad is now at version 8, you used ancient version 6.0. In 8 you do not need to export any netlist manually, it is being automatically tracked
2. USB-C shield should be connected to GND, not left floating, usb-c cables will connect GND to shield anyways (not sure if all of them)
3. Kicad has at least 3 plugins that can automatically generate gerbers to specific manufacturers, I personally use Fabrication Toolkit
4. For repeated layout like you have there is a plugin named "Replicate layout" which can make sure that diodes are perfectly aligned to every key (as long as you keep in hierarchical sheet)
Connecting shield to ground is not necessary on a keyboard it would introduce unnecessary noise to the electronics and if you wanted to filter the noise out it would cost more in components. All desktop computers already handle the shield connection so you don’t need to worry about it in this instance. Pretty much all drains are connected to the shield in these cables anyway though so none of it even matters.
@@funy0n583 It will not introduce any noise because shield is connected to ground via cable anyways and it will be connected to PC ground one way or another. Without shield however, ground is only connected via internal cable. Search for "Universal Serial Bus Type-C Cable and Connector Specification". You will find following text: Shield and GND grounds shall be connected within the USB Type-C plug on both ends of the cable assembly.
Now check your devices, i can guarantee all of them have shield connected to GND on PCB.
Oh my days, I learned more about kicad than I ever learned about it than other videos
This absolutely makes PCBs seem way easier than i thought they were.
If you understand this video you can make PCBs already and don't need it. And if not - there is far too much stuff NOT covered here...
For my own improvement, what else would you have liked to see explained?
I have to agree. The level of detail esp. related to the schematic design is either not slow enough or too detailed to make it approachable for most viewers. I understand that you warned that the viewers should have basic understanding of electronics but it seems to me a deeper knowledge about circuit design is necessary here.
Now, how could this be improved? Most keyboard enthusiasts that are brave enough to step beyond just buying a kit and assemble it, I believe still do not have enough knowledge about circuit design. However there are some tools that can help, but explanation is still limited. This is I think where you can fill the gap. For schematics, there is ergogen, and for components there are premade boards (eg. pro micro). Even with those things, I found that there is limited information to eg. to which pin should I connect the rows, columns, indicator leds, oled screen. Then how to assemble them (eg. how to make the IC board hot swappable, not just the key switch). Then after the components are all assembled in the pcb or handwired, what to do? How do we flash the qmk thing? etc
I do really appreciate this video series though, I think you put a lot of effort there. 👍🏼
@leonardab5042 totally second this. for me, the video is more supplementary to the knowledge I already know.
@@CasualCodersOfficial I watched the video in expectation to see more about the micro-controller part as I lack knowledge around Atmega as HID. Making a PCB as you showed required quite some level of skills I would say - I can do it but I would not recommend this to anyone with only basic levels. Using Kicad and working with SMT parts looks too easy and beginners might tricked into buying a lot of stuff but ending up with an unfinished project. Many of us know how easy it is to screw up a footprint of a part and end up with a work around (in best case). Either the video should be long multi-part series with many hours of beginners friendly explanation of how to design PCB's and pick electronic parts (I think you don't aim for this) or the video should assume you already got these skills and express this assumption to the viewer. I hope you do not stop making content and really hope for part 3+ to see how the projects continues and if the boards gets a case?
@@posi_de Everything above is super helpful. Regarding HID, I never touched that, as it's all software side and handled by the QMK Devs.
I do believe I touched on the fact that this isn't something I'd recommend to a beginner in part 1: ua-cam.com/video/IJxuzyO9b8M/v-deo.html
Though that was more than a year ago now.When I initially started this, I wasn't expecting it to take as long as it did.
This video series definitely falls into the category pointed out by @violetbob694 where it's more supplementary and hopefully useful to provide a direction to refine further searches. I don't have the time nor the ability to create the needed 10 hour course to adequately explain every single aspect of board layout and design. I can try to add some further references to the description if that'd be beneficial though.
thanks for uploading it....some of us have been waiting for this for a year !!
I've waited a year for this video lol. In the meantime, I made two hand wired keyboards using a RPi Pico as the microcontroller.
Great guide, love that you stepped through and explained key combinations as you went through the whole process, bookmarking this for whenever I take the kicad dive from other paid softwares. Something you skipped over is setting trace widths, and you're using class defaults(though you did talk about it for the diff pairs).
I would thicken all traces to switches, there's no reason to make them thin like high-speed data paths. If anything that little bit of extra trace capacitance, could help mitigate some switch debounce on occasion, but mostly for robustness. Also adding 'teardrops' features onto on all PTH and vias is a good thing to do as well, helps gradient the mechanical stress of hitting keys into a larger area so traces are less prone to hairline cracks developing right beside vias and large pad interconnects.
last time? You mean the vid you uploaded a year ago?
Great video ! I hope to watch part 3 soon !
I hope so too!
Part 2 was released after 1 year, so wait for part 3 at least in 2025 XD
Awesome video! Also, really good kicad skills and tips. Looking forward for the next one.
Thanks! Glad you enjoyed it!
I think beyond the atmega328, stm32s are cheaper and easier to work with. I think you should also mention JLCPCBs standard parts library which which is LCSC parts but includes all the capacitors and resistors, so someone can possibly get all surface mount components assembled for very cheap. STM32F103C8T6 with some parallel in serial out shift registers I think is the best option as compared to getting a microcontroller with a GPIO pin per button. You can also configure the shift registers to clock and send data on interrupts and use hardly any of the processing time, while still getting update rates >200hz. Nicely made video though.
I tend to agree. I quite like ST's microcontrollers. Though, I'll almost always spring for an ESP32 instead. Unless I care about my power draw of course. I wish they were more power efficient.
Fair point regarding LCSC and JLC for assembly.
Does QMK Support a shift register based layout? Seems like a major over-complication when most people I've seen tend to be making smaller ~75% boards. I believe a standard switch matrix should fix the GPIO Issue in nearly all of those cases.
Very good tutorial. Hope to see the part 3 where you explain how to use QMK in order to flash the MCU and finalize the keyboard
What about things like holes in the PCB for mounting hardware? You are probably going to want to have screws to hold the board in place and to hold the top and bottom shell together.
is there a reason why only a ground plane was filled and not one for VBUS and the like?
Waiting For next Part ...
I also had a doubt, doing Btech in ECE (Electronics and Communication) is enough for this Venture ? or do we also need MTech ? and if yes, MTech in what subject ?
Pls Help, I will Forever be Grateful !
I think the answer to this is yes, provided you're willing to learn and make some mistakes. PCB Design is one of those things that spans several disciplines. It covers electrical engineering with ohms law and electromagnetic. It covers mechanical engineering as you need to understand tolerances and how components come together in the real world. Depending on the project, it could branch into computer science and require the ability to write firmware for microcontrollers, etc.
I think much of this can be picked up for free from the internet, but to really understand it (in my opinion) requires you actually do it. Use a 3D printer to print and build stuff, design and fabricate some PCBs to learn the process. Getting hands on is where it might have some cost, but it's certainly more accessible now than it was even a decade ago.
Hope this helps!
@@CasualCodersOfficial Thanks Alot for the Input !
OMG HE IS BACK! EVERYONE! HE IS BACK!
6:22 "perigoso" in Brazil is "dangerous".
WHAT
A
TUTORIAL
19.05mm is exactly 3/4 inches.
I like the idea. it'd be a great [project to add to my DIY list as I am good at PCBs and most of the work is done by you. Now I need to see it working.
Subbed with alerts. Thank you.
Great video again! Can you recommend any resources for larger switch matrix layouts?
I want to make a full sized 109 key keyboard, plus some macro keys, but all the resources I've seen so far are for smaller 70%/80% boards.
There's probably some clever way to handle the matrix where matrix columns cover multiple columns of keys of something, but without guidance I'll be reinventing the wheel.
When I made my keyboard (128 keys), I solved this issue with the AT90USB1286. It's the biggest AVR MCU Atmel makes. It's got 48 GPIOs and runs at 5v. Alternatively, you could make use of one of the high pin count STM32s like the F103Rx, F103Vx, or F103Zx microcontrollers. Note that these are 3v3 logic and not 5v.
Here are the design files for my keyboard.
github.com/CasualCodersProjects/Keyboard
@@CasualCodersOfficial ah awesome! So you threw enough IO at the problem to fix it? I'll definitely check out those chips and files. That'll be a great help, thank you
@@buzz1ebee Is the 48 GPIOs of that IC not enough? You might also be able to do something with shift registers, but I fear that may cause significant latency on any keys downstream of it. I was going to ask about the ESP32-S3/S2, but those are only 45 GPIO at most.
That said, I'm not 100% certain which of the NRF SoC's you intended to use. I expect the chip with 48 IOs is the BGA one.
I would recommend using the 74HC165D, it’s a parallel in to serial out converter. You can connect it to the input of 8 buttons, and it only needs 3 pins. Since you can run these really fast and they’re stackable you can put two in series to read 16 inputs with three wires. If you’re looking for 109 buttons, you can just use 16 of these with the load and clock pins connected, and one data pin per chip. That way you only need 18 pins to read up to 128 buttons. The code isn’t too bad, just use interrupts to cycle each read and it’s like 50 lines
which page of the data sheet has the required components
if you cant look that up yourself i have some bad news to tell you
Part 3?
Can you make a video to explain USB HID Power Devices, preferably using stm32 bluepill?
I unfortunately haven't got a clue about this. I'm just using QMK for this keyboard, so I only wrote a config file and no real code.
Take a look at the STM32 HAL documentation for USB. Hopefully that might be able to provide some extra information? ST might have an appnote which provides some additional detail as well.
Why did you do both layers as gnd?
Route power, pour ground. It provides a reference for all the signals, aids in EMI/EMC, and prevents the board fab from having to etch away all the copper on the prepreg.
Part 3 please
I wanted to make my own Arduino with an atmega2560 to be controlled via wifi with the esp32 and I would like to know if the process is the same for both the atmega2560 and the atmega 32u
Sounds like it'd be fairly similar to me. Follow the datasheets to implement the reference circuit(s) and connect them together however you deem fit.
For next project can you do your own nitendo hardware from scratch? If possible can you do it with risc v chipset?
I wish I were that smart. That's well above my head.
fck bro im stuck with the pcb , we have to wait till 2025 for part 3 😂
Can you do a video about how to build pcb for beginners
Digikey's got a nice tutorial that I used when I was first getting started. It is a bit dated now, but it's all generally still aplicable.
ua-cam.com/video/vaCVh2SAZY4/v-deo.html
You can remove JLC's ordernumber without cost, no need to hide it under the MCU.
That is brand new as of May 2024. Thanks for the information!
what he actually made part 2!
how did you get dark mode lcsc?
I know I already said this, but dark reader.
Can you try to make a mouse that will be awesome
That would be really cool, but I'm afraid it's rather impractical. I lack the design skills to make the body, and the suppliers for mouse sensors have a minimum order quantity of like 10,000.
@@CasualCodersOfficial use an adns9800 or pmw3360, done lots of mice/trackball projects with those, qmk compatible too
Ahh, a fellow fan of KDE.
It's my favorite!
Why not use EasyEDA which sends to JLC without having to deal with any files (It also is web-based)
Eagle is better than kicad. has the autorouting which kicad clone does not have.
I've never used eagle, but Eagle is now an autodesk product and costs $680 per year. I won't be using it.
In addition, Kicad added some small auto-complete features in release version 7.0.0: www.kicad.org/blog/2023/02/Version-7.0.0-Released
I'd argue that an auto router would give worse results than routing by hand. Especially without loads of routing rules that could take a day or two to do.
Eagle is probably the worst PCB cad software up to date plus it is being discontinued, it will cease to exist in about a year or two, read the autodesk blog post about it. Abandonware.
Nah you tripping on god, KiCAD is much easier to use. Also KiCAD is a very well made software and not bloated like so many others like Altium. Only reason not to use KiCAD is if you need to use cadence and make something much more advanced.
Hi dear sir /madam can you please suggest me micro controller purchase website i need for my old keyboard micro controller here is micro controller number VS11K15A CAN YOY PLEASE TELL ME WHERE I CAN BUY THIS MICRO CONTROLLER 😊
This is actually a custom keyboard! None of that prebuilt rubbish that only requires switches but a whole custom unit. If only manufacturers allowed to create custom pcbs or custom units or that you can select the features and that they assembld it
Manufacturers dont allow custom PCBs? What are you smoking? Solder fumes?
you lost me at kicad... the workflow in kicad is not intuitive at all, and so overcomplicatd for absolutely no reason, and the dev's in their infinite obstenance have decided that a useful workflow, and UI should never be used.