2
\$\begingroup\$

How would I implement an differencing op amp circuit that performs the operation 5*v1-2*v2 with the op amp power supply being 12vdc? I already tried the basic circuit but I got negative resistance. Is that normal?

Schematic: http://imgur.com/xtxVYI3

\$\endgroup\$
  • 2
    \$\begingroup\$ Why don't you post the schematic of what you tried? I have no idea what you mean when you say you got negative resistance. \$\endgroup\$ – Matt Young Mar 5 '13 at 19:35
  • \$\begingroup\$ @Matt: When he calculated R3, he apparently got a negative value. \$\endgroup\$ – Ben Voigt Mar 5 '13 at 19:58
  • \$\begingroup\$ So I see... So what he's trying to get is a difference amplifier that runs off a 12V single supply. What is shown here will not come anywhere close to that. Answer enroute... \$\endgroup\$ – Matt Young Mar 5 '13 at 20:00
  • \$\begingroup\$ I still got a negative value for R3 for some reason \$\endgroup\$ – user1047968 Mar 5 '13 at 20:01
  • \$\begingroup\$ Is this single supply, or split? \$\endgroup\$ – Matt Young Mar 5 '13 at 20:12
3
\$\begingroup\$

What you have now is an analog comparator due to positive feedback. Diagram your circuit again, this time using negative feedback, and when you repeat the calculations you'll get much more reasonable resistor values.

(If you're copying from a textbook sum/difference amp circuit, please note that having the feedback resistor top or bottom is not important, connecting it to the inverting input pin is, and that op-amp symbols vary in placement of the input pins. Your textbook likely drew the circuit with pin 2 above pin 3.)

Of course, with a 12V supply, your inputs will have to be chosen so that the output isn't 40V.

You might try a topology like this (resistor values are not set correctly, that's up to you):

CircuitLab Schematic 7ducur

(And for Matt's benefit, here's the solution, showing that R3 is not unnecessarily adding complication)

CircuitLab Schematic f7qaq8

A nice way to analyze this is to first consider the circuit with only \$R1\$ and \$R2\$ present. Then

$$V_{out} = (1 + \frac{R1}{R2}) V3 - \frac{R1}{R2} V4$$

If the non-inverting gain is too high, use a voltage divider on \$V3\$. (This gives the Wikipedia circuit).

If the inverting gain is too high, use a voltage divider on \$V4\$.

Final gains:

$$G = \frac{R1}{R2 || R3} = \frac{R1 R2 R3}{R2 + R3}$$ $$V_{out} = (G+1) \frac{R5}{R5 + R6} V3 - G \frac{R3}{R2 + R3} V4$$

\$\endgroup\$
  • \$\begingroup\$ I'm new at this but I used the text book formula to find the resistance values, when I solved for R3, I got the negative value. \$\endgroup\$ – user1047968 Mar 5 '13 at 20:04
  • \$\begingroup\$ @user1047968: First, fix your schematic. Then, apply the ideal op-amp rules (input current is zero, input voltages are equal) and solve Kirchoff's Current and Voltage Laws. You get to pick one or two of the resistor values, for example, R4 as 1k. \$\endgroup\$ – Ben Voigt Mar 5 '13 at 20:05
  • \$\begingroup\$ It's not that simple with a single supply. \$\endgroup\$ – Matt Young Mar 5 '13 at 20:08
  • \$\begingroup\$ @Matt: Neither the question nor the circuit indicate single supply. \$\endgroup\$ – Ben Voigt Mar 5 '13 at 20:09
  • \$\begingroup\$ The question states "with the op amp power supply being 12vdc," he needs to clarify this point. The schematic indicates nothing useful to me other than a fundamental lack of understanding. \$\endgroup\$ – Matt Young Mar 5 '13 at 20:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.