RobotGuide

Hardware & electrical · topic E14 · 25 hours

Differential signaling & signal integrity

The foundation of every high-speed interface: USB, CAN, Ethernet, and MIPI all share the same set of principles for «how two wires carry 0s and 1s». Without this layer, when you hit «occasional frame drops» or «fails once the cable gets longer», all you can do is swap cables and hope.

Core stage · Hardcore
System software · Aware Embedded & controls · Proficient

Tools
Tools

What to learn

  • Single-ended vs differential: common-mode noise cancels in the subtraction; what CMRR really means and how it depends on frequency
  • Level families compared: TTL / CMOS (3.3 V, 5 V), RS-232 (±12 V), RS-485 (±1.5 V differential), LVDS (350 mV swing)
  • Impedance and termination: where 50 Ω single-ended / 100 Ω differential come from; the trade-offs between source-series and end-parallel termination
  • Reflections and ringing: the relationship between rise time and trace length, and how to estimate the critical length
  • Why CAN puts 120 Ω at each end: they parallel into 60 Ω to match the twisted pair; what you see with only one end terminated
  • Ground return: a signal always has a return path; how ground loops form, why shield ground at one end only, and the trade-off between ground planes and star grounding
  • Eye diagrams: the opening is your remaining margin; how much comes from jitter, noise, and ISI respectively
  • Be able to compute: what bandwidth 480 Mbps needs (BW ≈ 0.35 / t_r); how much margin a 10 m twisted pair has left at 1 Mbps

The lesson · plain words

«A wire is a wire — connect it and it works.» At low speeds that was true. But once signals get fast, every wire becomes a transmission line: wherever impedance is mismatched you get reflections, and reflections superimposed on the original signal become ringing, overshoot, and occasional bit errors. This page gives you the language that turns «occasional frame drops» into a computable problem.

When you must treat a wire as a transmission line

Rule of thumb: once the trace length exceeds 1/6 of the distance the signal's rising edge travels in the wire, you must treat it as a transmission line. Quick estimate: a signal with t_r = 1 ns has a 1/6 wavelength of about 2.5 cm — so a 3 cm trace already counts as a transmission line. It has nothing to do with the interface's bit rate; it is all about the edge.

A transmission line has exactly one core number: characteristic impedance. Trace width, dielectric thickness, and dielectric constant together decide whether it is 50 Ω or something else. At every impedance mismatch (connectors, vias, width changes, the far end) a reflection occurs: part of the energy bounces back toward the source and superimposes on the original signal.

Interactive figure · drag it and see

What this figure shows: a transmission-line simulation with a trace-length slider — a terminated 50 Ω line whose first arrival is the final clean value versus an unterminated line that bounces back and forth, each step being a reflection, with overshoot and ringing visible on the scope-style plot; a toggle switches between terminated and unterminated. Takeaway: reflections are not magic — energy rebounds at every impedance step, and termination is simply absorbing it; overshoot cooks input stages and ringing makes bit errors, and one look on the scope tells you which you have.

Termination: kill the reflection at the source or at the end

Two routes: source-series (put a small resistor in series with the driver output so the source impedance ≈ line impedance — the reflection gets absorbed when it returns to the source) and end-parallel (hang a resistor to ground at the receiver equal to the line impedance — the reflection never happens). CAN's 120 Ω at each end is a variant of parallel termination: one at each end, so the whole bus looks like 60 Ω.

Symptom checklist: termination on only one end → occasional errored frames, collapse under load; a visible staircase (stepwise climb) at the far end on the scope → source reflection; overshoot and ringing → missing termination or a discontinuous ground. Read the waveform first to classify the reflection, then decide which termination to add.

Differential: one subtraction kills common-mode noise

The two wires of a differential pair carry equal and opposite signals, and the receiver subtracts: the signal doubles, while common-mode noise cancels to zero. That is what CMRR (common-mode rejection ratio) means. But note it is frequency-dependent: at high frequency, when the two wires are asymmetric (unequal lengths, an incomplete reference ground plane), the noise cancellation degrades.

Differential does not mean ground stops mattering: the return current still flows through the reference plane, and a broken ground plane still breaks the link. Twisting matters because it makes the two wires alternately experience the same external interference — averaging away the possibility of «unequal».

You only understand it if you can compute: bandwidth and margin

Bandwidth rule of thumb: BW ≈ 0.35 / t_r. To carry 480 Mbps (USB 2.0 high-speed), the edges must be fast enough, corresponding to a bandwidth of several hundred MHz — which is why USB cables cannot just be extended arbitrarily. A 10 m twisted pair has plenty of margin at 1 Mbps, but at 480 Mbps it fails under the combined hit of attenuation and reflection.

The field algorithm for CAN: at 1 Mbps over 40 m, the total node capacitance slows the edges. Worst-case bit-time margin = nominal bit time − (edge time + transceiver delay + cable propagation delay). If the margin comes out below 30%, drop the speed; and if you lose one termination resistor, the reflected ringing eats the little margin you had — fix termination first, then talk about slowing down.

Three questions — do you really get it?

1. A staircase-like stepwise climb appears at the far end of the line. What is the most likely cause?

  • AThe line is too long
  • BReflections superimposed from a source-end impedance mismatch
  • CNot enough voltage
Show answer

B. The staircase = the incident and reflected waves arriving at different times and adding up. A source-series resistor absorbs the reflection.

2. Why does a differential signal still need a complete ground plane?

  • AJust a matter of habit
  • BTo shield against static electricity
  • CThe return path still goes through the reference plane; a discontinuous ground destroys the differential symmetry
Show answer

C. Differential cancellation removes «interference common to both wires»; a broken return path injects «unequal between the two wires» interference, which CMRR cannot stop.

3. CAN has 120 Ω at each end. What is the effective termination of the whole bus?

  • A240 Ω
  • B120 Ω
  • C60 Ω
Show answer

C. The two ends are in parallel: 120∥120 = 60 Ω, matching the twisted pair's characteristic impedance.

Keep going deeper

Links without a marker stay on this site; the rest point to the Chinese edition until its translation batch lands.

How it fails in the field

  • Believing «differential means ground does not matter»: the return still flows through ground, and a discontinuous ground still breaks the link
  • Terminating only one end: reflections cause occasional errored frames, and the link collapses once load rises
  • Measuring a differential signal with a multimeter: you see an average, not a waveform
  • «Solving» it by just lowering the bit rate: this masks the root cause of impedance mismatch, and it bites you again in the next scenario

You have learned enough when

Given a CAN scenario of «1 Mbps, 40 m, 32 nodes», you can compute the worst-case bit-time margin, decide whether to drop to 500 kbps, and state how much of the impact comes from the termination resistors versus the cable capacitance; you can also explain why a USB cable of the same length fails at 480 Mbps.

The Chinese edition carries the full topic page for Differential signaling & signal integrity, including the complete outline, depth requirements per career track, and further derivations: robotguide.dev/k/E14/.