The op-amp rules
An op-amp multiplies the voltage between its + and − inputs by a huge gain. Two ideal rules follow. No current flows into either input. With negative feedback, a path from the output back to −, the output adjusts until v− = v+.
R4 joins the + input to ground. No current enters the input, so R4 drops no voltage: v+ = 0 V. Rule two holds v− at 0 V too. The − input is a virtual ground: at 0 V, yet not wired to ground.
Summing
V1 = 0.5 V sits across R1 = 10 kΩ, because R1's right end is the virtual ground at 0 V. Ohm's law gives i1 = 0.5 V / 10 kΩ = 50 µA. That current depends only on V1 and R1.
V2 = 1 V drives i2 = 1 V / 20 kΩ = 50 µA through R2 into the same node. The inputs do not disturb each other: the node stays at 0 V, so each current is set by its own source and resistor.
Kirchhoff's current law at the − input: 50 + 50 = 100 µA arrive, and none can enter the op-amp. So all 100 µA must leave through the feedback resistor Rf. The node adds the two currents for us.
Rf's left end is at 0 V and 100 µA flows through 20 kΩ, so vo = 0 − 100 µA × 20 kΩ = −2 V. In general vo = −(Rf/R1·V1 + Rf/R2·V2) = −(2 × 0.5 + 1 × 1) V.
Difference
Remove R2 and send V2 = 3 V through R3 = 10 kΩ to the + input, with R4 = 20 kΩ to ground. Set V1 = 2.5 V. R3 and R4 form a divider: v+ = 3 × 20/30 = 2 V.
Feedback holds v− = v+ = 2 V: no longer a virtual ground. i1 = (2.5 − 2) V / 10 kΩ = 50 µA, all of it through Rf: vo = 2 V − 50 µA × 20 kΩ = 1 V.
With R4/R3 = Rf/R1 the output is vo = (Rf/R1)(V2 − V1) = 2 × (3 − 2.5) = 1 V. Both inputs sit near 3 V, yet only their 0.5 V difference reaches the output. Raise both by 1 V: vo stays.
Integrator
Remove R3 and replace Rf with C = 10 µF, empty at t = 0, and switch on V1 = 0.5 V. The − input is a virtual ground again, so i1 = 50 µA, and all of it flows into C.
A constant current charges C at a constant rate: 50 µA / 10 µF = 5 V/s. The output is C's right plate, so it falls: vo(t) = −(1/RC)∫V1 dt = −5t V. After one time constant RC = 0.1 s, vo = −0.5 V.
The output cannot pass the op-amp's supply voltages. With ±12 V supplies, the ideal ramp would reach −12 V at t = 12 / 5 = 2.4 s, so it stops before then. Real integrators add a reset switch across C.
What is happening
# step 1/12 · rules · sum # about: Op-amp, − input, + input ideal op-amp rule 1 i+ = i− = 0 (inputs draw no current) rule 2 v− = v+ (only with negative feedback) Why rule 2: vo = A(v+ − v−) with A about 10^5 or more. vo stays a few volts, so v+ − v− must be tiny: tens of microvolts. We call it zero. Rf (or C) from vo back to − is the negative feedback in every circuit of this lesson.
The figure is an ideal op-amp (no input current, infinite gain) with R1 = 10 kΩ, R2 = 20 kΩ, Rf = 20 kΩ, R3 = 10 kΩ, R4 = 20 kΩ and C = 10 µF. Every current, voltage and time shown is computed from these values by the lesson's model. The op-amp's supply pins are not drawn. Current that flows into the output pin (the feedback current here) returns through the supplies to ground, so KCL still holds for the whole circuit.