Searching \ for '[OT] Op Amp signal difference problem' in subject line. ()
Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=amp+signal+difference
Search entire site for: 'Op Amp signal difference problem'.

Exact match. Not showing close matches.
'[OT] Op Amp signal difference problem'
2000\03\08@132133 by

I'm a programmer, not an EE, so I'm hoping someone here can point me in
the right direction.  I'm currently working with a circuit that someone
else designed, and now I'm writing software for it.  I can supply a
schematic for this circuit, but I don't have it here in front of me.
Basically, we have 2 DC signals and we need to take the difference
between the 2, and amplify that difference by a factor of 10.  That
input is then feed into one of the A/D converters on a 16C74A (thus the
reason I am on this list).  The larger of the 2 signals is fed into the
+ input on an LMC6482, and the other is fed into the - input.  The
problem is that when I graph the output signal, and a calculated value
for S1-S2, they don't match.

So my questions are these:
1. Is this a valid use of an op-amp?  Maybe we should have a multi-stage
op-amp circuit instead of just using one.
2. Will an op-amp subtract 2 signals and then amplify that difference?
3. Is there a mailing list, web page, or book somewhere that will help
me with op-amp design?

Thanks,
Jim Dossey

part 0 3410 bytes
<P><FONT SIZE=2>Jim,</FONT>
<BR><FONT SIZE=2>I would say go with a multi-stage amp configuration.</FONT>
<BR><FONT SIZE=2>First stage a &quot;Difference Amplifier&quot; with the second</FONT>
<BR><FONT SIZE=2>stage to give you the amplification factor of 10.</FONT>
</P>

<P><FONT SIZE=2>Best regards,</FONT>
<BR><FONT SIZE=2>Steven</FONT>
</P>
<BR>

<P><FONT SIZE=2>Steven Kosmerchock</FONT>
<BR><FONT SIZE=2>Father/Student/Engineering Technician</FONT>
<BR><FONT SIZE=2>http://www.geocities.com/researchtriangle/lab/6584 </FONT>
</P>

<P><FONT SIZE=2>&quot;Great spirits have always encountered violent </FONT>
<BR><FONT SIZE=2>oppposition from mediocre minds.&quot;--A.Einstein</FONT>
</P>
<BR>
<BR>

<P><FONT SIZE=2>{Original Message removed}
Jim Dossey wrote:

> I'm a programmer, not an EE, so I'm hoping someone here can point me in
> the right direction.  I'm currently working with a circuit that someone
> else designed, and now I'm writing software for it.  I can supply a
> schematic for this circuit, but I don't have it here in front of me.
> Basically, we have 2 DC signals and we need to take the difference
> between the 2, and amplify that difference by a factor of 10.  That
> input is then feed into one of the A/D converters on a 16C74A (thus the
> reason I am on this list).  The larger of the 2 signals is fed into the
> + input on an LMC6482, and the other is fed into the - input.  The
> problem is that when I graph the output signal, and a calculated value
> for S1-S2, they don't match.

What do you mean by "they don't match."?

> So my questions are these:
> 1. Is this a valid use of an op-amp?  Maybe we should have a multi-stage
> op-amp circuit instead of just using one.

I am not familiar with the LMC6482, but you have not specified the range of
voltage of the signals either.

> 2. Will an op-amp subtract 2 signals and then amplify that difference?

An Op-Amp can amplify the difference between two signals,

>
> 3. Is there a mailing list, web page, or book somewhere that will help
> me with op-amp design?
>
> Thanks,
> Jim Dossey

--
*
|  __O    Thomas C. Sefranek  tcscmcorp.com
(*)/ (*)  Bicycle mobile on 145.41, 448.625 Mhz

ARRL Instructor, Technical Specialist, VE Contact.
http://www.harvardrepeater.org

>  The larger of the 2 signals is fed into the
>+ input on an LMC6482, and the other is fed into the - input.  The
>problem is that when I graph the output signal, and a calculated value
>for S1-S2, they don't match.

>So my questions are these:
>1. Is this a valid use of an op-amp?  Maybe we should have a multi-stage
>op-amp circuit instead of just using one.
>2. Will an op-amp subtract 2 signals and then amplify that difference?
>3. Is there a mailing list, web page, or book somewhere that will help
>me with op-amp design?

what is the mismatch?

As for the questions, it is a valid use for an op-amp, and it is
theoretically
correct. However, there are other factors that come into play. For this
configuration, it is mainly CMRR (Common Mode Rejection Ratio).
Unfortunately, a single op-amp configured as a difference amplifier
has poor CMRR. Other things to look for are offset voltage (Vos), and
offset current/bias current. Since you implied that this is out of your
realm of expertise, I won't go onto details. But the basic idea is that
the offset voltage and bias current of the op-amp represent an
additional input, which is then multiplied by the feedback network.
For example, if you have 2mV of offset voltage (not uncommon with
cheaper op-amps), and you have a gain of 10, then your output will
have an error of 20mV! I don't have a datasheet for the LMC6482.

There are many, many books that can give you a basic understanding of
these phenomena. There's always the oft-cited "Art of Electronics"
I also like "Operational Amplifiers, Characteristics and Applications"
By Robert Irvine.  Those should get you started, and they aren't
difficult to understand. Both are textbooks, so they go into some
detail. Feel free to ask if you need more help.

I guess the list would need to know the resistor values and input signal
characteristics to be able to help more

Offhand, I'd go with a two-op-amp difference amplifier. But you might be
able to do it with one, depending on the input signal (and impedance).

Phil Eisermann
H:(440) 284-3787 (mazerix.netcom.com)
O:(440) 329-4680 (peisermaridgid.com)

"Thomas C. Sefranek" wrote:
{Quote hidden}

I'm working with a 5V circuit.  The 2 inputs range from 1V to 4V, with
the difference between the 2 ranging from 0 - 500 mV.  S1 > S2.  Here is
a simplified version of the circuit:  (NOTE: There is also a variable 1K
resistor on S1 that is used as a zero adjust)

10K      |\  LMC6482
S1 >----vvvvvv-----|+\        1K
10K      |  >-+---vvvvvv-----> output
S2 >----vvvvvv--+--|-/  |
|  |/   |
| 100K  |
L-vvvv--|

The output is not what I expect because it seems to be influenced more
by S2 than it is by S1.  If both S1 and S2 are increasing (over a 1
minute period), then the output also increases.  If S1 increases and S2
decreases, the output decreases.  If S1 decreases and S2 increases, the
output increases.

Thanks again to all who replied.  I think I am starting to understand
the problem.

At 02:11 PM 3/8/00 -0500, Jim Dossey wrote:

>
>            10K      |\  LMC6482
>  S1 >----vvvvvv-----|+\        1K
>            10K      |  >-+---vvvvvv-----> output
>  S2 >----vvvvvv--+--|-/  |
>                  |  |/   |
>                  | 100K  |
>                  L-vvvv--|

Put 100K from the + input to ground.

>The output is not what I expect because it seems to be influenced more
>by S2 than it is by S1.  If both S1 and S2 are increasing (over a 1
>minute period), then the output also increases.  If S1 increases and S2
>decreases, the output decreases.  If S1 decreases and S2 increases, the
>output increases.
>
>Thanks again to all who replied.  I think I am starting to understand
>the problem.
>
>
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Spehro Pefhany                                    "The Journey is the reward"
speffinterlog.com
Fax:(905) 271-9838                      (small micro system devt hw/sw + mfg)
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

part 0 8682 bytes
<P><FONT SIZE=2>Jim,</FONT>
</P>

<P><FONT SIZE=2>Have you tried this:</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10K</FONT>
<BR><FONT SIZE=2>GROUND--VVVVVV----|</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10K&nbsp;&nbsp;&nbsp; |&nbsp; |\&nbsp; LMC6482</FONT>
<BR><FONT SIZE=2>&nbsp; S1 &gt;----vvvvvv--+--|+\&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1K</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10K&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp; &gt;-+---vvvvvv-----&gt; output</FONT>
<BR><FONT SIZE=2>&nbsp; S2 &gt;----vvvvvv--+--|-/&nbsp; |</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp; |/&nbsp;&nbsp; |</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 10K&nbsp;&nbsp; |</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; L-vvvv--|</FONT>
</P>

<P><FONT SIZE=2>Regards,</FONT>
<BR><FONT SIZE=2>Steven</FONT>
</P>
<BR>
<BR>

<P><FONT SIZE=2>{Original Message removed}
[snip]

> I'm working with a 5V circuit.  The 2 inputs range from 1V to 4V, with
> the difference between the 2 ranging from 0 - 500 mV.  S1 > S2.  Here is
> a simplified version of the circuit:  (NOTE: There is also a variable 1K
> resistor on S1 that is used as a zero adjust)
>
>             10K      |\  LMC6482
>   S1 >----vvvvvv-----|+\        1K
>             10K      |  >-+---vvvvvv-----> output
>   S2 >----vvvvvv--+--|-/  |
>                   |  |/   |
>                   | 100K  |
>                   L-vvvv--|
>
>
ohh... this isn't a difference amplifier! That would be the problem. You
need another 100K resistor from "+" to ground. You need to make
sure that the 10K and 100K are as close as possible, as this
configuration is dependend on the resistors ffor CMRR.

Which means throw out the variable 1K resistor for zero
adjust. That's not the way to trim, and it's just going to introduce
errors. To trim to zero, look in the datasheet for a circuit. With
single supply op-amps, there are usually two additional terminals.
Connect a 10K pot between them, with the wiper going to negative
supply of the op-amp. ground both inputs, and trim the pot until the
output voltage is zero. Note that some op-amps use a
different trimming scheme, so consult the datasheet.

Phil Eisermann
H:(440) 284-3787 (mazerix.netcom.com)
O:(440) 329-4680 (peisermaridgid.com)

At 01:20 PM 03/08/2000 -0500, you wrote:
>I'm a programmer, not an EE, so I'm hoping someone here can point me in
>the right direction.  I'm currently working with a circuit that someone
>else designed, and now I'm writing software for it.  I can supply a
>schematic for this circuit, but I don't have it here in front of me.
>Basically, we have 2 DC signals and we need to take the difference
>between the 2, and amplify that difference by a factor of 10.  That
>input is then feed into one of the A/D converters on a 16C74A (thus the
>reason I am on this list).  The larger of the 2 signals is fed into the
>+ input on an LMC6482, and the other is fed into the - input.  The
>problem is that when I graph the output signal, and a calculated value
>for S1-S2, they don't match.
>

Your opAmp circuit needs resistors to properly amplify or
difference voltages. You cannot simply put signals onto the
+ and - terminals. You always need a feedback configuration for
proper operation (except with chips labelled "instrumentation amp*).

1 opAmp can do it.

R1
V2 -------10K-----+--------+      opamp
|        |     +------+
R2 100K      |     |      |
|        +-----|+     |
gnd             |      |---+---1K--- Vout
R3                   |      |   |
V1 --------10K-------------+-----|-     |   |
|     |      |   |
|     +------+   |
+------100K------+
R4

Vout = [R2/(R1+R2)]*V2*[1+(R4/R3)] - V1*(R4/R3)

Vout = [100/(10+100)]*V2*[1+(100/10)] - V1*(100/10)
= 10*(V2 - V1)

the R's should be 1% tolerance, or the terms in the equation
won't cancel properly.

In general, the smaller R's (ie, 10K here) should be lots
bigger than the source resistances of the signals. If
necessary, make all resistors larger by the same factor,
ie, 10K/100K, 20K/200K, 50K/500K, etc. Larger R values are
ok with CMOS opAmps.

The source signals should not be greater than the voltages
powering the opAmp, since V+ = V2 (approx).

Be careful the voltage applied to the A/D is not outside the
range 0-5v - eg, by wrongly connecting the inputs. Not a problem,
if the opAmp is powered only by 5v, rather than +/-5v. The 1K
resistor in Vout lead helps protect the A/D in any case.

- Dan Michaels
Oricom Technologies
http://www.sni.net/~oricom
==========================

A great website for this infos related to this are  Linear Tech and Burr
Brown.
http://www.linear.com
http://www.burr-brown.com
If you have time read LTs great Application handbooks (specialy the earlier
one, AN1-AN30)

hth

>> > 3. Is there a mailing list, web page, or book somewhere that will help
>> > me with op-amp design?

Michael Wieser
m.k.wnextra.at

Service and Audiodesign

<x-flowed>At 02:11 PM 3/8/00 -0500, Jim wrote:
>I'm working with a 5V circuit.  The 2 inputs range from 1V to 4V, with
>the difference between the 2 ranging from 0 - 500 mV.  S1 > S2.  Here is
>a simplified version of the circuit:  (NOTE: There is also a variable 1K
>resistor on S1 that is used as a zero adjust)
>
>             10K      |\  LMC6482
>   S1 >----vvvvvv-----|+\        1K
>             10K      |  >-+---vvvvvv-----> output
>   S2 >----vvvvvv--+--|-/  |
>                   |  |/   |
>                   | 100K  |
>                   L-vvvv--|
>
>The output is not what I expect because it seems to be influenced more
>by S2 than it is by S1.  If both S1 and S2 are increasing (over a 1
>minute period), then the output also increases.  If S1 increases and S2
>decreases, the output decreases.  If S1 decreases and S2 increases, the
>output increases.

1. As others have mentioned, you need a 100k resistor to ground to maintain
balance between the two inputs. Otherwise you will lose common mode
rejection and you'll develop a bias current problem on the + terminal.

2. I assume the "LMC" op-amp is a CMOS rail-rail op-amp, so you shouldn't
have to worry about offset voltages or bias current effects, since they
will be very small compared to your inputs.

3. Make sure your signals don't get above 0.5 V, or you will saturate the
op-amp, giving a fixed ~ 5 V instead of the correct value.

4. Make sure the difference between the two inputs doesn't exceed the
maximum difference allowed between inputs by the op-amp.

5. If your op-amp is not 'rail-rail', you will get saturation/clipping
below 5 V.

6. I think most of your problems will go away when you add the 100 k
resistor to the + terminal.

7. Another thing you can try is to replace the 100k resistors with 10k and
see what your output looks like with unity gain.

8. Do you have an oscilloscope? This will allow real-time debugging of the
electronics separately from the PIC.

9. Are the inputs via twisted pair? What is the opportunity to pick up hum
from AC power lines, fluorescent lights, etc? If this can be a problem, the
resistors used for inputs should be matched to 1% or 0.1%, or you need a
circuit mod for common mode rejection adjustment.

10. What is the output impedance of your input sources? Is 10k the correct
value to use for the input resistors?

11. This circuit should work (with the 100k addition), without the need for
more op-amps to make an instrumentation amplifier. A good CMOS op-amp (I
use LMC660) is accurate enough to make a high-quality difference amplifier.

12. You can connect the two inputs together and look at the output. You
should get zero volts to 1% or better if your design is correct.

================================================================
Robert A. LaBudde, PhD, PAS, Dpl. ACAFS  e-mail: rallcfltd.com
Least Cost Formulations, Ltd.                   URL: http://lcfltd.com/
824 Timberlake Drive                            Tel: 757-467-0954
Virginia Beach, VA 23464-3239                   Fax: 757-467-2947

"Vere scire est per causae scire"
================================================================

</x-flowed>
Analog world is too much complicated by itself, you don't need to
complicate it more by not giving detailed information... :)
If what you are trying to do is what I am thinking, for example reading
a sensor in a form of a bridge or something like that, your inputs S1
and S2 can not receive feedback from the output, if you do, your sensor
voltage output will be affected by this "not expected" signal,
impedances will change, signals will travel alone, etc. When reading
sensors, most balanced or sensible ones, you MUST use an instrumentation
amplifier OR build your cheap instrumentation amplifier with 3 op-amps.
Most designs for cheap Inst.Op. use 4 op-amps, but you can do with only
3.

It can be done using a multiple amplifier chip, as for example (but also
not recommended LM324) with 4 amp ops inside, you will use only 3 for
this purpose.  With this fashion, your S1 and S2 will go directly to the
setup inputs without any interference from the feedback.

The zero (offset) adjust is almost always necessary in op-amps, since
perfect zero offset is just theory. In the suggested cheap Inst.Op. this
adjust has nothing to do with the inputs, they still free to receive
"just" the sensor signal.

If you are interested in such design email me directly.

Wagner.

"Robert A. LaBudde" wrote:
{Quote hidden}

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