The Op-Amp Differentiator
A slanted input makes a flat output
The light-blue slanted line is an input ramp rising at a constant slope, and the gold horizontal line is the output. The input climbs on a slant, yet the output is flat, and its height depends only on how fast the input rises. The steeper the input, the lower the output sits, so set the slope that puts the output at the target of −4V on the green dashed line.
Take the input through a capacitor
The integrator made a current Vin/R with its input resistor and poured it into the feedback capacitor. The differentiator swaps the two parts, putting the capacitor at the input and the resistor in the feedback. A capacitor passes current only while the voltage across it changes, and that current is proportional to the input's rate of change: i = C·dVin/dt. Thanks to the virtual ground, all of this current flows on into the feedback resistor and sets the output.
The output is proportional to the input's rate of change
The current through the feedback resistor is C·dVin/dt, so the output is that current times R, that is, Vout = −RC·dVin/dt. A constant input has rate of change 0, so the output is 0 too, and the faster the input changes, the larger the output. Feed in a ramp of constant slope and the rate of change stays the same throughout, so the output rests flat at that slope times −RC. The minus sign is inherited from the inverting amplifier, which is why a rising input puts the output below the horizontal axis.
Differentiation reads the slope
In the general case, where the input changes in any way at all, the output is still the input differentiated with respect to time, Vout = −RC·dVin/dt. Differentiation reads off the slope of the input curve at every instant, so a triangle wave in gives a square wave out whose sign flips between the rising and falling parts. In the s-domain, the input capacitor's impedance 1/sC produces the s that stands for differentiation, making the gain −sRC, and the integrator is the mirror image with resistor and capacitor swapped. Because the gain grows in proportion to frequency, a real circuit also amplifies high-frequency noise strongly, so a small resistor is placed in series with the input capacitor to cap the gain at high frequencies.
Back to the first screen
The steeper you made the input ramp, the lower the gold output line went, and the output settled on the target of −4V when the input slope was +4 (RC = 1). The slanted input became a flat output because the capacitor passes a current proportional to the input's rate of change, and the ramp's slope was the same from start to finish. Even as the shaded triangle under the input grew, the output height followed not its area but only the slope of its edge, and that is exactly where the differentiator parts ways with the integrator. Swapping two parts turned the accumulating integrator into a differentiator, and the circuit took over the job of reading slopes.