Circuit Design: non-inverting opamp

Started by burningman, April 07, 2010, 11:57:16 AM

Previous topic - Next topic

burningman

Having an interest in learning more about non-inverting circuits, I have looked over many examples and found some variations that have left me stumped. The article R.G. wrote entitled 'What are all of those parts for' has been a helpful guide, but there are still aspects of designing non-inverting circuits that are a bit confusing. The schematic below incorporates components from various circuits I have looked at. Any help would be appreciated.


  • Are my component labels correct?
  • Is it a requisite that pull-down resistors be the first and last components on either side of a circuit?
  • Can we omit the pull-down resistor (input side) and place the R2/Crf combo preceding the input cap? Would this act as a pull-down, as well as set the input impedance?
  • Is the input impedance of the circuit determined by any parallel combination of resistors to ground connecting to the + input?
  • What is the purpose of R2 and how can the value of this resistor be determined?
  • What is the purpose of Rout and does its order (before or after the output capacitor) matter?
  • How is the output impedance of the circuit determined?


Thanks.

burningman

I'm not sure if the link to the schematic worked. I'll try again.

Brymus

Here are my best guesses,maybe someone will correct me and we will both learn something.
AFAIK R2 is there to block RF,and possibly attenuate the input signal some.
I think it also plays a role in setting the input impedence IDK for sure.
The output impedence well there was a thread where PRR explained what is neccesary to figure that out ,I forget the answer.
But if you search you might find it.It seemed pretty involved to find the true output impedence.Usually I thought for all practicle use it was the value of the last resistance such as your R out,or the value of a volume pot.
The pull down resistor cant be de-coupled to work correctly,which is why its seperate from the usual filters you see at the input /output.
And it is usually large to keep its filter effect to a minimum,it just has to allow the de/coupling cap to bleed off its charge so it wont pop when switched back in.
However if you have a volume pot last you dont need a output pulldown resistor as the pot will act like one.
Also AFIAK Anytime two passive components are in series it doesnt matter what order they are in,the circuit doesnt know the difference.
Texas Insruments has some good free PDFs on op amps (OpAmps for everyone-Ron Mancini) if you search the web,(I would have to look up all that info)however alot of people (like RG,Mark,PRR among others) dont have to look up that stuff as the know it like thier alphabet.
I'm no EE or even a tech,just a monkey with a soldering iron that can read,and follow instructions. ;D
My now defunct band http://www.facebook.com/TheZedLeppelinExperience

burningman

Does anyone have any other thoughts on this? Thanks.

R.G.

Quote from: burningman on April 07, 2010, 11:57:16 AM
Are my component labels correct?
Labels are just that - labels. They can be correct or incorrect only in context.
Quote
Is it a requisite that pull-down resistors be the first and last components on either side of a circuit?
The whole point of pulldown resistors is that the input and output capacitors leak a little when they're switched so they don't connect to anything. Pulldowns force the outboard ends of capacitors to stay at ground. Instead of pulldown resistors, you could substutite "any DC resistive path from the capacitors to ground". Pulldowns are not mandatory unless you will switch the input and output capacitors to be open sometimes.
QuoteCan we omit the pull-down resistor (input side) and place the R2/Crf combo preceding the input cap?
Yes, you can. However, with no DC path to ground, the outboard end of Cin will be open when you pull the plug out or use some kind of bypass switching that opens the DC path through the switch. So you'll get a pop when you reconnect to it.
Quote
Would this act as a pull-down
No. Pull-downs are a DC path to ground.

Quoteas well as set the input impedance?
The input impedance is not so much set by something as it is determined by the AC impedance of every possible current path from the input pin to ground, in parallel. The input to the opamp is one of these paths. Another is the bias resistor/network on the + pin, which your circuit is lacking. This circuit has no firm DC bias. The path through R1 and Crf is another path that sets the input impedance; it may only matter at high frequencies depending on the size of Crf compared to R1, though.

QuoteIs the input impedance of the circuit determined by any parallel combination of resistors to ground connecting to the + input?
The input impedance of the whole circuit is determined by the parallel combination of *all AC current paths to ground* which connect to the input pin. The opamp input is one of these. The (missing) bias network is another. The R1/Crf is another. Rpulldown is another. Any path that AC can get through to ground is a parallel path which lowers the input impedance at some frequency.

QuoteWhat is the purpose of R2 and how can the value of this resistor be determined?
R2 is to limit current into/out of the + input under fault conditions in most cases.

QuoteWhat is the purpose of Rout
1. To limit the output current under fault conditions
2. To isolate unforseen capacitive loads that could make the circuit go unstable and oscillate.

Quoteand does its order (before or after the output capacitor) matter?
In any purely series circuit, of however many components, as long as you do not either look at/measure or tap voltage/current from any of the intermediate connections, the order of the components makes no difference whatsoever to the voltage/current at the end pins of the series combination. That is, no - it doesn't matter in this circuit.

QuoteHow is the output impedance of the circuit determined?
If you mean determined as in "set up and/or designed", it's kind of not. The output impedance at the opamp output pin is equal to the open circuit impedance of the opamp without feedback, maybe a few hundred ohms or a k or two, divided by the amount of open circuit gain not used by the ciruit. In the case of a gain of 1, and an open loop gain of 100,000, the open loop impedance of the opamp is divided by 100,000. Same opamp in a gain-of-ten would be open loop impedance divided by 10,000, 10x of the gain being used up making signal, not lowering output impedance. This is one of those fuzzy, indistinct numbers which are calculated by making assumptions about the open loop performance, and then noting that the fuzzy number is made almost zero by the huge gain.

Rout, which is outside the feedback loop, is in series with the opamp's output impedance, so it adds directly to the opamp's source impedance. This is so low that effectively, the output impedance is just Rout, in parallel with the output Rpd, which should be trivial.

If you mean determined as in "measured to determine what it actually is", you set up a signal, note the output voltage level with zero load, then short the output and measure the output signal current, if you can. This is the ideal "open circuit voltage/short circuit current test". In the real world, the opamp will likely go into current limiting if Rout isn't pretty big, so the results are indeterminate. You can also load the output down by a load resistor that decreases the output some measurable amount, then compute the output impedance by the voltage divider rule.

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.

burningman

Thank you for the detailed response R.G.

You mentioned the lack of a bias resistor/network. Would a bias network be recommended or necessary when using a dual rail supply, like in my example?

Would you be able to tell me how to determine the appropriate value for R2?
Thanks.

R.G.

Quote from: burningman on April 07, 2010, 10:22:45 PM
You mentioned the lack of a bias resistor/network. Would a bias network be recommended or necessary when using a dual rail supply, like in my example?
A bias network, in the form of some DC path to a bias voltage, is needed for almost all opamp circuits, and is certainly needed in your example. This might take the form of a single high value resistor to the middle of the bipolar rails.

For all bipolar and JFET input opamps, you need some kind of resistive path. MOS input opamps have such high input impedance that the surrounding circuit board and any contamination on it form the perhaps unintended bias network. Some JFET input opamps will do this trick too.
Quote
Would you be able to tell me how to determine the appropriate value for R2?
You look at the datasheet for the device, and read off the maximum input current that the pin on the opamp can withstand. Then you decide what's the largest voltage on the input that you want to protect against, and use Ohm's law to get the resistance.

If this seems ill-defined, it is. You have to pick how much current you'll let in. You can clean this up a bit by putting reverse biased diodes from the input pin to both power supplies after R2. Now you can pick R2 to limit current to something the diodes can stand.

Or you can make R2 = 0, which is a popular choice. This eliminates its thermal noise, which may or may not be important, and relies purely on the opamp itself to live or die on transient input voltages.

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.

burningman


burningman

#8
Just rehashing the biasing of a non-inverting circuit using a dual rail psu

QuoteA bias network, in the form of some DC path to a bias voltage, is needed for almost all opamp circuits, and is certainly needed in your example. This might take the form of a single high value resistor to the middle of the bipolar rails.

Would the voltage reference point be at 0V? If that's the case, wouldn't the input already be properly biased, considering the path to ground (the bias point) through R1 and Rpd?

R.G.

Quote from: burningman on April 11, 2010, 09:29:15 AM
Would the voltage reference point be at 0V?
For dual supplies, yes, that's the normal bias reference.
Quote
If that's the case, wouldn't the input already be properly biased, considering the path to ground (the bias point) through R1 and Rpd?
No. The path to ground through R1 and Rpd is blocked by Cin and Crf. Capacitors are DC open circuits. That's one reason their schematic symbol shows a gap in the middle. There is literally an insulator in the middle of the capacitor to block DC.

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.

burningman

So R1 needs a direct path to Vref without obstruction from Crf or any other DC blocking component. That makes sense.
Could the bias be set by R1 if it was connected directly to ground (bias point), and would moving Crf parallel to R1 still allow Crf to perform its job? Sorry for the unending intrigue.

R.G.

Quote from: burningman on April 11, 2010, 01:02:14 PM
Could the bias be set by R1 if it was connected directly to ground (bias point),
Yes.

Quoteand would moving Crf parallel to R1 still allow Crf to perform its job?
Maybe. Crf isn't doing much for you where it is. Crf is there to be a low pass filter for radio frequency signals. As it is, R1 gets in the way of that. If you move Crf to parallel with R1, then Crf does get to act like a short circuit to radio signals, but it's divider action is then determined by the unknown impedance of the wires coming in. In some cases, those wires can act inductive, and the wire inductance plus Crf can *tune in* a radio station. Putting a low value resistor in series with the incoming signal forces the incoming signal to see some value of real resistance, not a mishmash of wire resistance/inductance/capacitance. A resistor somewhere up to about 1K in series with the input, either before or after Cin, will help kill RF. Crf then goes from the inboard side of that resistor to ground, and then R1 biases the opamp. The input impedance at mid-frequencies, where Cin looks like a short circuit, Crf looks like an open circuit, is the parallel combination of Rpd, R1, and the input impedance of the input pin of the opamp.

QuoteSorry for the unending intrigue.
Intrigue? This is >learning< and it's something I think is very important. You have qualified yourself for any help I can give by being willing to think on your own, ask intelligent questions, and not clamor for a packaged-up javascript calculator to do it all for you so you never have to understand.  :icon_lol:

I have no problem with questions like this.
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.

burningman


ericohman

INSTAGRAM: http://instagram.com/perkabrod
Scroll past all car stuff to see my vintage amps and stompboxes ;)
Eric // SkellefteƄ, Sweden.

R.G.

Quote from: ericohman on April 11, 2010, 07:16:12 PM
What does Cf and Ci do?
Cf and Rf set the frequency where the gain starts to decrease: F = 1/(2*pi*Rf*Cf)
Ci is an infinite impedance at DC, so the gain at DC is the same as Ci being an open circuit - that is, unity. Otherwise the DC bias voltage would be multiplied, too. In addition, Ci and Ri set the frequency where gain begins to be the midfrequency gain: F = 1/(2*pi*Ri*Ci)

That is, Ci/Ri and Cf/Rf set the lower and upper boundaries of flat gain, respectively.

QuoteDoes Rf and Ri set the gain? Rf/Ri+1?
Yes. Midband gain reduces to  G =1+ Rf/Ri
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.

ericohman

If I would use this with a single supply. Say a 9V battery.
Should I connect pin 8 to +9V
pin 4 to ground

Create a voltage divider at the battery and connect Ci to +4.5V (virtual ground?)

I think that's what I've seen floating around on the internet. But I have had so much trouble simulating it with LTspice that I have ordered a bunch of value packs with opamps, caps, resistors and diodes to try to breadboard these things.
INSTAGRAM: http://instagram.com/perkabrod
Scroll past all car stuff to see my vintage amps and stompboxes ;)
Eric // SkellefteƄ, Sweden.

R.G.

Quote from: ericohman on April 12, 2010, 04:16:09 AM
If I would use this with a single supply. Say a 9V battery.
Should I connect pin 8 to +9V
pin 4 to ground
Yes. Opamps don't really know what "ground" is. They only know the most positive power supply, V+, the most negative power supply, V-, and whatever voltage the + input is referenced to.

QuoteCreate a voltage divider at the battery
Yes. This makes a reference voltage in the middle of the power supply pins.

Quoteand connect Ci to +4.5V (virtual ground?)
No, at least not the way I think you meant that. The ground-agnosticism of an opamp, and especially with a single power supply creates a contradiction. The external world thinks that ground is zero volts. If you connect the minus terminal of your battery to the external-world ground, the opamp can't work properly biased at that voltage. In fact many opamps can't get closer than a volt or two to what they see as V-.

So we use Ci to let a DC voltage difference exist between external-world ground and the virtual ground (also called an AC ground, or more often just a bias voltage) inside the opamp circuit. One side of Ci must be tied DC-wise to the outside-world ground. The inside of Ci carries the signal to the + input, and that side must be tied to the internal virtual ground (Vbias, etc.) that is DC offset to let the opamp work properly.

Then there is a DC offset from real-world ground at the output too. The output capacitor supports letting processed signal AC through while blocking the internal DC and letting the processed signal go back to being referenced to the outside-world zero volts ground.

QuoteBut I have had so much trouble simulating it with LTspice that I have ordered a bunch of value packs with opamps, caps, resistors and diodes to try to breadboard these things.
SPICE is very hard to get started with. You simply must get everything in the right place, and then you have to get the programming-language part of it correct, or nothing works. I suspect that translating the schematic into the programming-language style is your problem there. At least it was for me. I got where I could do it, but I use a simulator that lets me "draw" the schematic, then it makes its own internal SPICE representation. Much, much faster that way than typing it all in.
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.

ericohman

Quote from: R.G. on April 12, 2010, 09:45:43 AM
So we use Ci to let a DC voltage difference exist between external-world ground and the virtual ground (also called an AC ground, or more often just a bias voltage) inside the opamp circuit. One side of Ci must be tied DC-wise to the outside-world ground. The inside of Ci carries the signal to the + input, and that side must be tied to the internal virtual ground (Vbias, etc.) that is DC offset to let the opamp work properly.

Then there is a DC offset from real-world ground at the output too. The output capacitor supports letting processed signal AC through while blocking the internal DC and letting the processed signal go back to being referenced to the outside-world zero volts ground.

I'm sure it's well described, however, I cannot understand :)

By the way, this was how I meant:
INSTAGRAM: http://instagram.com/perkabrod
Scroll past all car stuff to see my vintage amps and stompboxes ;)
Eric // SkellefteƄ, Sweden.

burningman

I'm fairly sure that the resistor tying to the biased voltage reference needs to be introduced at the non-inverting input. The schematic in the following post presents it that way. http://www.diystompboxes.com/smfforum/index.php?topic=64238.0