Diode Clipping in the Feedback Loop

Started by Guitarfreak, September 29, 2010, 04:42:00 PM

Previous topic - Next topic

Guitarfreak

When you have diode clipping in the feedback loop of a gain stage, are they acting as a sort of power supply "conditioning" for that stage?

merlinb

Quote from: Guitarfreak on September 29, 2010, 04:42:00 PM
When you have diode clipping in the feedback loop of a gain stage, are they acting as a sort of power supply "conditioning" for that stage?
No... they're acting as a level-dependant feedback loop.

Mark Hammer

Op-amps are designed to provide maximum pedal-to-the-metal gain in the thousands, unless you tell them otherwise.  The feedback from the output back to one or the other input pin provides negative feedback than is akin to stepping on the brakes.  It tells the op-amp "I don't want you to apply maximum gain.  I want you to apply this much less gain."  The more negative feedback is applied, the harder those brakes are stepped on, and the lower the gain.

So, anything that reduces the amount of negative feedback, will reduce gain.  That's why a higher resistor value in the feedback loop generally results in more gain: it reduces the amount of negative feedback applied.

When diodes are in the feedback path, they do not permit any negative feedback to be applied...until the feedback signal from the output reaches the forward voltage of the diode.  So, if I have a pair of diodes in parallel with a 470k feedback resistor, all the negative feedback is coming through the 470k, until the point where the feedback signal is greater than the 520mv or whatever that the diode requires to conduct.  When you get to that point the diode allows the negative feedback through, such that the gain is now dictated by the feedback through the diode, and not through the 470k.

But of course, dropping the gain via that negative feedback path means the output will fall below the forward voltage of the diode/s.  At which point, the gain is now again dictated by the 470k alone.  I guess the brakes analogy can be extended in this manner: Two feet are being applied to the brake pedal, with one of them unchanging, and the other one only mattering when it presses harder than the first one

Guitarfreak

Quote from: Mark Hammer on September 29, 2010, 10:25:59 PM
Op-amps are designed to provide maximum pedal-to-the-metal gain in the thousands, unless you tell them otherwise.  The feedback from the output back to one or the other input pin provides negative feedback than is akin to stepping on the brakes.  It tells the op-amp "I don't want you to apply maximum gain.  I want you to apply this much less gain."  The more negative feedback is applied, the harder those brakes are stepped on, and the lower the gain.

So, anything that reduces the amount of negative feedback, will reduce gain.  That's why a higher resistor value in the feedback loop generally results in more gain: it reduces the amount of negative feedback applied.

When diodes are in the feedback path, they do not permit any negative feedback to be applied...until the feedback signal from the output reaches the forward voltage of the diode.  So, if I have a pair of diodes in parallel with a 470k feedback resistor, all the negative feedback is coming through the 470k, until the point where the feedback signal is greater than the 520mv or whatever that the diode requires to conduct.  When you get to that point the diode allows the negative feedback through, such that the gain is now dictated by the feedback through the diode, and not through the 470k.

But of course, dropping the gain via that negative feedback path means the output will fall below the forward voltage of the diode/s.  At which point, the gain is now again dictated by the 470k alone.  I guess the brakes analogy can be extended in this manner: Two feet are being applied to the brake pedal, with one of them unchanging, and the other one only mattering when it presses harder than the first one

Conceptually I think I've come to a better understanding of that now.  Except for the part where you said that a larger feedback resistor increases gain, that logically goes against everything else you said I think, especially compared to what you said in the sentence directly previous to it.  So essentially the feedback resistor is a way to a. lower the potential for gain, and b. reduce the amount of clipping that the diodes apply?

Since the feedback resistors are 'pumping the brakes' does that increase the amount of gain?  I'd imagine it would because if there was no 'brake pumping' the stage would be unclipped and clean, but then again without factoring in the diodes there technically is no clipping.

BadIdeas

Hm, I think my understanding of negative feedback clipping differs from that.
I'm sure you meant to say that anything that increases negative feedback decreases the gain, right?
Suppose there is a 470k resistor in the loop and an unspecified resistor from the -in to the ground. As I understand it, while the voltage is low and all the feedback is going through the 470k resistor, the gain is high and the waveform is steep. As the diodes turn on, they act as resistors parallel to the 470k and reduce the ratio if impedance to the -in to impedance to the ground, increasing negative feedback, and decreasing gain. This brings the waveform from a steep incline to a more level shape, comparatively speaking. Because the diodes are only affecting the gain of the input, the clipping is softer than diodes tied from the output to ground directly.

Am I wrong?
How hard can it possibly be to put FRESH vegetables in a can? Seriously.

Quackzed

QuoteExcept for the part where you said that a larger feedback resistor increases gain
( :) Mark, i hope you will excuse me for explaining your comment. :) )
basically a high value (470k) feedback resistor only lets a small amount of signal back to the input, so it REDUCES gain a small amount, for alot of gain at the output.
a low value (470) feedback resistor lets a large amount of signal back to the input, so it REDUCES the gain a large amount, for a little gain at the output.
nothing says forever like a solid block of liquid nails!!!

BadIdeas

I forgot to add that even silicon diodes don't turn on all at once, so I don't believe the output drops below the turn on voltage of the diodes. If anything, I may be most likely to be mistaken on this point.
How hard can it possibly be to put FRESH vegetables in a can? Seriously.

Guitarfreak

#7
Quote from: Quackzed on September 29, 2010, 11:29:18 PM
QuoteExcept for the part where you said that a larger feedback resistor increases gain
( :) Mark, i hope you will excuse me for explaining your comment. :) )
basically a high value (470k) feedback resistor only lets a small amount of signal back to the input, so it REDUCES gain a small amount, for alot of gain at the output.
a low value (470) feedback resistor lets a large amount of signal back to the input, so it REDUCES the gain a large amount, for a little gain at the output.


So if my understanding is correct:

In the example of the 470k resistor the output tone is characterized mostly by diode clipping, which is more or less close to what it would be without said resistors there.  Whereas the example of the 470Ohm resistor is far cleaner and quieter with far less diode clipping than would occur naturally with said diodes?

R.G.

There is a simpler way to look at this.

Imagine that you have an opamp which approaches the ideal: infinite, frequency-independent gain, and inputs which have infinite input impedance. This has a bipolar (+/-) power supply, and the + input is grounded. The output is tied through resistor Rf to the inverting input and the input signal is applied through a resistor Ri to the inverting input.

The inputs of the opamp cannot source or sink any current. If the output of our opamp happens to be more positive than ground, then it pulls the inverting input higher than ground by the resistor divider action of Rf and Ri; no current can go into or out of the inverting input. So the inverting input is pulled up by the output voltage times Ri/(Rf+Ri).

This voltage is higher than the + input, which is grounded, so the opamp amplifies the amount the inverting input is pulled above ground by the open loop gain, which is infinite, but inverting, so the output slews as fast as it can back toward ground. When it reaches ground, the inverting input is at ground because 0V times the Ri/(Rf+Ri) is still zero volts, and the output is no longer driven up or down. It balances at ground. Or in fact at any voltage where the + input is, because the gain drives the output to move the inverting input to exactly the same voltage as the + input. So we've proven that a opamp will balance at the place where the inverting input voltage is as close to equal to the + input voltage as the errors and imperfections will let it.

That's an important point: The inverting input is **always** at the same voltage as the + input as long as the opamp can balance there. Negative feedback forces this to be true by moving the output voltage around to make it true.

We can use this to find out things about the closed loop gain. With the (-) input held at the same voltage as the (+) input, ground in this case, if we put a signal on the input resistor of Vin, then a current flows through Ri of I = Vin/Ri. But the opamp input cannot source or sink current. The input current must be balanced by an equal and opposite current from the output to keep charge from piling up on the (-) input, as we know it cannot. The current from the output must be equal and opposite, so the current must be I, but the voltage on the output to get the same I must be Vout = Rf*I, same size current flowing in the feedback resistor as flows in the input resistor. That means that the output voltage must be Vout = Rf*I = Rf*Vin/Ri ; a little rearrangement give Vout/Vin = Rf/Ri. So the gain has to be Rf/Ri and the reason that the gain is that is because the feedback forces the net current at the inverting input to be zero.

The reason I'm blathering on about this is the **all opamp feedback networks** are effectively driven as though there is a current source driving them, because the current has to be the same as the current in the input resistor. If you use a nonlinear feedback device, like diodes, the opamp output does literally anything within it's power supply voltage and current limits to make the same current flow through the feedback device as the input resistor. All opamp feedback networks (weasel words go here)  are driven in current mode: a current is forced through them to balance the current on the inverting input at zero.

Now we're at the short, sweet explanation about what diodes in feedback around an opamp do. They are driven by a current equal to Vin/Ri, whether that's positive or negative with respect to the + input. And that's why the output can only swing +/- a diode drop higher or lower than the bias voltage. The diode lets through all the current needed at the (-) input with only a diode drop of voltage needed to drive it.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

teemuk

#9
Also, (in most cases) there is no single feedback resistor; there are feedback resistors.

Why? Because those resistors (and often also impedances from capacitances and possibly inductances within the feedback loop) form voltage divider to attenuate the feedback signal. More attenuation naturally means less negative feedback resulting into higher gain. With no attenuation at all the amount of NFB is 100% and the gain is unity.

Mark Hammer

Quote from: Quackzed on September 29, 2010, 11:29:18 PM
QuoteExcept for the part where you said that a larger feedback resistor increases gain
( :) Mark, i hope you will excuse me for explaining your comment. :) )
basically a high value (470k) feedback resistor only lets a small amount of signal back to the input, so it REDUCES gain a small amount, for alot of gain at the output.
a low value (470) feedback resistor lets a large amount of signal back to the input, so it REDUCES the gain a large amount, for a little gain at the output.

Yeah...that's what I said........poorly. :icon_lol:

Guitarfreak

#11
Quote from: teemuk on September 30, 2010, 08:54:41 AM
Also, (in most cases) there is no single feedback resistor; there are feedback resistors.

Why? Because those resistors (and often also impedances from capacitances and possibly inductances within the feedback loop) form voltage divider to attenuate the feedback signal. More attenuation naturally means less negative feedback resulting into higher gain. With no attenuation at all the amount of NFB is 100% and the gain is unity.

This is actually something that I am struggling with in a build project of mine, so I am glad you mentioned it.  The fact that the feedback circuit and voltage divider circuit are interconnected really affects what I hope to accomplish with the pedal.  I tried lowering the feedback resistors in order to get more headroom in the gain stage, then raising the base to ground resistors to compensate for the bias change, but the transistor turned off so I had to reverse the mod.  Next thing I am to do is going to be to lower the value of the base to ground resistors and see how that works.