-3
\$\begingroup\$

I want to create a resistor network, where the gain changes by 1 dB per switching in each resistor

See picture. Switches are all the same size.

enter image description here

How would I size these resistor values so that the gain from this resistor network changes by 1 dB for each additional switched in resistor? I want to make a network of 10 of these, so the switched vertically go to 10 and resistors horizontally to 10.

It's used in an impedance matched amplifier that uses this network for programmable gain, a progammable gain amplifier. Amplifier is just a differential opamp with input resistance R1, and this switching network as the feedback network. The load is 2*R1.

See picture.

\$\endgroup\$
9
  • \$\begingroup\$ If you're working in dB, that implies you may need this to be impedance-matched; do you? If so, you won't be able to do it as simply as you have here. \$\endgroup\$ Commented Nov 21 at 20:55
  • \$\begingroup\$ This is just a switched resistor network for an amplifier that is already impedance matched. \$\endgroup\$ Commented Nov 21 at 20:57
  • \$\begingroup\$ In that case, it depends on how the amplifier is configured. As is, it looks like you're trying to make an attenuator. \$\endgroup\$ Commented Nov 21 at 20:57
  • 1
    \$\begingroup\$ What I meant by that was that the question makes it look like you're trying to make a switchable passive attenuator, a very different task than a PGA. Show us your amplifier topology, not just the resistors. \$\endgroup\$ Commented Nov 21 at 20:58
  • 1
    \$\begingroup\$ Your latest image is also meaningless. Forget about the images and explain more what you want to happen especially in terms of impedance matching (if really needed). Does it really need to be a balanced attenuator? If so then that's 4 switches per attenuation stage. \$\endgroup\$ Commented Nov 21 at 21:10

2 Answers 2

3
\$\begingroup\$

This is wildly guessing from your description and the really hard to interpret pseudo-schematics you gave us, but making assumptions that don't work well with the self-contradicting parts of your comments (i.e., especially ignoring that you said the amplifier is impedance-matched, and ignoring that you have an idealized amplifier in your schematic, but think that the load matters here, which would indicated that you actually do need impedance matching, but if you need that, your whole approach makes no sense at all and can be discarded without further considerations):

  • The voltage gain of your amplifier is defined by the ratio of input resistors to feedback resistors, let's call it \$A = \frac{R_i}{\sum\limits_{n\text{. resistor enabled}}R_n} \$.
  • by definition, a gain of 1dB is the ratio defined by \$10^{\frac{1}{20}} =: \delta\$, putting that into a calculator will tell you \$\delta \approx 1.122\$.
  • Hence, adding a gain of 1 dB means increasing \$A\$ by a factor of \$\delta\$.
  • Assuming you mean to switch the feedback resistors: each switch must reduce the sum of enabled resistors by a factor of \$\delta\$.
  • therefore, every resistor must add \$\delta-1\$ in resistance to the sum of all previous resistors

The rest is you picking a first resistor; the second is trivially computed from the first (bold rule in above), the third from the sum of the first and the second, and so on.

Do I think you're on a sensible way to building a programmable gain amplifier? No, I'm afraid not. There's a couple misconceptions your question leaves us guessing at.

And: in your specific case, \$\delta-1\$ is only \$\approx 0.122\$. 12.2%: you will have a non-trivial time finding resistors in that raster, so you need to combine multiple resistors. Because combining resistors adds sums the variance in their tolerances, you pretty quickly end up in a situation where you need to hand-tune your resistive ladder. Then, with resistors of different magnitudes in series, some dissipate much more power than others – and resistors have thermal coefficients. Suddenly you're starting to come up with solutions to thermally couple large numbers of resistors.

Hence, yours is not really a good architecture to realize in discrete electronics. Generally, modern multiplying DACs (hint: look that up on wikipedia!) are not build like that.

There's a host of other ways to achieve adjustable gains. But you will need to ask a new question that actually describes the signal (frequency, amplitudes, powers, fidelity & noise) and the application. Your approach so far is not sufficient to actually help you.

\$\endgroup\$
3
\$\begingroup\$

It sounds like you want to create, not a resistor network, but a variable resistor, to use as a component in your fedback amplifier. The variable resistor should be able to be set to several values in a dB ratio.

Given the amplifier topology, any consistency of impedance around the inputs and outputs is moot, the fedback amplifier has a zero output impedance. As long as it has enough current output capability, it will drive the load.

With the topology you have illustrated, the gain is controlled linearly with the value of the feedback resistor. The input resistor sets a current, the feedback resistor gets a voltage developed across itself equal to IR.

All it takes to choose the values is to get your calculator or favourite spreadsheet, and calculate Rn = R0 * 10^(n/20) for n dBs, the inverse of the dB function. Then it's just a question of subtraction to find the incremental values that you switch.

I think 1dB steps would be too small for audio, 2dB is quite fine enough. A good approximation to 2dB steps can be had from the Renard R10 series: 1.0, 1.25, 1.6, 2.0, 2.5, 3.2, 4.0, 5.0, 6.3, 8.0, 10.0.1 This can be found cropping up everywhere, the most visible to an engineer might be that its alternate terms (the R5 series) are used for the standard voltages for capacitors.

Place this variable resistor in the feedback network of your amplifier wherever it's needed.

schematic

simulate this circuit – Schematic created using CircuitLab

I've normalised the values to 100 Ω, of course scale them as required.

I've only drawn 9 steps, 100 to 800 Ω, but I'm sure you can extend the pattern.

You'll notice the resistors I've used are not in a nice progression. This is as a result of taking the small differences between two, larger, approximated values. This nicely illustrates the error magnification feature of taking small differences like this. If you use exact values for the total required resistances instead of the R10 values, then the differences will progress nicely.

If you want more accuracy, then use the formula above rather than the approximate 'nice numbers' R10 series to base the values on. If you do really want 1dB steps, then use the formula above for 1dB steps, or use the R20 series.

If this is simply a volume control for audio, then extreme accuracy on the steps is not really required. Choose the nearest E12 or E24 value resistors for the string of resistors and compute the errors, you'll find they are quite small.

Do bear in mind that (apart from the 1 or 2 dB step size) I've answered the question as you have asked it. I am not endorsing most of the other elements of your question. Your amplifiers are not impedance matched. This is probably not the best way of varying gain in an amplifier. I don't know whether your application is best served by a differential amplifier: note that its input resistance is not symmetrical, and it uses twice as many gain control elements as a single-ended amplifier.

1 I'm trying to learn to do logs in my head, to at least 1.5 places. Get the first place from internalizing that series, get the second from linear interpolation between them. Handy for approximating roots and powers, as well as multiplication and division, if you're lying awake at night.

\$\endgroup\$
11
  • \$\begingroup\$ oh nice (+1); didn't know about the Renard series! Thanks for writing this answer! \$\endgroup\$ Commented Nov 22 at 12:20
  • 1
    \$\begingroup\$ @MarcusMüller Glad you liked it, I try to slip a bit of gratuitous extra information into my answers. \$\endgroup\$ Commented Nov 22 at 16:41
  • \$\begingroup\$ So the switches are sized using R20 (vertical switches) and the resistors (horizontal) using the R0 equation you posted assuming a 2dB step for both ? \$\endgroup\$ Commented Nov 23 at 15:53
  • \$\begingroup\$ @user43423432432 I don't understand your comment/question, so I'll just reiterate and try to clarify. I've numbered the switches for the resistance that the diagram has when only that switch is closed. Use R10 for 2dB steps, use R20 for 1dB steps, if you're happy with the approximate values. Use the dB inversion formula: ratio = 10^(dB/20) for the exact values. \$\endgroup\$ Commented Nov 23 at 16:24
  • \$\begingroup\$ I got it now - but if I use R20 don't I need 20 switches now and 20 resistors ? \$\endgroup\$ Commented Nov 23 at 20:02

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.