I am currently struggeling with the following problem. I need to find an amplifier circuit which implements the following equation:
$$
U_a=U_1+2U_2-2U_3
$$
I decided to go with the circuit shown below. I calculated the following equation for the output:
$$
U_a=-\frac{R_F}{R_3}U_3+\frac{R_1 || R_4}{R_2+R_1||R_4}\frac{R_F+R_3}{R_3}U_2+\frac{R_2 || R_4}{R_1+R_2||R_4}\frac{R_F+R_3}{R_3}U_1
$$
Now I can formulate all the conditions necessary in order for the equations to fit.
$$
I: \frac{R_F}{R_3}=2 \\
II: \frac{R_1 || R_4}{R_2+R_1||R_4}\frac{R_F+R_3}{R_3}=3\frac{R_1 || R_4}{R_2+R_1||R_4}=2\\
III: 3\frac{R_2 || R_4}{R_1+R_2||R_4}=1
$$
From the conditions I tried to calculate specific values for the resistors, starting with the 2nd condition.
$$
II: R_2=\frac{R_1||R_4}{2}\\
R_2R_1+R_2R_4=\frac{R_1R_4}{2}\\
R_1=\frac{R_2R_4}{\frac{R_4}{2}-R_2}
$$
This result I plugged into a condition following from III.
$$
III: R_1=2(R_2||R_4)\\
\frac{R_2R_4}{\frac{R_4}{2}-R_2}=\frac{2R_2R_4}{R_2+R_4} \\
\frac{1}{\frac{R_4}{2}-R_2}=\frac{2}{R_2+R_4}\\
R_2+R_4=R_4-2R_2 \\
3R_2=0
$$
Well … crap, R2 is supposed to be 0, so would be R1. And the value for R4 does not matter? I guess I did something wrong but I cannot figure out what. What is wrong with my calculation? Is it possible to implement the given equation with the circuit I drew?
EDIT: I forgot to mention that it is only allowed to use one op-amp.
Best Answer
The way I would approach this is to observe that Rf/R3 = 2 (by inspection)
The gain from the non-inverting op-amp input is thus 2 + 1 = 3.
So you need a divider with gain 1/3 from V1 and 2/3 from V2.
Set R1||R2||R4 = R
Then R/R2 = 2/3 and R/R1 = 1/3
Since 1/R4 = 1/R - 1/R2 - 1/R1 = 1/R - 2/3R - 1/3R = 0 So R4 = \$\infty\$
You can pick two more values arbitrarily- say R = 10K which leads to R2 = 15K, R1 = 30K
It would make sense to constrain RF||R3 = 10K to balance the offset from bias currents, so RF = 30K R3 = 15K.
Edit:-
General principle for a voltage divider with n resistors R1...Rn
Vout/Vin = R * (V1/R1+V2/R2+...+VN/RN)
Where R = R1||R2||..||RN
(It's easy to prove this by superposition)