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

B

#### Bob Engelhardt

Jan 1, 1970
0
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

M

#### Michael Black

Jan 1, 1970
0
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.
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.
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.
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).
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 ...??
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

M

#### Michael Black

Jan 1, 1970
0
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.
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

J

#### Jamie

Jan 1, 1970
0
Bob said:
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.

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.

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

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

J

#### Jamie

Jan 1, 1970
0
Michael said:
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).
Ha? I think you better look at that again, it is very needed..unless you
want a run away system.
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
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

J

#### Jamie

Jan 1, 1970
0
Michael said:
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.

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

J

#### Jamie

Jan 1, 1970
0
Tim said:
But quite practically, if not for C1 and its associated resistors then
the circuit will oscillate strongly. That circuit is a classic for
driving a MOSFET gate without oscillations.

It's considerably different from a voltage follower into a resistive
load, though, because the MOSFET gate is very capacitive, and the LM358
(like lots of op-amps) Really Doesn't like driving capacitive loads, and
will oscillate like mad if you try.

Unless, of course, you want the circuit to actually work correctly.

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

J

#### Jamie

Jan 1, 1970
0
Tim said:
The op-amp accounts for that. If you put your thumb over C1, R4, and Q1,
then what's left is a voltage follower that drives the voltage at the top
of R13 to be equal to the voltage at pin 5 of U1. Since (at DC at least)
the MOSFET takes no gate current, that voltage is proportional to the
battery current, and hence it is the battery (or power supply) current
that is being servoed.

The circuit should do a pretty darned good job of holding the load
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

J

#### Jasen Betts

Jan 1, 1970
0
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.

???
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,

J

#### Jasen Betts

Jan 1, 1970
0
The reason for R5 is because you need R4 and C1 in there for stability:
the MOSFET gate is highly capacitive, which slows the response of U1 down
considerably. If you just connected U1 straight to Q1, then there would
be enough added lag in the loop formed by U1 and Q1 that the circuit
would oscillate. R4 isolates U1's output from the MOSFET gate (but
leaves in the lag).
C1 lets U1's output 'talk' directly to U1's input
(which introduces lead, which counteracts the lag).

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.

J

#### Jamie

Jan 1, 1970
0
Jasen said:
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.
You mean it lowers the BW ?

Jamie

J

#### Jamie

Jan 1, 1970
0
Jasen said:
???
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,
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

J

#### Jamie

Jan 1, 1970
0
Tim said:
Ah -- I thought you were commenting on the OP's post, not Mr. Black's
post. My error.

Yes, and I was kind of surprised that you didn't realize it. But I've
seen some pretty astute analog circuit designers who've seen this circuit
(or similar ones) and not realized what was up.

Coors Light. Ick. Surely in this day and age you can get some decent
craft beer with real taste and color!

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

B

#### Bob Engelhardt

Jan 1, 1970
0
Bob said:
...

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.

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?
2. The 2nd op amp: "The voltage reference, U2, provides a stable
2.5-volt reference voltage ...". ...

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

J

#### Jasen Betts

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

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

J

#### Jasen Betts

Jan 1, 1970
0
Jason, Could you elaborate on that? Like write us an equation that
shows how it reduces the AC gain?

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.

Replies
18
Views
709
Replies
7
Views
2K
Replies
3
Views
1K
Replies
5
Views
1K
Replies
7
Views
1K