# What does this op amp/transistor circuit do? (revised circuit)

simulate this circuit – Schematic created using CircuitLab

I asked a question yesterday about the circuit above, but my notes showed the op amp terminals mistakenly swapped and the circuit in my original question displayed positive feedback.

After studying it some time, I understand why the circuit no longer displays positive feedback but it's still not clear to me what this circuit does.

It's clear the voltage divider sets the voltage on the - terminal of the op amp to a value between 9V and 10V, but I don't understand how the rest of the circuit responds. In particular, it's not clear to me how the transistor affects the feedback loop and how the second power supply input affects the differential voltage at the op amp inputs.

I'm particularly interested in understanding how much voltage and current the circuit supplies to the load. I'm also interested in how real (ie. non-perfect) op amps might behave differently and the tradeoffs involved in picking the right op amp for this circuit.

Thank you. I'm a beginner and overall very confused by op amps and transistors.

• possible duplicate of What does this op amp/transistor circuit do? – Leon Heller Jul 12 '13 at 17:09
• Note that I've explicitly linked to that question (originally posed by me) and explained why this question is different from the previous one. Is this not an acceptable practice on the Electronics SE? (would it have been better to edit the original question instead?) – David Chouinard Jul 12 '13 at 17:14
• @DavidChouinard Yes, it would have been better to edit the original question. Or, perhaps, delete the 1st question or ask the moderators to mark the 1st one as a duplicate. There was an error in the 1st one from the beginning. – Nick Alexeev Jul 12 '13 at 18:42
• @NickAlexeev I disagree. By editing the original question, all the answers would have been rendered very wrong. I would only make such a huge semantic change to my question if there had not yet been any answers. The original question is answered, and this is a new one. – Phil Frost Jul 13 '13 at 0:03
• @PhilFrost What I had in mind something along the lines of: "Update: my notes showed the OpAmp terminals mistakenly swapped... [new diagram]". And, yes, keep the initial (incorrect) diagram. The question would look more like a notebook, but there are no problems with that. – Nick Alexeev Jul 13 '13 at 0:39

First of all you can control the voltage on the inverting input (-) in the range of 9 to 10V.

Opamp will try to keep the voltage on both its inputs the same by varying the output voltage. First assume that opamp is working in its linear region (output voltage is not saturated). This means the voltage on the non-inverting input (+) is exactly the same as the voltage on the inverting input.

If you set the voltage to 10V the voltage difference on the resistor R3 is 0V. Using Ohm's law this yields zero current. This also means there is 0A going through the load.

If you set the voltage to 9V the voltage on the R3 resistor is nor 1V (10V-9V). Using Ohm's law gives 1A. All this current is also going through the load (because opamp's input current is zero).

This way you can control the load current from 0 to 1A.

Now the dynamic behavior.

Assume you set 9.5V with the potentiometer. The voltage on the collector of the transistor is 9.5V. This means R3 voltage is 0.5V and load current is also 0.5A.

Now change the potentiometer to 9.6V. Opamp's inputs are not balanced any more. The inverting input's voltage is higher than the non-inverting input. Therefore opamp will adjust its output by lowering the voltage on the base of the transistor. The collector current will drop and so will the voltage on R3. V(R3) will drop to 0.4V at which point the input voltages will be equal and you will have a steady-state again.

Practical considerations.

Almost any opamp will work correctly in this circuit. You must consider maximal current opamp can give to the gate. If your output current is max. 1A, the gate current has to be 1A/(transformer beta). You must choose an opamp that will provide at least this much current.

You must also be aware that if you want your circuit to work when the output is shorted the voltage on the output has to go down to GND+0.7V. Even if it does not you can very easily correct it by adding a base resistor.

• Thanks, Szymon. It's starting to make more sense. However, it's not clear to me what value the transistor is providing? – David Chouinard Jul 12 '13 at 19:03
• Transistor acts as a current amplifier. For example LM358 can only source 40mA and you need 1A for your current source. – Szymon Bęczkowski Jul 12 '13 at 20:22
• Most op-amps will not work in this circuit if the emitter load is below 1 ohm or there is virtually any capacitance associated with the load - it will oscillate because the transistor will have a gain greater than 1 and it's in the op-amp feedback loop AND most op-amps won't be able to live with this extra open-loop gain and the circuit will become unstable. – Andy aka Jul 12 '13 at 23:11

The circuit is a hypothetical attempt at a constant current feed to the load. Once it is established that (on the face of it) the circuit has negative feedback you can move on and say that the inputs to the op-amp will always be the same (within millivolts).

Because Vin- has a fixed voltage on it determined by the pot all that remains to establish how the voltage on Vin+ is produced. This is simple - that voltage is determined wholly by the current through R3.

This means that you set the pot to produce a voltage on Vin- and the current through R3 adjusts to produce exactly the same voltage on Vin+. At this point equilibrium is reached.

The current through R3 is controlled by the voltage from the pot. What about the current through the load? Well, it's virtually the emitter current (R3 current) and so this circuit is an attempt to apply a constant current to the load.

Let's say the pot is set to be 9.5V - this means (theoretically, and on the face of it) that the voltage across R3 will be 0.5V i.e. 10V - 9.5V. This means that 0.5A flows through R3 and that current largely flows through the load. If the load is 10 ohm, the voltage on the load will be 5V. If the load dropped to 1 ohm, the voltage on the load would drop to 0.5V.

There are restrictions from the power supply of 10V. For instance, if the load were 20 ohms, the circuit power voltage hasn't got enough headroom to put 0.5A through the load and the circuit no longer behaves linearly.

What is wrong with this circuit - if you tried to build it, it would oscillate although the average current into the load may just about be kept at a fixed value. Why would it do this? It will do this because it has made the fatal error of not understanding the open-loop gain of most op-amps.

Most op-amps commercially available sail close to the wind in that with negative feedback they are close to becoming unstable - in fact some op-amps cannot work as a unity gain inverter. What makes this circuit worse - collector gain is potentially added within the feedback loop so now the op-amp has to cope with an extra bit of gain within the negative feedback loop and this, under most practical load conditions will make the circuit oscillate.

If the load is 1 ohm then most op-amps would just about cope with the collector gain being unity but the extra little bit of phase shift incurred makes it on the point of oscillation.

If the load is 2 ohms then the collector voltage gain is less than 1 and this circuit stands a chance of working provided that the load is purely resistive - any small amounts of capacitance will make this circuit sing because at high frequencies the capacitance will turn the collector gain greater than 1.

Forget about loads less than 1 ohm and don't really expect this to work in practise - there are better circuits for controlling load current.

• Could you kindly elaborate what better circuits exist for controlling load current, I built a similar circuit but with a mosfet and it does oscillate under certain conditions. What are better alternative circuits or how do we stabilize the circuit in this case? – Miguel Sanchez Apr 23 at 19:39

Let's do "the math" for this circuit. As others have pointed out, if there is negative feedback, the input terminals have the same voltage:

(1) $v_+ = v_- = v_i$

Where $v_i$ is our independent variable, the input voltage determined by the potentiometer setting.

For simplicity, assume that the current through R3 is identical to the load current $i_L$. Then we have:

(2) $v_+ = 10V - i_L \cdot R_3$

Putting (1) and (2) together, we have:

(3) $i_L = \dfrac{10V - v_i}{R_3}$

So, this circuit implements a voltage controlled current source (VCCS).

It is clear that the range of the input voltage is $9V \le v_i \le 10V$ so the range of load current is (for $R_3 = 1\Omega$):

$0A \le i_L \le 1A$

Now, this analysis assumes that the op-amp is ideal and that the transistor current gain $\beta$ is infinite. Since real op-amps have finite gain and bandwidth and real transistors have finite current gain, it is correct to ask if this analysis approximates the operation of an actual circuit.

In addition, there are "boundary conditions" that must be met. For example, the maximum voltage that can be applied to the load must be less than 10V. Thus, for loads of about $10 \Omega$ or more, your load current range will be reduced.

There are several other considerations that are beyond the scope of this answer.

In particular, it's not clear to me how the transistor affects the feedback loop

The transistor provides current gain for the load current as well as inverting voltage gain for the feedback loop. Since the feedback is connected to the non-inverting terminal of the op-amp, there would be positive feedback with out this inverting gain present.

This circuit is a current source. The transistor provides an inversion as does the opamp. The net change is positive or no inversion. However, the point of feedback is on the collector of the transistor which means the controlled voltage is at that point. This means whatever voltage is dialed into the potentiometer will be duplicated at the bottom of R3. If the voltage at Vcc and across R3 is guaranteed to be constant, then this is a current source. Of course all this assumes all other parameters are within the dynamic range of the parts involved. For example, it is impossible to drive a constant current into an open load.

I have constructed an used a similar circuit with a power mosfet as the output transistor. In my case I needed a very fast opamp since I was forcing the mosfet into a linear operating mode. I also used the drain of the mosfet as my output and not the source. The circuit actually does work.