Comparators – a brief overview Similar to an Op Amp…including the symbol AV = ∞ IBIAS = 0 VOS = 0 BW = ∞ Except… Output p stage g is likely y different ((open p collector/drain, open p emitter/source) Designed to saturate and recover rapidly Not compensated, p , i.e. no provision p for unity yg gain stability y Not intended to be used as an amplifier Used open loop or with POSITIVE feedback More other difference can be subtle More…other Comparators – function and application Decides if an input voltage is above or below a reference voltage Often have unique output structures for speed or interfacing ii.e. Si Single-bit l bit analog-to-digital l t di it l converter t Zero-crossing detector Oscillators Drivers (switch, relay, LED, etc.) Compatibility p y with standard logic g levels Latching outputs Open-collector/drain, open-emitter/source Suffer from offset and bias current problems just like Op Amps Input Overdrive – magnitude of ΔVIN Affects output response time Op Amps as Comparators This is often done with the extra amp in a dual or quad package Op Amp input protection diodes often prevent using an Op Amp as a Comparator Large input differential causes large currents and damage + - Op Amps have better accuracy and lower drift (DC and dynamic) Op Amp is really the only option for microvolt comparisons True Comparators are usually faster (no internal compensation) Output voltage may not be compatible with logic levels Very poor saturation recovery Comparator as an Op Amp – don’t even try Comparators make simple “digital” decisions Simple view of LM311 Comparator operation: + + + + No Current Flow Current Flows VOUT VIN < 0 - GND GND - Output acts as Transistor “switch” switch – only allows current to flow one direction External connections (i.e. pull-up, pull-down) define output operation “Open” Emitter not available on most comparators High-speed comparators have a defined output circuit to preserve speed “O “Open” ” Collector C ll t allows ll fl flexibility ibilit iin iinterfacing t f i VOUT VIN > 0 Voltage level shifting LED or Relay drivers If VIN = 0 V, output is INDETERMINATE! LM311 – Output configurations are limitless VDC VDC +V B/S OUT 3 G 4 - V- VREF 8 5 R1 6 VIN 2 V+ B + + B/S VOUT 7 OUT VREF 1 U1 LM311 3 - 0 -V G 4 2 V- VIN V+ B 8 5 +V 7 VOUT1 1 VOUT2 U3 LM311 R4 -V VIN < VREF, VOUT = 0; VIN > VREF, VOUT = VDC 0 +V VIN 2 8 5 + V+B B/S OUT VREF 3 - 6 VIN < VREF, VOUT1 = VOUT2 = VDCR4/(R3 + R4); VIN > VREF, VOUT1 = VDC, VOUT2 = 0 VDC VDC +V 7 1 G V-U2 LM311 4 -V VOUT VREF 2 8 5 + VIN 3 - 6 7 R5 VOUT 1 G V-U4 LM311 4 -V VIN < VREF, VOUT = VDC; VIN > VREF, VOUT = 0 V+B B/S OUT R2 0 R3 6 -VDC VIN < VREF, VOUT = VDC; VIN > VREF, VOUT = VDC Problems with Comparators (LM311 specifically) Input Offset Voltage Input Bias Current Common-mode input range VCM + IN − IN V −V = 2 VIN+ < VSS + 30V VIN+ < VDD − 1.25V VIN− > VDD − 30V > VSS VIN− > VSS + 0.4V With passive pull-up, output rise asymmetrical Exceeding the CM input range or absolute input range can cause very strange responses (Definition, (Definition Survival, Survival Operation) t(VOL → VOH) ≠ t(VOH → VOL) Noise – causes jitter is switching Overdrive – small overdrive = long g switching g time