# Negative feedback divider calculation for NE5532

I have this "Switched Gain" circuit from Douglas Self's book.

I want to implement the same topology but with different gain in decibels: 0 dB, 3 dB, 6 dB and 12 dB.

I need a method/formula to recalculate the divider.

• Can you design it if you were asked to provide gains of unity, 2, 4, 8 etc? Sep 15 at 17:53
• Yes you do. But you did not ask an answerable question about it. Is the problem not being to convert decibels to linear gain values or converting linear gain values to resistance values? Sep 15 at 18:44
• The question is clear enough, I don't know why people are voting to close it. Sep 15 at 19:43
• @GodJihyo Did you vote for it to remain open? If so it should have triggered the "leave open" option. It has now been voted to remain open so all is well :-). [[Hmmm: Still shows as 2 close votes but review queue says now remains open. Will check further]. Sep 19 at 3:07
• @RussellMcMahon No, didn't realize I could. I see how to now, will keep it in mind. Sep 19 at 4:41

The math is going to be a bit complicated.

The top part of the divider will be in parallel with the 10k resistor R50, so the formula for the gain of this circuit is:

$$Gain = 1 + \frac{R_{top}||10k}{R_{bottom}}$$

Where $$\R_{top}\$$ is the resistance of the top part of the divider string and $$\R_{bottom}\$$ is the resistance of the bottom part of the divider string for each switch position. You would need 4 resistors to get 4 gain values (including 0 dB). You end up with these formulas:

3 dB setting: $$\1.4125 = 1 + (R1 || 10k)/(R2 + R3 + R4)\$$

6 dB setting: $$\1.9953 = 1 + ((R1 + R2) || 10k)/(R3 + R4)\$$

12 dB setting: $$\3.9810 = 1 + ((R1 + R2 + R3) || 10k)/(R4)\$$

Someone might be able to work those out into a mathematical way to calculate the values, but my math skills are a bit too rusty so I'll propose another route, simulate.

Set up the circuit in a simulator. Start with a 2 resistor divider. Make the top resistor an easy value, let's say 1k. You can calculate the bottom resistor to get 3 dB gain pretty easily. $$R_{bottom} = (R_{top} || 10k)\cdot (Gain - 1)$$

$$R_{bottom} = (909.09)\cdot (0.4125) = 2203.8\Omega$$

So let's make the bottom resistance 2200$$\\Omega\$$

If you now run an AC analysis and plot the output you should see a gain of ~ 3 dB.

Next you have to find the values for 6 dB. You will need to divide that 2200$$\\Omega\$$ in such a way that you get a divider that will give you the right gain. So add another resistor in between the other two and move the tap point between it and the bottom resistor. Now play with the values of those resistors and re-run the simulation until you get a combination that adds up to 2200 and give you a gain of 6 dB. Pick two values that add up to 2200 and then if the gain is too low, add an amount to the upper one and subtract the same amount from the bottom one. I got 725 and 1475.

Now do the same for 12 dB. Leave the 725 where it is and divide the 1475 into two resistors, placing the tap between them. Adjust them the same way as before, 800 and 674 gives me pretty close to 12 dB.

For other gain values or more steps adjust the procedure accordingly.

Here's my finished circuit in LTspice.

Step 1: Convert the desired dB values to voltage ratios. For example, voltage gain of 6dB is a ratio of 2:1.

Step 2: Calculate the values for each desired gain value. Ignore the switch for now - you want 3 different gain-set resistor values based on the feedback resistor of 10k. For example, the gain value of 6dB has a gain-set resistor value of 10k.

Step 3: Subtract the gain set resistor values from each successive gain setting. Note that the higher-gain switch settings use the resistors from the lower gain settings.

This is a really simple problem to solve as soon as you break it down to these three tasks.

• As the circuit is shown in the question it's not like a typical Rf/Rin gain setup. The 10k resistor is in parallel with the top of the divider, so it makes the math a bit complicated. You could modify the circuit to do it this way, disconnect the top of the divider string from the output and just switch different resistances between the 1000uF cap and ground, I'm not sure if that will have any detrimental effect though. There may be a reason Self did it the way he did. Sep 16 at 1:33