DIY Volume Control (Relay Attenuator)

The pops in the audio from switching all the relays at once is a problem, which is why using a microprocessor is needed to switch one relay at a time from high to low or low to high, depending on if you are turning the volume up or down, with a slight delay between relays. See my thread for more code.
 
  • Like
Reactions: U102324
The problem I have is exactly as you say, is when you turn on and off the highest bit, i.e. all the 1, 2, 4, 8,... drops and 16 is activated alone. The code I tried just could not get rid of it even at mS intervals, it lay slap bang in the audio band and drew my attention every time one passes a single binary number. I even dumped the whole project just on that irritation. I then tried a volume control chip, which basically does the same and the problem did not exists. Maybe they set up the new value of the control pot position into memory and switch the whole bunch at very high speed outside the audio band
 
Last edited:
🥷😉You just buy the best resistors, and caps, you can afford. With my volume control having 68 resistors it can add up. CCF series for a $1 each, RN65 for $1-4 each, Caddock for $4-8 each, Vishay nude foil resistors for $12 each. With these resistors the more you pay the lower the distortion and increased clarity, which isn't always the case. I spent a lot of money playing with parts only to find some not worth the materials they were made with.
 
  • Like
Reactions: U102324
Would you mind explaining - I don't need code just how you overcame it. When you say delays, by what? Delay each digit what happens while turning the pot and hearing no zipper sound. I would love to try that board again I have a PIC on it
 
With these resistors the more you pay the lower the distortion and increased clarity, which isn't always the case. I spent a lot of money playing with parts only to find some not worth the materials they were made with.
I would greatly appreciate anything you can add here, like parts specifics and your findings.

good: Ag (Au-alloy contact)
good: gold overlay silver palladium
bad: gold overlay silver nickel
I’ve been using the Panasonic TX2-12V-1 AgPd relays. The website/datasheet states these are best for low signal applications up to 10V and 10mA max, but this seems at odds with Digikey and Mouser which suggest far higher voltages and current.
 
I got rid of the pops with the code shown and adjusted delays with the relays you can see in my link above. Some relays don't like to be switched one after the other, some don't like to be switched at the same time, but in all cases it was necessary to switch the low going bits first and the high going ones after that. That said the Muses solution sounded much better.
 
I don't like relay volume control, I have the Muses and it does sound very clean and transparent, seems to introduce nothing to the signal. I have also used the BTFSystems micro processor controlled LDR volume control which also sounds good, but the Muses sounds more transparent.

You can use a micro processor to directly switch multiple relays, I do it for input switching and muting. I use single coil latching relays (5V 20mA) that have a must switch rating of 3.75V and draw peak current for only about 5ms while switching. I ground the downstream coil pin to ground through a 150~200uF capacitor, current flows and switches the the relay and charges the capacitor when the processor pin is set high and current decreases smoothly to near zero as the capacitor charges. Then, when the processor pin is set low, the capacitor discharges back through the relay to the processor pin, again switching the relay. The coil DC resistance limits current to 20ma. So a processor could switch multiple relays with maybe 5~10ms delay between devices since current flows only momentarily when the relay is switching and thus with a 10ms PAUSE the processor is delivering current to only a single relay at a time. You really cannot hear a 10ms delay . . .
 
  • Like
Reactions: U102324
I would greatly appreciate anything you can add here, like parts specifics and your findings.


I’ve been using the Panasonic TX2-12V-1 AgPd relays. The website/datasheet states these are best for low signal applications up to 10V and 10mA max, but this seems at odds with Digikey and Mouser which suggest far higher voltages and current.
See the article in Linear Audio Volume 1 Resistor non-linearity, Ed Simons, Page 138. lots of info on resistor distortion. All see the product info from Vishay Percision resistors online
 
What are the pros and cons of 64 steps attenuator with 10k and 27k constant input resistance, see e. g. RelaiXed?
It is obvious that the output resistance of the former is less, but what else needs to be considered?
In my project I plan to use Arduino nano to control the relays.
 
Tom, yes this could be a problem since the interior is a glass tubular read relay with the coil assembly wound around the contacts so you would introduce a spike into the signal path when switching.
As far as I understand it, the distortion in reed relays is from the material used in the reed itself. You're also right that there could be some coupling between the coil and the reed, but I doubt that's responsible for the zipper noise. Rather, I think that is due to the switching of the attenuator steps, which creates steps in the output waveform. For MOSFET switches you will also have charge injection, which creates zipper noise unless compensated for.

See linear audio article on distortion in resistors.
Or read the X Chapters of The Art of Electronics, 3rd ed. Bruce Hofer's presentation from AES provides good coverage of resistor nonlinearities. You can find it on YouTube.

Basically you want to use resistors with a low temperature coefficient and low voltage coefficient. That does not necessarily mean expensive resistors. The Susumu RG I mentioned earlier fits these criteria and are very affordable. 15 cents/each in reel quantity if I recall correctly.

Tom
 
i was looking into latching type of relays, do you guys think these are any better than constantly powered ones in terms of the magnetic field they emit once switched?

reason is, it would be nice, once the volume is set that everything is basicly in "standby"

but this requires also some more wiring (2 mcu pins per relay), here is also where i see a mcu per board becomes beneficial

so i would need a 16 pin io MCU, 2x ULN2003, 6-8 relays, lcsc has those double coil latching ones with silver alloy+gold plating contacts: https://www.lcsc.com/product-detail/Magnetic-Latching-Relays_PANASONIC-TQ2SA-L2-5V-Z_C2684450.html and they are SMD
they draw 40mA, unfortunaly a bit too much for only the MCU...
 
Last edited:
I see more costs than benefits here. A DC current through a relay has no negative effect on the audio signal. And the current delivery capability must be there either way. The power savings are not significant.
you are probably right, on average 120mA (4 out of 8 relais) at 5V dont seem that much, specially since depending on what display i choose it could take 100-200mA alone

but i generally see it like this: its also not "much more" work to slap a second ULN2003 on it, so im honestly fine with either, and i see the potential benefit of less power consumption and "standby relais", the memory aspect doesnt plays a big role here since i would still need to save the current volume step for the user to know
 
  • Like
Reactions: U102324