Using a Rotary switch as an Attenuator

Started by YouAre, June 27, 2016, 12:48:20 PM

Previous topic - Next topic

YouAre

Hello All!

I'm building an output attenuator for mic preamps for a buddy, and we have elected to use resistors on a rotary switch in lieu of a pot for precision between channels and easy recall of attenuation settings.

I'm using the "U-Pad" design below:
http://www.uneeda-audio.com/pads/

Per their instructions, I'm using the output impedance of the mic preamp (600 ohms) as my shunt resistor (R2). I'm then calculating the series resistance (R1/2) based as I would a normal voltage divider with the desired attenuation levels (5, 10, 15, 20, 30 dB), and then dividing that required resistance in half since it's a balanced signal. Is that correct?

Next, I'd like to know which is the "best" method of switching the series resistance to avoid POPs. I have two options:
A) Calculate the series impedance such that the rotary switch adds in series resistors progressively
B) Switch the entire series resistance

If anyone needs a diagram of either of the above, I'll be happy to draw one up quickly.

Are there any major consequences for either of the above options? Having run the calculations for the resistance values for both options, the resistance values required are readily available. So I won't have any trouble with Option A as I had initially suspected.

Thank you for your help!

Unlikekurt


YouAre

Quote from: Unlikekurt on June 27, 2016, 02:25:18 PM
Switch with shorting contacts?

I forgot to mention that, thank you!

I figured I could use a switch with shorting contacts in either of those scenarios.

anotherjim

Years ago, I built a passive switched attenuator/selector for my "studio" monitoring. Balanced in my case, but...

I used the metering in an audio program with a test wave looping and picked the 1% resistors to work out value for the shunt of each step with a simple setup in a breadboard. The shunt resistors had a common to Cold one side with the other switched to Hot, so each step has a unique resistor - I figured it simpler that way than tapping a series ladder. I didn't go mad over precision of the steps - the nearest whole dB is plenty good enough.
Because I only had 6 way switches (needed 2 poles for stereo), I actually built 2 switches, one course and one fine, the fine is usually off.

Decent rotary switches were another matter. Since as I was making it up as I was going along I used cheap switches - the usual plastic bodied ones - Alpha?
I did use Make-before-break ones, but they do bounce, which kind of defeats the purpose, so there still can be clicking. In practice, it's no problem for me and its remained in my set-up ever since.

PRR

What is the actual source impedance? Nominal load? Is it fussy?

Same for what it is driving.

A 600:600 pad may need more contacts. A 600:10K pad hardly needs a switch.

There will be "pop" when you cut 5dB signal in/out; you won't be throwing this switch mid-track.

I can't imagine 30dB pad going to a Line Input.
  • SUPPORTER

YouAre

Quote from: anotherjim on June 27, 2016, 04:58:04 PM
Years ago, I built a passive switched attenuator/selector for my "studio" monitoring. Balanced in my case, but...

I used the metering in an audio program with a test wave looping and picked the 1% resistors to work out value for the shunt of each step with a simple setup in a breadboard. The shunt resistors had a common to Cold one side with the other switched to Hot, so each step has a unique resistor - I figured it simpler that way than tapping a series ladder. I didn't go mad over precision of the steps - the nearest whole dB is plenty good enough.
Because I only had 6 way switches (needed 2 poles for stereo), I actually built 2 switches, one course and one fine, the fine is usually off.

Decent rotary switches were another matter. Since as I was making it up as I was going along I used cheap switches - the usual plastic bodied ones - Alpha?
I did use Make-before-break ones, but they do bounce, which kind of defeats the purpose, so there still can be clicking. In practice, it's no problem for me and its remained in my set-up ever since.


The exact dB cut is almost immaterial. I picked round values to which I'd calculate a reasonable accuracy (i.e. 20dB is actually 19.9 with my calculated values). I would like precision between channels though.

I'm going to try the basic alpha switches, and some of the fancier grayhill switches...just cause. Popping isn't going to be an issue, you're right. It's more of a nice to have in this case.

Quote from: PRR on June 27, 2016, 04:59:17 PM
What is the actual source impedance? Nominal load? Is it fussy?

Same for what it is driving.

A 600:600 pad may need more contacts. A 600:10K pad hardly needs a switch.

There will be "pop" when you cut 5dB signal in/out; you won't be throwing this switch mid-track.

I can't imagine 30dB pad going to a Line Input.

The attenuator will be on the output of mic preamps. The goal is to crank the gain to the point of clipping them. I'm not familiar with recording gear as this is my first foray into studio equipment, but I believe 600 ohms is the typical output impedance of mic preamps. Please correct me if I'm wrong.

This will likely be going straight into the interface, as I don't believe my buddy plans on using anything for analog makeup gain.

When you say 600/600 pad, do you mean 600 ohm series resistor for a gain of .5? And can you please clarify what you mean when a 600:10K pad doesn't mean a switch?

And is 30dB too aggressive of a cut for a mic preamp output? In all honestly, my rotary switches have 6 positions. I honestly don't mind having a setting that doesn't get used.

PRR

> goal is to crank the gain to the point of clipping

Without clipping this interface input?

Then I submit that the task is clear. Say the preamp clips at 10V. Say the interface clips at 2V. A 5:1 pad is just-right. Since at this level there is no penalty in driving the interface somewhat less than its "max", we might go 10;1, 20dB.

This needs adjusting for the actual interface input clipping level, which may be higher than 2V.

It isn't clear if you plan different preamps. A few won't hit 5V, and then the 20dB pad is still reasonable (you can adjust-up the -12dB level in the digital side). A very few will do more than 10V, but rare, and I wonder if you might just give them a dedicated 10dB pad to get more practical output even when not distorting.

An old-man note: distorting a live signal, you are stuck with what you did live. It may not sound so good the next day, or trial-mixed with the other tracks. After some next-day regrets, I usually tracked "without damage". No EQ, distortion, reverb. Once on tape (CD, flash), I could then mangle it digitally or sent-out to analog toys, without risking the precious original take.
  • SUPPORTER

J0K3RX

Doesn't matter what you did to get it... If it sounds good, then it is good!

YouAre

Quote from: PRR on June 27, 2016, 07:17:33 PM
> goal is to crank the gain to the point of clipping

Without clipping this interface input?

You got it!

Quote
Then I submit that the task is clear. Say the preamp clips at 10V. Say the interface clips at 2V. A 5:1 pad is just-right. Since at this level there is no penalty in driving the interface somewhat less than its "max", we might go 10;1, 20dB.

This needs adjusting for the actual interface input clipping level, which may be higher than 2V.

That's the basic premise of what he wants to do. The friend that wants this sent me this as a reference.
http://www.recordingwithgas.com/GAS_A-10_Attenuator.html

Quote
It isn't clear if you plan different preamps. A few won't hit 5V, and then the 20dB pad is still reasonable (you can adjust-up the -12dB level in the digital side). A very few will do more than 10V, but rare, and I wonder if you might just give them a dedicated 10dB pad to get more practical output even when not distorting.

My friend will likely be using several different kinds of preamp, so the versatility of multiple pad options seems to be the safest bet.

Quote
An old-man note: distorting a live signal, you are stuck with what you did live. It may not sound so good the next day, or trial-mixed with the other tracks. After some next-day regrets, I usually tracked "without damage". No EQ, distortion, reverb. Once on tape (CD, flash), I could then mangle it digitally or sent-out to analog toys, without risking the precious original take.

Duly noted. I do leave his recording techniques to his discretion, but he's a conservative enough recording engineer that I can trust that he won't permanently affect a good take with an overly distorted signal that's "committed to tape." He may end up using this in a reamping setup.

Do you have any comments on the resistor switching though? On Switching the series impedance entirely vs. gradually switching in resistance in series?

Thank you for the help!

Quote from: J0K3RX on June 27, 2016, 10:45:50 PM
You could try one of these...
http://www.homedepot.com/p/AudioSource-Impedance-matching-Volume-Control-AOSAE100VC/205411317


But where's the fun in that  :)

This is definitely one of those situations where it is cheaper for us to build it than to buy it. This is cool though! Didn't know home depot started carrying stuff like this.

ashcat_lt

#9
Most professional line level gear is designed for nominal levels at +4dbu with 16-20db of headroom.  So they tend to clip somewhere over 20V p2p.  On my interfaces, 0dbfs~27V, I think the analog components in them get non-linear before that point, but don't actually stop it hitting the digital ceiling.

Pretty sure most mike preamps are designed to put out about the same types of levels.  If you're really pounding it into distortion, it probably will push following stages into non-linearity if not actual clipping.

Anywho, this idea of a passive resistant ladder is nice for all the reasons that passive stages are nice (headroom, noise, and stuff), and really crappy for the big reason that passive is bad - it is completely dependent on the properties of both the source and the load.  Especially in this case where you're trying to rely on the source Z as the "top resistor" in the divider, it's really tough to say what you're actually going to get out of it.

You can measure the source Z of one pre and then calculate your pad for that, but you can not assume that the next will be anywhere near the same.  Build it for 600 ohms, what happens if your new source is 1K?  Maybe not a huge difference, but noticeable.  What happens is the next pre is an opamp source at 15 Ohm?  That's a real difference!

And that's not mentioning the load.  So he plans to always hit one interface, so you know what that load is going to be, and you absolutely must design for it.  It's in parallel with (an integral part of) the "bottom resistor" in the divider and will have an impact on your results.

And all of this assumes that the reactive parts of the circuit have values big or small enough that they are always outside the audible range with all of the values you choose.  This is also a huge assumption.

An actual voltage divider where you set both the top and bottom resistors and the overall total R stays constant will be a bit more consistent and predictable in most cases, but having it buffered on both sides would be quite a bit better. 

YouAre

Quote from: ashcat_lt on June 28, 2016, 11:58:36 AM
Most professional line level gear is designed for nominal levels at +4dbu with 16-20db of headroom.  So they tend to clip somewhere over 20V p2p.  On my interfaces, 0dbfs~27V, I think the analog components in them get non-linear before that point, but don't actually stop it hitting the digital ceiling.

Pretty sure most mike preamps are designed to put out about the same types of levels.  If you're really pounding it into distortion, it probably will push following stages into non-linearity if not actual clipping.

Anywho, this idea of a passive resistant ladder is nice for all the reasons that passive stages are nice (headroom, noise, and stuff), and really crappy for the big reason that passive is bad - it is completely dependent on the properties of both the source and the load.  Especially in this case where you're trying to rely on the source Z as the "top resistor" in the divider, it's really tough to say what you're actually going to get out of it.

You can measure the source Z of one pre and then calculate your pad for that, but you can not assume that the next will be anywhere near the same.  Build it for 600 ohms, what happens if your new source is 1K?  Maybe not a huge difference, but noticeable.  What happens is the next pre is an opamp source at 15 Ohm?  That's a real difference!

And that's not mentioning the load.  So he plans to always hit one interface, so you know what that load is going to be, and you absolutely must design for it.  It's in parallel with (an integral part of) the "bottom resistor" in the divider and will have an impact on your results.

And all of this assumes that the reactive parts of the circuit have values big or small enough that they are always outside the audible range with all of the values you choose.  This is also a huge assumption.

An actual voltage divider where you set both the top and bottom resistors and the overall total R stays constant will be a bit more consistent and predictable in most cases, but having it buffered on both sides would be quite a bit better.

All very good points, thank you!

I should give more information on some of the equipment he plans on using this with.

He's having me assemble preamp kits from this site: https://seventhcircleaudio.com/products#

The preamps he's selected (n72 and a12) seem to have a 604 ohm resistor connecting the 2 hots of the XLR output. This leads me to believe that the output impedance of these units is ~604ohms. Is that correct?

I'm also inclined to think that tacking on this attenuator on the output of these preamp units will maintain the 604 ohm output impedance if we use a 604R resistor as the shunt. Is that a safe assumption?

At that point, we're just matching the output of the attenuator to the source feeding it. I'll have to leave it up to him to match his preamps to the gear downstream of it. This should work if we're reasonably certain that all of the pieces of gear feeding this are all ~600R, right?

I can always make something more universal by buffering the input and output per your recommendations, but I'm not sure if that's required for the preamps he's planning on using.

Thank you for checking my understanding of the design so thoroughly!

anotherjim

I looked at the N72 schematic. It is transformer output. The 604ohm resistor appears to be optional - I dunno why, loading for long cable?
I'd keep it simple, and fit fixed 1k in hot & cold, then you're covered. ~All you need is enough sensible choices of attenuation. Incidentally, the design shows for a switched attenuator in the circuit after the mic transformer, a rather complex 12 way 3 wafer switch stack. I may be mis-interpreting it's existence, but won't that do it already?

YouAre

Quote from: anotherjim on June 28, 2016, 05:13:56 PM
I looked at the N72 schematic. It is transformer output. The 604ohm resistor appears to be optional - I dunno why, loading for long cable?
I'd keep it simple, and fit fixed 1k in hot & cold, then you're covered. ~All you need is enough sensible choices of attenuation. Incidentally, the design shows for a switched attenuator in the circuit after the mic transformer, a rather complex 12 way 3 wafer switch stack. I may be mis-interpreting it's existence, but won't that do it already?

Not sure, I assumed it's to keep a fixed standard output impedance.

Can you please elaborate on the fixed 1k on the hot and cold lines? You're referring to series resistors, correct?

Also I believe you're referring to the input trim. That will help prevent the preamp for saturating. The goal with this attentuator is to allow the preamp to saturate with no ill effects on the gear it feeds.

PRR

> The 604ohm resistor appears to be optional

No, it is "if needed".

The box needs a 600 Ohm load to hit its specs.

If you have true-600 interfaces, that's fine.

Most inputs have been "10K bridging" for decades. The box OT frequency response will be off its specs. Then you DO use the 604 Ohm to hit the design response.

(Yes, 604 || 10K is not 600.00. Most of these issues come out right for anything from 450 to 900 Ohm load. However a 640r dummy load does get righter for 10K-22K bridging. Indeed 604 may be typo for 640.)
  • SUPPORTER

anotherjim


The right hand scheme. R2 is the variable shunt.
I'd go for a switch with no R2 on first step, and a variable resistor on the last step. Trial using the pot, measure the pot resistance and use that value to fit fixed resistors for the remaining in-between steps.
I offer this advice with the proviso that I have no definite idea how it would affect the response of the output transformer, but I'm thinking that 604 resistor needs to be there - low frequency response would be poorer without it?

YouAre

Sorry for the delay guys! My long weekend got started a little early  ;D

Quote from: PRR on June 28, 2016, 08:18:36 PM
> The 604ohm resistor appears to be optional

No, it is "if needed".

The box needs a 600 Ohm load to hit its specs.

If you have true-600 interfaces, that's fine.

Most inputs have been "10K bridging" for decades. The box OT frequency response will be off its specs. Then you DO use the 604 Ohm to hit the design response.

(Yes, 604 || 10K is not 600.00. Most of these issues come out right for anything from 450 to 900 Ohm load. However a 640r dummy load does get righter for 10K-22K bridging. Indeed 604 may be typo for 640.)

So which load do I really want to design to? Do I want to match the output impedance of the gear feeding this attenuator? Or the input impedance of the gear that this attenuator feeds?

Looking up the specs for the other preamp he's using ( http://ams-neve.com/wp-content/uploads/2016/03/10731084usermanualissue51-1.pdf , page 9), it looks like a 600ohm output impedance. Also looking at the Carnhill VTB1847, which is the output transformer for the SCA Neve preamp, it seems that it also has a 600ohm output.

In this instance, do we really need that 604ohm ouput resistor on the preamp? Wouldn't it simply drop the output impedance of the transformer from 600R to approx. 300R?

Thank you again for all the help!

Quote from: anotherjim on June 29, 2016, 07:08:04 AM

The right hand scheme. R2 is the variable shunt.
I'd go for a switch with no R2 on first step, and a variable resistor on the last step. Trial using the pot, measure the pot resistance and use that value to fit fixed resistors for the remaining in-between steps.
I offer this advice with the proviso that I have no definite idea how it would affect the response of the output transformer, but I'm thinking that 604 resistor needs to be there - low frequency response would be poorer without it?


I assume the process you described above would be to determine the proper output impedance of the unit we're designing, correct?

anotherjim

I really don't think you can achieve perfect impedance matching with a simple attenuator. The process I described is for finding actual attenuation values with no pretence of accurate matching. Each step will change the load impedance the OT sees. You can have a constant impedance attenuator - that means more switch poles & resistors - as shunt R decreases then series R must increase to keep the total constant.

If your engineer is after "character" sound rather than pristine, then maybe worrying about impedance matching is moot?

If the OT works best into 600R (across the secondary coil), then a preferred attenuator setting ought to present 600 ohm total (including the following 10k of the interface in parallel). Clearly a 2x1k + X pad is not going to be 600R, but in parallel with "some" value resistance across the OT and at some value of X, then it could be, but only at that one value.

An spdt centre off switch could be used to give the following load resistor across the output transformer ...
Centre - no 600R (next device is 600R input),
Up - 600R connected but with no following attenuator used.
Down - Selected R to give 600R total with attenuator used.

PRR

> looks like a 600ohm output impedance.

"Output impedance is 75 ohms @1kHz."

But rated for the semi-bridging load of 600 Ohms.

> the output transformer

That's a key detail. Transformer response varies with loading. It may not meet its +/-0.5dB 20Hz-20KHz spec if the load is not pretty near 600 Ohms.

Dunno why you care. A 600 Ohm dummy-load is 12 cents. (Ah, maybe 50 cent... this amp can dump over 1 Watt to a load.)

> goal is to crank ...to ...clipping

Especially if you are gonna abuse the signal (AND this preamp) until it looks like a demo-derby loser.

I think a 470-1K 2 Watt dummy-load is in order because this Neve-type output stage may be strained running totally un-loaded. It does not have to be 600.0 Ohms; indeed the past-clipping sound will be different if it isn't.

Then pad-out with a U-pad, 2.2K in the two legs, 500r-2K to taste in the shunt arm.
  • SUPPORTER

tubegeek

Quote from: PRR on June 28, 2016, 08:18:36 PMIndeed 604 may be typo for 640.

I think it's just the closest 1% component to 600.
"The first four times, we figured it was an isolated incident." - Angry Pete

"(Chassis is not a magic garbage dump.)" - PRR

YouAre

Quote from: anotherjim on July 05, 2016, 04:59:32 PM
I really don't think you can achieve perfect impedance matching with a simple attenuator. The process I described is for finding actual attenuation values with no pretence of accurate matching. Each step will change the load impedance the OT sees. You can have a constant impedance attenuator - that means more switch poles & resistors - as shunt R decreases then series R must increase to keep the total constant.

Understood. I don't think I'll try to "reasonably" maintain impedance.

Quote
If your engineer is after "character" sound rather than pristine, then maybe worrying about impedance matching is moot?

If he's used to a certain overdriven sound that works with an analog board, I'd like to maintain that character. I have a feeling that a severe impedance mismatch will alter the frequency response of the transformer. It could be for better or for worse, but I won't make that call.


Quote
If the OT works best into 600R (across the secondary coil), then a preferred attenuator setting ought to present 600 ohm total (including the following 10k of the interface in parallel). Clearly a 2x1k + X pad is not going to be 600R, but in parallel with "some" value resistance across the OT and at some value of X, then it could be, but only at that one value.

I'm not certain there is a 10k resistance at the input of the interface. I'm pretty certain it's "expecting" to see something with a 600ohm output impedance at its input.

Quote
An spdt centre off switch could be used to give the following load resistor across the output transformer ...
Centre - no 600R (next device is 600R input),
Up - 600R connected but with no following attenuator used.
Down - Selected R to give 600R total with attenuator used.

That's a damn good idea actually. Thank you!

Quote from: PRR on July 05, 2016, 05:21:19 PM
> looks like a 600ohm output impedance.

"Output impedance is 75 ohms @1kHz."

But rated for the semi-bridging load of 600 Ohms.

> the output transformer

That's a key detail. Transformer response varies with loading. It may not meet its +/-0.5dB 20Hz-20KHz spec if the load is not pretty near 600 Ohms.

Dunno why you care. A 600 Ohm dummy-load is 12 cents. (Ah, maybe 50 cent... this amp can dump over 1 Watt to a load.)

I understand that a transformer isn't going to deliver a consistent output at all frequencies, hence their "color."

I'm not planning on skipping the 604R resistor. What I maaaaaay do is bypass the resistor on the preamp if I tack on this attenuator. So this attenuator network would take place of that resistor effectively.

Quote

> goal is to crank ...to ...clipping

Especially if you are gonna abuse the signal (AND this preamp) until it looks like a demo-derby loser.

I may have been a liiiiittle facetious with how much he plans on cranking this.

Quote

I think a 470-1K 2 Watt dummy-load is in order because this Neve-type output stage may be strained running totally un-loaded. It does not have to be 600.0 Ohms; indeed the past-clipping sound will be different if it isn't.

Then pad-out with a U-pad, 2.2K in the two legs, 500r-2K to taste in the shunt arm.

Can you clarify on why the dummy load should be 2 watts? the 604R resistor on the output of the transformer is only 1/4W on the bill of materials for the preamp.

And just to clarify, you're suggesting keeping the series resistors (R1/2,  referring to the diagram above) fixed while swapping the shunt resistor (R2) to get different attenuation values? That does simplify having to switch 1 resistor instead of 2...

Thank you again!

Quote from: tubegeek on July 10, 2016, 10:28:47 AM
Quote from: PRR on June 28, 2016, 08:18:36 PMIndeed 604 may be typo for 640.

I think it's just the closest 1% component to 600.

Confirmed.  Check all of the other projects, and they're meant to be 604. There is no 600R resistor available at 1/4W and 1% tolerance.