Summing and Difference Amp

Discussion in 'Homework Help' started by Zaper, Sep 19, 2013.

  1. Zaper

    Thread Starter Member

    Aug 17, 2010
    43
    0
    Hi everyone!

    I'm looking for some help in designing a circuit that uses only one Op Amp with the output:

    v_0 = v_1 + 2v_2 - 2(v_3 - 2v_4)

    The circuit that I've currently worked up is attached and according to my simulations it can realize:

    v_0 = v_1 + 2v_2 - v_3 - 2v_4

    What I'm stuck at is how to weight the inverted side of the without throwing of the resistor ratios.

    If anyone can help I'd really appreciate it!
     
  2. WBahn

    Moderator

    Mar 31, 2012
    17,788
    4,808
    Show your work for how you "worked up" the circuit you have. Do yourself a favor and use the symbolic resistances instead of actual values (i.e., R1 and R2 instead of 1kΩ and 2kΩ).
     
  3. Zaper

    Thread Starter Member

    Aug 17, 2010
    43
    0
    Thanks for the response!

    Sorry about the resistor values, they were just artifacts from simulations (if you look next to the values each resistor has a name).

    The basis of this circuit came from this website: http://masteringelectronicsdesign.com/a-summing-and-differential-amplifier-with-one-op-amp/

    I realized that I had made an error when I created the original circuit by including R_f2, at least assuming that this is the right circuit in the first place. A revised circuit is attached (with no resistor values ;))

    Anyways, as far as work goes: I started with just a simple Node Voltage on the inverting side of the Op Amp:

     \frac{v_x - v_4}{R_4} + \frac{v_x - v_3}{R_3} + \frac{v_x - v_{out}}{R_f} = 0

    Rearranging:

     v_x(\frac{R_f}{R_4} + \frac{R_f}{R_3} + 1) - v_3\frac{R_f}{R_3}- v_4\frac{R_f}{R_4} = v_{out}

    Knowing that we need coefficients of -2 and -4 on V3 and V4 respectively I get

     R_4 = 4 R_f <br />
R_3 = 2 R_f

    Which leaves Node Voltage at the Non-Inverting terminal:

     \frac{v_x - v_2}{R_2} + \frac{v_x - v_1}{R_1} = 0

    When I solve this for Vx (to sub into the first equation) I get:

     v_x = \frac{v_1R_2+v_2R_1}{R_1+R_2}

    Is this reasonable up to this point? The math gets fairly nasty when I try to combine things and solve for the remaining resistors.
     
  4. WBahn

    Moderator

    Mar 31, 2012
    17,788
    4,808
    Thanks for showing your work at a nice level of detail.

    How will R4=4Rf get you a coefficent of -4 for V4?

    I looked at your development briefly and I don't see any errors.

    However, I'm not convinced that you have enough degrees of freedom to satisfy a set of four arbitrary gains. I could be wrong, but it appears to me that your R1 and R2 force a relative gain between V1 and V2 and that R3 and R4 force a relative gain between V3 and V4. Unfortunately, you need two other things - something that forces the overall gain (and it appears Rf does that) and something to force a relative gain between {V1,V2} and {V3,V4} and, at that point, you are fresh out of options.
     
  5. Zaper

    Thread Starter Member

    Aug 17, 2010
    43
    0
    Sorry, I typed R4 and R3 backwards. It should have been

     4R_4 = R_f<br />
2R_3 = R_f

    And what you're saying about degrees of freedom is my exact problem. Basically when I sub in I'll get something along the lines of

     6R_1 = R_2<br />
and<br />
5R_1 = 2R_2

    (This might not be exacly what solving gets, but it's something close)

    This is of course not possible unless they're zero which is not really an option here...

    Is there a different type of circuit that you would recommend? Iv'e been searching around for a couple days now and this circuit is the closest I've found to working.

    Thanks for all the help!
     
  6. WBahn

    Moderator

    Mar 31, 2012
    17,788
    4,808
    Well, if you want to change the relative gain of {V1,V2} compared to {V3,V4}, it would seem like you would want to take use a circuit that only applies a fraction of the V1,V2 voltage to the non-inverting input of the opamp. We might call such a thing a "voltage divider". Play with that idea some and we can discuss further.
     
    Zaper likes this.
  7. Zaper

    Thread Starter Member

    Aug 17, 2010
    43
    0
    Ok, I think I've got the right circuit now!

    The general idea for adding the two resistors (Rd1 and Rd2) was that if I added a resistor to ground they had to sum to Rf in order to keep all of the ratios aligned and they also have to be equal to each other in order to bring the voltage down by half. So to spell it all out:

     R_{d1} = R_{d2}<br />
R_{d1} + R_{d2} = R_f

    Is that what you had in mind?
     
  8. WBahn

    Moderator

    Mar 31, 2012
    17,788
    4,808
    Yep, you've got the right idea, though I don't think you need Rd1, just Rd2.

    What you need to do is develop a set of equations for the four gains as functions of the resistances and then show that the set of equations is linearly independent.
     
  9. Zaper

    Thread Starter Member

    Aug 17, 2010
    43
    0
    I tried to absorb Rd1 into R1 and R2 but doing that made my simulations stop working (they worked perfectly with the last circuit I posted).

    As far as solving for a set of linear equations, I think that, at least for this question, it is acceptable to just choose a value for Rf and get all the other resistor values from equations I've already put up and then just prove that the circuit works like it's supposed to. That being said, I think I've finally finished the problem.

    Thanks for helping me out!
     
Loading...