Swap Two Coax Cables to Separate Cable Delay From Scope Path Bias

Two oscilloscope channels see the same rising edge from a splitter, but one reports it later. That difference includes the cable and the measurement path behind it. Leave the two paths in place, exchange the cables at both ends and repeat the measurement. The cable contribution changes sign, so two signed measurements can separate it from the fixed path contribution.

This is a proposed bench experiment. The diagram shows the fixture, and the worked traces are synthetic. The worksheet is blank for your measurements.

One SDG1032X generator feeds sum port S or 3 of a Mini-Circuits ZFRSC-2050+ splitter. Output 1 ends at a fixed 50-ohm feed-through and CH1. Output 2 ends at a fixed 50-ohm feed-through and CH3. The long and short cables exchange branches, reversing the order of the synthetic rising edges.
The splitter and both terminations stay fixed. Move both ends of each cable. The synthetic traces show the halfway edge moving between channels when the long cable moves. Full-size PNG · Editable SVG

One edge, two fixed paths

Coaxial cable has a center conductor and a surrounding metal shield. Its characteristic impedance is the voltage-to-current ratio of a wave traveling along it. A matched 50 Ω load at the receiving end absorbs most of that wave and reduces reflections. A feed-through termination passes the center connection through to a high-impedance scope input and places a 50 Ω resistor across center and shield at that end.

PartConnection and job
Siglent SDG1032XOne square output through a short fixed 50 Ω jumper to the splitter sum port S, numbered 3. Leave the second generator output off.
Mini-Circuits ZFRSC-2050+Use the 50 Ω BNC (bayonet-style coax connector) model in case K18. Port 1 stays assigned to CH1 and port 2 to CH3. Both paths are loaded for every capture.
Belden 8259Make a short cable near 1 m and a long one near 4 m from the same cable stock with the same type of 50 Ω BNC plugs. Record measured lengths and mark the cables.
Two Tektronix 011-0049-02Keep one 50 Ω BNC feed-through on each scope socket, CH1 and CH3. Connect the far end of each test cable to its branch's feed-through.
Siglent SDS1104X-EUse the 1 MΩ scope inputs behind the external loads. Enable CH1 and CH3 only. Both are direct coax connections and use 1× display scaling.

The coax shields continue through the connectors to the instrument reference. Keep both instruments on their normal protective earth and use this low-voltage generator fixture by itself. Turn off its output before reconnecting either cable. A plain BNC tee makes two matched 50 Ω loads look like 25 Ω at the junction. The resistive splitter gives the intended fixture a matched input when both outputs are matched and divides the voltage approximately by two.

Set the generator to a 100 kHz, 50% duty square wave, 1.00 V peak-to-peak and +0.50 V offset, displayed for a 50 Ω load. The intended matched input plateaus are roughly 0 and 1 V. With about 6 dB of splitter loss, an idealized output rises by about 0.5 V. Even the 1 V input plateau delivers about 20 mW into 50 Ω, well below the splitter's 0.75 W matched limit. Each Tektronix load is rated for 2 W average. These are setup estimates. Read each channel's actual low and high levels independently.

Capture A, swap to B, then restore A

  1. Keep the generator jumper, splitter, scope sockets and both feed-throughs fixed. In A connect the short cable from port 1 to CH1 and the long cable from port 2 to CH3.
  2. On both channels use direct-current (DC) coupling, the same volts per division, full bandwidth, 1× scaling and identical offset conventions. Disable bandwidth limiting, averaging, peak detect and channel delay corrections. Use normal acquisition with a rising-edge trigger on CH1 near 0.25 V. Start around 100 mV per division and 10 ns per division and position the trigger so both channels have settled low and high regions. Check that the traces fit vertically with no flattened off-screen peaks.
  3. CH1 and CH2 share one analog-to-digital converter, which turns voltage into sample numbers. CH3 and CH4 share the other. CH1 plus CH3 allows up to 1 billion samples per second on each. Read actual sample spacing from the exported time column and retain at most 2 ns per acquired sample. Keep the setting fixed in all captures.
  4. Stop on one acquisition and use the scope's Save/Recall menu to store the two displayed channels together as a CSV file (comma-separated values). Preserve that file. Make a cropped copy around the same single rising edge, with at least five settled samples before both transitions, at least five after both, and at least 21 rows overall. Turn metadata rows into notes and label the actual time and two voltage columns time_s,ch1_v,ch3_v. Keep one common seconds axis. Convert units explicitly when needed, with no resampling or per-channel shifting.
  5. Turn off the generator output. For B completely exchange the two cables, so long now goes from port 1 to CH1 and short from port 2 to CH3. Turn the output back on and retain a new capture with the same settings. Turn the output off, restore both cables to A and capture again. Keep this sequence reasonably evenly spaced and record the times. Restore quickly enough to expose reconnect variation as well as drift. Use the worksheet to record each connector mapping.

Triggering on CH1 in every capture moves the display origin when the cables swap. Within each record both channels retain a common time axis, so the subtraction is still valid. If a CSV was made from a displayed screenshot, has missing points or contains two independently exported time axes, return to the same acquisition and export again.

Read each edge at its own midpoint

In each channel take the median of its first five samples as the low plateau and its last five as the high plateau. The halfway voltage is their mean. A single pair of samples bracketing that level gives the crossing window. Between samples i and i+1, estimate the time by a straight line:

t50 = ti + (V50 − Vi) ÷ (Vi+1 − Vi) × (ti+1 − ti).

Use the same sign throughout. Let Δ = t50,CH3 − t50,CH1. A positive number means CH3's rising crossing is later. Let C be the long-minus-short cable delay and F the fixed CH3-minus-CH1 path bias. Use the mean of first A and restored A to summarize the original direction.

ΔA = F + C,   ΔB = F − C.

C = (ΔA − ΔB) ÷ 2,   F = (ΔA + ΔB) ÷ 2.

The equal-spacing assumption only helps the average approximate the midpoint of slow drift. The subtraction cannot remove a change in edge shape or a branch that changes when reconnected. The fixed result includes differences in splitter arms, terminations, adapters and scope paths. This procedure measures their combined bias in place. It does not establish absolute delay or a scope calibration.

Belden specifies nominal propagation speed of 0.66 times the speed of light for 8259. A 3.00 m length difference gives 3.00 m ÷ (0.66 × 299,792,458 m/s) ≈ 15.16 ns. At 1 ns per sample that is about 15 sample intervals. Use this as a scale and sign check. The cables' connectors, actual lengths and measured edge shapes also matter.

Use windows to decide what the swap resolved

Synthetic captureΔ estimateCrossing window for Δ
A+18.50 ns18 to 20 ns
B−11.65 ns−12 to −10 ns
Restored A+18.70 ns17 to 19 ns

The synthetic result is about +15.13 ns for cable and +3.48 ns for fixed bias. For the delay window, let each channel's crossing be anywhere inside its own bracket. The earliest possible difference is CH3's lower time minus CH1's upper time, and the latest is CH3's upper time minus CH1's lower time. Form the envelope of both A difference windows before doing the half difference. In this example the cable window is 13.5 to 16.0 ns and the fixed window is 2.5 to 5.0 ns. These intervals expose finite sampling and reconnect spread. They are not tolerance certificates or statistical confidence intervals.

With the fixture above, look for opposite signs in A and B and a restored A close to first A. A stable fixed bias larger than the cable difference can keep both signs the same. The positive cable result still stands if the half-difference window excludes zero and A repeats within the chosen limit. The default 2 ns repeat limit is a practical screening choice. Choose another positive limit only with a documented reason. Check that the per-channel swings and transition shapes stay comparable. If A and restored A disagree, the plateaus wander, or the cable window covers zero, improve the capture and repeat before interpreting it. Interpolation can produce decimals smaller than a sample interval. Treat them as estimates between points.

Run the complete Python analyzer

Download the worksheet, diagram originals, three synthetic CSV files and the exact program. Use Python 3.10 or later. From the extracted folder run python3 cable_swap.py synthetic/a.csv synthetic/b.csv synthetic/restore.csv. Then substitute your normalized A, B and restored A files. The program reports each midpoint relative to the beginning of its cropped record, channel swing, raw differences, ranges and repeat checks. It rejects a missing plateau, insufficient swing, repeated midpoint crossing, nonuniform samples a sample interval above 2 ns and a run of consecutive samples exactly at the halfway level. Keep each cropped input at 4096 samples or fewer and no larger than 1 MiB. Use three separate acquisition files, even if two captures happen to export identical data. Use python3 -m unittest -v test_cable_swap.py to replay the supplied host tests.

Download the complete reader files (ZIP) · Blank observation worksheet

"""Compare two cable lengths from three same-edge CH1/CH3 captures."""
import argparse
import csv
from dataclasses import dataclass
import json
from math import isclose, isfinite
from pathlib import Path
from statistics import median


@dataclass(frozen=True)
class Edge:
    time_ns: float
    bracket_ns: tuple[float, float]
    swing_v: float


@dataclass(frozen=True)
class Capture:
    delta_ns: float
    bracket_ns: tuple[float, float]
    step_ns: float
    ch1: Edge
    ch3: Edge


def read_capture(path):
    columns = ["time_s", "ch1_v", "ch3_v"]
    if path.stat().st_size > 1_048_576:
        raise ValueError("crop the input CSV to at most 1 MiB")
    with path.open(newline="", encoding="utf-8-sig") as stream:
        reader = csv.reader(stream, strict=True)
        if next(reader, None) != columns:
            raise ValueError("expected CSV header time_s,ch1_v,ch3_v")
        samples = []
        for line, values in enumerate(reader, 2):
            if len(samples) == 4096:
                raise ValueError("crop the input CSV to at most 4096 acquired samples")
            if len(values) != 3:
                raise ValueError(f"line {line}: expected three values")
            try:
                row = tuple(map(float, values))
            except ValueError as error:
                raise ValueError(f"line {line}: nonnumeric sample") from error
            if not all(isfinite(value) for value in row):
                raise ValueError(f"line {line}: nonfinite sample")
            samples.append(row)
    if len(samples) < 21:
        raise ValueError("provide at least 21 acquired samples around one edge")
    return samples


def edge(times, volts):
    low, high = median(volts[:5]), median(volts[-5:])
    swing = high - low
    if not isfinite(swing) or swing < 0.10:
        raise ValueError("rising swing is below 0.10 V or out of range")
    if any(abs(value - low) > 0.08 * swing for value in volts[:5]):
        raise ValueError("first five samples are not a low plateau")
    if any(abs(value - high) > 0.08 * swing for value in volts[-5:]):
        raise ValueError("last five samples are not a high plateau")
    level = low + swing / 2
    crossings = [i for i, (left, right) in enumerate(zip(volts, volts[1:]))
                 if (left < level) != (right < level)]
    if len(crossings) != 1:
        raise ValueError("the 50% level must be crossed once in the crop")
    i = crossings[0]
    if volts[i + 1] == level and i + 2 < len(volts) and volts[i + 2] == level:
        raise ValueError("multiple samples at the 50% level leave the crossing ambiguous")
    fraction = (level - volts[i]) / (volts[i + 1] - volts[i])
    return Edge(times[i] + fraction * (times[i + 1] - times[i]),
                (times[i], times[i + 1]), swing)


def capture(path):
    raw_times, ch1, ch3 = zip(*read_capture(path))
    origin = raw_times[0]
    times = [(time - origin) * 1e9 for time in raw_times]
    steps = [b - a for a, b in zip(times, times[1:])]
    step = median(steps)
    if not all(isfinite(value) and 0 < value <= 2.000001 and
               isclose(value, step, rel_tol=0.01, abs_tol=0.00001) for value in steps):
        raise ValueError("require uniform acquired samples at an interval no greater than 2 ns")
    first, third = edge(times, ch1), edge(times, ch3)
    return Capture(third.time_ns - first.time_ns,
                   (third.bracket_ns[0] - first.bracket_ns[1],
                    third.bracket_ns[1] - first.bracket_ns[0]), step, first, third)


def pair(first, swapped, restored, max_repeat_ns=2.0):
    if not isfinite(max_repeat_ns) or max_repeat_ns <= 0:
        raise ValueError("repeat limit must be finite and positive")
    captures = [first, swapped, restored]
    if any(not isclose(item.step_ns, first.step_ns, rel_tol=0.01) for item in captures):
        raise ValueError("keep the sample interval fixed in all three captures")
    a = (first.delta_ns + restored.delta_ns) / 2
    b = swapped.delta_ns
    # Use the envelope of both A captures to expose reconnect variability.
    a_min = min(first.bracket_ns[0], restored.bracket_ns[0])
    a_max = max(first.bracket_ns[1], restored.bracket_ns[1])
    b_min, b_max = swapped.bracket_ns
    cable = ((a_min - b_max) / 2, (a_max - b_min) / 2)
    fixed = ((a_min + b_min) / 2, (a_max + b_max) / 2)
    repeat = abs(first.delta_ns - restored.delta_ns)
    return {
        "sample_interval_ns": first.step_ns,
        "capture_deltas_ns": {"A": first.delta_ns, "B": b, "restored_A": restored.delta_ns},
        "capture_delta_windows_ns": [item.bracket_ns for item in captures],
        "channels": [
            {"CH1": vars(item.ch1), "CH3": vars(item.ch3)} for item in captures
        ],
        "cable_long_minus_short_ns": (a - b) / 2,
        "cable_crossing_window_ns": cable,
        "fixed_CH3_minus_CH1_ns": (a + b) / 2,
        "fixed_crossing_window_ns": fixed,
        "repeat_difference_ns": repeat,
        "repeat_within_limit": repeat <= max_repeat_ns,
        "opposite_window_signs": (a_min > 0 > b_max) or (b_min > 0 > a_max),
        "positive_cable_delay_resolved": cable[0] > 0 and repeat <= max_repeat_ns,
    }


def main():
    parser = argparse.ArgumentParser(description=__doc__)
    for label in ("first_A", "swap_B", "restored_A"):
        parser.add_argument(label, type=Path)
    parser.add_argument("--max-repeat-ns", type=float, default=2.0)
    args = parser.parse_args()
    captures = []
    seen = set()
    try:
        for filename in (args.first_A, args.swap_B, args.restored_A):
            try:
                file = filename.stat()
                identity = (file.st_dev, file.st_ino)
                if identity in seen:
                    raise ValueError("A, B and restored A require three distinct acquisition files")
                seen.add(identity)
                captures.append(capture(filename))
            except (OSError, ValueError, csv.Error) as error:
                raise ValueError(f"{filename}: {error}") from error
        result = pair(*captures, max_repeat_ns=args.max_repeat_ns)
    except ValueError as error:
        parser.exit(2, f"{error}\n")
    print(json.dumps(result, indent=2, allow_nan=False))


if __name__ == "__main__":
    main()

Challenge

Both captures have CH3 arriving later. Can the cable still be slower?

Yes. Suppose ΔA is +10 ns and ΔB is +4 ns. The half difference is +3 ns and the fixed contribution is +7 ns. You would still need the cable window above zero and a stable restored A. The raw signs show that the fixed contribution is larger than the cable contribution in this case.

Primary references and related experiments

In the coax echo timing experiment one channel measures a reflection after a round trip. Try oscilloscope probe compensation to see how changing the measurement path can change the edge itself.