Balanced Attenuator

Joe Broskie's balanced attenuator design

I decided that in order to do accurate distortion measurements, I needed to build an adjustable balanced attenuator. In my EMU project, I used fixed value resistors for the attenuator, but they really need to be adjustable to cover the range of amplifier voltages expected and still be able to hit the sweet spot for the EMU balanced inputs. I considered using an R2R approach with relays (similar to my preamp project)  but wanted a simpler solution. Balanced, stepped attenuators are pretty rare in the literature, but I came across a design done by Joe Broskie here at TubeCAD.com. He sells this as a PCB kit with switches and 1% resistors for the ridiculously low price of $26, but it is out of stock as of this writing. His basic idea was to combine a shunt attenuator with a voltage divider output, allowing both coarse and fine adjustments. He used an 11-position rotary switch to select shunt resistors and a 2-pole 6 position switch to select the voltage divider resistors. If you want to build one of these, you can't beat his store price.

Hopefully, these resistor values are correct. I tried to calculate them myself but after hours of math mistakes (reciprocals of log_10 functions), I got a headache, so I'll use Joe's values.

I drew a schematic in KiCad to plan how to build my own version. This is pretty simple. I added an additional position for the fine adjustment switch to short the outputs to ground, allowing the unit to be set to a zero reference when doing noise baseline tests.

The accuracy of the 8.2K resistors and all the series resistors are critical to maintain accurate balance and CMRR, so I ordered 0.1% resistors. The 11 shunt resistors are less critical so I chose 1%. All metal film. Also, I chose 1 Watt for the two 8.2Ks, since the inputs could see significant voltages when testing power amps, and dissipation could become a problem. I wanted to have the option to short the lower 8.25K resistor to ground so that the box can be used in single-ended mode. In this case the upper BNC connector can be used for input and the attenuation will be 1/2 of the balanced mode.  Also, I wanted the option of connecting the signal ground to the case ground - or not - to minimize the chances of ground loops or shielding issues. That is the reason for the extra SPST switches which will be on the front panel.

I breadboarded the resistors to verify the attenuation results. Using a fixed DC voltage source, I measured the attenuation steps and plugged the results into a spreadsheet. I set up a column to calculate deviation from expected and noticed increasingly large errors as I approached 0 dB. Then it dawned on me that overall, the attenuator has a 3 dB insertion loss - of course, because of the 8.25K input resistors and the loading of the series string. DUH! Then I went back to look at Joe's write-up and he does indeed mention the 3dB loss. When I added -3dB to entries in the spreadsheet, I got nearly perfect real-world measured results.  Errors were less than 1%. So the design is good, given the caveat that the -3dB correction has to be applied to any measurements.

I ordered one of these little boxes from Amazon. If this works out, I may standardize on these for small test equipment, for example, the low-distortion oscillator. The panels measure 50x100 mm, so there is not a lot of room. However, this presents an interesting challenge to build things as compactly as possible.

Front panel designed in KiCad

I decided to create a front panel in KiCad. Normally, KiCad is used for PCBs, but thanks to Toli's DIY Blog, I got the idea to use it for instrument panels. It was trickier than I anticipated since I had forgotten most of what I knew about the program. I finally figured out that in order to get the rotary switch markings just right, I had to create a small circle centered near the origin of the drawing canvas, then right-click and select "create circular array". The distance of the center of the circle from the origin determines the array radius, which is brain-dead since you would expect that an array could be created anywhere on the canvas, and simply specify the radius as a parameter. But no, you have to use the origin (if you can even find it). You can then specify the number of repeats and the angle between them. Since I specced out Grayhill rotary switches with 30 degrees between stops, I simply told KiCad to do 12 repeats with 30 degrees in between, then deleted the extra markings. Once I was pretty sure of all my dimensions, I generated Gerber files and sent them off to JLCPCB. A preliminary Gerber upload yielded a quote of $5.00 for 10 panels (plus shipping) in aluminum (yes - $0.50 each).

These tiny beauties will be used for resistor switching. Pricey switches, but pretty much MIL-spec. The 11-position switch will only have 1 deck. The 7-position switch will have 2 decks. I'll solder the resistors directly onto the switches' solder lugs. There are also PCB versions of these available, but I like the idea of hand soldering. The inputs will use mini-XLR jacks for the balanced inputs and isolated BNC jacks. The BNCs can be used either for balanced mode (with 2 cables) or single-ended. 

I remember seeing those switches many years ago and marvelled at their precision.

The Grayhill switches I got were adjustable stop, which means you have to insert tiny steel pins into the correct holes in front. This went OK, except I put them in the wrong holes several times and one time the pin would not come out until I got a very powerful magnet to extract it.


The front panels arrived today from JLCPCB (exactly 1 week after I placed the order) and look very nice. They have a satin aluminum finish and the lettering is sharp and clear. I forgot that unless you tell them not to, they imprint a serial number for your job on the front surface in a small font. It is not really bothering me, but next time I'll get them to omit that. I mounted the components in order to test for fitment. I had made a slight measurement mistake on the corner holes, so I had to enlarge them slightly to get the 4 corner screws to align with the case. I updated my KiCad drawing with the correct dimensions for future use as a template for other devices.

Wiring pretty much done. The resistors are soldered directly on the switches' terminals. If this were a commercial project, I would use PCB mounted switches and SMD resistors.

And its done! One DIY member asked about frequency response and suggested compensation caps will be required - I'll need to do some sweeps on the box to see if that is necessary. I am dubious for 2 reasons: 1) the impedances of the resistors are relatively low and 2) the box is only about 1% accurate across the steps, so if the frequency response rolloff is in that ballpark, it is probably not needed. Adding small caps across the 8.25K resistors may be all that's required in any event.

Files: