# A couple of simple questions about a simple op amp circuit

Discussion in 'Electronic Basics' started by Bob Engelhardt, Apr 1, 2012.

1. ### Bob EngelhardtGuest

I'm a new poster here. I've posted a couple of times to SED, but always
felt that the general level of SED was _way_ above me. SE_Basics_ is
more my level.

1. What is the purpose of R5? My guess is that the ckt would work
without it, but it's in some way better with it.

2. The 2nd op amp: "The voltage reference, U2, provides a stable
2.5-volt reference voltage ...". How does it do that? It's not
connected, so it must be internal, but ...??

Thanks,
Bob

2. ### Michael BlackGuest

If you aren't designing, it doesn't belong there. You are trying to
interpret an existing schematic.
when under load. A battery may show decent voltage when unloaded, but
then drop significantly when under load. This sort of thing means when you
measure the voltage, it's more like when the battery is in the circuit.

You could just load the battery with a big resistor, but that has
problems, so the fancier circuit.

U1 and Q1, the fet, form a constant current sink, meaning no matter what
the voltage the FET sees, it keeps drawing the same current (a resistor
across the battery would draw current varying with the voltage on the
battery).

Since the circuit turns voltage into a current draw, if there was no
voltage regulator, the drain would vary according to whatever is powering
this circuit, the 9v battery. I'm not sure that the voltage regulator
isn't overkill, but it doesn't add much in cost or size to the circuit,
that sort of voltage regulator can be found in plenty of computer
switching supplies, though maybe not that specific device.
U1 and the FET form a constant voltage sink.

The resistor is in the feedback circuit to the op-amp. No, it probably
isn't needed, it's there for isolation (note that c1, the .01uf capacitor,
is probably there to limit frequency response, and without R5, it wouldn't
work as well).
U2 is the TL531 in the upper left corner, a precision voltage regulator
(kind of like a fancy zener, where you can actually control the point at
which the regulator regulates). It supplies a stable voltage to U1.

The other half of the 358, is simply labelled "U" and is completely out of
the circuit (it's not used, so likely a dual op-amp was specified because
the 358 has certain characteristics that means it works better in a single
voltage power supply)

Michael

3. ### Michael BlackGuest

But technically, if not for the capacitor from the output of the opamp to
the inverting input of the op-amp, the resistor is not needed.

It's no different from a voltage follower (or indeed, the other half of
the op-amp that lies unused at the lower left, the output connected to the
inverting input), though in this case, the FET is in that feedback loop.

But the opamp wants to see voltage, which it's already seeing on the
non-inverting input. Since no voltage amplification is done in that
stage, there's no absolute reason for the resistor, the voltage at the
FET is the same voltage as at the inverting input of the op-amp.

But of course, it isolates the capacitor that's going from the op-amp
output to the inverting input of that op-amp.

Michael

4. ### JamieGuest

No, you need R5 there. It is the feed back sense required to keep
U1 operating as a voltage comparator. The + input of U1 is the reference
voltage required and the (-)input would be the comparing point, in this
case, it is comparing the SOURCE (S) side of the mosfet transistor and
will make what ever needed adjustment output on U1 to bias Q1 to get there.
If the voltage exceeds at (S) of Q1, compared to what is sitting at (+)
input of U1, U1 output will then drop in bias voltage on the gate (G) of
Q1. This of course, will cause the Q1 to not conduct as much and lower
the voltage at (S) of Q1 to satisfy the voltage comparator circuit of U1.

The output of U1 will not be following the + input reference voltage,
it will be higher than the 2.5v max you would get with that circuit.

Looking up the transistor, the sheet tells me you'll need ~3 Volts
Plus what is sitting at the Source of Q1 to get it to come on.

That device is like a programmable zener diode. Internally it has a
2.5v fixed reference (Band Gap), which is very stable. You can think of
that as a zener diode. That is used as a internal voltage comparator
against the control pin voltage.

Since the internal is set for 2.5 volts, the component stops clamping
the load when it hits 2.5 volts, because the internal comparator as hit
the balance point of the internal fixed voltage reference.

Now, if you were to apply a scaled reference of what is appearing at
the top side to the control pin, you can then force it to elevate its
clamping voltage at a higher point. A scale reference would be like a
voltage divider network where it derives its source from the top side of
the programmable zener here.

Btw, U2 is the 3 terminal voltage reference, not the OP-AMP.

The 358 is a dual unit, it looks like they are simply terminating the
leads due to lack of use so it won't damage the chip.

Hope that shed some light on the subject.

Jamie

5. ### JamieGuest

Ha? I think you better look at that again, it is very needed..unless you
want a run away system.
They terminate un-used op-amps in a package like that to insure no damage
comes to them, which would most likely propagate over to the used side.
Yes, it is a dual op-amp, to be exact.

Jamie

6. ### JamieGuest

No, the R5 is needed. The cap there serves to pad the feed back down so
it won't oscillate. Just think of adding more miller effect on top of
what is already there inside of the op-amp.

In order to have a constant current you need the circuit to monitor
the actual current and make calibrations at the gate drive. You can only
do this if you have a way to monitor the current and R5 is that. It
simply is monitoring the voltage which would be a function of current on
those high power R's there.

Jamie

7. ### JamieGuest

Well, at least it gives people something to talk about. But I still
can't see how he expects the circuit to be a constant current source for
the test load if you don't bother to account for the sharp knee on the
gate turn on voltage point and the load varying due to a battery
discharging while under test.

I almost get the impression that maybe he thinks that is a jfet or
non-enhanced, when in fact, it's not. Maybe using the correct foot print
may have removed the mystery behind that.

Jamie

8. ### JamieGuest

I fully understand how the circuit works, but my comment to the original
statement is, that R5 is needed when it was thought it could've been
removed because it looked like it wasn't needed. That is far from the
truth. That is all I was trying to convey, R5 is absolutely needed here.

This is a 101 constant current circuit using a differential circuit to
maintain it's current at R13 and R14.

Oh well, maybe I should pick a different brand beer. This Coors Light
is getting to me, then again, it could be the fact that I just got done
with my Taxes. And I hope all the free loaders enjoy getting my money
that I have to additionally pay on this year.

Jamie

9. ### Jasen BettsGuest

???
the circuit compares the volage across in r13 + r14 with the preset
voltage in the non-inverting input and turns the mosfet up or down to
match the voltages. the mosfet response doesn't need to be linear, only
monotonic,

10. ### Jasen BettsGuest

nah, a capacitor from output to the inverting input reduces the AC gain
producing even more lag, this stops the op-amp from overshooting and
also ensure that it won't oscillate.

11. ### JamieGuest

You mean it lowers the BW ?

Jamie

12. ### JamieGuest

And, if you stop chopping up the messages, you'll know that the whole
statement was about removing R5 from the circuit completely.

My how things can run a muck around here. Nothing but chop monkeys
around here.

Jamie

13. ### JamieGuest

Well, I do enjoy Sam Adams however, I can not drink that any more. It
seems to dry out my throat and gives me breathing problems when trying
to sleep at night. You notice how I said at night, other times I just
sleep at the desk!

Jamie

14. ### Bob EngelhardtGuest

I had actually built a ckt very similar to this a while ago, without R4,
R5, & C1. It "worked" very well, as far as keeping a load current
fixed, as shown on a DVM. If I had thought to 'scope it I suppose that
I would have seen oscillation. Next time I'll know.

Follow up question: if my ckt was oscillating, how would that affect the
battery under test?
Well, that was embarrassing! When he said "U2", I thought that he was
talking about the 2nd half of the op amp pkg. But the zener was clearly
marked as "U2". I guess that I expected a "U" to be an IC & a zener to
be a "D", never thinking ...

Bob

15. ### Jasen BettsGuest

I suspect he intended to replace the resistor with a conductor,

16. ### Jasen BettsGuest

An equation,,, you mean like numbers?

My initial thought was that the capacitor in the negative feedback path
is going to kill all the AC gain (because caps pass AC, and negative
feedback reduces gain)

Looking closer I see that the op-amp is organised as an integrator
integrating the difference between the voltage at the mosfet source
and the voltage from the pot.

So, a step change at the source will result in a ramp at the op-amp output
the slope is determined by (V_source-V_pot) R5 C1, this will result in
a change that will turn the mosfet on or off the compensate for the
error. As the source voltage approaches the set point the current in
R5 reduces and the ramp levels out.

As I understand MOSFETs (which isn't all that well) that one is
configured as a source follower, so it's going to have approxiately
unity voltage gain.

So closing the loop the step response is going to be a logarythmic
curve with the limit at the set point.

R5 is 1k and C1 is 10nF so the time constant is 10us whick looks to
be between 10 and 100 times more than the time the op-amp takes to
respond to its inputs, so it's going to mostly behave like an integrator
and will quickly

The capacitances of the mostfet (which as I said I don't really
understand) are all much smaller than C1, so I'm guessing that the
mosfet will respond about 10 times faster than the integrator does.