Op-amp applications: comparator, integrator, filter, differential amplifier
The same op-amp does different jobs just by rearranging resistors and capacitors. Four that are common in sensor circuits.
Comparator
Compare two inputs without feedback and the output goes to one supply rail. It tells you quickly whether something "has been exceeded", as in overcurrent detection. A little positive feedback (hysteresis) keeps the output from chattering on noise. A dedicated comparator IC is faster and more stable.
Integrator
Put a capacitor in the feedback path and the output is the integral of the input. Used in analog PI controllers and triangle-wave generators.
RoadmapSee where this note sits in Electronic Circuits→Active filter
A second-order filter made of an op-amp and two RC pairs (Sallen-Key) has a sharper cut-off than a passive RC, and its low output impedance drives the next stage (an ADC) well.
Differential amplifier
Four resistors amplify only the difference between two inputs. Used to measure signals that both float above ground, such as the two ends of a shunt resistor.
Vout = (V+ - V-) × R2/R1 (when the resistor ratios match exactly)
Even a 1% mismatch in the ratios lets the common-mode voltage leak through, so use precision resistors or a dedicated differential amplifier IC.