A few weeks ago I began studying my options when I really needed a great attenuator to match my new Twisted XBOSOZ preamplifier. I really did not want to have to solder a lot of resistors around a rotary switch and wanted to be able to easily handle balanced signals.

Well I searched and searched and found a lot of really cool relay switched attenuators, which very much appealed to me, I really wanted a true logarithmic approach, one switch on, one logarithmic step. Most of the examples I found where either R-2R or a string of switches like a rotary attenuator. Those are great, but not exactly what I wanted right now. Still, since I was in the mood to experiment I built an R-2R ladder attenuator which further fueled the desire to push even further, as it worked very well indeed.

So, I found a site developed by Jos van Eijndhoven which was a wonderful resource for me. Jos is very generous to have shared so much great information on his site. He also has a very cool implementation of his own which I think is superb. The site can be found here at :

At the site you can read all about the approach I chose, which is a logarithmic ladder, or as some have called it a 7 bit addressable LPAD register, which makes sense too. In fact that is pretty much how it works. The output impedance of the circuit is constant while the input impedance varies. This is very desirable for some circuits as change output impedance can change change input characteristics of the target circuit, this can be a less than desirable thing. But the biggest win is that you get a nice truly logarithmic curve with steps precisely as you design them.

This project is an open project. Everything I have done is public domain knowledge and I intend to share the design, PCB PDFs, schematics, and experiences freely with the hope that some will be able to contribute and make the design better, and that some will be able to do something they might not have otherwise attempted.

I won't try to rewrite all the good information on Jos' site instead I will explain what I have done to implement what I have learned.

First of all I wrote a small Java application to generate the resistor values for me, and determine the closest E96 resistor value for each resistor in each stage. I will post it later after I polish it up a bit.

Then I designed a PCB which would allow me to build the circuit with a lot of flexibility. My best success so far has been to calculate the first stage as if it has a perfect source, or if you know the actual output impedance of the source you can plug that in too, but in most cases the input impedance is low enough to be dominated be the first stage, so not knowing the exact value is just fine. The circuit I designed is for 7 relays which works out great for .5db step from -63.5db to 0 db attenuation.

If you have a very high output impedance source like a tube DAC or something you could do a couple of things, you can calculate the first stage for the actual output impedance of the source (which is the input impedance to the attenuator) or you could use a buffer in front of the attenuator and calculate for a (nearly) perfect source.

For my own initial implementation and for the purposes of providing a springboard for further development I designed a simple firmware application for my circuit and a controller PCB for it. This controller is very simple which should help people who just want a simple attenuator, and not a lot of bells and whistles. The human interface is a simple linear single pot (5-20K is fine) which does not need to be anything fancy at all, no signal goes through it. The micro controller is a PIC16F690 of which I am only using a small number of the I/O pins (8) leaving the others for other things like display, mute, or whatever you like. The pot is attached on one end to VCC and to the other VSS and the ADC on the PIC reads the voltage at the wiper in reference to VCC and sits the 7 bit relay register based on the value returned by the ADC.

That controller worked very well, and work very much like a standard LOG audio pot. A very conventional and useful controller implementation.

Now, there are some tricks I used in the firmware to get past a few things. First, if you progress upward through the 7 bit register from 0 to 128 you will notice as get reach the more more significant bits as that high bit turns on (or off in the downward progression) and all of the bits below it turn off (or on) the input impedance will jump (or fall) significantly which leads to an annoying pop. Not to worry, there was a very simple way to address this in the firmware. The little G6K relays I am using switch pretty dang fast. So I was able to switch off (or on) the relays below the most significant on(or off) one at a time till I only have one of them on (which matches the input impedance roughly of the significant bit I am transitioning to), then I set the significant bit. Pop is then totally eliminated, and it happens so fast (a few ms) you don't notice it. The firmware code (C code) will be posted here soon so you can see how I did it.

So the bottom line is this logarithmic attenuator works very well, I would venture its as good as the best and better than the rest. You can use nice resistors, and the soldering is easy. Both channels can be matched perfectly, so you get perfect channel matching. Give it a try I think you will find what I have, your new attenuator.

Some other details. The PCBs I am providing are single sided and easy to etch. Also they are the same size (controller and attenuator PCBs are separate) and designed to be stackable so you can easily do balanced (2 attenuator boards and one controller) or SE (one of each) and not take up much case real estate at all.

More details and PCB and schematic images coming soon (today) just tidying them up.