News:

SMF for DIYStompboxes.com!

Main Menu

Mis-biased Opamps

Started by Bill Mountain, March 01, 2012, 04:08:58 PM

Previous topic - Next topic

Bill Mountain

Today is one of those days where I just ask everything that pops into my head.

If one were to intentionally mis-bias an opamp could it accept a larger voltage swing on one side than the other?

For example:  Putting some sort of active stage after an assymetrical clipping stage.

ashcat_lt

This raises an interesting question re: whether the asymmetry survives the trip through an AC coupling cap.  That is, does an assymetrically clipped square wave not just look pretty much like a symetrical square wave with a DC bias?  Will the coupling cap just kind of float up to where "0" is actually halfway between the new peaks?  Then you apply your new bias voltage and it wiggles symmetrically around that?  I'm asking because I really don't know, but am interested.

Mark Hammer

#2
They probably ARE misbiased in a great many cases, if you think about it.

How close to an ideal middle do a pair of 5% resistors make the Vref in most circuits?
How much of a voltage swing can the chips manage, using a single-ended 9v supply?
Given the amplitude of the input signal, how much gain can be applied to the signal on each side of that presumed "middle" reference voltage.

Consider.....

Using a pair of 5% 47k resistors, that middle could be at somewhere between 4 and 5 volts with a fresh 9v battery.
Assuming it's an okay op-amp, it should be able to swing within a volt of each rail, so from 1 to 8v or a 7v, or +/-3.5v range.
Assuming the typical input signal amplitude is around 100mv, the signal should be able to be amplified 35x before running out of headroom.
If the Vref is not exactly in the middle (let's say it's at +4v), then the signal can swing 30x on the negative side and 40x on the positive side.

The majority of distortion/clipping circuits will generally apply gain > 100x.

So I'm gonna say you've already heard what it sounds like, pretty much every time you plug in a pedal.

having said that, there ARE degrees of misbiasing, and I would imagine what you're pondering is some form of misbiasing that is more than simply 10% off the midpoint.

R.G.

Quote from: Bill Mountain on March 01, 2012, 04:08:58 PM
If one were to intentionally mis-bias an opamp could it accept a larger voltage swing on one side than the other?
For example:  Putting some sort of active stage after an assymetrical clipping stage.
Yes, but that's the wrong way to look at it.

An opamp is best thought of as being able to move its output to anywhere in its output voltage range with a few millivolts of difference between its inputs. This is always based on where the (+) input is sitting. So putting the + input at any voltage inside the common mode range is how you bias an opamp. Moving the - input more than a few millivolts away from the (+) input in either direction moves the output the full range of possible voltage.

So if the + input is offset from the dead middle of the opamp power supply, the output will bang against one side of the power supply first. So yes, it will accept a bigger input on one polarity than the other.
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.

Bill Mountain

Quote from: R.G. on March 01, 2012, 05:41:21 PM
Quote from: Bill Mountain on March 01, 2012, 04:08:58 PM
If one were to intentionally mis-bias an opamp could it accept a larger voltage swing on one side than the other?
For example:  Putting some sort of active stage after an assymetrical clipping stage.
Yes, but that's the wrong way to look at it.

An opamp is best thought of as being able to move its output to anywhere in its output voltage range with a few millivolts of difference between its inputs. This is always based on where the (+) input is sitting. So putting the + input at any voltage inside the common mode range is how you bias an opamp. Moving the - input more than a few millivolts away from the (+) input in either direction moves the output the full range of possible voltage.

So if the + input is offset from the dead middle of the opamp power supply, the output will bang against one side of the power supply first. So yes, it will accept a bigger input on one polarity than the other.

So is there any possibility of playing with this to get some more clean headroom after an asymmetrical distortion stage without increasing supply voltage?

R.G.

If you offset the correct direction and perfect amount, yes.

However, it strains the concept of 'clean headroom' to the breaking point, as it's only clean with the preceding distortion stage, and then only with the right amount of offset and gain. And it offers no bigger signal than the opamp would otherwise do, just it bangs into the power supply less with that specific stage preceding it.

I suppose I'm objecting to the idea of "headroom". Yes, if you have a signal that is DC coupled and is guaranteed to be bigger to one side than the other, you can offset an opamp to make up for that so it bumps into the power supply less on the tall side.

Let's do some particulars. Let's say you have a sine wave signal that's +/- 1V peak, 2V peak to peak. You run it through an asymmetrical clipper, which we'll say is just a germanium diode, and the negative side clips at -0.3V. The resulting signal is now 1.3V peak to peak, but it's offset positive by about 0.333 V, that being the average value of a half wave rectified signal  and a -0.3V rectangle on the negative side. Let's also assume you have an opamp which has rail to rail inputs and outputs so we don't have to go monkey with datasheets to get a feel for what's happening.

If you bias the opamp at half the 9V power supply, 4.5V, and AC couple the signal, the thing will swing up a bit less than 1V and down about 0.63V. These are not equal because of the different times the voltages spend in those levels. So you can have an opamp gain of up to 4.5V/1V, or 4.5x before you get opamp clipping on top of the asymmetrical clipping already there. Note that this is the total gain, either 1+ Rf/Ri for noninverting or Rf/Ri for inverting.

If you offset the bias point down so that the opamp is just hitting the positive and negative peaks on the power supplies, the available gain will be bigger. It will be 9V/1.3V = 6.9x instead of 4.5x. In that sense, you do have more 'headroom'.

This only happens at one specific bias point and clipping voltage. Change anything about the signal, and the balance of bias point and gain before hitting the power supplies fails, so the 'headroom' is less. Notice that neither gain is all that big. Every type of distortion will have it's own required bias point. Changing things like treble cut or bass cut on the signal will affect things as well. Change the overall harmonic structure in the signal, or get a guitar pickup with an offset or a big second harmonic for a part of the note and it's a coin toss whether the incoming signal will push the signal off to the short or tall side of the offset. IMHO, it's a fragile design, needing carefully tweaked. That doesn't say it will sound bad, just that it may not do what you expect it to all the time.

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.

merlinb

Guitarists often go on about headroom, but often I don't think they really comprehend what it means. Headroom AND distortion? Kinda mutually exclusive...

Also, what they so universally fail to understand, is that if you don't want to run out of headroom, *just turn the signal level down a bit*. That's what all those pots are for.... ::) *

* "Yeah, but, like, I want more headroom AND I want it louder, man"
Face palm.

Bill Mountain

Great responses guys!

This was more theoretical than practical.  I was just picturing putting an active filter or signal boost after a clipping stage and trying to think of ways to keep the next opamp from clipping.

merlinb

Quote from: Bill Mountain on March 02, 2012, 05:19:11 AM
This was more theoretical than practical.  I was just picturing putting an active filter or signal boost after a clipping stage and trying to think of ways to keep the next opamp from clipping.
The clipped signal would noramlly have the same amplitude as the clean signal would (probably less, since it would sound louder so the player would probably turn it down), so it's highly unlikely that a pedal designed for the clean signal (like a filter) would somehow not have enough headroom for the clipped signal. If anything the clipped signal is easier to handle since its amplitude is hard limited; you are guarenteed never to get any sudden large transients...

Bill Mountain

#9
Quote from: merlinb on March 02, 2012, 08:27:31 AM
Quote from: Bill Mountain on March 02, 2012, 05:19:11 AM
This was more theoretical than practical.  I was just picturing putting an active filter or signal boost after a clipping stage and trying to think of ways to keep the next opamp from clipping.
The clipped signal would noramlly have the same amplitude as the clean signal would (probably less, since it would sound louder so the player would probably turn it down), so it's highly unlikely that a pedal designed for the clean signal (like a filter) would somehow not have enough headroom for the clipped signal. If anything the clipped signal is easier to handle since its amplitude is hard limited; you are guarenteed never to get any sudden large transients...

So if I used an Si and Ge diode like R.G.'s example I could assume that the input of the next stage will never see over 1 volt (700 mV for the Si plus 300 mV for the ge) and I can base the gain of the following stage on that assumption?  Or 2.1V if I used 3 Si's or .9 volts for 3 Ge's, etc.

I guess I'm picturing hitting the rails with double the signal voltage on one side because of the assymetry.  I I went with 3x Si's I'd have 1.4 (will say positive) and .7 (negative).  I could only amplify the positive side by 3.2 but then I'd be wasting gain on the negative side because I could go up to 6.4 times voltage gain.

Its probably more trouble than it's worth but it's fun to think about getting the most out of each stage.

merlinb

Quote from: Bill Mountain on March 02, 2012, 09:09:14 AM
So if I used an Si and Ge diode like R.G.'s example I could assume that the input of the next stage will never see over 1 volt (700 mV for the Si plus 300 mV for the ge) and I can base the gain of the following stage on that assumption?  
1V is huge; deafening. Although the signal may be boosted up that high inside the dirt pedal, there is always an output volume control which will inevitably be set around the 0.1V mark, or less. Like I say, if you don't want to clip the next thing in the chain, just turn the level down a bit! If a dirt pedal has a gain of 100 that doesn't actually mean you have to cope with 100V at the output. The gain is just there to generate the distortion. After that you turn the signal down again...

R.G.

Quote from: Bill Mountain on March 02, 2012, 09:09:14 AM
So if I used an Si and Ge diode like R.G.'s example I could assume that the input of the next stage will never see over 1 volt (700 mV for the Si plus 300 mV for the ge) and I can base the gain of the following stage on that assumption?
Yes. Limiters ... limit.

However, you have to watch the signal size and any DC offset. You're talking about dynamically generating signals which have a time-varying DC offset. AC coupling signals like that is a mess, largely because the varying DC has to impress itself across the coupling capacitor. This causes a number of oddities in the amplifier following the coupling cap. You now have to think about what the time response of the AC coupling cap and input impedance to the following opamp does in response to fast DC changes on the input signal. IMHO, it's easier to DC couple and asymmetrical signal to a following opamp, and worry about the DC levels at the input to the asymmetrical clipper and output of the opamp. At least the opamp works at a static DC level and you get to control its bias point independent of the signal.

This same process (i.e. asymmetrical clipping of an input signal) is what causes blocking distortion in vacuum tube stages when the grids are driven positive and start conducting; only in this case, it's the amplifying stage itself doing the offset clipping.

QuoteI guess I'm picturing hitting the rails with double the signal voltage on one side because of the assymetry.  I I went with 3x Si's I'd have 1.4 (will say positive) and .7 (negative).  I could only amplify the positive side by 3.2 but then I'd be wasting gain on the negative side because I could go up to 6.4 times voltage gain.
Your concept is correct - the DC bias point of the opamp has to be set so the incoming signal touches both output limits at the same time to get the biggest possible swing and hence undistorted gain out of an amplifying stage. I believe Merlin is commenting on the desirability and overall utility of doing that in this situation.

We're close enough to it to note some things that I posted - what, Mark, ten or twelve years ago? - in the prior incarnation of this forum. For most people, softer clipping is more musically useful. Clipping devices are often not perfect. They don't hit X voltage and flatline right there, producing a razor-sharp transition into clipping. Rather, there is a more-or-less gradual transition from not clipped at all to fully clipped. Opamp clipping at the power supplies is nearly a perfect, sharp-kneed clipper/limiter. Diodes are more gradual, having a clipping 'knee' of about 50-100mV or so, depending on the diode material and construction. They also have a differing amount of travel before they start conducting a lot, before the knee.

On average, silicon and germanium have about the same size clipping knee; LEDs are close, but a big larger knee. Schottky has a sharper knee, befitting its semiconductor physics status as half a semiconductor junction. The relative size of the non-conducting region to the knee is different. Germanium has less non-conduction before it starts rounding over than silicon, even for the approximately same-sized 'knee'. So more of the time the signal spends on a germanium diode clipper is spent in the knee than the non-conduction region, and hence the more proportion of the knee rounding happens with germanium. For the same sized signal, germanium clips harder; for the same ratio of signal applied to the diode versus the clipping voltage of the diode, germanium sounds softer.

That line of speculation led me to the thought that softness of clipping depends on the relative fraction of the signal's voltage amplitude is spent in the knee of a clipper than in either the non-conducting/non-clipping region or the heavily clipped region. In the non-conduction region, no clipping is happening, and in full clipping, it's all flat line; so the interesting stuff happens as it rounds the corner. If you feed a silicon diode clipper a 0.5V peak signal, you get very minor clipping. At 0.6V, more, and at maybe 0.8 or 0.9V peaks, the diode is fully conducting and any "rounding" effect begins to be lost. If you feed a silicon diode clipper at 10V peak signal, the signal passes through the entire transition region of the diodes so fast that it's not noticeable as any rounding at all, so all signals that big look like rectangular waves, and this from the same set of diodes.

So to do soft clipping, the trick is to find a clipping process that has a big rounding region compared to the non-conduction region, and keep the signals fed to it from dramatically exceeding that level. Germanium diodes and even better MOSFETs qualify in the first criteria. The trick then becomes keeping the signal level to the right size to feed the clipper a signal that's not going to blast it into flatline clipping. You can do this most easily with a number of gain stages, each arranged to add a modest gain, but then padded back down so they don't blast the heck out of the following stage input.
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.

DavenPaget

Great Read . Thanks Keen .
Hiatus

Bill Mountain

Yes great read.  You put some science around my thoughts on different clippers.  This'll give me some great ideas to work with.

WGTP

I wonder what happens when you use 2 stages and they are both asymmetrical but in opposite directions and equal amounts.  Does the signal sum to symmetrical?  ;)
Stomping Out Sparks & Flames

ashcat_lt

Quote from: R.G. on March 02, 2012, 12:32:25 PM

However, you have to watch the signal size and any DC offset. You're talking about dynamically generating signals which have a time-varying DC offset. AC coupling signals like that is a mess, largely because the varying DC has to impress itself across the coupling capacitor. This causes a number of oddities in the amplifier following the coupling cap. You now have to think about what the time response of the AC coupling cap and input impedance to the following opamp does in response to fast DC changes on the input signal. IMHO, it's easier to DC couple and asymmetrical signal to a following opamp, and worry about the DC levels at the input to the asymmetrical clipper and output of the opamp. At least the opamp works at a static DC level and you get to control its bias point independent of the signal. 
This sounds a bit like what I was talking about.  An "asymmetrical" square (rectangle) wave looks pretty much like a symmetrical one with a DC bias.  AC coupling caps will remove this bias and make it symmetrical again.  It will sort of find a new 0 point halfway between the peaks, so the point of the OP is moot.  

I don't have a DC coupled scope, and have found it impossible to verify asymmetry by recording into my (AC coupled) audio interface and inspecting the waveform.  It doesn't go twice as far above the line as below.  You end up having to look for differences in the sloped of the wave as it goes into and out of the clipped off peaks, and that's questionable at best.


A bit of a tangent - I'm currently working on a circuit based on an LM324.  This opamp will swing to 0V (negative rail) but won't go all the way to the positive rail.  No need to "mis-bias" because, given enough gain, it will clip the top of the wave first.

R.G.

Quote from: ashcat_lt on March 03, 2012, 12:45:36 PM
This sounds a bit like what I was talking about.  An "asymmetrical" square (rectangle) wave looks pretty much like a symmetrical one with a DC bias.  AC coupling caps will remove this bias and make it symmetrical again.  It will sort of find a new 0 point halfway between the peaks, so the point of the OP is moot.  
For square waves, yes. For rectangle waves, no. The difference is that rectangle waves may have a different ratio of high to low times. A square wave is a special case of rectangle with equal high and low times.

Imagine: a rectangle wave that's high 1% of the time, and low 99% of the time. The DC level is, on average, 1% of the size of the high level. Put it through a cap and the result will be 1% lower than the DC level on the inside of the cap, but will have spikes 99 times higher when the signal goes high. It will appear to be offset even though the average DC level on the inside of the cap is zero.

Every change in duty cycle changes the average DC level in a rectangle-wave signal. Asymmetry in any waveform, in fact, changes the average level. Caps remove that average, but what comes out is not equally spaced between the peaks.

QuoteA bit of a tangent - I'm currently working on a circuit based on an LM324.  This opamp will swing to 0V (negative rail) but won't go all the way to the positive rail.  No need to "mis-bias" because, given enough gain, it will clip the top of the wave first.
This is the confusion I was trying to get around with a rail-to-rail opamp so it didn't obscure the underlying concepts. The LM324 output will go within millivolts of the negative supply, but only a volt or two below the positive supply. And the DC bias does matter there. The LM324 can be set up to clip quasi symmetrically, if you put the DC bias halfway between ground and the positive clipping point; that is, halfway through the available swing range. What matters is where the bias is between the two points the output can reach. For "power supply rails" just substitute "the limits the output can swing, whatever those are."

Quote from: WGTP on March 03, 2012, 12:15:53 PM
I wonder what happens when you use 2 stages and they are both asymmetrical but in opposite directions and equal amounts.  Does the signal sum to symmetrical?  ;)
Yes. But only if the gains are such that the second gets a signal divided down by the gain of the first stage so the first stage's gain doesn't push the signal level the second stage sees more than the first stage saw.

In practice, with some gain in each stage, no, they'll clip asymmetrically but in a more complicated way.
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.

Bill Mountain

Ok.  Here's another question.  What about mis-biasing an opamp not to accept a lop-sided signal but to produce a desired output.  Like why have I seen some 741's biased with 820k and 1M resistors?  Does does this have anything to do with evening out how far you can go to each rail?  Or does this produce different clipping textures (even with diode limiters)?

PRR

RG> softness of clipping depends on the relative fraction of the signal's voltage amplitude is spent in the knee of a clipper

+1
  • SUPPORTER