LTC1966: Equal Peaks Can Produce Different RMS Voltages
Give a sine, triangle and square wave the same peak amplitude. A peak measurement treats them as equal, but a square wave spends more of its cycle near the extremes. Connect them in turn to an LTC1966 converter. Compare its steady output with a calculation from the actual input waveforms.
Root mean square (RMS) means square the voltage, find the mean of those squares, then take the square root. Across a resistor, a steady voltage equal to a waveform’s RMS value would deliver the same average power. A peak-to-peak value only measures the distance between the extremes.
Connect one converter on a 5 V supply
Before connecting any input or output cable, connect the DHO804 rear Ground Terminal to earth with the ground cable supplied with the oscilloscope. The Type-C power connection does not provide protective earth. Then power the DHO804 with its supplied 15 V, 3 A adapter. Keep the AFG1022 generator and SPD3303X supply protective-earth connections intact.
Use the Analog Devices LTC1966CMS8#PBF, the 0–70 °C commercial eight-lead mini small-outline package (MSOP-8). Solder it to a breakout with short wires and a clean board. The part runs on a 2.7–5.5 V single supply. This fixture uses 5.00 V and a differential input within 0.48 V peak, comfortably inside the 1 V differential peak range. The manufacturer's accuracy entries apply to the stated data-sheet waveforms and conditions. This experiment uses its own broader comparison screens.
| Pin or part | Connection |
|---|---|
| 1 GND, 4 VSS | Both to G0, the single supply return. |
| 2 IN1 | Generator channel 1 center directly to IN1. Generator shield and probe ground go to G0. |
| 3 IN2 | MID from 1.00 kΩ, 1% to +5 V and 1.00 kΩ, 1% to G0. Add a 100 nF ceramic from MID to G0. |
| 5 VOUT, 6 OUT RTN | Connect 6 to G0. Fit 1 µF KEMET R82DC4100DQ60J polyester film directly between 5 and 6. Meter V to 5, COM to 6. |
| 7 VDD, 8 EN | 7 to +5 V with a 100 nF ceramic bypass across 7 and 1. Ground 8 to enable the part. Grounding the active-low enable turns it on. |
Use a current-limited, isolated-output bench supply such as SIGLENT SPD3303X set to 5.00 V and 20 mA. The resistor divider draws about 2.5 mA. Its midpoint sees 500 Ω at low frequency, before the bypass capacitor, compared with the converter’s typical 8 MΩ differential input impedance. The bypass on MID helps keep the reference quiet. Connect the supply negative, generator shield and both scope ground clips to the same G0. Never clip a grounded scope lead to MID or an input. These signal-ground connections do not replace the separate DHO804 chassis earth lead.
Verify the source offset before enabling it
- Connect a Tektronix AFG1022 and a RIGOL DHO804 with two compensated PVP2350 probes at 10×. The generator has a nominal 50 Ω output and the fixture is high impedance. Use the generator’s high-impedance display setting. Verify its actual level on the scope with the converter disconnected before first connection. A precheck near 2.5 V includes watching the output switch on and confirming that it stays inside the powered fixture’s rails. Keep both channels DC coupled so they report absolute node voltages.
- With the generator output off, connect the circuit and enable the 5 V supply. Verify 4.90–5.10 V and measure MID on the scope. With the board powered, set generator channel 1 to direct current (DC) output near MID for the zero control. Verify actual IN1–IN2 stays near zero. Enable the prechecked waveform output only after the 5 V supply is on. At shutdown switch generator output off first, then remove the 5 V supply.
- Switch to 1 kHz and start with 0.800 V peak-to-peak and +2.50 V offset. Use a 50% symmetry ramp for the triangle and 50% duty square wave. Inspect each actual shape. Adjust the generator offset and amplitude so differential input is centered near zero, with about 0.400 V half-span and each pin within its physical limits. Accept IN1 only between 1.8 and 3.2 V and IN2 only between 2.30 and 2.70 V in this fixture. The peak setting on the generator is a starting point.
Capture the input while reading the settled output
- Run
zero,sine,triangle,squareandsine_repeatin that order. Leave the probes and output meter in place. After each source change wait at least five seconds, then take two Fluke 115 readings on fixed 600.0 mV DC, about two seconds apart. Verify rail separately using a second meter, or check it in the 6.000 V range before reconnecting and waiting again. A drifting result needs more settling. The zero control only checks wiring, reference and residual. The converter can be nonlinear at very small input levels, so do not subtract the zero reading from the signal rows. - At each step stop one simultaneous scope capture and save Storage → Save Wave → Memory → CSV. CSV means comma-separated values. Use actual probe-scaled volts and seconds. Keep both channels from the same acquisition. In an analysis copy retain consecutive native samples and rename columns to
time_s,in1_v,in2_vas shown in the blank trace header. Keep about 6–10 ms of clean waveform, at least 501 native points, and no sample gap over 10 µs. If the memory export exceeds 2 MB, crop consecutive points. Do not re-time or skip rows. Inspect the waveform and retain the raw export. - Copy the blank worksheet. Enter the measured rail, both output readings in volts and the corresponding local trace filename for each row. Keep all five capture files beside the worksheet. Check the input and output at the same settings before advancing to the next run.
The data sheet describes nominal output impedance near 85 kΩ. A 10 MΩ Fluke meter alone can reduce a reading by about 0.84% in the simple divider estimate. Keep that meter as the only output load and keep its range and wiring fixed. The program reports the loaded voltage directly. No gain correction is applied. The manufacturer shows an output-capacitor tradeoff between ripple and settling. A 1 µF capacitor is an example value, while the two-readout check is how this exercise screens a particular result.
Compare the RMS values of equal peaks
For a centered ideal waveform with peak magnitude A, the sine gives A/√2, a symmetric triangle gives A/√3, and a 50% square gives A. At 0.400 V peak those are about 282.8, 230.9 and 400.0 mV. The square spends almost the entire cycle at full magnitude, and the triangle crosses the in-between amplitudes at a constant rate. Each shape’s crest factor, the ratio of peak to RMS, is within the converter’s stated supported range in this example. The waveforms remain illustrative until measured.
The code subtracts IN2 from IN1 at each common timestamp and uses the first four complete periods between rising mid-level crossings. It requires consecutive crossings 0.98–1.02 ms apart. It keeps any measured direct-current difference. On each interval a straight-line interpolation between voltages a and b contributes (a² + ab + b²)/3 to the mean square, weighted by interval duration. The result describes the recorded samples under that interpolation. It does not recover unsampled edges. The shape-ratio check is a consistency screen. Inspect the actual traces to identify their shapes.
To declare a resolved comparison, the input half-spans must be 0.380–0.420 V and differ by at most 18 mV across runs. The differential mean must stay within ±15 mV and IN2 must move no more than 20 mV per capture. The program applies a scope-reference allowance of ±(3% of RMS + 5 mV), an example fixture screen that depends on range, probes and observed repeatability. Check your scope and probe performance on the actual settings before interpreting the result. When working at approximately 2.5 V common mode, compare the two channels on the same node and correct obvious gain or offset problems before collecting the set.
The output uses the Fluke 115’s ±(0.5% of reading + 0.2 mV) allowance on the 600.0 mV DC range under its stated calibration and environment. The output intervals must overlap their matching scope-reference screens and preserve at least 20 mV between triangle, both sine captures and square. A changed sine repeat or an unstable reading produces an unresolved status. The comparison does not claim the converter’s rated accuracy.
Challenge. The square has the same 0.8 V peak-to-peak as the triangle. Why can its steady output be higher?
The square is near 0.4 V in magnitude almost the whole time. The triangle spends most of its time below that magnitude. Squaring gives greater weight to the larger voltages, so the square has a larger mean square and a larger RMS output.
Run the complete analyzer
Run python3 rms_waveforms.py observations.csv. The experiment ZIP contains the complete program, original schematic, blank worksheet, trace header and host tests. A valid data set returns JSON and exit 0 even when the contrast is unresolved. Invalid input returns exit 2. The host tests use constructed traces. No physical measurements accompany this design.
Complete Python waveform analyzer
"""Compare the LTC1966 DC output with simultaneous differential waveform samples."""
import argparse
import csv
import json
import math
from pathlib import Path
import sys
RUNS = ("zero", "sine", "triangle", "square", "sine_repeat")
HEADER = ("run", "rail_v", "out_first_v", "out_second_v", "trace")
TRACE_HEADER = ("time_s", "in1_v", "in2_v")
SHAPES = {"sine": math.sqrt(.5), "triangle": math.sqrt(1/3), "square": 1.,
"sine_repeat": math.sqrt(.5)}
EPS = 1e-10
def finite(raw):
result = float(raw)
if not math.isfinite(result):
raise ValueError("nonfinite measurement")
return result
def read_worksheet(path):
if path.stat().st_size > 12000:
raise ValueError("worksheet exceeds 12 kB")
rows_by_run = {}
filenames = set()
with path.open(encoding="utf-8-sig", newline="") as file:
rows = csv.reader(file,strict=True)
if tuple(next(rows,())) != HEADER:
raise ValueError("use the exact worksheet header")
for name in RUNS:
row = next(rows,())
if len(row) != len(HEADER) or row[0] != name:
raise ValueError("complete the five worksheet rows in order")
rail, first, second = map(finite,row[1:4])
if not (4.90 <= rail <= 5.10 and all(-.015 <= v <= .500 for v in (first,second))):
raise ValueError(f"{name}: rail or output outside fixture window")
local = Path(row[4])
if local.name != row[4] or local.suffix != ".csv" or local in filenames:
raise ValueError("use a separate local CSV trace filename for each run")
filenames.add(local)
rows_by_run[name] = (rail,first,second,path.parent/local)
if next(rows,None) is not None:
raise ValueError("unexpected rows after the five runs")
return rows_by_run
def read_trace(path):
if path.stat().st_size > 2_000_000:
raise ValueError("trace exceeds 2 MB")
points = []
second_low, second_high = math.inf, -math.inf
with path.open(encoding="utf-8-sig",newline="") as file:
rows = csv.reader(file,strict=True)
if tuple(next(rows,())) != TRACE_HEADER:
raise ValueError("use exact trace header time_s,in1_v,in2_v")
for row in rows:
if len(row) != len(TRACE_HEADER):
raise ValueError(f"row {rows.line_num}: expected time and two voltages")
t, v1, v2 = map(finite,row)
if abs(t) > 5 or not (1.8 <= v1 <= 3.2 and 2.30 <= v2 <= 2.70):
raise ValueError("input voltage or timestamp outside fixture range")
if points and not 0 < t-points[-1][0] <= 10e-6 + EPS:
raise ValueError("sample times must increase, with gaps at most 10 µs")
points.append((t,v1-v2))
second_low, second_high = min(second_low,v2),max(second_high,v2)
if len(points) < 501 or points[-1][0]-points[0][0] < .005 - EPS:
raise ValueError("retain at least 501 native samples spanning at least 5 ms")
if second_high-second_low > .020 + EPS:
raise ValueError("IN2 reference moves by more than 20 mV")
return points
def crossing_boundaries(points):
low, high = min(v for _,v in points),max(v for _,v in points)
level = (low+high)/2
crossings = [left+(level-a)*(right-left)/(b-a)
for (left,a),(right,b) in zip(points,points[1:]) if a < level <= b]
if high - low < .1 or len(crossings) < 5:
raise ValueError("record at least five clean rising mid-level crossings")
for a,b in zip(crossings,crossings[1:]):
if not .00098-EPS <= b-a <= .00102+EPS:
raise ValueError("crossing periods outside the 0.98–1.02 ms fixture window")
return crossings[0],crossings[4],level
def waveform(points):
"""Integrate the exact piecewise-linear mean and mean square."""
start,stop,level = crossing_boundaries(points)
selected = [(start,level),*((t,v) for t,v in points if start<t<stop),(stop,level)]
integral, squared = 0.,0.
for (left,a),(right,b) in zip(selected,selected[1:]):
interval = right-left
integral += interval*(a+b)/2
squared += interval*(a*a+a*b+b*b)/3
duration = stop-start
low,high = min(v for _,v in selected),max(v for _,v in selected)
peak = (high-low)/2
rms = math.sqrt(squared/duration)
if peak <= EPS:
raise ValueError("selected waveform cycles have negligible peak")
return dict(peak_v=peak,mean_v=integral/duration,rms_v=rms,
minimum_v=low,maximum_v=high,shape_ratio=rms/peak,
cycles=4,frequency_hz=4/duration)
def meter_interval(a,b):
first,second=sorted((a,b))
return [first-(.005*abs(first)+.0002),second+(.005*abs(second)+.0002)]
def examine(rows):
results = {}
for name,(rail,first,second,path) in rows.items():
try:
points = read_trace(path)
if name == "zero":
result = dict(maximum_abs_input_v=max(abs(v) for _,v in points))
else:
result = waveform(points)
expected = result["rms_v"]
# The scope term is a fixture allowance, separate from the DC meter.
result["reference_screen_v"] = [expected*.97-.005,expected*1.03+.005]
result["input_shape_ok"] = (.38-EPS <= result["peak_v"] <= .42+EPS
and abs(result["mean_v"]) <= .015+EPS
and abs(result["shape_ratio"]-SHAPES[name]) <= .04+EPS
and max(abs(result["minimum_v"]),abs(result["maximum_v"])) <= .48+EPS)
result.update(rail_v=rail,output_screen_v=meter_interval(first,second),
output_repeat_ok=abs(first-second) <= .006+EPS)
except (OSError,ValueError,csv.Error) as error:
raise ValueError(f"{name}: {error}") from None
results[name] = result
return results
def compare(results):
zero = results["zero"]
zero_ok = zero["maximum_abs_input_v"] <= .015+EPS and max(map(abs,zero["output_screen_v"])) <= .015+EPS
sine,triangle,square,repeat = (results[name] for name in SHAPES)
waveforms = (sine,triangle,square,repeat)
peaks = [row["peak_v"] for row in waveforms]
input_ok = all(row["input_shape_ok"] for row in waveforms) and max(peaks)-min(peaks) <= .018+EPS
output_repeat = max(abs(a-b) for a,b in zip(sine["output_screen_v"],repeat["output_screen_v"])) <= .012+EPS
for row in waveforms:
lower,upper = row["output_screen_v"]
reference_low,reference_high = row["reference_screen_v"]
row["output_agrees_with_scope_screen"] = max(lower,reference_low) <= min(upper,reference_high)+EPS
ordering = (triangle["output_screen_v"][1]+.020 <= sine["output_screen_v"][0]+EPS
and triangle["output_screen_v"][1]+.020 <= repeat["output_screen_v"][0]+EPS
and max(sine["output_screen_v"][1],repeat["output_screen_v"][1])+.020 <= square["output_screen_v"][0]+EPS)
if not zero_ok or not input_ok:
status = "input_or_zero_control_unresolved"
elif not output_repeat or not all(row["output_repeat_ok"] for row in results.values()):
status = "output_repeat_unresolved"
elif not ordering or not all(row["output_agrees_with_scope_screen"] for row in waveforms):
status = "conversion_contrast_unresolved"
else:
status = "equal_peak_rms_contrast_observed"
return dict(status=status,zero_control_ok=zero_ok,equal_peak_inputs_ok=input_ok,
sine_repeat_ok=output_repeat,output_ordering_guard_ok=ordering,runs=results,
scope="Sampled waveform reference and loaded DC output under fixture allowances.")
def main():
parser=argparse.ArgumentParser(description=__doc__)
parser.add_argument("worksheet",type=Path)
args=parser.parse_args()
try:
report=compare(examine(read_worksheet(args.worksheet)))
except (OSError,ValueError,csv.Error) as error:
print(f"Worksheet rejected: {error}",file=sys.stderr)
return 2
print(json.dumps(report,indent=2,allow_nan=False))
return 0
if __name__=="__main__":
raise SystemExit(main())
Primary references
- Analog Devices LTC1966 product and orderable details, 1966fb data sheet (mirror of the manufacturer’s PDF) and AN-106 RMS-to-DC instrumentation.
- KEMET exact R82DC4100DQ60J specification.
- Tektronix AFG1022 quick-start manual and RIGOL DHO800 user guide with PVP2350 probe guide.
- Fluke 115 multimeter manual.
See why generator display and circuit amplitude can differ. The LM386 clipping experiment shows a different way a circuit changes a sine wave’s shape.