Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

How do I get a DC difference amplifier working?

  1. Feb 18, 2016 #1
    I've been trying to figure out why my DC subtraction amplifier is not working, and am completely baffled. I have set up an op amp with no feedback resistors with voltages applied to both the inverting and non-inverting inputs as specified below. I previously had the op amp setup with a 10x gain differential op amp following this circuit and obtained similar results. I tried searching and attempting the calculations for the op amp, and reading up on them in a couple books I had but I can find no explanation as to why this would not work. I used values of 5v, and 1v so that it would not be operating near the rail, and should have a gain of 1 since no resistors are added.
    The Op amp output voltage should be Vo = Av*V1-V2 where V1 is the noninverting, and V2 is the inverting inputs. Av (Voltage Gain) = 1; therefore 5v-1v = 4 Vout is expected.

    Op Amp: TL072CP & LM358
    Supply Voltage +10v (Single Supply)
    Inverting Input Voltage Applied: 1v DC
    Non-Inverting Input Voltage Applied: 5v DC
    Output Voltage Measured: 9.6V DC for TL072CP, 8.9v for LM358
     
  2. jcsd
  3. Feb 19, 2016 #2

    Averagesupernova

    User Avatar
    Science Advisor
    Gold Member

    You say you have set up the circuit with no feedback resistors yet the schematic shows it. Are all resistor of the same value?
     
  4. Feb 19, 2016 #3
    I have answered my own question after further research. Removing the resistors gives an ideal op amp infinite voltage gain operating "Open Loop".

    The LM358 for example has approximately 100dB of gain which is 10^5*(V2-V1) since the op-amp responds only to the difference signal (V2-V1) where V2 = Non-Inverting input voltage, and V1 = Inverting input voltage and hence ignores any signal common to both inputs (Common mode rejection)

    If I only vary the V2-V1 by 5mV (1v-0.995v) output will be 0.005*10^5 = 500v [(V2-V1)*Gain] and since the rails are 10v it will be saturated and given that the LM358 is 1 diode drop + a little below Vin that accounts for why I was getting between 9.6v and 8.9v the op amps saturation point.

    I simply replaced the resistors with all 1k giving me 1x gain, and now am getting the expected result.

    At this point I will consider this question answered, and thanks for the reply.
     
    Last edited: Feb 19, 2016
  5. Feb 19, 2016 #4

    jim hardy

    User Avatar
    Science Advisor
    Gold Member
    2016 Award

    I often tell folks this very basic and easy to remember rule

    easy to remember 3 step method to evaluate an opamp circuit

    1. write KVL for voltage at noninverting input.
    2. write KVL for voltage at inverting input.
    3. Set 1 equal to to 2 and solve for Vout
     
  6. Feb 19, 2016 #5

    LvW

    User Avatar

    I suppose that`s the problem. Try split supply - and it will work.
     
  7. Feb 19, 2016 #6

    sophiecentaur

    User Avatar
    Science Advisor
    Gold Member

    Alternatively, set your amplifier 'Ground' to half way between supply + and supply ground, using a potential divider and decoupling Capacitors and that will give you +/- 5V supply to the chip. You can then do your analogue arithmetic calculations using volts relative to the amplifier local ground (at +5V, absolute). (Saves getting hold of another power supply and would prove the point)
     
  8. Feb 19, 2016 #7

    jim hardy

    User Avatar
    Science Advisor
    Gold Member
    2016 Award

    i think he realized he'd have to add those resistors he showed us in first post ?
     
  9. Feb 19, 2016 #8

    sophiecentaur

    User Avatar
    Science Advisor
    Gold Member

    There must still be a problem with the single sided supply and the implied reference of 0V (R4)
    I can't understand why a simple virtual earth amp needs to be using 1k Resistors in order to (appear to) work. I think it could be because of the large bias current to earth.
     
  10. Feb 19, 2016 #9

    jim hardy

    User Avatar
    Science Advisor
    Gold Member
    2016 Award

    Good thinking . May be....

    By my simple old man's method , the opamp 'operates' by forcing its inputs equal
    proxy.php?image=https%3A%2F%2Fi.imgur.com%2FkIDirHS.gif
    if all 4 resistors are equal,
    Va = (V1 + Vout )/2
    Vb = V2/2

    equating Va and Vb gives
    V2/2 = (V1 + Vout )/2
    multiply both sides by 2
    V2 = V1 + Vout

    Vout = V2 - V1

    with Va and Vb both V2/2

    but i notice he swapped inverting and noninverting inputs in this sentence
    and he got his V2 and V1 in this term reversed :: Vo = Av*V1-V2

    so if, with single sided supply he applied 5 volts to V1 and 1 volt to V2
    the amplifier would have to drive output beyond the negative rail to "operate" .

    And it looks like he might have done that


    If he applied his voltages correctly it should work fine.

    Now that begs the question why did his output go to positive saturation instead of negative ?
    Pure speculation follows.....

    It'd be interesting to repeat that test.
    That opamp's datasheet does not mention "latchup" from overdrive
    but it does have this cryptic note regarding "lateral NPN parasitic transistor action"
    upload_2016-2-19_15-8-10.png
    I wonder whether the relatively low 1kohm input resistors might allow enough current to trigger that action. Would absence of resistors allow input current ? He didn't say under which condition he saw saturation, did he,,, resistors or no resistors ?

    What would that opamp do with its inputs forced 4 volts apart with say 50 milliamps of current capability?(That's datasheet absolute maximum number for input current)

    . i dont know.

    Only mention i could find of latchup in LM358 was when it's exposed to radiation. It's a lot tougher than humans.

    It looks like by post 3 he had things more straight:

    That time he called V1 inverting and V2 non-inverting.
     
  11. Feb 19, 2016 #10

    sophiecentaur

    User Avatar
    Science Advisor
    Gold Member

    The feedback will be pulling Va to Vb and Vb is the result of V2 being potted down by R2 and R4. This is not the way a virtual earth adder is supposed to be working because the input sensitivity of each input will be different, due to the pull down resistor R4. When the circuit is working between + and - supplies, R4 is connected to mid-rail Ground and would have a high value (?). The fact that it needs such low resistors in the circuit to get it look like it's working implies that something is wrong and the first things that's wrong is the single sided power supply. It's only a matter of kindness to the chip to give it the right food. There seems to me to be pointless to operate it away from the proper conditions. R4 should be connected to a (near) 'half rail' point and the voltages should be measured with respect to that point. Where's the problem in that? It's telling you it's not happy so be nice to it.
     
  12. Feb 19, 2016 #11

    jim hardy

    User Avatar
    Science Advisor
    Gold Member
    2016 Award

    Weelll,

    if it's a TI LM358, http://www.ti.com/lit/ds/symlink/lm158-n.pdf
    it ought to be capable of single supply differencing

    upload_2016-2-19_17-7-12.png

    1k is too low for his feedback resistor R3 because of its output sinking capacity

    upload_2016-2-19_17-9-32.png

    hence the 100k in TI's datasheet application circuit
    but as you say it'd work fine with split supply.

    i too had a hard time adjusting to single supply opamps. They're sure nice when all you've got is +5 or +12.

    old jim
     
  13. Feb 20, 2016 #12

    sophiecentaur

    User Avatar
    Science Advisor
    Gold Member

    Using a single rail is useful but you always have to be careful about where the single volts are all referenced to. Single sided outputs are often all you need but not the best configurations to cut your teeth on op amps with. :smile: Most op amp work has the luxury of ignoring the power supply/ies because they are usually not included in the functional diagrams. In this case, it is a serious omission from the diagram, I would say. (Despite the note underneath it)
     
  14. Feb 20, 2016 #13

    jim hardy

    User Avatar
    Science Advisor
    Gold Member
    2016 Award

    Agree wholeheartedly .


    In 1970's National Semiconductor was getting so many inquiries from people complaining their circuits didn't work that they published an application note explaining 'you have to connect the power '. o_O
     
  15. Feb 20, 2016 #14

    Averagesupernova

    User Avatar
    Science Advisor
    Gold Member

    From anyone else I would call B.S.!
     
  16. Feb 20, 2016 #15

    jim hardy

    User Avatar
    Science Advisor
    Gold Member
    2016 Award

  17. Feb 20, 2016 #16

    Averagesupernova

    User Avatar
    Science Advisor
    Gold Member

    Yes I remember that WOM. I always got a charge out of the 6 volt supply required for filaments. I recently tossed a beat up copy of that datasheet. It had never occurred to me to get a fresh one from the web.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: How do I get a DC difference amplifier working?
Loading...