All sixty-four states

Sixty-four codes, one staircase. The ladder now tracks within 0.2 dB to 50 dB, and below that the oscilloscope — not the attenuator — is the limit.

Follow-up to the posts “Attenuator — Test Report” and “The error was never in the resistors”. Those two left one question: with the ladder’s reference finally its own, what does the whole attenuator measure?

Everything. Codes 0 to 63, one at a time, with a brief mute between states. Three oscilloscope captures at three vertical scales — 50 mV/div for the shallow codes, 5 mV/div in the middle, 1 mV/div at the bottom — stitched on overlapping plateaux. Each plateau taken as a median, with about 20 ms either side of every relay transition thrown away.

The result

codesfitted dB per stepRMS about the fitworst error against ideal
0–191.00220.050 dB0.113 dB
20–320.99350.041 dB0.133 dB
33–500.98530.049 dB0.196 dB
51–630.93430.125 dB1.359 dB
Fitted slope, spread and worst error by region — all 64 codes.

All 64 states are there, the staircase is monotonic, and no code is missing. Three to hold on to: **code 16 measures 15.970 dB, code 32 measures 32.022 dB, code 48 measures 47.846 dB. The same code 32 measured 27.31 dB** in October, on a board whose shunt returns shared a conductor with the relay coils.

Attenuator sweep

Using a test controller (Arduino nano), we sweep through all attenuation levels. The high attenuation at the start of the sweep is not shown as it is too low be distinguished in the graph. The reason the attenuator dips to ‘zero’ between every step is due to the short mute we do before changing the attenuation and avoid potential transients in case the bits aren’t fully in sync. These micro mutes are less than 1ms can’t be heard in the audio output of the amplifier.

Every code

All 64 programmed states, each against the ideal 10^(−c/20): programmed attenuation, measured attenuation relative to the 0 dB plateau, and the difference. The dagger marks the codes below the measurement floor, discussed underneath.

CodeProgrammed (dB)Measured (dB)Error (dB)
000.0000.000+0.000
011.0000.981-0.019
022.0001.990-0.010
033.0002.999-0.001
044.0004.018+0.018
055.0005.038+0.038
066.0006.002+0.002
077.0007.044+0.044
088.0007.987-0.013
099.0008.939-0.061
1010.0009.890-0.110
1111.00010.957-0.043
1212.00012.022+0.022
1313.00013.064+0.064
1414.00013.960-0.040
1515.00015.067+0.067
1616.00015.970-0.030
1717.00017.113+0.113
1818.00017.968-0.032
1919.00019.085+0.085
2020.00020.095+0.095
2121.00021.130+0.130
2222.00022.086+0.086
2323.00023.133+0.133
2424.00024.018+0.018
2525.00025.038+0.038
2626.00026.040+0.040
2727.00026.959-0.041
2828.00028.035+0.035
2929.00029.100+0.100
3030.00030.069+0.069
3131.00031.024+0.024
3232.00032.022+0.022
3333.00033.167+0.167
3434.00033.979-0.021
3535.00034.960-0.040
3636.00036.066+0.066
3737.00036.978-0.022
3838.00037.998-0.002
3939.00039.017+0.017
4040.00039.906-0.094
4141.00040.938-0.062
4242.00041.872-0.128
4343.00042.972-0.028
4444.00043.929-0.071
4545.00044.804-0.196
4646.00045.852-0.148
4747.00046.875-0.125
4848.00047.846-0.154
4949.00048.834-0.166
5050.00049.831-0.169
51 †51.00050.565-0.435
52 †52.00051.509-0.491
53 †53.00052.408-0.592
54 †54.00053.412-0.588
55 †55.00054.347-0.653
56 †56.00055.174-0.826
57 †57.00056.090-0.910
58 †58.00057.388-0.612
59 †59.00057.968-1.032
60 †60.00059.257-0.743
61 †61.00059.981-1.019
62 †62.00060.771-1.229
63 †63.00061.641-1.359
Code 0 to 63 against the ideal curve. Errors are measured minus programmed.

What the bottom of the range is, and is not

Below about 50 dB the oscilloscope runs out before the attenuator does. At code 63 the wanted signal is 0.325 mV on the recorded scale, and the last plateau reads 0.380 mV. An offset of 50 to 60 µV is enough to move that reading by more than a decibel. So the last dozen codes are marked resolution-limited, not wrong — and the honest claim is the narrow one: monotonic across all 64, inside 0.2 dB to 50 dB, and not yet established below that.

If a number is ever needed at 63 dB it will not come from a scope. It wants a stable DC or low-frequency source, a high-resolution DMM, a documented zero-input offset, and both sweep directions.

You may recall we used 1% resistors in the first iteration. We then found that the measure attebnuation scale was significantly off and assumed it was due to that ‘wide’ range and ordered 0.1% resistors. We then found that wasn’t the issue, the grounds of audio path and the relay circuits had been mixed up. It was that correction – a new board – that produced the results above. I still have a set of 1% resistors and might try them out on the new board and see if they would have been adequate after all. I will update this post if they are.

Verdict

Good enough. The ladder does what it was designed to do across its whole range, the ground fault is behind it, and what is left at the bottom is a measurement question rather than a circuit one. The board measured here is that revision — shunt returns on SIGNAL_GROUND, the relay coils and their driver on their own ground — and it is the one that goes into the machine.

Measured 7 November 2026 on the new board, in which the audio path’s ground and the relay-control ground are separate conductors meeting only at the star — with a DC battery stimulus. Sources: fswp1.csv, fswp2.csv, fswp3.csv.