1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

Why op amps dont work like this?

Discussion in 'General Electronics Chat' started by YoNinja, Sep 15, 2017.

  1. YoNinja

    YoNinja New Member

    Joined:
    Sep 15, 2017
    Messages:
    3
    Likes:
    0
    Hello, I have a question I hope someone can shed some light on. The circuit below is meant to be a sample and hold circuit. It will send a voltage to the non-inverting input while a button is pressed. This causes the output to follow the input. Then the button is released and the output voltage simultaneously feeds both inputs in a forever sample and hold. This doesnt work. But why? Output feedback is certainly capable of affecting the input, so why doesnt this work?

    sandh.png
     
  2. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,216
    Likes:
    640
    Location:
    Derbyshire, UK
    Because that isn't a sample and hold circuit, there's no storage capacitor there.

    You should also be aware that a sample and hold circuit isn't 'for ever', it's only for a VERY short time, while your A2D reads the value.
     
    • Like Like x 1
  3. YoNinja

    YoNinja New Member

    Joined:
    Sep 15, 2017
    Messages:
    3
    Likes:
    0
    i am not asking how to make a sample and hold circuit. i am asking why that circuit wont work. there is a specific reason why the amp is not capable of maintaing a self sustaining output after a jump start from the push button, but what is that reason?
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. crutschow

    crutschow Well-Known Member Most Helpful Member

    Joined:
    Mar 14, 2008
    Messages:
    10,592
    Likes:
    477
    Location:
    L.A., USA Zulu -8

    Because you have shorted the two op amp inputs together.
    I could tell you more but that's all you wanted to know. :rolleyes:
     
  6. MikeMl

    MikeMl Well-Known Member Most Helpful Member

    Joined:
    Mar 17, 2009
    Messages:
    11,045
    Likes:
    541
    Location:
    AZ 86334
    You would need an amp with zero bias current, zero offset and infinite gain.
     
  7. YoNinja

    YoNinja New Member

    Joined:
    Sep 15, 2017
    Messages:
    3
    Likes:
    0
    I dont think shorted inputs is the answer. For all intensive purposes the inputs are isolated and draw very little current right? So a short, or zero difference of potential across the inputs would only command no change in the output. An op amp (in closed loop) wants to drive the inputs to the same potential, or 0V differential. If "shorted" inputs were the answer then the following should work then right? But it doesnt, no shorted inputs and it still doesnt work. Drops to zero volts...
    sandh2.png

    My intuition after writing this post is that the reason it doesnt work has to do with the slew rate of the op amps. Once the button is release the potential at the non-inverting input immediately drops, which in turn causes a drop in the output voltage, which in turn cascades to zero volts. The amp can only react to the input and if the input drops the output will in turn, with delay, drop as well . Is this why? Really trying to get this straight in my mind. I am never really satisfied with black box or cause I said so explanations.
     
  8. Colin

    Colin Member

    Joined:
    Sep 25, 2003
    Messages:
    369
    Likes:
    21
    Location:
    Australia
    You are correct.
    You have pulled the output higher than what the op amp can do and when the button is released, the output voltage drops slightly and "down she goes!"
     
  9. simonbramble

    simonbramble Active Member

    Joined:
    Nov 22, 2010
    Messages:
    430
    Likes:
    63
    the problem with both circuits is the short circuit between the output and the non inverting input. The output will want to regulate to one voltage that might be different from the input voltage, so the 2 will fight each other. The one with the lowest source impedance (or the most current capability behind it) will win.

    If you have an input of, say, 2V with a 5V supply, yes the inverting input will try to regulate to 2V so the 2 inputs equal each other. If you have an offset voltage of 1mV, the non inverting input will be 1mV different from the inverting input. if the inverting input is tied to the output, then the output will be 1mV different and the non inverting input and the output will then start to fight.

    Generally it is a bad circuit. Remove the feedback going to the non inverting input and you have something that stands a chance of working. As Nigel says, for a true sampling circuit, you need a capacitor in there..
     
    • Like Like x 2
  10. alec_t

    alec_t Well-Known Member Most Helpful Member

    Joined:
    Jul 10, 2011
    Messages:
    9,253
    Likes:
    1,218
    Location:
    Cardiff, Wales
    In simulation the output of the post #6 circuit can be either near the +ve rail, near the -ve rail, about half way between the rails, or oscillating about the half-way point, depending on both the choice of opamp model and the initial circuit conditions. I suspect slew rate, input offset and opamp internal configuration all play their part.
     
  11. schmitt trigger

    schmitt trigger Active Member

    Joined:
    May 24, 2009
    Messages:
    886
    Likes:
    84
    This condition is similar (*) to what happens to a SR flip flop where a logic 1 is applied simultaneously to both inputs.
    Depending on slight input differences, the output can assume any state.

    (*) please note, I said similar, not identical.
     
  12. MrAl

    MrAl Well-Known Member Most Helpful Member

    Joined:
    Sep 7, 2008
    Messages:
    11,028
    Likes:
    951
    Location:
    NJ

    Hello there,

    In theory with ideal components it works, so the answer is because of the non idealities and parasitics of the op amp.

    If you have a perfect buffer with gain of 1 and apply an input of exactly 2 volts from an ideal voltage source you get an output of exactly 2 volts. The ideal op amp output acts like an ideal voltage source so you can tie the output to the input and no current will flow between sources.
    You can then disconnect the original voltage source and the output and input will stay at 2 volts.

    The problems come in though, because of all the non idealities of the op amp which include:
    imperfect gain
    input offset
    input and output impedances (reduced to resistances for this case)

    Taking the first above, if we input 2v we dont get 2v output. If we get 2.001v output then when we connect it to the input and remove the first source the output ramps up to infinity or until it saturates. If we get 1.999v output then when we connect the output back to the input and remove the first voltage source the output ramps down to minus infinity or until it saturates negatively. Since the gain is not exactly 1, the input voltage is always changed by the output because the output responds to the input by either increasing it or decreasing it, and once it increases it or decreases it the input also increases or decreases again and so the repetition of this condition will cause the voltages to either fall completely or rise until they hit some limit like the level of the power supply.

    So just the imperfect gain alone will prevent this from working well in real life.

    The next best thing for comparison is an SLC memory cell that acts like a very very very long time period sample and hold. The basic property is that the voltage level is held by a small capacitance, and for extremely long holding time part of the output is fed back to the input, almost just like you had suggested but not exactly like that.

    We can also compare this to an oscillator that feeds back part of the output on purpose too. The thing here though is that there is always some non linear gain adjustment that acts to keep the voltage levels within a certain range. So in theory you could in fact wire up an oscillator and energize it when you want it to store a logical '1' and de-energize it when you want to store a logical '0', and the presence or absence of an output wave would indicate the present state of the memory cell. Unfortunately, it may be hard to control the output level at anything other than on or off.
     
    Last edited: Sep 16, 2017
    • Informative Informative x 1
  13. MikeMl

    MikeMl Well-Known Member Most Helpful Member

    Joined:
    Mar 17, 2009
    Messages:
    11,045
    Likes:
    541
    Location:
    AZ 86334
    See post #5
     
  14. MrAl

    MrAl Well-Known Member Most Helpful Member

    Joined:
    Sep 7, 2008
    Messages:
    11,028
    Likes:
    951
    Location:
    NJ
    Hi,

    You mean that one liner?
     
  15. ci139

    ci139 Active Member

    Joined:
    Apr 12, 2012
    Messages:
    397
    Likes:
    34
    because you'r feedback forces
    • an excellent op amp to it's internal ground that is incase of balanced ideal bi-polar supply the Signal-Ground
    • not so excellent op amp would go wondering and fix it's output at some point in between Vcc(/Vdd) to Vee(/Vss) or start oscillations
    . . . your feedback sets the output that is dependent of "common mode offset" (read the V.inputs - V.sig.gnd) and from the input offset and the misc junction temperatures and e.c. drifting depending on the
    • "Slew rate" of the Pull-up stage
    • "Slew rate" of the Pull-down stage
      • ""negative feedback power"" of the Pull-up "virtual circuit"
      • ""negative feedback power"" of the Pull-down "virtual circuit"
        • Open loop Gain or a "differential such" as you feed back !evenly! to +pos and --neg inputs - - - thus over driving them if you reference your output to ground with lesser ratio than 5k and more (a typical Op amp Voltage gain) ◄ it (the previous sentence) makes sense in I/O -put time-differential- (/dynamic-) balance ××× in other words you'd need to reference your output back to inputs with voltage dividers say 5000+kΩ : 1kΩ the used 5MΩ feedback means the settling time due no-dynamic power is very slow, ... blaah,blaah ... (but so is then also the output drift -- once it settles)
        • . . .
    . . . incase of a speciffic/?good(for your application?) Op Amp it will stay at set level for shorter- to longer while - - - so with the right equipment it actually does do (although for a significantly shorter period) what you think it should
     
    Last edited: Sep 23, 2017
  16. ci139

    ci139 Active Member

    Joined:
    Apr 12, 2012
    Messages:
    397
    Likes:
    34
    Random_EEX_Hold_TEST.png Random_EEX_Hold_TEST-a.png Random_EEX_Hold_TEST-b.png Random_EEX_Hold_TEST-c.png
     
    Last edited: Sep 23, 2017
  17. ci139

    ci139 Active Member

    Joined:
    Apr 12, 2012
    Messages:
    397
    Likes:
    34
    X-mas_NoKiA--AC-3E_v3ww10.png
    somewhat interesting circuit - when shorting two intuitively "same potentials" the grid stops working -- otherwise it follows the source (±2V) at 25kHz
     
  18. hyedenny

    hyedenny Member

    Joined:
    Jan 17, 2009
    Messages:
    68
    Likes:
    2
    Why ask a question if you're going to argue with perfectly reasonable answers?!

    INTENSIVE PURPOSES?!?! 'Nuff said.
     
  19. ci139

    ci139 Active Member

    Joined:
    Apr 12, 2012
    Messages:
    397
    Likes:
    34
  20. AnalogKid

    AnalogKid Well-Known Member

    Joined:
    Sep 22, 2011
    Messages:
    1,105
    Likes:
    160
    Location:
    Ohio - GMT-5
    Your intuition is not correct. The circuit does not work because the intent of your circuit violates the second law of thermodynamics.

    It also does not work in theory - that is, with a theoretically perfect opamp - because it has 100% positive feedback and 100% negative feedback at the same time. This is not a valid condition. To show this, start with the gain equation for a fully differential amplifier, modify it to include the positive feedback connection, plug in your resistor values, and solve for the gain.

    ak
     

Share This Page