Skip to content

Instantly share code, notes, and snippets.

@Sleepdealr
Last active November 12, 2024 20:23
Show Gist options
  • Save Sleepdealr/ab05f5edb82eae9e0393f4d63da55adf to your computer and use it in GitHub Desktop.
Save Sleepdealr/ab05f5edb82eae9e0393f4d63da55adf to your computer and use it in GitHub Desktop.

Best practices for PCB Design

Schematics

  • Power symbols should point upwards
  • Ground symbols should point downards
  • Sections should be labeled
  • Nets should generally not cross
  • Nets should be labeled
    • Either global or regular labels are fine
  • Signals flow left to right
  • Labels and values should be visible
  • Footprints should not show up in schematic
  • Differential pairs should be labeled and used as such
  • Use the default symbols and footprints when possible
  • Read the datasheet first
  • Pick out parts for your BOM as you go, and be sure to read their datasheets

Specific tips for keyboards

  • Unless it's really small, put the matrix in a sub-sheet (Press s)
  • With wider boards, consider using a duplex matrix

PCBs

  • Route using busses
  • Use the same thickness of traces for specific things and switch to thicker traces for high current connections
    • Trace width calculator
    • There is one included within KiCad as well
    • It is recommended to use 15-20 mils for power, and 6-10 for traces
  • Place a via for ground on every decoupling capacitor
  • Single-sided assembly will make your board easier and cheaper to assemble
  • Route traces in order of their sensitivity
    • Crystal -> USB -> Power -> Matrix/other
  • Keep your differential pairs length matched
  • Vias in pads should be avoided, especially when getting a pcb assembled. The hole allows solder to flow into and might not leave enough for the part to be correctly soldered
  • Place directionally sensitive parts in the same direction, such as diodes or polarized caps
    • The factory might get confused and misrotate a component
  • Rotate parts and switch GPIO pins around to make routing neater and simpler
  • Consider properly connecting USB shield to ground (Proper ESD protection !!!!)
  • 90 degree bends will work fine, 45 degree bends will most likely look better though

Extra tips and resources

Specific tips for keyboards

  • Try to route columns on the top layer, and rows on the bottom layer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment