Help understanding an Op-Amp circuit - Page 1
Forum section: electronics / beginners

author: jgalak
author_rank: Regular Contributor
timestamp: December 23, 2017, 09:32:28 pm
content: I'm working my way through AoE, and trying to figure out one of the basic OpAmp circuits there (attached).Presumably, point A is Vin. Which means the IC1 OpAmp tries to keep its inverting input, and thus point B, at Vin. So point C, the non-inverting input to IC2 is at Vin+Vce? Does the transistor drop not need to be considered?Even ignoring the Vce drop, if point C is at Vin, why isn't Iout=(Vcc-Vin)/R3 ? I'm not seeing why R1 and R2 have any impact on it.I'm sure it's something obvious, but the book doesn't explain it in sufficient detail for me to wrap my head around.

author: Benta
author_rank: Super Contributor
timestamp: December 23, 2017, 10:02:25 pm
content: If you ignore base current into Q1, R1 sets the collector current of Q1 (by feeding back the voltage over R1 to the inverting input) and thereby also the current through R2. Which again gives the voltage at point "C" with respect to the positive supply voltage.This only works with sensible values of R1 and R2, of course.

author: mikerj
author_rank: Super Contributor
timestamp: December 23, 2017, 10:10:56 pm
content: Quote from: jgalak on December 23, 2017, 09:32:28 pmIf point C was Vin then you would be correct, but it isn't. Vin is point A, so the voltage drop across R2 (and therefore R3) depends on both Vin and the ratio of R2 to R1.i.e. V(R2) = V(R3) = Vin*R2/R1To get the current through R3, and therefore the load, divide the result by R3 e.g. Iout = Vin/R3*R2/R1

author: jgalak
author_rank: Regular Contributor
timestamp: December 23, 2017, 10:17:53 pm
content: So why isn't point C at at Vin+Vce? Point B is at Vin, isn't it? And Vce is fixed at .2 or .6 or whatever it is for Q1? (Or does Vce vary?)

author: Zero999
author_rank: Super Contributor
timestamp: December 24, 2017, 01:06:56 am
content: Quote from: jgalak on December 23, 2017, 10:17:53 pmPoint C is at Vin+Vce. Point B is at Vin. Vce varies.If the transistor's beta is very high, the current through R1 and R2 are equal. The current through R1 is simply equal to the voltage across it, with is equal to A. The transistor acts as a constant current sink, with the current determined by R1 and the input voltage.

author: radiogeek381
author_rank: Regular Contributor
timestamp: December 24, 2017, 01:35:58 am
content: Hero99 has it right. Let's look at how we get there.The OP is correct in saying that V(C) = V(B) + Vce, but this isn't a very useful "truth" as Vce is a function of a lot of things that we can't know (even if we know the transistor specs, the actual values cover a span that makes predicting Vce vs. Ic not worth the trouble here.)So what are the useful truths?1. V(B) must be equal* to V(A) if the op-amp is working correctly. (What is the output of IC1? Who cares? Provided V(A) is sufficiently far from the power rails, V(out) is going to do what it has to do to make V(B) == V(A). )(* I'm using the word "equal" to mean "pretty damned close.")2. So now we know the current through R1. it is V(A) / R13. We have reason to believe that the current gain of Q1 is sufficiently high that Ic is pretty close to Ie. We also know that the current into the + terminal of IC2 is very small. So, the voltage at C is going to be Vcc - Ic*R2 = Vcc - Ie*R2 = Vcc - V(A)*R2/R14. This is also going to be the voltage at the bottom of R3. So the current through R3 is (Vcc - V(C)) / R3So we crank the algebra handle and getI(R3) = (Vcc - V(C))/R3 = (Vcc - (Vcc - V(A)*R2/R1) / R3 = V(A) * R2 / (R1 * R3)5. Finally, we look at the output fet and know that drain current and source current are equal, so Iout = V(A) * R2 / (R1 * R3)We never needed to know anything about transimpedances, saturation currents, phase of the moon, or anything peculiar.We do need to check a few things though.If V(C) - V(B) is negative, then we've got V(A), R2 and/or R1 values that are out-of-whack and this analysis needs to be adjusted a bit.In fact, if V(C) - V(B) is "too small" where "too small" is a matter of taste, but 0.2V is probably "too small", then we need to adjust the analysis.If V(A) is too close to either power rail (depending on the op-amp selected) then this circuit will misbehave.Similar arguments apply to V(C), R3, and the voltage at the Iout node.Big take-away here, is to look for the simplest rules that will constrain the values you're looking for. Ohm and Kirchoff are most likely to be the best first choice. The only other "rules" we used here were to assume that Av for both op-amps was really high, and that Q1's beta was high. Looking at Vce was a less useful path, as its value is influenced by many factors that are difficult to know or vary with time, place, phase of moon, manufacturing lot, and so on.

author: David Hess
author_rank: Super Contributor
timestamp: December 24, 2017, 02:36:06 am
content: Quote from: jgalak on December 23, 2017, 09:32:28 pmThe transistor's Vce(sat) drop only applies if the transistor is operating in saturation. When in the active region, Vce changes so that the Ie=Ic+Ib within the limits of the transistor's collector resistance. In this case, Ib likely represents the largest error term but is still of small absolute value. An FET used for the first transistor would reduce this further or there are ways to compensate for it if necessary.

author: jgalak
author_rank: Regular Contributor
timestamp: December 24, 2017, 03:12:04 am
content: Aha! For some reason I was assuming the transistor was in saturation. But then the circuit wouldn't work, would it? Since the first opamp couldn't then control the feedback.Thanks for the detailed walk through, makes much more sense now!

author: David Hess
author_rank: Super Contributor
timestamp: December 24, 2017, 03:21:09 am
content: Quote from: jgalak on December 24, 2017, 03:12:04 amSaturation or cutoff just limit the operating range of the circuit.When in the active region, the collector or drain of the transistor looks like a current source with high impedance. Feedback from the emitter through the operational amplifier and into the base further raises the impedance at the collector or drain to a very high level so it looks like a very good current source. If the current is too high, then the voltage across the load resistor will be great enough to allow the collector-to-emitter voltage to drop to the point where the transistor saturates and then the operational amplifier would not be able to control its feedback.

author: Zero999
author_rank: Super Contributor
timestamp: December 24, 2017, 11:59:24 am
content: Q1 should really be a MOSFET. Attached is the simulation, with a BJT. I'll post a detailed annotated schematic later.

author: David Hess
author_rank: Super Contributor
timestamp: December 24, 2017, 12:28:17 pm
content: Quote from: Hero999 on December 24, 2017, 11:59:24 amOr a JFET. Or a JFET driving a bipolar transistor. Or a Darlington transistor. Or no change because error analysis shows that other sources of error are greater than that contributed by the single bipolar transistor.

author: Zero999
author_rank: Super Contributor
timestamp: December 24, 2017, 02:27:13 pm
content: Quote from: David Hess on December 24, 2017, 12:28:17 pmA JFET would require a negative supply. I agree, a Darlington transistor is another possibility.You're right that with ordinary components (1% resistors and a jellybean op-amp) other errors will dominate, the non-finite Hfe of the BJT. However if precision resistors (<0.1%) and a low offset op-amp are used, the 0.18% error, due to the BJT, will become dominant.

author: David Hess
author_rank: Super Contributor
timestamp: December 24, 2017, 05:46:31 pm
content: Quote from: Hero999 on December 24, 2017, 02:27:13 pmAdding a couple of diode Vbe drops in series with the source allows using a JFET without a negative supply; often one of the Vbe drops is a bipolar transistor. Or an LED could be used.

author: Zero999
author_rank: Super Contributor
timestamp: December 24, 2017, 07:11:04 pm
content: Quote from: David Hess on December 24, 2017, 05:46:31 pmThose are good ideas, but isn't it easier just to use a MOSFET or Darlington? The 2N7000, MPSA14 or two BC548 are cheaper than a J-FET plus diodes or LED.

author: David Hess
author_rank: Super Contributor
timestamp: December 25, 2017, 03:16:11 am
content: Quote from: Hero999 on December 24, 2017, 07:11:04 pmAt least for through hold parts, JFETs can be had for 1/3rd the price of the 2N7000 and they are lower noise, lower capacitance, and higher gain. In most applications a MOSFET is probably easier to use unless the base current error from a bipolar transistor is acceptable.