Searching \ for '[OT]: Analog (opamp) question' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: techref.massmind.org/techref/io/atod.htm?key=analog
Search entire site for: 'Analog (opamp) question'.

Exact match. Not showing close matches.
PICList Thread
'[OT]: Analog (opamp) question'
1999\01\07@142852 by Peter L. Peres

picon face
Hello,

 I have a small question. It might be stupid, but...

 I need to measure a DC current using a probe resistor in a circuit. The
resistor is in the +-branch and at the highest voltage available in the
system. This current needs to be transformed into a ground-referenced
voltage for ADC purposes. I'll try an ASCII schematic:

                  R1
U1, I1 >-----*---/\/\/\---*-----> U1 - R1*I1, I1
            |            |
            /            /
         R2 \         R3 \
            /            /
            \            \
            |            |    R6            |\
            *------------ ---/\/\/\---------+ \
            |            |    R7            |  >----*----O Vo
            |            *---/\/\/\----*----- /     |
            |            |             |    |/      |
            /            /             |     R8     |
         R4 \         R5 \             *---/\/\/\---+
            /            /             ^
            \            \             A
            |            |
           ===          ===
           ///          ///
           GND          GND


 Assuming R2 == R4 and the differential amplifier gain is Ao = R8/R7, the
expression for the output voltage assumes the form:


Vo = Ao*U1*I1*R1*R5/(R3 + R5)


this is very nice, but I'd like to get rid of U1, for obvious reasons. U1
is not fixed, obviously. The most direct way is, of course, to measure U1
at the same time, and divide Vo by something proportional to U1 (in
software). (U1 IS measured at the same time by other parts of the
circuit).

Question: Is there a cunning way to avoid this, using *simple* analog
circuits to inject a current proportional to U1 into the '-' input of the
op-amp at point A ? I know how to do this with 2 current mirrors and a R.
Any other ideas ? An op-amp voltage controlled current source referenced
to U1 ? Pros and cons ?

Note that the expressions come off a bit of paper, and that it' 9PM here.
There may be errors.

tia,

       Peter

1999\01\07@152538 by Ryan Miller

flavicon
face
I don't know if this is exactly what you are looking for but I have a
circuit where I measure a 4-20mA DC current through a resistor. I use a
LTC1043 "swinging cap" chip which takes a differential voltage and converts
it to a ground referenced voltage, without op-amps or having to match
resistors or do any conversions. I'm using one on a motor drive card and
have never had any problems with them; they seem solid.

FYI

Ryan

{Quote hidden}

<snip>

>
>         Peter
>

1999\01\07@160317 by paulb

flavicon
face
Peter L. Peres wrote:

{Quote hidden}

 Well, the first way is to add the missing resistor, R9, which is
supposed to be between the positive input of the Op-amp and ground.

 However, the alternative is to remove the assumption that R2/R4 equals
R3/R5, and adjust this ratio to correct for the absence of R9.  Whilst
this is the low-count option (but not as low as deleting the redundant
R6 and R7 of course), I must agree that the maths becomes hairy.

 Just put R9 where it's supposed to be!
--
 Cheers,
       Paul B.

1999\01\07@160921 by Eisermann, Phil

flavicon
face
> Hello,
>
>   I have a small question. It might be stupid, but...
>
>   I need to measure a DC current using a probe resistor in a circuit.
> The
> resistor is in the +-branch and at the highest voltage available in
> the
> system. This current needs to be transformed into a ground-referenced
> voltage for ADC purposes.
>
       [snip]

       unfortunately, i can't take credit for this; it
       comes to you courtesy of National Semiconductor.


       I            R1
       >-----*---/\/\/\---*--->
             |            |
             |            |
             *------------|----*
             |            |    |
             |            |    |
             /            |    |
             \ R2         |    |(7)
             /            |   |\
             \            *---- \
             |                |  >---*  LM301A
             *----------------+ /    |
             |                |/|    |
             |                  -V   |
             +-| (PN3674)            |
               |---------------------*
             +-|
             |
             *---o Vout = I((R1*R3)/R2)
             |
             /
             \
             /
             \
             |
            ---
             -


       The JFET is used as a buffer. Id = Is, therefore
       the output voltage reflects the current draw. The
       circuit shows R1 = 0.1, R2 = 100, R3 = 5K. That
       gives 5V/A output.

1999\01\07@163154 by mwestfal

flavicon
face
Peter L. Peres wrote:
>
>   I have a small question. It might be stupid, but...
>
>   I need to measure a DC current using a probe resistor in a circuit. The
> resistor is in the +-branch and at the highest voltage available in the
> system. This current needs to be transformed into a ground-referenced
> voltage for ADC purposes. I'll try an ASCII schematic:


Let me modify the circuit:


{Quote hidden}

Make R2/R1 = R2'/R1'.

Then Vo = Vrs * (R2/R1) where Vrs is the voltage drop across Rs.

The voltage drop across Rs is Vrs = I * Rs

-------------------------------------------------------------------------------
Mike
spam_OUTmwestfalTakeThisOuTspamodc.net
http://web.csusb.edu/public/csci/mwestfal
Linux religious dogma: "The Gates of Hell shall not prevail."
-------------------------------------------------------------------------------

1999\01\07@170254 by William Chops Westfield

face picon face
Well, not being an analog sort of guy, I probably would have taken an
"analog computer" approach - negate U1-R1*I1, add to U1 (gives R1*I1),
multiply by appropriate scale factor.  Three opamps (still one
package!), if you're dumb.  I'm pretty sure it'd condense down to one
if you're clever; probably look a lot like the circuit you posted, too...

BillW

1999\01\07@172204 by paulb

flavicon
face
Mike Westfall wrote:

{Quote hidden}

 Darn!  Why didn't I think of that?
--
 Cheers,
       Paul B.

1999\01\07@172802 by Thomas McGahee

flavicon
face
Peter, try the following instead:

>
>                    Rx
> U1, I1 >-----*---/\/\/\---*-----> U1 - R1*I1, I1
>              |            |
>              |            |
>              |            |                  R3
>              |            |             +--/\/\/\----o GND
>              |            |             |
>              |            |    R4       |    |\
>              *------------C---/\/\/\----*----+ \
>                           |    R2            |  >----*----O Vo
>                           *---/\/\/\----*----- /     |
>                                         |    |/      |
>                                         |     R1     |
>                                         *---/\/\/\---+
>

RX is the current probe resistor.
R1=R3
R2=R4
Gain=R1/R2

Vout=(I*Rx)*Gain

U1 is no longer a term.
This configuration is a simple differential amplifier circuit.
It may not be the optimal circuit, but it will work.
The resistors R1 R2 R3 R4 must be precision resistors.
R2 must be at least 100 times larger than Rx for accuracy.

There are precision differential instrumentation amps
available from companies like Burr Brown and others that
incorporate an improved version of the above in a single package.





>
----------
{Quote hidden}

1999\01\07@173755 by Gerhard Fiedler

picon face
use an opamp which goes up to the positive rail with its output. short r3 and
r6 and take r5 out. set r2=r7 and r4=r8.

Ao=r8/r7=r4/r2

Vo= i1 * r1 * Ao

you can make the opamp to output current, but i thought you want to measure
current and output voltage...

ge


At 21:25 01/07/99 +0000, Peter L. Peres wrote:
>Hello,
>
>  I have a small question. It might be stupid, but...
>
>  I need to measure a DC current using a probe resistor in a circuit. The
>resistor is in the +-branch and at the highest voltage available in the
>system. This current needs to be transformed into a ground-referenced
>voltage for ADC purposes. I'll try an ASCII schematic:

                  R1
U1, I1 >-----*---/\/\/\---*-----> U1 - R1*I1, I1
            |            |
         R2 /            |
            \            |
            /            |
            \            |
            |            |                  |\
            *------------ ------------------+ \
            |            |    R7            |  >----*----O Vo
            |            *---/\/\/\----*----- /     |
            |                          |    |/      |
            /                          |     R8     |
         R4 \                          *---/\/\/\---+
            /                          ^
            \                          A
            |
           ===
           ///
           GND


{Quote hidden}

1999\01\07@192346 by Mike Keitz

picon face
On Thu, 7 Jan 1999 21:25:55 +0000 "Peter L. Peres" <.....plpKILLspamspam.....ACTCOM.CO.IL>
writes:

>  I need to measure a DC current using a probe resistor in a circuit.
>The
>resistor is in the +-branch and at the highest voltage available in
>the
>system. This current needs to be transformed into a ground-referenced
>voltage for ADC purposes.


Here's a simple circuit commonly used for that purpose:

(+supply)-------Rs-------(load)
          |         |
         R1        R3
          |         |
          |---   ---|
         R2   |  | R4
          |   +  -  |
         GND   O----x---- Out

The +,- and O at the bottom is an op-amp.  It is necessary of course that
R1/R2 = R3/R4 in order to reject changes in the supply voltage.  Voltage
dropped across Rs is amplified by a gain of R4/R3.  If the supply voltage
is rather high, it is hard to keep the op-amp inputs within their range
and also have good gain.  This circuit is not optimal in that case.

I'm not sure what your circuit is supposed to do but it looks
unnecesarily complicated.  Of course the conventional 2 and 3-amplifier
"instrumentation amplifier" circuits can also be used, offering somewhat
higher performance.

It is sometimes possible to rearrange the circuit so your ADC's ground is
one end of the resistor.  This simplifies the current measurement a lot.


___________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com/getjuno.html
or call Juno at (800) 654-JUNO [654-5866]

1999\01\07@194251 by Russell McMahon

picon face
The circuit looks like it SHOULD do what you want pretty much as is.
Your formula looks approximately correct but is, fortunately,  wrong
for a properly designed circuit :-)
Essentially, when the dividers are balanced the required "current
proportional to U1" is effectively provided.

Rather than re-derive I'll say what I think should be done and allow
others to pull out bits of paper and point out why I'm wrong :-).

For R2=R4 as you specified, if you also set R3=R5 (and best R3=R2)
then the amplifier circuit proper is fed by a difference signal of
I1*R1*(R2/R2+R4) = 1/2 * the voltage drop across R1.
The only reason for the dividers here is to limit the maximum input
voltage to keep it inside the common mode range of the op-amp. If the
+ supply of the op-amp is at voltage U1 (which it may not be) then
some opamps will allow a common mode range which includes their
positive supply and the dividers would not be needed. The division
ration does not have to be half as it is here - you can choose any
convenient ratio - it should however be as high as possible as it is
dividing down the 'desired" signal as well as the unwanted power
supply voltage. Use as low a division ratio as your opamps common
mode voltage will allow.
[Common mode voltage (Vcm) is the maximum voltage "common" to both
differential inputs which will be rejected by the op-amp while it
amplifies the difference between them. Vcm is usually expressed both
in absolute terms and usually more importantly, relative to the power
supply voltage in use at the time. There are both positive and
negative Vcm limits and they are often not symmetrical but here only
the positive limit is of concern]

As shown the circuit should work if the dividers R2/R4 and R3/R5 are
balanced.
However, the op-amp input /leakage currents will see different
resistances and produce an offset. This may be overcome by making R6
= to a value of (R8  in parallel with R7). As R8 is probably >> R7
this means R6 will be approximately equal to R7.
Another error source is that the impedance of the dividers will
appear to be part of R6 and R7 - as long as R6 and R7 are >> R2 etc
the problem will be minimised. If not, you can calculate the
equivalent resistance and use it in your figuring. ie add (R3//R5
// =  in parallel with) ) to R7 and R2//R4 to R6.

To "completely" overcome the affects of R2 etc unity gain buffers
(opamps with inverting connected to output, input to non-inverting
input) may be placed before R6 and R7.

Approximately:

   Vo = R1*I1  *  R5/(R#+R5) * R8/Rx

where Rx = R7 + R5//R3

for R2/R4 = R3/R5
and    R6~ R7//R8    (ideally? R6+R2//R4 = (R7+R3//R5)//R8 but this
is probably unnecessary)


regards

           Russell McMahon

From: Peter L. Peres <EraseMEplpspam_OUTspamTakeThisOuTACTCOM.CO.IL>

>  I need to measure a DC current using a probe resistor in a
circuit. The
>resistor is in the +-branch and at the highest voltage available in
the
>system. This current needs to be transformed into a
ground-referenced
{Quote hidden}

R8/R7, the
>expression for the output voltage assumes the form:
>
>
>Vo = Ao*U1*I1*R1*R5/(R3 + R5)
>
>
>this is very nice, but I'd like to get rid of U1, for obvious
reasons. U1
>is not fixed, obviously. The most direct way is, of course, to
measure U1
>at the same time, and divide Vo by something proportional to U1 (in
>software). (U1 IS measured at the same time by other parts of the
>circuit).
>
>Question: Is there a cunning way to avoid this, using *simple*
analog
>circuits to inject a current proportional to U1 into the '-' input
of the
>op-amp at point A ? I know how to do this with 2 current mirrors and
a R.
>Any other ideas ? An op-amp voltage controlled current source
referenced
>to U1 ? Pros and cons ?

1999\01\07@200745 by Dwayne Reid

flavicon
face
>  I need to measure a DC current using a probe resistor in a circuit. The
>resistor is in the +-branch and at the highest voltage available in the
>system. This current needs to be transformed into a ground-referenced
>voltage for ADC purposes. I'll try an ASCII schematic:

circuit and good answers from Paul and Phil snipped.

couple of things:  what voltage is your rail?  The LT 1490 has an input
stage that goes up to 44V, even with a 3V or 5V rail.  Neat device!  One of
LT's ap notes shows a high side current sensor doing just what you want.

If you use Phil's suggestion, make sure that you use an op-amp that includes
VCC within the common mode range.  This can be one of the LT devices like
above or most JFET op-amps such as the TL071 series.

If you want to stay with a differential amplifier, you could look at some of
the integrated solutions from Burr-Brown or Analog Devices.  Their claim to
fame is the very accurately matched resistors within the device.  You would
still be left with matching 2 external resistors (the input resistors)
depending upon the voltage of that rail.

Finally, there are a couple of people making high side current sensors with
the shunt integrated right in the package.  These work in a fashion similar
to Phil's suggestion.  Again, depends on the voltage on that rail.  I've
seen at least 2 different approaches but don't have the names of the
manufacturers handy right now.  I can look them up if needed.

hope this helps.

dwayne


Dwayne Reid   <dwaynerspamspam_OUTplanet.eon.net>
Trinity Electronics Systems Ltd    Edmonton, AB, CANADA
(403) 489-3199 voice     (403) 487-6397 fax

1999\01\07@202850 by Scott Dattalo

face
flavicon
face
On Thu, 7 Jan 1999, Dwayne Reid wrote:

> Finally, there are a couple of people making high side current sensors with
> the shunt integrated right in the package.  These work in a fashion similar
> to Phil's suggestion.  Again, depends on the voltage on that rail.  I've
> seen at least 2 different approaches but don't have the names of the
> manufacturers handy right now.  I can look them up if needed.

For example, check out:

http://www.national.com/pf/LM/LM3812.html

These current sense IC's have a 4 milliohm shunt resistor integrated in
the package. The output is a PWM signal. I've never used them, but they
look neat.

Scott

1999\01\08@113720 by Tom Handley

picon face
  Peter, others have mentioned some good circuits. If you want an
integrated solution, take a look at the MAX471/472. These are
high-side current sensors in an 8-pin DIP or SO package. The supply
voltage ranges from 3-36V, they draw 100ua, and have a 2% accuracy.
They provide a voltage output as well as sign/direction. The 471 has an
internal sense resistor and will measure up to 3A (1V/A). The 472 uses
an external resistor. They are intended for use in battery chargers.

  - Tom

At 09:25 PM 1/7/99 +0000, Peter L. Peres wrote:
{Quote hidden}

1999\01\08@124626 by Peter L. Peres

picon face
On Thu, 7 Jan 1999, Ryan Miller wrote:

> I don't know if this is exactly what you are looking for but I have a
> circuit where I measure a 4-20mA DC current through a resistor. I use a
> LTC1043 "swinging cap" chip which takes a differential voltage and converts
> it to a ground referenced voltage, without op-amps or having to match
> resistors or do any conversions. I'm using one on a motor drive card and
> have never had any problems with them; they seem solid.

Thank you, Ryan,

 I have never used a LTC1043, but I am familiar with the principle, and
have used the reed relay based version of the same circuit before ;). How
much common mode voltage will a LTC1043 take, and is it linear (pun ;) ?
I'd like it to be 0.5 % or better when U1 varies over a 2:1 range. This is
easy with op-amps only, and so-so with discrete current mirrors. The large
amount of resistors is not a problem, I will use an 6-fold SIPP for the
matched ones. My gain is x20 and I only need the gain setting resistor
with the SIPP and the probe resistor.

 My problem is, that I have to use an inexpensive op-amp (whose other
sections are used for something else) and that I'd want instant response
on this signal (w/o calculation overhead).

Peter

1999\01\08@144951 by Peter L. Peres

picon face
Hello,

 I'd like to thank you all for the valuable input on this, I am very
grateful for your help.

 The National schematic contributed by Phil Eisermann is very much along
the lines of my 'small cunning analog circuit addition' ;) Unfortunately,
it requires an opamp that allows U1 in its CMMR (U1 is actually higher
than my opamp supply at certain times). It also requires a P-FET and that
I don't have for this project.

 Mike Westfall was first to contribute the simple 'direct' solution, of
course, of which I was aware. I started adding complications because of U1
being higher that the opamp CMMR voltage. This is how I got stuck.

 I will use a Zener diode as shown in the circuit to prevent this. One
free 'gift' I get is, that the gain is now sub-unitary due to the cmrr
limit vs. U1. Sigh.

thank you all,

       Peter

PS: The schematic again for reference:

{Quote hidden}

More... (looser matching)
- Last day of these posts
- In 1999 , 2000 only
- Today
- New search...