Paused · 512 captured clocks
01 · Follow the feedback loopPinned clock n = 511
ANALOG MODULATOR · fs DIGITAL FILTER & OUTPUT · fs → fs/R +b[n] − clock fs Input · Vin+0.250 Vsample x[n] ΔDifference−0.750 V Integrator · Σ+0.000 Vs[n−1] + e[n] Comparator1s[n] ≥ 0 → 1 1-bit DAC+1.000 V z⁻¹+1.000 Vone clock Digital low-pass+0.250 V32-sample average Decimator↓32NEW WORD Output word20 / 32raw ones count Logic 1 → +Vref · logic 0 → −VrefFeedback from the previous clock sets the present error.Displayed voltages in the digital path are decoded estimates.
Selected block · 03

Integrator · accumulate the error

At the inspected clock
Integrator state
+0.000 V
Input at inspected clock
+0.250 V
25.0% of positive reference
Ones in latest full output window
62.50%
20 ones / 32 clocks
Latest decoded output
+0.250 V
Output clock n = 511
Output data rate · fs / R
128 S/s
32 clocks → one output word
02 · Inspect the waveformsOne shared cursor across the signal chain
Pinned sample n = 511 · 124.756 ms

Hover to inspect; click to pin. Drag or use ← / → on a focused plot. Shading marks the latest completed output window at the cursor.

InputDAC used this clock
Input and previous feedback DAC voltage. Numeric values are available in the block inspector.
Error into integrator
Difference between input and feedback.
Stored stateDecision at 0 V
Discrete-time integrator state and zero threshold.
Comparator output
One-bit comparator output, either zero or one.
InputMoving averageDecimated / held
Moving average, held decimated output, and original input for comparison.

Dots are new output words; the maroon staircase holds each result. The green filter is causal, so a changing input is delayed and attenuated.

Last 32 bits at cursor
oldest → newest
Latest raw output word · ones count C010100₂ = 20V̂ = (2 × 20 / 32 − 1) × 1 V = +0.250 V

512 clocks captured · 16 output words · maximum 8,192 clocks

Learning guide · from feedback to a digital number

Why the bit density follows the input

A 1 sends +Vref back to the subtractor; a 0 sends −Vref. The integrator keeps a running total of the difference. For an in-range DC input, the bounded state prevents error from building indefinitely, so the average feedback approaches the input. With a fraction P of ones, that average is (2P − 1)Vref. This gives P ≈ (1 + Vin/Vref)/2. At zero input, this reset convention produces 0, 1, 0, 1, …

The exact clock convention used here

e[n] = x[n] − d[n−1]
s[n] = s[n−1] + e[n]
b[n] = 1 if s[n] ≥ 0, otherwise 0
d[n] = (2b[n] − 1)Vref
s[−1] = 0; d[−1] = +Vref

Each clock samples the input, subtracts the previous feedback, updates the integrator, and then makes a new comparator decision. The new DAC level is used on the next clock. Zero is assigned to logic 1. The plotted integrator is a unit-gain, discrete-time state in voltage-equivalent units—not a continuous-time op-amp ramp. Only machine-precision roundoff near the zero threshold is rounded to zero.

Try three small experiments

Zero input: inspect the alternating sequence and the state that drives it. Positive DC: try +0.75 Vref and count how often the comparator produces a 1. A sine wave: increase R and watch the filter delay and attenuate the signal. At +1.15 Vref, feedback can no longer balance the input, so the state grows while the output saturates.

Model references

Background on the modulator and the role of filtering: Analog Devices · Sigma-Delta ADC Tutorial and Texas Instruments · Understanding the delta-sigma modulator. The equations above define the particular implementation in this simulator.

Filtering is different from decimation

The digital filter computes the mean of the most recent R DAC-equivalent samples at every modulator clock. It waits for a full window before reporting a value. The decimator then keeps the result at n = R−1, 2R−1, …, giving one output word every R clocks. The staircase is only a display of the held output value.

C = number of ones in an R-clock output window
V̂ = (2C/R − 1)Vref
Output rate = fs/R
Count-code spacing = 2Vref/R

A count is not a precision specification

The displayed output word is the unsigned ones count C, from 0 through R inclusive. It has R+1 possible values and needs ceil(log₂(R+1)) storage bits. It is not a standardized commercial ADC code format. More storage bits or a larger R do not by themselves establish effective resolution. No ENOB estimate is claimed.

Time, delay, and what the readouts mean

The first sample is n = 0 at t = 0; sample n occurs at n/fs seconds. The filter’s group delay is (R−1)/(2fs). At each inspected clock, the density and output cards show the latest completed output window, which may end earlier than the cursor. Shading identifies that window. The waveform crosshair and all block values follow the hovered or pinned sample.

Run moves forward from the pinned sample, first replaying existing capture data, then generating new samples. Step clock advances one sample; Next word advances to the next decimator boundary. Reset clears the capture but keeps your settings. Capture +512 appends samples at the end. Changing a setting recomputes the existing capture; it does not insert a live input change. Select Sine wave or Ramp to study a changing input. Ramp rises between the selected rails, includes the upper endpoint, and restarts at the lower rail on the next clock. A longer rise time makes the voltage change more slowly. The Playback control sets the viewing speed independently.

What is intentionally left out

This is an educational first-order loop with one ideal integrator, a zero-threshold comparator, an ideal DAC using the selected lower and upper reference rails, and a sinc¹ filter. There is no analog saturation clamp, thermal noise, reference noise, clock jitter, hysteresis, or component mismatch. Over-range inputs are shown rather than silently clipped. Real converters can use higher-order loops, multibit quantizers, and much stronger digital filters.

The file works offline. The only external links are the optional reference articles; no external scripts, libraries, or network services are required.

Paused
01 · Parallel comparison

Flash conversion circuit

Analog · Reference · Digital

Sampled input+0.250 V
15 parallel comparators10 ones
Thermometer encoder1010₂ = 10

Resistor string & comparator bank

More hardware buys parallel conversion

Resistor segments · 2ᴺ
Comparators · 2ᴺ − 1
Decision clocks / code1
Ideal code width · 1 LSB

All comparators evaluate the same input together. Raising N by one doubles the resistor count and nearly doubles the comparator count.

At fixed segment resistance, more segments reduce ladder current. Comparator area, input loading, and switching energy still grow. Actual speed also depends on settling and encoder delay.

Mismatch changes the code boundaries

DNL is each actual code width divided by the ideal LSB, minus 1. INL is each internal threshold shift in LSB. Values use the fixed reference endpoints.

Inspect all thresholds and resistor values
Tap kRₖ below tapIdeal thresholdActual thresholdINL · LSBComparator

Input at inspected clock
Latest completed code
Decoded code-center voltage
Modeled output data rate
02 · Inspect the conversionBipolar input · offset-binary code
InputHeld inputDecoded / held output
Pinned clock

Learning guide