# Calculating variable gain for difference amplifier

1. May 5, 2012

### Marshillboy

1. The problem statement, all variables and given/known data

http://img706.imageshack.us/img706/263/hwstatement.png [Broken]

2. Relevant equations

KCL/Node voltage method
Ideal op-amp rules

3. The attempt at a solution

I solved a previous, similar problem where the gain was fixed and the resistor mass going into the inverting and noninverting inputs of the opamp was merely a single resistor from each lead of Vi.

The way I've been attempting to solve this problem is by assigning unknown voltages (say V1, V2) to each of the leads of Vi, assigning two more unknowns to the top and bottom nodes of Rg (say, Rg1, Rg2), and another unknown voltage to the inverting/noninverting potential (say, Vb). Then, I find the node equations using KCL and attempt to solve. The resulting equations are extremely unwieldy and I feel like there must be a better way to approach this problem.

#### Attached Files:

• ###### hw5.png
File size:
39.1 KB
Views:
63
Last edited by a moderator: May 6, 2017
2. May 6, 2012

### rude man

Your two input voltages (to each input of Vi) are not unknown. Call them V1 and V2. Then you have 4 independent (unknown) nodes (the two on either end of Rg and the op amp input and output nodes.

Let V2 = 0 and compute output voltage Vo1 for input V1. Then let V1 = 0 and compute Vo2 for input V2. I would use nodal equations so there are 4 equations for the 4 unknown voltages. Software can easily do the algebra for you and it doesn't make mistakes!
Then add the effect of the two input voltages to get the total output Vo = V01 + V02 (superposition principle).

If you do everything right you will note to your amazement that V0 = k(V1 - V2). In other words, if you apply the same voltage V (not saturating the inputs or output) to both inputs you get V0 = 0. This configuration is sometimes called an instrumentation amplifier.