The relay-switched attenuator volume control

Attenuator PCB for one channel - top

Background

For many years I've been thinking about the best way to control the volume in a remote-controlled preamplifier with the minimum loss of transparency, and I decided long ago that the a relay-switched attenuator was the ultimate solution. In fact I put together a couple of PCBs with 30-step (2dB) attenuators nearly fifteen years ago, although for various reasons I never matched these up with a preamplifier, and I ended up raiding the boards for parts.

In the passive preamp I used for several years, the volume control consisted of a 12-position attenuator, based on a cheap four-pole rotary wafer switch and Maplin metal film resistors. This proved very transparent and reliable, though the switch contacts needed an occasional squirt of contact cleaner. Its drawbacks were the lack of remote control, and the coarse 4dB steps - I only actually achieved 4dB steps by reducing the minimum attenuation to 24dB, giving a total range of 48dB. This wasn't a restriction in practice, since I was using quite sensitive power amps at the time, and I never needed higher volume levels. The switched attenuators from DACT and others have a high reputation, but these are still very expensive, and aren't compatible with either remote control or proper control of channel balance.

Options

No shunt attenuators! See my thoughts on the "signal path" to see why the advantages of these are overstated. Switched attenuator circuit Ladder attenuator circuit

I had the choice between a ladder attenuator (left), where a series of resistors is connected across the input and the switches select which tap is connected to the output, and a parallel switched attenuator (right), where each attenuation setting is defined by an independent pair of resistors, each with its own switch. The ladder, which is a closer analogue of a rotary potentiometer, is cheaper, since it only needs half the number of resistors and switches, but I decided to use the parallel arrangement, since in this case there are fewer solder joints in the circuit at any time, and also because it allows each step to be adjusted independently of all the others. Incidentally the DACT attenuators, as well as most others of their type, are ladder attenuators. In my setup many of the resistors in the shunt leg (R2) are parelleled up to get a closer match to the ideal values.

The input impedance is independent of the volume setting, which is a major advantage with this type of circuit, as changing the loading of the preceding stage can change the frequency response. The choice of impedance is a compromise - if this is too high, the noise levels (both thermal and electromagnetic) rise, but if it's too low it starts to load the input down. I settled on 10 kilohms, as this isn't too high (many valve preamps use more than 100 kilohms), but is still an easy load for the output buffer of op-amps.

Each of my attenuators has a single fixed 47K resistor (R3 in the diagram) in parallel with the switched shunt resistor to ensure a minimum source impedance for the output buffers of the preamp, since op-amps don't like an open circuit on their inputs (and power amps connected thereafter like it even less!).

The final decibel

I wanted to make the volume increments as small as possible, within the constraints of space (overall cost was less of a limitation as I planned this project over a long period and started collecting parts early). To reduce the number of choices to something manageable, I decided to use constant logarithmic increments; digital control meant that the number of steps would most conveniently be a power of two, and a range of 64dB seemed about right. Steps of 1dB seemed the ideal, since my old control with 4dB steps was much too coarse.

I could fit 64 relays on a single board, but balanced operation meant the number of steps was reduced to 32. To get 1dB increments, a further attenuation stage was needed. I then had the choice of 1dB steps with the main attentuator, with a selectable cut of 32dB, or 2dB steps and a separately switched 1dB step. I couldn't think of any way to do the former reliably without adding extra buffer stages, so I settled for the latter.

The choice was then whether to apply the 1dB step as a cut (shunt resistor at the input) or as a boost (shunt resistor in the feedback loop of the input buffers). I decided on the second, since shunting the input resistor would effectively halve the input impedance at every other volume setting. The input buffers are originally unity-gain, with a 4.64K resistor between output and inverting input, so a 38.3K resistor between inverting input and ground will give a gain of +0.993dB - close enough. The only disadvantage of this approach is that the final 1dB relay has to switch on and off every time the volume changes, so its life will be shortened. I alleviated this by using two relays instead of one, and alternating these according to the value of bit 1 of the volume setting.

I finally setted for 32 steps from -2dB to -64dB, which with the extra 1dB gives 64 steps from -1dB to -64dB: here is a list of the resistance values for a 10K attenuator.

Balanced operation

This was the real limiter on the project, since not only did it mean I had to buy twice as many relays, but also meant a very crowded space on the PCB. In the end I had to build separate PCBs for the two channels and mount them piggy-back over the preamp board, and even then the boards were so tightly packed that I had to instal more than half of the discrete components on the underneath of the board, which made for a long and intensive building process. Attenuator PCB for one channel - bottom

I made a point of keeping the hot and cold circuits close on the board, to minimise the difference in flux cut by the traces.

Part selection

I used Maplin 1% metal film resistors for most of the shunt components, and RS 0.1% precision metal films for most of the series resistors - these are reasonable value in quantity, but not so for small numbers. The Maplins are very cheap but very good quality, and I find that they tend to be even in the worst cases within 0.5% of nominal value. Thorsten Loesch has good things to say about them, though I've never done any kind of critical listening to individual parts.

The relays were the same double-pole type as I used in my preamp and active crossover: the Fujitsu 53W/1 with gold-on-silver contacts and 100 ohm, 5V coils. I needed sixty-seven for each channel: sixty-four for the attenuator itself, one for mute and two for the 1dB step. Each dual relay was connected with one pole switching the shunt resistor and the other switching the series leg.

Digital control

I decoded the five highest bits of the six-bit volume signal with four 74LS138. The control logic of this chip allows three of them to be used to decode twenty-four lines without an extra inverter. I used an NPN transistor as an inverter for the fourth decoder chip.

I used a 74LS00 to apportion the activation signals to the two 1dB relays, according to the value of bit 1 of the volume signal.

Results

After several weeks of soldering, cursing and plenty of testing, the attenuator now works without a hitch. The relays of course click audibly, even with the lid of the box on, though the fact that four change at once gives the surprising auditory impression of a very expensive rotary switch. There is no audible click through the speakers when changing between levels - and as far as I can tell - the "final bit" switching seems to be seamless.

Alex Megann, April 2005

Back to DIY page.