Supplier photo of an assembled infinity mirror light cube illuminated on a dark background.
Supplier photo
Temu affiliate offer · Project idea

Build an infinity light cube

Listing specifies 5-volt direct current. Soldering required; battery and glue not included.

View kit on Temu

Tricky Circuit may earn a commission through these links. Product ideas have not been bench-tested by Tricky Circuit and are not verified lesson parts lists.

Measure What the Scope’s 20 MHz Limit Does to a Rising Edge

With an unchanged square-wave source and termination, the oscilloscope’s bandwidth setting can change the way it records the same transition. The measured edge may grow longer because the instrument attenuates more of the high-frequency content that forms the edge. The low and high plateaus can stay at nearly the same voltage. This experiment holds the source, cable and termination fixed and measures the change using raw samples from one channel.

Compare three acquisitions at full bandwidth, three at 20 MHz, then three at full bandwidth again. Measure every rising edge between 10% and 90% of its own voltage swing. The included traces are calculated or synthetic.

Make a single terminated signal path

Before connecting any input or output cables, connect the RIGOL DHO804’s rear Ground Terminal to earth ground using the supplied ground cable, as required by the DHO800 User Guide. Its Type-C power input does not ground the instrument through the power cord. Use the supplied power adapter. Keep the AFG1022’s protective earth connected. The coax cable shields provide the signal references described below; they do not replace this required chassis earth lead.

  • Source. Use channel 1 of a Tektronix AFG1022 function generator. Choose an ordinary 100 kHz square wave, 1.00 V peak-to-peak, zero offset and the 50 Ω load display setting. The generator’s physical output impedance remains nominally 50 Ω.
  • Cable. Use a Pomona 2249-C-24, a 24 inch RG58C/U coaxial cable with BNC male connections at both ends. BNC stands for Bayonet Neill–Concelman, the bayonet-style coaxial connector. Plug its first end into the generator’s female output.
  • Termination. Plug the coax into the female input of a Tektronix 011-0049-02 50 Ω feed-through terminator, then plug the male end directly into the RIGOL DHO804 channel 1 input. The terminator includes a 50 Ω path from center to shell. The center conductor also goes through to the scope. This part is rated 50 Ω ±1 Ω, direct current to 1 GHz, 2 W average under its stated conditions. A centered 1.00 V peak-to-peak ideal square sits at about ±0.50 V, so the nominal resistor dissipation is 0.50² ÷ 50 = 5 mW.
  • Scope. Use channel 1 with direct-current (DC) coupling and the 1× scale setting. The DHO804’s input is nominally 1 MΩ in parallel with 15 pF. The external terminator supplies the line termination. Disable the other analog channels so the scope can use its single-channel real-time sample rate. Keep both instruments’ protective earth intact. Use the low-voltage source path shown in the figure.
A Tektronix generator drives a 50 ohm coaxial cable and an external feed-through termination connected directly to a RIGOL oscilloscope. The terminator is a 50 ohm shunt between center and shell. Calculated normalized rising edges are compared at full and limited bandwidth, with their 50 percent crossings aligned.
The coax and feed-through stay attached for all nine records. The calculated plot aligns each curve at its own 50% crossing. The two calculated FULL curves nearly overlap because their illustrative rise times differ by only 0.05 ns. Alignment serves to compare shape and width. The drawing omits the DHO804 power adapter and separate chassis earth lead; connect them as described before adding any input or output cables. Full-size PNG · Editable SVG (ZIP: bandwidth-limited-edge.svg)

Use plateau levels to set the two time markers

Bandwidth describes how much of the faster signal content the scope passes. The manufacturer’s data sheet specifies 70 MHz analog bandwidth for the DHO804 and a typical 10–90% rise time of 5 ns or less under its conditions. The 20 MHz menu setting deliberately attenuates more of the fast components. Tektronix’s AFG1022 performance manual gives a typical square-wave rise and fall time below 12 ns at 1 V peak-to-peak. The edge you capture includes both the source transition and the scope response.

Call the median low plateau L and the median high plateau H. The two voltage thresholds are V10 = L + 0.10(H − L) and V90 = L + 0.90(H − L). Subtract the two crossing times, tr = t90 − t10. With L = −0.50 V and H = +0.50 V, the thresholds are −0.40 and +0.40 V. A change in trigger position shifts both times together and can leave their difference unchanged.

A familiar estimate is tr ≈ 0.35 ÷ BW for a smooth response of the type underlying that approximation. At 20 MHz it gives about 17.5 ns as a scale. The factor depends on the shape of the response, and the input signal has finite rise time. Even a theoretical convolution needs an assumed response. For example, two Gaussian-shaped responses with 8 ns and 17.5 ns rise times would give about 19.2 ns in combination. The example illustrates a possible size of effect. The comparison evaluates the observed timing directly.

One synthetic run from the downloadable archive
Setting Median Swing
FULL 9.484 ns 1.00 V
20 MHz 19.267 ns 1.00 V
Restored 9.535 ns 1.00 V

Capture nine edges with the same settings

  1. Let both instruments warm for at least 30 minutes. Set the generator amplitude and frequency and check the waveform on channel 1. Choose direct-current (DC) coupling, 1×, a vertical scale around 200 mV/div and an offset that centers the waveform. Check for flat low and high levels near −0.50 and +0.50 V and avoid clipping. Use a normal rising edge trigger around 0 V, without averaging or peak-detect processing.
  2. Use ordinary real-time sample acquisition with only CH1 enabled. Select 1 kpts of memory and about 20 ns/div as starting settings. Verify the actual sample spacing in the scope or exported file. The DHO804 has a maximum single-channel rate of 1.25 gigasamples per second, corresponding to 0.8 ns spacing under those conditions. The analyzer accepts raw time gaps up to 1.25 ns. Display interpolation can connect samples visually. It adds no observed time points.
  3. Tap the channel 1 status label, open the Vertical settings and set BW Limit to FULL or off. Take the first three consecutive fresh stopped acquisitions, one after another, as full-1.csv through full-3.csv. Use the same scales, trigger and cable path throughout. Verify a new acquisition each time.
  4. Set the same channel’s bandwidth limit to 20 MHz. Confirm the setting readback and take three fresh acquisitions as limited-1.csv through limited-3.csv. Set FULL again and take three fresh acquisitions as restore-1.csv through restore-3.csv. This return to the starting setting checks for a shift from the generator or connection. Do not adjust the source to make the edges agree.
  5. Export the raw channel using Storage → Save → Choose → Save Wave. Select Memory and CSV. CSV means comma-separated values. A raw memory record can extend beyond the displayed region. In each record, keep a contiguous window approximately 100 ns before to 100 ns after the selected rising edge, using the original time and voltage samples. Keep the full low and high plateaus within the cropped window. Normalize headers to time_s,voltage_v with values in seconds and volts. Preserve the time order and original sample spacing. Use the same cropping rule for all nine captures.

Compare rise times using Python

Download the column template (ZIP: scope-blank.csv), complete analyzer (ZIP: scope_edge.py) or archive of synthetic samples and tests (ZIP: experiment-tests-v1.zip). The command takes nine distinct paths in order of capture, with three paths for each setting. Use Python 3.8 or later and the standard library.

python3 scope_edge.py full-1.csv full-2.csv full-3.csv limited-1.csv limited-2.csv limited-3.csv restore-1.csv restore-2.csv restore-3.csv
python3 scope_edge.py synthetic/full-1.csv synthetic/full-2.csv synthetic/full-3.csv synthetic/limited-1.csv synthetic/limited-2.csv synthetic/limited-3.csv synthetic/restore-1.csv synthetic/restore-2.csv synthetic/restore-3.csv

The analyzer takes the first and last 20% of each record as plateau references. It requires one upward crossing each at 10%, 50% and 90%, with the whole rise well inside the record. It estimates the time between adjacent samples by linear interpolation. If ringing or noise causes ambiguous threshold recrossings, repeat with the original condition after checking the measurement path. The code also checks range, raw spacing, plateau stability and a minimum number of samples in the measured transition.

The experiment requires each setting’s rise times to be repeatable, the high and low plateau references to stay within 0.05 V across all files, and the restored median to be within the greater of 1.6 ns or 20% of the original median. The 20 MHz median must exceed both full medians by at least 3 ns and at least 25%. Those are the limits for this comparison. A successful result shows the effect of this setting on the recorded edge. Inferring the exact source edge, instrument calibration or filter response needs a different measurement.

Exit 0 qualifies the comparison. Exit 1 means the input files or paths are invalid. Exit 2 indicates an unresolved control or a missing command-line argument. If the sample gap is too large, check actual sample rate and disable the other channels. If the restoration fails, inspect the generator, terminations and acquisition settings first.

#!/usr/bin/env python3
"""Compare 10–90% rise times in nine raw scope traces of one unchanged source."""

import argparse
import csv
import io
import math
import os
import statistics
from pathlib import Path

MODES = ("full", "limited", "restore")
HEADER = ["time_s", "voltage_v"]
BYTES_MAX = 1048576
ROUNDING = 1e-9
TIMING_ROUNDING_NS = 1e-6


class Unresolved(ValueError):
    """A readable trace failed a comparison or measurement gate."""


def within(value, low, high, margin=ROUNDING):
    return low - margin <= value <= high + margin


def load_trace(path):
    with path.open("rb") as stream:
        data = stream.read(BYTES_MAX + 1)
    if len(data) > BYTES_MAX:
        raise ValueError(f"{path}: CSV exceeds one MiB")
    reader = csv.reader(io.StringIO(data.decode("utf-8-sig"), newline=""), strict=True)
    if next(reader, None) != HEADER:
        raise ValueError(f"{path}: expected time_s,voltage_v")
    result = []
    for count, row in enumerate(reader, 1):
        if count > 20000 or len(row) != 2:
            raise ValueError(f"{path}: row count or number of fields exceeded")
        time, voltage = map(float, row)
        if not all(map(math.isfinite, (time, voltage))):
            raise ValueError(f"{path}: nonfinite field")
        if abs(time) > 1 or abs(voltage) > .85 + ROUNDING:
            raise Unresolved("times exceed ±1 s or raw voltage exceeds ±0.85 V")
        result.append((time, voltage))
    if len(result) < 120:
        raise Unresolved("a capture requires at least 120 raw samples")
    origin = result[0][0]
    return [(1e9 * (time - origin), voltage) for time, voltage in result]


def crossing(rows, level):
    times = [
        a + (b - a) * (level - low) / (high - low)
        for (a, low), (b, high) in zip(rows, rows[1:])
        if low < level <= high
    ]
    if len(times) != 1:
        raise Unresolved("a threshold has no single upward crossing")
    return times[0]


def measure(rows):
    gaps = [b[0] - a[0] for a, b in zip(rows, rows[1:])]
    if any(not 0 < value <= 1.25 + TIMING_ROUNDING_NS for value in gaps):
        raise Unresolved("timestamps must increase with gaps no greater than 1.25 ns")
    span = rows[-1][0]
    if not within(span, 145, 420, TIMING_ROUNDING_NS):
        raise Unresolved("keep a 145–420 ns raw window containing one rising edge")

    before = [voltage for time, voltage in rows if time <= .20 * span]
    after = [voltage for time, voltage in rows if time >= .80 * span]
    low, high = statistics.median(before), statistics.median(after)
    swing = high - low
    if not within(swing, .80, 1.20):
        raise Unresolved("rising voltage swing lies outside 0.80–1.20 V")
    if max(max(levels) - min(levels) for levels in (before, after)) > .04 * swing + ROUNDING:
        raise Unresolved("a low/high reference plateau is unstable")
    t10, t50, t90 = [crossing(rows, low + fraction * swing) for fraction in (.10, .50, .90)]
    if not .22 * span < t10 < t50 < t90 < .78 * span:
        raise Unresolved("the complete rising edge must be in the middle of the record")
    rise = t90 - t10
    supports = sum(t10 <= time <= t90 for time, _ in rows)
    if supports < 4 or not within(rise, 4, 45, TIMING_ROUNDING_NS):
        raise Unresolved("edge is out of the 4–45 ns range or has fewer than four in-edge samples")
    return rise, low, high


def comparison(paths):
    saved = {}
    print("setting    median_ns    min_ns    max_ns    low_V   high_V")
    for index, label in enumerate(MODES):
        found = []
        for path in paths[index * 3:index * 3 + 3]:
            try:
                found.append(measure(load_trace(path)))
            except Unresolved as error:
                raise Unresolved(f"{label} ({path}): {error}") from error
        rises, lows, highs = zip(*found)
        median = statistics.median(rises)
        if max(rises) - min(rises) > max(1.6, .15 * median) + TIMING_ROUNDING_NS:
            raise Unresolved(f"{label}: the three rise times are not repeatable")
        saved[label] = (median, lows, highs)
        print(f"{label:<9} {median:10.3f} {min(rises):9.3f} {max(rises):9.3f}"
              f" {statistics.median(lows):8.4f} {statistics.median(highs):8.4f}")

    lows = [low for _, levels, _ in saved.values() for low in levels]
    highs = [high for _, _, levels in saved.values() for high in levels]
    if any(max(levels) - min(levels) > .05 + ROUNDING for levels in (lows, highs)):
        raise Unresolved("the captured low or high plateau shifted by more than 0.05 V")
    full, limited, restore = (saved[label][0] for label in MODES)
    if not all(within(value, 4, 18, TIMING_ROUNDING_NS) for value in (full, restore)):
        raise Unresolved("full-bandwidth reference medians must lie within 4–18 ns")
    if abs(restore - full) > max(1.6, .20 * full) + TIMING_ROUNDING_NS:
        raise Unresolved("the full-bandwidth timing did not return")
    baseline = max(full, restore)
    if limited < max(baseline + 3, baseline * 1.25) - TIMING_ROUNDING_NS:
        raise Unresolved("20 MHz capture did not meet the required increase in rise time")


def main():
    parser = argparse.ArgumentParser(description=__doc__)
    parser.add_argument("file", type=Path, nargs=9,
                        help="three FULL, then three 20 MHz, then three restored FULL CSV files")
    args = parser.parse_args()
    try:
        if len({os.path.realpath(path) for path in args.file}) != 9:
            raise ValueError("pass nine distinct capture paths")
        comparison(args.file)
    except Unresolved as error:
        print(f"UNRESOLVED: {error}")
        return 2
    except (ValueError, OSError, csv.Error) as error:
        print(f"INPUT ERROR: {error}")
        return 1
    print("QUALIFIED: the 20 MHz setting lengthened the measured transition and FULL restored it.")
    return 0


if __name__ == "__main__":
    raise SystemExit(main())
Challenge. Why might both median plateau voltages stay the same when the rise time changes?

The plateaus change slowly compared with the edge. Limiting high-frequency content spreads the transition in time, while steady low and high voltages can still settle to nearly the same values in this DC-coupled setup. This is why the procedure measures both plateau voltage and timing.

Related reading

Primary references

Download the complete reader files (ZIP) for the original editable drawing, PNG, worksheet and code in scope-bandwidth-limit-rise-time. The full main program is also included above.

📡Broadcast the signal — amplify the connection.

Leave a Reply

Temu affiliate offers

Find your next electronics project

Explore these do-it-yourself project kits. Check the selected option, included parts and instructions on each offer.

Tricky Circuit may earn a commission if you buy through these Temu affiliate links. These are product ideas; they have not been bench-tested by Tricky Circuit and are not verified lesson parts lists.

Supplier photo of a breadboard, jumper wires and assorted electronic components in a plastic storage case.

Supplier product photo

Try breadboard experiments

Breadboard, wires and assorted parts. Arduino controller board not included.

View kit on Temu

Supplier photo of an assembled blue surface-mount soldering practice board with a circular ring of small lights.

Supplier product photo

Solder a chasing-light board

Surface-mount soldering practice. Battery and battery holder not included.

View kit on Temu

Supplier photo of an assembled two-wheeled line-following car with a blue circuit board, two motors and an empty battery holder.

Supplier product photo

Build a line-following car

Soldering and assembly required. Check battery and track requirements before buying.

View kit on Temu