pcb_calc_termination
Determine if a PCB net is electrically long and needs termination, then calculate resistor values for series, parallel, or Thevenin schemes based on flight time and rise time.
Instructions
Decide if a net needs termination and size the resistor(s).
Two questions the impedance calc does not answer: is this net
electrically long for its edge rate, and -- if so -- what termination
value? A net stays a lumped wire while its one-way flight time is under
length_fraction of the rise time (Johnson & Graham's 1/6 rule by
default; pass 1/2 for the looser convention); past the critical length
the reflection arrives during the edge and the net must be matched to
z0_ohms. Pure math, no Altium. Propagation speed uses the effective
dielectric constant (Er for stripline; reduced for microstrip, Hammerstad
when width_mils/dielectric_height_mils are given, else the
0.475*Er+0.67 approximation).
Args:
length_mils: Routed (or estimated) net length.
rise_time_ns: Signal edge rate (the driver's 10-90 % rise time).
z0_ohms: Line characteristic impedance (size it with
pcb_calc_impedance; default 50).
dielectric_constant: er (default 4.2 FR-4).
geometry: microstrip or stripline.
driver_impedance_ohms: Driver output impedance, subtracted for the
series value (Rs = Z0 - Rdriver).
vcc: Supply rail; enables the Thevenin split option when > 0.
width_mils, dielectric_height_mils: Microstrip geometry for the
Hammerstad Er_eff (optional; falls back to the approximation).
length_fraction: Electrically-long threshold (default 1/6).
multi_load: True for a bus / multi-receiver net (recommends
far-end Thevenin/parallel instead of source series).
Returns:
{"ok": True, "needs_termination", "recommended", "critical_length_mils", "flight_time_ns", "options": {...}, "summary"} -- options carries
the ideal and nearest-E24 resistor values (and the AC cap) for every
applicable scheme.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| er | No | ||
| z0 | No | ||
| vcc | No | ||
| z0_ohms | No | ||
| geometry | No | microstrip | |
| multi_load | No | ||
| width_mils | No | ||
| height_mils | No | ||
| length_mils | Yes | ||
| rise_time_ns | Yes | ||
| length_fraction | No | ||
| driver_impedance | No | ||
| dielectric_constant | No | ||
| driver_impedance_ohms | No | ||
| dielectric_height_mils | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||