October 26, 2014 Leave a comment
Yes, when you are not lucky enough to score a good deal on expensive pots (see my last post) then getting suitable attenuators for your project can be a bit of a pain :D If you are looking for a balanced attenuator there isn’t really much “middle ground” out there between an Alps RK27 costing app. €30 and a real stepped attenuator such as a DACT (which retails for more than €300).
The typical answer to this is simple – use relays. I was never really a fan of relay attenuators though, having always found the loud clicking noises whenever you even looked at the volume knob really annoying and not something I’d want to have to live with on a daily basis. However, relay attenuators do have a couple of advantages, among which that they can be built for a reasonable cost. A stepped attenuator also has very good channel matching, but whereas even the expensive DACT only gets you 24 steps, typically with 2dB between them, 128 or even 256 steps of 0.5dB each are quite easily achieved with relays. So, having thus abandoned my principles, I wanted to try one as well :)
Even a cursory look at the schematics would reveal this as a clone of TPAs “Joshua Tree” attenuator, however it is by way of another design. I actually started from the eagle files shared by diyaudio user MaxW in this thread. I have kept the circuit more or less intact, but removed the input selector that Max had and converted it to a (nearly) complete through-hole design.
I have decided to keep the I2C-controller and the attenuator itself onto a single PCB. A couple of reasons for this, mainly that it makes for easier wiring when the PCB is “self-contained” apart from the controller and PSU, but also that when the attenuator is used in a balanced or multichannel configuration each channel gets its own I2C-address, meaning you can easily control levels separately. The added parts cost is negligible to me. The attenuator stage itself uses Omron G6K 5V miniature relays and Vishay RN55 resistors. As far as I know there are no substitutes from other manufacturers for the relays (because of the uniform 2.5mm pin spacing), but Reichelt has them for a decent price so even that is manageable. The unit is intended to be controlled by an Arduino (or similar microcontroller) with I2C-capability and I have used MaxW’s sample code from the diyaudio thread as my starting point which seems to work very well.
Now, I have put together the first sample PCB and I am honestly a bit impressed. Obviously the clicking is still there, but it isn’t too loud with the tiny Omrons. The volume ramps very smoothly when you turn the encoder and I heard absolutely no audible clicking or noise in the headphones I used for testing. My next step is to build a pair of additional boards for a balanced setup and modify the Arduino code to support a balanced configuration as well :)
PS: If you need a different value for the relay attenuator, there are a few good pages out there with information and online calculators:
- AMB’s “Delta 1″ project. (also the AMB discussion forum is a good source of information)
- Twisted Pear Audio’s “Joshua Tree” and the matching controller.