Simultaneous use of inverting and noninverting op amp inputs

Discussion in 'Analog & Mixed-Signal Design' started by rscgln, Sep 14, 2018.

  1. rscgln

    Thread Starter New Member

    Sep 14, 2018
    5
    1
    Hello, it is quite clear to me how to use an op-amp in inverting mode, to get 0 or -5V with a 0 or +5V input and, as well, it is clear how to get 0 or +5V with a 0 or +5V input with noninverting mode. It is also clear how to get, for instance, -12V or +12V output with the appropriate supply and the correct resistors but my need is to achieve both functions simultaneously. I.E. I need to generate an output of +12V, 0V and -12V, presumably using TWO input wires (A, B) that can be 0V or +5V. I am pretty sure I can do this: A=0V B=0V out = 0V, A=5V B=0V out=+12V, A=0V B=5V out=-12V (A=5V B=5V undefined) but I cannot figure how. Can someone give a suggestion? Thanks
     
  2. ericgibbs

    Moderator

    Jan 29, 2010
    5,922
    1,115
    hi rs,
    Welcome to AAC.
    Your description suggests that the Ai,Bi inputs are 0v or 5v and the outputs Ao and Bo are are +12v , 0, or -12v.
    Are these digital input signals ie: 0v or 5v or do they cover the range of 0v thru +5v.?? with a corresponding +/-0v thru +/-12v ;ie : analog.?

    Eric

    eg: if Ai or Bi = +2.5v would Ao or Bo be +/-6v
     
    Last edited: Sep 14, 2018
  3. rscgln

    Thread Starter New Member

    Sep 14, 2018
    5
    1
    Yes, the inputs are digital, so no intermediate values. But I fear I was not very clear in my question: I need to use ONE single op amp and the only one output should be +12, 0 or -12 (no intermediate values) based on two input signals. Basically, my real need is to "generate" +12, 0 and -12 on one "wire" using Arduino or something like. Of course, I could use more than 2 input signals, if needed. Op amp was what I thought a simple solution but it is not a must.
     
  4. ebeowulf17

    Well-Known Member

    Aug 12, 2014
    2,441
    437
    We'll see what the TS says, but it sounded to me like there's only one output. I think an amp with a gain of 2.4 would handle the specific values requested... but as you pointed out other value combinations where the difference between Ai and Bi is something other than -5, 0, or +5 would have correspondingly different output values.
     
  5. rscgln

    Thread Starter New Member

    Sep 14, 2018
    5
    1
    That will not happen and, in any case, it wouldn't be a problem.
     
  6. ebeowulf17

    Well-Known Member

    Aug 12, 2014
    2,441
    437
    Cool!

    I'm guessing from your description of past experiences that you've previously configured op amps with positive feedback to guarantee digital outputs with hysteresis.

    In order to do what you've described here, i think all you have to do is set up an amp with a gain of 2.4, which will rely on negative feedback.

    I'm under the weather, and still waking up, so l don't trust my brain right now. If I get a chance later today I'll try to sim the simple amp idea. In the meantime, if you're not already familiar with the ideas, do a little reading on positive vs. negative feedback in op amp circuits. If I'm remembering things correctly, your requirements can be met with a pretty simple setup - maybe you'll have it figured out before I even have time to sim it!
     
  7. danadak

    Well-Known Member

    Mar 10, 2018
    1,730
    351
    Any constraints on speed / delay input to output ?

    Regards, Dana.
     
  8. rscgln

    Thread Starter New Member

    Sep 14, 2018
    5
    1
    No problem at all! The frequency, anyway, is very low: from 10 to 100Hz!

    I am working on that 2.4 gain idea and it looks promising, with a couple of identical resistors connected to my two digital pins, centre on a 3rd resistor on the inverting input to have 0, 2.5 and 5v, 2.4 gain, some feedback... I have just to check how to "offset" but I am confident I will find a solution. Unfortunately now I have to leave, but I will continue later on.
     
  9. ebeowulf17

    Well-Known Member

    Aug 12, 2014
    2,441
    437
    Hrmmm...

    I think I may have been remembering things wrong. I think the "simple" amps I'm thinking of always have one of the inputs held at a stable voltage, often at ground potential. I think what I was imagining might require an instrumentation amp (or its home-spun 3-op-amp equivalent, which can be made with a single quad op amp IC.)

    I'll give it some more thought, cause I need to get better at understanding these circuits anyway, but don't be surprised if my first idea turns out to be a dead end.
     
  10. ebeowulf17

    Well-Known Member

    Aug 12, 2014
    2,441
    437
    Maybe this? (The differential one on the left.) Set Rf to 2.4 times Rin?
    upload_2018-9-14_6-0-32.gif
     
  11. Kjeldgaard

    Member

    Apr 7, 2016
    288
    109
    Could it be a differential amplifier with a gain of 2.4 times?

    A quick sketch:
    DiffAmp_1.jpg
     
    ebeowulf17 likes this.
  12. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    8,730
    2,009
    You could do it with a few discretes, like this :-
    +5to+12-12.PNG
     
    ebeowulf17 likes this.
  13. ebeowulf17

    Well-Known Member

    Aug 12, 2014
    2,441
    437
    Yep, just got done simulating the same!
    dual-input_to_plus-minus12_01.png
     
    Kjeldgaard likes this.
  14. rscgln

    Thread Starter New Member

    Sep 14, 2018
    5
    1
    Yes, I think this as well as Kjeldgaard's, are the simplest solutions and what I was looking for!
    I will arrange this configuration.

    Thanks a lot for all your effort!
     
    ebeowulf17 likes this.
  15. ScottWang

    Moderator

    Aug 23, 2012
    6,358
    984
    The output +12V and -12V should be exchange.

    The TS shown at the last two lines in the #1 as :
    A=5V B=0V out=+12V,
    A=0V B=5V out=-12V
     
Loading...