USB Differential Pair Routing on a PCB

USB is the interface most engineers meet first and one of the easiest to get subtly wrong. The pair looks like any other differential route, the data rate on the label is modest by modern standards, and the connector is often placed by mechanical constraints before the electrical design begins. That combination produces boards where the link works on the bench and drops out when a cheap cable is fitted, or where a device passes enumeration and fails at high speed.

What Makes USB Different from an Ordinary Bus

USB carries power and data on the same connector and negotiates its speed over the link itself. It also supports hot plugging, which means the differential pair can be exposed to electrostatic discharge from a user who touches the connector shell or the pins. Those three facts define the routing requirements: controlled impedance for the pair, a robust ground reference, and protection that survives a discharge event without degrading the signal.

The pair is also expected to work with a cable of unknown quality. A design that just meets the specification on the board may fail with a long, poorly shielded cable attached, which is why designers aim for margin rather than the minimum requirement.

Impedance Target and Stackup Choice

USB specifies a differential impedance target, typically ninety ohms, with a tolerance that the link can absorb. Hitting it requires the stackup and the trace geometry to be chosen together: conductor width, spacing between the pair and the distance to the reference plane. The differential value is what the specification quotes, but the single ended impedance of each conductor also matters, because asymmetry converts part of the signal into common mode energy that radiates.

Choose the layer first and the geometry second. A pair routed on an outer layer with a solid reference beneath is easy to control, while the same pair routed across a plane boundary is not. Our notes on impedance tolerance explain how the fabricated stackup affects the achievable value and why the measurement condition has to be agreed in advance.

USB differential pair routed to a connector on a PCB

Length Matching Inside the Pair

The two conductors of a USB differential pair should be the same length, and any difference should be small enough that the skew it creates stays well inside the timing budget. In practice this means keeping the pair symmetric through every bend, avoiding the temptation to make one trace take a shortcut around an obstacle and compensating only at the very end.

Where compensation is needed, place the extra length as close as possible to where the mismatch occurred, and use smooth, gradual serpentine sections rather than tight zigzags. Tight turns create their own impedance discontinuity and couple into the adjacent turn of the same serpentine, which undermines the purpose of the matching. Matching also needs to hold across layer transitions, since a via adds a small delay to whichever conductor passes through it.

Ground Reference and Return Path

The pair needs a continuous reference plane beneath it along the whole route. A gap in that plane forces the return current to detour, which raises common mode noise and can turn the link into a radiator. Keep the plane solid under the connector, under the protection devices and under the transceiver, and avoid routing the pair across a split even when the geometry would be convenient.

Where a layer transition is unavoidable, place a ground via close to the pair so the return current has somewhere to go. Our description of microstrip and stripline routing explains how the return path behaves in each structure, and why the reference for a buried pair is usually easier to keep continuous than for one on the surface.

<img src="https://www.gopcba.com/wp-content/uploads/2023/05/pierre-chatel-innocenti-Lk-nu_hX6ms-unsplash.jpg" alt="ESD protection diode placed next to a USB connector footprint” />

ESD Protection Placement

Protection belongs at the connector, not at the transceiver. A discharge event arrives at the pins and has to be diverted before it travels along the board, so the device should sit within a few millimetres of the connector with a short, wide ground return. Placing it further away leaves a length of exposed trace that will carry the transient into the rest of the design.

Choose a protection device with low capacitance, because a large junction capacitance across the pair degrades the signal at the data rate the link has to support. The ground connection of the protection device deserves as much attention as the signal connections: a long thin trace to ground defeats the purpose of a fast clamp. The principles behind that grounding are covered in our notes on EMI suppression design principles.

Connector, Cable and Shield Handling

The connector is part of the transmission line, and its pinout usually forces the pair to approach from a specific direction. Route the pair into the connector symmetrically, keep the stubs to the pins as short as the mechanical design allows, and avoid placing vias immediately at the connector if a surface route is possible. Where the shell is grounded, connect it to the board ground with multiple points rather than a single stitch.

Cable quality is outside the designer’s control, which is another reason to build margin into the board. A pair that leaves the connector with clean impedance and a solid reference gives the cable the best chance of working, and gives the test engineer a clear answer when a link turns out to be marginal.

Routing the Power and Detect Pins

Power and ground pins are not an afterthought. The supply pair should be wide enough for the current the port can draw, and the return should be routed with the same care as the data pair. On a battery powered product, a voltage drop along a thin supply trace can push the port out of specification when a device charges from it.

Detect and configuration pins are slow, but they are often routed near the pair. Keep them from running parallel to the differential route for long distances, and terminate them as the specification requires. Where a configuration pin selects a mode, a marginal level caused by coupling or a long stub can put the port into the wrong mode entirely.

FAQ

Do I need controlled impedance for USB 2.0? The specification defines a target impedance and the link will tolerate some deviation, but controlled impedance is the reliable way to meet it. On a short route inside a small product the deviation may be tolerable; on a longer route, or at higher data rates, it becomes the difference between a link that works and one that does not.

How far from the connector should the ESD device be? As close as the layout allows, ideally within a few millimetres, with a wide and short connection to the ground plane. Every millimetre between the connector and the clamp is a length of trace that will carry the discharge into the board before it is diverted.

Can I route a USB pair across a plane split if there is no alternative? It is better to change the floorplan than to cross a split. Where it truly cannot be avoided, provide a stitching capacitor or a ground bridge across the split close to the crossing point so the return current has a short path, and accept that the link will have less margin than a properly referenced route.

Leave A Comment