(Summarise a Concept) Inverting vs. Non inverting

Started by mistahead, July 05, 2013, 01:43:02 AM

Previous topic - Next topic

mistahead

I'm seeing a lot of material that is assuming some knowledge of inverting vs. non-inverting outputs (eg. from an OPAMP).

Other than the fact that the output waveform is inverted (yep, flip the graph - okey dokey) in an inverting output, why should I be so interested?

Because I'm gap filling with basic electronics the depth of what is going on is available, but why would I care if my waveform is inverted - what applications need this or..?

Oh - ok I just realised I could cancel its non-inverted counterpart by using the two, but I can make quiet more easily with less parts.

samhay

#1
I'm not sure if I entirely understand your question, but perhaps you should think of an inverted input as a consequence of your design choice(s):
- if you want to use a single (or 3,5,7...) transistor as an amplifier (with gain), then the output will be inverted.
- if you want to use the inverting input of an op-amp (e.g. because you want low input impedance or a gain < 1), then the output will be inverted.
etc
- etc.

In these case, you would probably be 'interested' in an amplifier with gain etc rather than the fact that the output is inverted (a consequence). However, as you mentioned, if you have an inverted input, then it also means you will probably have to treat it differently if/when you mix it with another (e.g. clean) signal. This might be a good/'interesting' thing as it gives you more options.
I'm a refugee of the great dropbox purge of '17.
Project details (schematics, layouts, etc) are slowly being added here: http://samdump.wordpress.com

mistahead

That actually did answer it, the basic point at the base of it I'd missed was there, cleared up the perspective issue.

Cheers

amptramp

With an inverting op amp, your input impedance is your input resistor, which is part of the gain equation.  With a non-inverting op amp stage, the input resistor can be as large as you want, subject to a level shift from the op amp bias current.  Non-inverting gain is set by resistors that do not affect the input impedance.


R.G.

Quote from: mistahead on July 05, 2013, 01:43:02 AM
Other than the fact that the output waveform is inverted (yep, flip the graph - okey dokey) in an inverting output, why should I be so interested?

Because I'm gap filling with basic electronics the depth of what is going on is available, but why would I care if my waveform is inverted - what applications need this or..?

In addition to the earlier comments, let me add a few.
- You can get cancellation that you don't want. In a speaker cab, inverting versus non-inverting reduces to speaker polarity. If you have one speaker one way and the other flipped, you get a big loss of bass due to the acoustic cancellation. This is pretty straightforward, and something you probably already knew. But the same thing happens in electronics circuits. If you ever have two parallel paths, one inverting and one non-inverting, then you mix them, even long later in an amplifier or even acoustically from two different amplifiers, you get the same cancellation effect. Mixing happens places you don't necessarily expect, like in phasers, flangers, chorus, and filters.

- Inverting and noninverting circuits have different properties that are side effects of them being inverting or not. The simplest examples are in opamps, but this applies to every feedback-using amplifier, which includes most of them. Noninverting circuits tend to have much higher input impedance, but somewhat quirkier about gain accuracy, stability, and other esoterica. Inverting circuits tend to have more stable, predictable performance in ways that beginners don't yet think about. It used to be a platitude of the opamp designer that you should "Always invert - unless you just can't," because of the side effects.

- Inverting and non-inverting are special cases of phase shift. In any circuit where the frequency is being altered by caps or inductors, the phase is being shifted by some amount for a factor of 10 below to above the critical frequency of the frequency breakpoint. Example: DC blocking cap that prevents inputs below 20Hz. At frequencies down around 2 Hz, the capacitor dominated the circuit, and what signal voltage gets through is shifted by 90 degrees. This shift decreases til at 200 Hz, the phase shift is nearly zero. All filters also introduce phase shift, so if a signal is filtered, "inverting" and "non-inverting" get somewhat lost in the shuffle.
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.

Gurner

#6
Quote from: R.G. on July 05, 2013, 09:30:02 AM
, so if a signal is filtered, "inverting" and "non-inverting" get somewhat lost in the shuffle.

Exactly (& not often spoken of)

In theory, if you have an inverting guitar amp with minimal phase shift driving a speaker, then if you cranked the amp up & played your guitar directly in front of that speaker (facing it), you'd get a chunky degree of string cancellation (very poor sustain) esp at the lower frequencies ....I've never tried it (sort of like the opposite to Gary Moore's Parisienne Walkways.... Asthmatic Banjos?!). Of course as you then move further away from the amp, different frequencies will be shifted by different amounts due to the physical distance between the string & the speaker & then (just like a signal through a circuit with inductors & caps) the amount of phase shifts going on gets too mind boggling to even contemplate :-)

R O Tiree

#7
Sometimes, when you mix an unaffected signal with an affected signal in a non-time based pedal (so not a delay, chorus, flanger, etc but, for example a distortion with some "clean" mixed back in, or a compressor to try to preserve some more of the playing dynamics) you can end up with phase shifts that will introduce cancellations that are not only frequency dependent (kind of like a phaser, then) but also absolutely fixed (so, a bit like a phaser whose LFO is not working).  Using big-a$$ de-coupling caps (say 1µF or bigger?) helps to push these phase shifts very low down in the frequency spectrum and minimise their magnitude but any tone circuit will also introduce phase shifts and this might well mean that your carefully considered design to get the signals at the mixer inputs matched might not be quite so well-considered at all.

So, to mind-boggle Gurner's post still further, the whole signal chain from guitar to amp will introduce frequency-dependent phase shifts which could well end up in phase with the strings at certain freqs, even though the net effect of the number of amp stages is to invert.  And it's all moot anyway because guitar strings don't stay vibrating in the plane of the guitar body for very long after pick-strike, it sez 'ere... they end up doing a sort of waggle-dance and, if you could look along the strings as a chord/note is held, you would see them actually describing a circle after only a short time. Thus, all you'd have to do is turn around and cancellation becomes reinforcement again.

Of course, if you're mental and have loadsamoney, you too can set up several stage monitors and put a bunch of crosses on the stage floor and play feedback choons...
...you fritter and waste the hours in an off-hand way...

Mark Hammer

#8
Judicious use of inverting and non-inverting op-amps has other applications as well.

For instance, the input impedance of an inverting op-amp (i.e., feeding the input signal to the inverting pin) is lower than the input impedance of a non-inverting amplifier.  Sometims, you want the input impedance to be lower so that the signal can be "strategically dulled" a bit, while other times you want the treble content to be as preserved as possible, so you pick the format best-suited to the application.

Another instance where the choice of one over the other can be for strategic reasons is wonderfully illustrated by the Marshall Bluesbreaker overdrive pedal.


Remember that the gain of an inverting op-amp can be set by both the feedback resistance and/or the input resistance.  The Bluesbreaker uses a single pot to adjust the feedback resistance of one stage AND the input resistance of a subsequent stage.  Since gain is multiplicative, and the pot wired up this way provides reciprocal changes in resistance (feedback for op-amp 1 goes up as input resistance for op-amp 2 goes down, and vice versa) this clever trick can provide a lot of overall gain change in a simple fashion, without changing bandwidth too much.  Brilliant!

Another clever use of inversion can come in circuits whwere there is a modulating control voltage.  What you'll often see is that the control voltage source (e.g., an envelope or perhaps an LFO) is fed to the two outside lugs of a "blend" pot.  One of those feeds passes through a unity-gain inverting op-amp.  The blend pot pans between the inverted and noninverted versions of that control signal.  When you get to the midpoint, the inverted and non-inverted versions completely cancel each other other out, and as you rotate more in one direction that verson starts to be less cancelled and have greater amplitude.  You'll sometimes see this trick used for feedback paths in phasers or flangers, as a way of getting different degrees of negative or positive feedback/regeneration.

Finally, many circuits that provide "balanced" outputs will use unity gain inverting op-amp stages to provide an "opposite" copy of the output signal on a 3rd output lug of the XLR or phne jack.


amptramp

Non-inverting op amp stages can have lower noise than inverting amps because the resistance at the input is in parallel with the source and the resistances in the feedback loop can be as low as the op amp output stage allows.  With the inverting amp, the input resistor is in series with the source and adds to the noise.

R.G.

Quote from: amptramp on July 05, 2013, 07:52:08 PM
Non-inverting op amp stages can have lower noise than inverting amps because the resistance at the input is in parallel with the source and the resistances in the feedback loop can be as low as the op amp output stage allows.  With the inverting amp, the input resistor is in series with the source and adds to the noise.
... which by itself isn't all that bad, since we're always sticking 1M resistors on the non-inverting inputs of opamps anyway. But getting gains with a series 1M on an inverting stage means the feedback resistor has to be gain-times bigger than that, and you get some bad noise issues.

Fortunately, this can be sidestepped by using a resistive T network instead of a single resistor for the feedback network. This lets you run gains with significantly lower feedback network resistances, or the noise and stabilty problems they cause from stray capacitances.
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.

PRR

> we're always sticking 1M resistors on the non-inverting inputs

And in-operation, this is "always" bypassed by source impedance.

Because we picked 1Meg as "large" compared to source Z, the 1Meg's contribution to total hiss is small. (Ask Norton or Thévenin.)

In a Voltage Transfer frame of mind, total hiss can always be smaller with the NI opamp connection.

Certain tricks work better with low input impedance. Summing an arbitrary and changeable number of inputs (mixer) is one. The classic approach is preamp (to get above hiss), resistors, inverter.

Occasionally Current Transfer is more logical. Photo-diodes is the most common problem. Here the very high source impedance works best in Inverting connection because the noise-gain on the opamp's contribution becomes near unity, while signal current transresistance can be quite high. (This is all far outside the stompbox field.)
  • SUPPORTER

amptramp

Quote from: R.G. on July 05, 2013, 09:35:04 PM
Quote from: amptramp on July 05, 2013, 07:52:08 PM
Non-inverting op amp stages can have lower noise than inverting amps because the resistance at the input is in parallel with the source and the resistances in the feedback loop can be as low as the op amp output stage allows.  With the inverting amp, the input resistor is in series with the source and adds to the noise.
... which by itself isn't all that bad, since we're always sticking 1M resistors on the non-inverting inputs of opamps anyway. But getting gains with a series 1M on an inverting stage means the feedback resistor has to be gain-times bigger than that, and you get some bad noise issues.

Fortunately, this can be sidestepped by using a resistive T network instead of a single resistor for the feedback network. This lets you run gains with significantly lower feedback network resistances, or the noise and stabilty problems they cause from stray capacitances.

If you are looking at thermal noise, a single feedback resistor is always better than a T-network.  I did that calculation long ago for amplifiers used with photodiode inputs.

R.G.

Quote from: amptramp on July 05, 2013, 11:57:33 PM
If you are looking at thermal noise, a single feedback resistor is always better than a T-network.  I did that calculation long ago for amplifiers used with photodiode inputs.
I was, and I would probably send you a bill for the sheets of math scribbling I've done in the last several hours - except that dang, you're right.   :icon_biggrin:

The T network is marginally worse for noise under most conditions I guessed at during the scribbling.

It is still better for DC stability and freedom from stray capacitance issues, though.
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.

PRR

> The T network is .... .... better for DC stability

That can't be universally true, but it is too hot today to disprove it.
  • SUPPORTER

amptramp

Quote from: R.G. on July 06, 2013, 01:16:14 PM
Quote from: amptramp on July 05, 2013, 11:57:33 PM
If you are looking at thermal noise, a single feedback resistor is always better than a T-network.  I did that calculation long ago for amplifiers used with photodiode inputs.
I was, and I would probably send you a bill for the sheets of math scribbling I've done in the last several hours - except that dang, you're right.   :icon_biggrin:

The T network is marginally worse for noise under most conditions I guessed at during the scribbling.

It is still better for DC stability and freedom from stray capacitance issues, though.

Suppose you have an inverting amplifier with a 10 meg feedback resistor and you have 10 pF across it.  This gives you a rolloff at 1592.4 Hz.  If you keep the same gain using a T network, the same capacitance will give you the same cutoff if it is between the inverting input and the output of the op amp (which are usually adjacent pins).  Capacitance across one of the resistors (usually the feedback resistor going to the inverting input) in a T network can be larger to do the same thing, but inverting pin to output pin capacitance has the same effect regardless of how the DC current is fed back.

R.G.

Quote from: amptramp on July 06, 2013, 05:40:48 PM
Suppose you have an inverting amplifier with a 10 meg feedback resistor and you have 10 pF across it.  This gives you a rolloff at 1592.4 Hz.  If you keep the same gain using a T network, the same capacitance will give you the same cutoff if it is between the inverting input and the output of the op amp (which are usually adjacent pins). 
Yes. However, the capacitance is almost never the same. First, if there is 10pF between two adjacent pins, one is, as we used to say "hosed" if they ever have to run at high impedances. If the capacitance is a function of routing the leads and capacitor bodies, then the T network splits the capacitances into three capacitances, two in series and one to ground. If one juggles the capacitances to be in proportion to the conductances, one can make a capacitive divider that is mostly frequency neutral. This may take some jiggering and some careful and cautious layout, but in general the capacitance for a T network will not be the same as that for a single resistor, unless you really work at making it that way.

QuoteCapacitance across one of the resistors (usually the feedback resistor going to the inverting input) in a T network can be larger to do the same thing, but inverting pin to output pin capacitance has the same effect regardless of how the DC current is fed back.
Yes, since it's the current fed back to the input pin that matters. However, with a T network, you at least have the possibility of either lowering the inevitable capacitance or dinking with and possibly lowering the effects of capacitances you can't get rid of.

As to adjacent pin capacitance, it's hard to get rid of the real pin-metal to pin-metal, but you can shield the inverting pin's traces with driven or grounded traces. Again, not perfect, but a possible part of the bag of tricks.
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.