Table of Contents:
  1. General Routing
  2. Power
  3. USB
  4. Clock Source
  5. Miscellaneous
  1. General Routing
    1. Have a ground fill
      • [2023-07-31] technically not needed, but you should know why a ground fill has problems, and why it's probably still better than wiring ground. Opinions within. If you've got better facts just tell me.
      • "badly filled ground planes can cause floating islands, which causes ground to be a different reference different places (ground loops)", "then check that in DRC"
      • "noisy ground near wires and lots of ground can mean lots of places for inductance", "ok. unfortunately this literally does not matter. this inductance is a fart in a wind tunnel of electrons. At such slow speeds and massive voltages, you are NOT crashing a circuit over ground plane inductance."
      • a ground fill helps USB because they're supposed to run near ground. ideally below but alternatively beside. Mistakes that require extra knowledge don't get made when you use a ground fill
    2. ([2023-07-31] this is purely aesthetic everywhere but around USB) Have no islands or large holes in the ground fill
    3. Use stitching vias when a trace jumps layers
    4. Do not make traces turn 90° or more at a corner. (Hard mode, 45°)
    5. Do not route traces directly underneath and parallel to an existing trace. (Respect ground return paths)
    6. Use stitching vias when a trace jumps a break in the ground fill on either side of the board
    7. Do not use a via inside a solder pad
    8. Do not route traces directly underneath a package. Scratching may cause a short
    9. Use DRC rules your manufacturer can actually fabricate
    10. Use 0.25mm (Hard mode, 0.3mm) or wider traces to route power
    11. Bottom line, if your routing doesn't look beautiful, there's room for improvement
  2. Power
    1. See fig. 1
    2. Use a fuse which can trip multiple times without needing replacement
    3. Use decoupling capacitors
    4. Route power in a ring around your component, dropping through decoupling caps to each power pin
    5. Keep decoupling capacitors within ~3mm of the power pin they decouple.
    6. Route power at a lower precedence than signals, as it's less important to isolate power from via noise
    7. Do not route power underneath the clock source
    8. Use stitching vias at the ground side of every decoupling capacitor you can
  3. USB
    1. DO NOT ROUTE TRACES UNDERNEATH THE USB CONNECTOR. A few traces may need to break this rule, but the USB connector is a very high use part of the PCB and is the MOST likely component to scratch the PCB with the shock of repeated plugging and unplugging.
    2. Use terminating resistors, if required by the chip.
    3. Keep terminating resistors within ~4mm of the microchip they connect to USB data
    4. USB traces should be differentially paired
    5. USB traces should have 100Ω of edge coupled microstrip differential impedance
    6. Connect shield to a metal case, OR connect shield to ground, optionally through an RC circuit or ferrite bead. DO NOT connect shield to the case and ground to shield. This makes the case a shock risk
      • [2023-07-31] This bullet creates a lot of confusion, here's some more info: [source]
      • "As a result, for a pure digital USB device, without analog or mixed-signal circuits, without a metal chassis, connecting the shield directly to the circuit ground, while violating all of the rules, in actually a suitable compromise for many applications with justification. And indeed, many USB dongles are designed like that. When you don't have a choice, a straight connection may be the only compromise here."
      • "The most important flaw is that if the shield and circuit ground are isolated from each other via capacitors or ferrite, during a ESD strike, a large potential difference is created between the shield and circuit ground, enabling a ESD strike across them, and causing the device to fail ESD compliance tests. In Williams' anecdotal observations, floating shield, RC and ferrite bead solutions performs poorly under ESD strikes, and is a common cause of failure of ESD compliance tests. After bonding the shield directly onto the circuit ground, these devices would pass ESD tests immediately. Whenever the topic of splitting USB shield and circuit ground is brought up, he would always say, "don't do it, it simply cannot pass ESD tests.""
      • However, in theory these are not true, and the proper way to make a shield is by making a faraday cage. Henry Ott is summarized in the following quote from the same stackexchange.
        • Perfect Shield Connection To summarize, if you're connecting two high-speed digital devices together (with no analog or mixed-signal circuit, and both with metal chassis), according to Ott, theoretically, the purest way to do that would be:
          1. Mount the connector onto the chassis, creating a solid shield-to-chassis termination. Ideally, the connector should be mounted directly onto the chassis first. For many coaxial and circular connectors, they can be screwed onto the chassis directly. If the connectors are mounted onto the circuit board, use metal I/O cover, EMI gaskets, grounding fingers, or other means to create a solid connection between the metal shell of the connector and the chassis. If the above is not possible, the I/O ground plane to chassis connection serves as the final fallback. At the very least, multiple metal screw standoff is used.
          2. Create a seperate I/O area and I/O ground plane on the circuit board, allowing the chassis-to-circuit ground connection to be made with minimum common-mode current flow. The I/O area of the PCB also uses its own ground plane, largely but not fully isolated from the main circuit ground plane. Most copper between the two regions are removed, only a small bridge is used to connect both planes, allowing high-frequency signals to flow on top of the bridge without crossing a slot in the plane, while providing a degree of isolation between the circuit ground of chassis ground.
          3. Connect other non-shield conductors (such as power, signal, power ground, signal ground) to the circuit, as wires or traces.
          This complete my summary of Henry Ott's Electromagnetic Compatibility Engineering, the following sections are my own opinions.
        • A pure faraday cage protects in entirety the components within. This is not possible in our reality as keyboardists or peripheral manufacturers.
        • The right answer is usually not 3F. The right answer is usually connecting shield to ground with a nice power sized trace at only one location right near the USB receptacle.
    7. Do not run signals parallel to USB data traces. If you must cross the USB data lines, do so at a perpendicular angle
    8. Route USB data lines at the highest precedence
    9. Do not put vias in or between USB data lines
    10. Do not put components between USB data lines
    11. keep USB data lines direct and short
    12. surround USB data lines in uninterupted continuous ground
    13. Avoid routing USB data lines over a break in the ground plane
    14. Keep USB traces short and direct
    15. Use pulldown resistors on CC lines
    16. Use USB-C. There's no longer any good reason to use anything else
  4. Clock Source (Crystal/Resonator/Clock/Oscillator)
    1. Do not route signal, USB, or power traces near or under the clock source
    2. Give the clock source an isolated island of quiet ground plane on the component side. Stitch this to the larger ground plane with stitching vias
    3. ([2023-07-31] This is also technically not true. just keep the traces short. for some forms of timekeeping components this isn't true and the traces do need to be the same length. always using this rule avoids you ever being wrong). Keep clock source signal traces equilength
    4. Do not use vias in the clock source traces
    5. Route the clock source with the highest precedence
    6. If the packaging of a microchip causes you you fight precedence between USB and clock source traces, run and do not stop running
    7. Keep the clock source very close to the microchip it supplies
  5. Miscellaneous
    1. Always expose debugging headers. You never know when you may want them
    2. You will fail at least 3 times. That's ok
    3. Double check everything with a sharp fresh eye in the morning before sending your design to a manufacturer. They will not catch your mistakes for you


For additions, subtractions, and edits, contact suggestions@libsharedobject.so
TOP HOME