# Designing an op-amp given the output formula

1. Mar 28, 2013

### rasen58

1. The problem statement, all variables and given/known data
Design an op-amp based circuit to produce the function
Vout = 5*V1 - 4*V2

2. Relevant equations

3. The attempt at a solution
I have no idea how to approach this. I know there are two voltages on the two inputs, and that the feedback resistors should be going to the negative input, but how do I pick the values for the resistors?

2. Mar 28, 2013

### Staff: Mentor

What opamp configurations are you familiar with? Have you worked with the summing opamp configuration? Can you think of a way to do this subtraction all with one opamp? How about with two opamps?

3. Mar 29, 2013

### rasen58

I think I got it. I can use one op amp and there is a voltage source on each input. So using feedback to the negative side, I can use KCL on the node there and once rearranging that equation, I tried values for the two resistors to make them equal the equation.

4. Mar 29, 2013

### rude man

How many resistors in total you plan to use?

5. Mar 29, 2013

### rasen58

I used 2: one was 20k and the other was 5k

6. Mar 29, 2013

### rude man

If you can do that with only 2 resistors you are a genius!
So where are your two inputs V1 and V2 connected?
(Hint: try 4).