Pop/click free HW-based relay attenuator V3

It depends on your needs. Of course you can switch audio with FETs, but engineers who want top quality do not.
Non sense for true audio EE engineers.
Fet switching: Distortion of DAC8811 is -105 dB that is 0.0006% thd.
Asking for less distortion in audio is non sense because true figures of preamps and amps are much higher.
Back on topic:
Your gain switch with relays does click and pop because whatever you do they are way too slow.
 
This gimmick won't make it pop free, the relays are way too slow. Milliseconds slow.

Relays is the wrong techonology, the real stuff with FET switches do not use this gimmick. 10 Nanoseconds fast.

Or, with FETs you can arrange for a changeover, basically a crossfade. That way, you can switch multiple channels at the same time and not worry about 'zero crossings'. BTW, switching at a zero crossing only matches the signal level, not the slope or higher derivatives at the switch point. So, even with a fast zero crossing switch, you still get a click, it's just smaller.
 
At what voltage and at what load and what frequency?

I tested at several frequencies using a synchronous average of 128 512K point FFTs. Since the APx residual is not a constant, I find it's most useful to compare the circuit to the analyzer residual and see how it deviates. Depending on the phase of a harmonic, extra distortion from the device under test can add to or subtract from the analyzer residual, so the goal is to see how closely the D.U.T. matches up to the residual.

The two graphs are of the second harmonic and the third harmonic. This circuit produces mainly second harmonic as a result of component variations, with third harmonic mostly from the buffer amplifier. Fourth and higher harmonics are very low, and basically the APx residual - neither the 797 or the FET switches seem to produce fourth or higher order harmonics.

The drive level is +6dBV, and the tests were taken at 8 frequencies from 50Hz to 10kHz, chosen to line up with the FFT bin frequencies of the 192kHz FFT. The circuit was loaded into the 200kΩ load of the APx analyzer to focus on FET switch distortions, and not problems with the AD797. The blue trace line is a loopback test of the APx driving a 5KΩ load, the same as the input impedance of this circuit. The two red traces are measurements of the switching circuit amplifiers only (AD797 with an ADA4522-2 dual servo in a Superbal arrangement), with jumpers replacing the switching FETs. The four orange-yellow dots at each frequency are the FFT averages of four examples of the complete switching circuit. Four tests were done so I could get an idea of how random component tolerances affect the performance.

In general, the distortion measurements are within a dB or two of the residual, with the FETs causing primarily 2nd harmonic distortion. Of course, with distortion levels this low, we're mainly looking at the test set residual, but still, these tests are repeatable, and one can still see how the circuit deviates (or not) from the analyzer residual, and then infer that the actual circuit distortion is at least of the same magnitude as the residual, if not lower. One can never have too clean of an analyzer LOL!
 
Oops: I messed up the attachments. Here are the graphs again:
 

Attachments

  • 2nd harmonic FFT.png
    2nd harmonic FFT.png
    95.2 KB · Views: 316
  • 3rd harmonic FFT.png
    3rd harmonic FFT.png
    93.6 KB · Views: 304
U6/R32/R33 prevents 1-bit jitter.

I must confess that I'm missing something here.

There are 7 relays controlled by pins DB7(MSB) through DB1(LSB+1) of the ADC chip. DB0 is the LSB, which does not control a relay. However, DB0 is fed to D-FF U6, which simply divides it's incidental toggling rate by 2. The Q output of U6 is then padded down to essentially zero volts by the R32, R33 divider pair.

Question: Why does LSB toggling even matter when it does not control a relay, why isn't pin DB0 simply left as a no-connect. I'm not seeing the need of U6, R32 and R33, although, no doubt, there is one.
 
Last edited:
I must confess that I'm missing something here.

There are 7 relays controlled by pins DB7(MSB) through DB1(LSB+1) of the ADC chip. DB0 is the LSB, which does not control a relay. However, DB0 is fed to D-FF U6, which simply divides it's incidental toggling rate by 2. The Q output of U6 is then padded down to essentially zero volts by the R32, R33 divider pair.

Question: Why does LSB toggling even matter when it does not control a relay, why isn't pin DB0 simply left as a no-connect. I'm not seeing the need of U6, R32 and R33, although, no doubt, there is one.

It adds or subtracts 1/2 LSB at the bottom of the POT.

It ensures that the input to the ADC is always close to halfway between output steps.

This stabilises the circuit from noise pickup, voltage fluctuations etc.

It is a simple form of feedback.

And it works. :cool:
 

Clever.

Are you still selling PCBs?

I'm developing a preamp project which requires an constant-output-resistance type attenuator. Yours appears to be designed as a constant input-resistance type, so I would need to make a minor modification to the layout of the first relay stage. Minor, depending on whether there's space in the layout to cut a trace between pins 3 and 4, and between pins 5 and 6 of relay K1, then bridge each cut with a resistor.
 
Last edited:
Clever.

Are you still selling PCBs?

I'm developing a preamp project which requires an constant-output-resistance type attenuator. Yours appears to be designed as a constant input-resistance type, so I would need to make a minor modification to the layout of the first relay stage. Minor, depending on whether there's space in the layout to cut a trace between pins 3 and 4, and between pins 5 and 6 of relay K1, then bridge each cut with a resistor.

Unfortunately I sold the last 2 PCBs 2 weeks ago.

So for the time being I have nothing to sell.