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

Started by April 1, 2012
```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
```
```On Sun, 1 Apr 2012, Bob Engelhardt wrote:

> 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

```
```Bob Engelhardt wrote:

> 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

```
```On Sun, 1 Apr 2012, Jamie wrote:

> Bob Engelhardt wrote:
>
>> 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.
>
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

>  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
>
>
```
```Michael Black wrote:

> On Sun, 1 Apr 2012, Bob Engelhardt wrote:
>
>> 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).
Ha? I think you better look at that again, it is very needed..unless you
want a run away system.

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

```
```Michael Black wrote:

> On Sun, 1 Apr 2012, Jamie wrote:
>
>> Bob Engelhardt wrote:
>>
>>> 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.
>>
> 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

```
```On Sun, 01 Apr 2012 11:34:26 -0400, Bob Engelhardt
<bobengelhardt@comcast.net> wrote:

>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

R5/R4/C1 keep both Q1 and U1 from oscillating. There are probably
three oscillation modes: Q1 RF oscillating on its own, U1 oscillating
from being loaded by the Q1 gate capacitance, and an overall loop
oscillation.

U2A appears to do nothing. It looks like the designer attempted to
keep it running closed-loop to keep it from affecting the other
section, but he didn't do it right.

It would be more sensible to use U2A to buffer the reference, increase
R1, and save a bunch of 9V supply current.

--

John Larkin                  Highland Technology Inc
www.highlandtechnology.com   jlarkin at highlandtechnology dot com

Precision electronic instrumentation
Picosecond-resolution Digital Delay and Pulse generators
Custom timing and laser controllers
Photonics and fiberoptic TTL data links
VME  analog, thermocouple, LVDT, synchro, tachometer
Multichannel arbitrary waveform generators
```
```On Sun, 01 Apr 2012 11:34:26 -0400, Bob Engelhardt
<bobengelhardt@comcast.net> wrote:

>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.

Both R5 _and_ R4 are to isolate the OpAmp from a capacitive load, to
prevent instability.

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

The second OpAmp is not U2, it's the second section of U1... it's not
used and is "dummy" connected" to prevent undefined currents.

U2 is the TL431, an adjustable shunt regulator, connected here simply
as a 2.5V _zener_.

...Jim Thompson
--
| James E.Thompson, CTO                            |    mens     |
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    |
| Phoenix, Arizona  85048    Skype: Contacts Only  |             |
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  |
| E-mail Icon at http://www.analog-innovations.com |    1962     |

I love to cook with wine.     Sometimes I even put it in the food.
```
```On Sun, 01 Apr 2012 14:25:26 -0400, Michael Black wrote:

> On Sun, 1 Apr 2012, Jamie wrote:
>
>> Bob Engelhardt wrote:
>>
>>> 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.
>>
> 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.

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 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.

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.

> 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.
>
Unless, of course, you want the circuit to actually work correctly.

--
Tim Wescott
Control system and signal processing consulting
www.wescottdesign.com
```
```On Sun, 01 Apr 2012 11:34:26 -0400, Bob Engelhardt wrote:

> 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.

First, you need _some_ connection between the MOSFET source and the
negative feedback to the op-amp, because it's by servoing that source
voltage to your set voltage that you're controlling the current.

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).  R5 gives C1 a chance
to work, while still providing a DC path from the MOSFET source voltage
(which is what you want to set) to U1's negative input.

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

The second op-amp is mislabeled (as is the first).  The first one should
be U1A, and the second one (which is in the same package) should be
labeled U1B.

U2 is the thing that looks like a zener with a wire sticking out of it,
hooked back to the cathode -- it's a shunt voltage reference: stick a
reasonable current into it, and it'll hold a defined voltage.

--
Tim Wescott
Control system and signal processing consulting
www.wescottdesign.com
```