Heya,

I saw someone else post their KiCAD design here for review. Now I would like to ask what improvements could be done with mine. I read a lot of documentation and followed many a YT tutorial the past two weeks and I am by no means experienced with PCBs or even many aspects of microelectronics aside from PC building.

I know that the data line from the USB C connector could wind up being a source of trouble because of the lengths. Is there anything here I could do?

I can only upload single images for posts, so I’ll try putting another one in the comments that shows the generalized layout of the right keyboard.

Peace and love

  • FlatFootFox@lemmy.world
    link
    fedilink
    arrow-up
    7
    ·
    edit-2
    1 day ago

    I’m running out the door, so sorry for keeping this a little terse. Just wanted to throw out some things for you to potentially look into with regards to your USB-C port in case you were about to send this PCB off for fabbing.

    1 - Consider including an ESD Protection chip. It’s a small IC which you pass your data lines through. It can help protect your microcontroller in case there’s some static electricity in the cable you’re plugging in.

    2 - There’s a variety of different detection mechanisms and handshakes in USB-C to identify the amount of power a USB-C device supports. Adding a pair of 5.1K resistors to the CC1 and CC2 pins on your USB-C port will definitively tell the device on the other end that your keyboard is a simple USB 2 device and should get a nice chill 5V. Some devices will default to providing 5V is CC1 and CC2 are left floating, but others are more picky. Adding the two 5.1K resistors will help make sure you don’t run into any trouble with a USB-C to USB-C cable.

    3 - I’m less confident on the specifics of this one, so maybe do a bit of research yourself. Most of the USB-C implementations I’ve seen on keyboards tie the redundant pins on the USB-C port together. I believe some of these are only connected when the cable’s face up, and others are only connected when the cable’s face down. Routing them together on your board will make sure you don’t run into any trouble with cheap USB-C to USB-A cables.

    Here’s a quick example of those three items in action. (Ignore the weird vias and disconnected ground nets. I deleted the fill to make it easier to read.)

    Sorry to post and run. Hope that helps!

    • silverneedle@lemmy.caOP
      link
      fedilink
      arrow-up
      3
      ·
      1 day ago

      Cheers! Much obliged. Will definitely be adding ESD protection.

      I based the USB power circuitry on a reference that assumes Micro-USB and I know that USB-C is really different when it comes to power. I’ll see that I put a resistor there, as you did.

      The point about connecting up the redundant pins is also an interesting one, think I need to look into the PDF for the specific part I’m using to know what extra work is necessary, if it is necessary. 👍