PCBWiki
ActiveTexas Instruments · SOIC-8 (TI package code D)

LM393 PCB Design Guide: Footprint, Pinout, and Alternatives

Industry-standard dual comparator with open-collector outputs on a 2–30 V single supply.

The LM393 is the industry-standard dual voltage comparator, in production since October 1979 and still the default answer for turning an analog level into a logic edge. It runs from a single 2 to 30 V supply (36 V absolute maximum), draws 0.45 mA typical for both comparators, has an input common-mode range that includes ground, and switches in 1.3 µs typical with 5 mV of overdrive. The outputs are open-collector, so each one can be pulled up to any logic rail independent of the comparator's own supply, and multiple outputs can be wire-ANDed by tying them together on one pull-up.

Nothing about the LM393 is precise or fast, and for a threshold detector, zero-cross detector, or fault flag that is usually fine. Know the limits before designing it in: input offset is 2 mV typical but 5 mV max at 25 °C and 9 mV max over temperature, response time is 1.3 µs, and the plain LM393 is a commercial-grade part rated for 0 to 70 °C ambient only. When those bite, stay in the family; the LM2903 is the same comparator graded −40 to 125 °C, and TI's LM393B drop-in cuts typical offset to 0.37 mV. When the output must actively drive high rather than just sink, no grade of this part will do it — you want a push-pull comparator, or you may actually want an op-amp.

Most LM393 board bugs are the same five mistakes. A missing pull-up leaves the output floating instead of high. Inputs within 1.5 to 2 V of VCC produce undefined outputs with no error flag. An input pulled more than 0.3 V below ground turns on parasitic devices and corrupts the comparison. Slow-moving inputs make the output chatter because there is no built-in hysteresis. And the 0 to 70 °C grade quietly disqualifies it from automotive and outdoor designs. Each is covered below.

What breaks boards

  1. No pull-up, no logic high: the output is open-collector

    The output only sinks current; the logic-high level comes entirely from the external pull-up resistor. Forget the pull-up and the output floats — it can even read plausibly on a high-impedance scope probe, then fail in circuit. Size the pull-up against the sink specs: VOL is 130 mV typical and 400 mV max at 4 mA of sink current (700 mV max over the full temperature range), and the output is only guaranteed to sink 6 mA minimum. The upside is free level shifting: pull up to any logic rail regardless of the comparator's supply.

  2. Comparisons near VCC fail silently: common-mode range stops 1.5–2 V below the rail

    The common-mode input range runs from ground to VCC − 1.5 V at 25 °C and shrinks to VCC − 2 V over the full temperature range. If both inputs rise above that window the output state is undefined; either input may go all the way to VCC without damage, and the output stays valid as long as the other input remains in range. The window loses that same 1.5 to 2 V off the top no matter how low the supply is, so on low rails it is the dominant constraint. Divide inputs down or compare against a lower reference.

  3. Inputs more than 0.3 V below ground corrupt the output

    Absolute maximum input voltage is −0.3 V to 36 V, with input current limited to −50 mA. Drive an input below −0.3 V — an inductive sensor, ground bounce between boards, an AC-coupled signal — and current flows through a parasitic diode to ground, turning on parasitic transistors that raise supply current and can make the output incorrect. The part usually survives (normal operation resumes once the input current is removed), but the comparison is garbage while it lasts. Clamp inputs that can go negative, or add series resistance to keep fault current far below the −50 mA limit.

  4. No built-in hysteresis: slow inputs make the output chatter

    The LM393 has no internal hysteresis, and with 1.3 µs typical response at 5 mV overdrive it will switch many times as a slow, slightly noisy signal crawls through the threshold. The classic symptom is a burst of output pulses around every crossing — fatal if the output clocks a counter or an interrupt. Add positive feedback from the output to the non-inverting input to create a deliberate hysteresis band. Layout matters for the same reason: TI says not to run the output and inverting-input traces in parallel without a VCC or GND trace between them, to place series input resistors close to the device, and to bypass VCC.

  5. The plain LM393 is a 0 to 70 °C part — and specs sag over temperature

    Recommended ambient range for the LM393 is 0 to 70 °C, commercial grade. In an automotive, outdoor, or sealed-enclosure design it is out of spec before the product ships; the same comparator is sold as the LM293 (−25 to 85 °C) and LM2903 (−40 to 125 °C) for exactly this reason. Even inside the window, temperature is not free: input offset grows from 5 mV max at 25 °C to 9 mV max over the full range, VOL max rises from 400 mV to 700 mV, and the common-mode ceiling drops from VCC − 1.5 V to VCC − 2 V. Check thresholds and pull-up sizing at the extremes, not just the bench.

Key specifications

ParameterValueSource
Supply voltage range2 V min to 30 V max recommended (non-V devices); absolute maximum 36 V (non-B versions)SLCS005AH Rev AH, Section 5.2 Recommended Operating Conditions (supply voltage, non-V devices) + Section 5.1 Absolute Maximum Ratings (VCC, non-B versions)
Ambient temperature range0 to 70 C (LM393, LM393A); LM293 is -25 to 85 C, LM2903 is -40 to 125 CSLCS005AH Rev AH, Section 5.2 Recommended Operating Conditions, ambient temperature TA rows
Input offset voltage2 mV typ / 5 mV max at 25 C; 9 mV max over full range (VCC = 5V to 30V, VIC = VICR min, VO = 1.4V)SLCS005AH Rev AH, Section 5.8 Electrical Characteristics for LM193, LM293, and LM393 (without A suffix), VIO rows, LM293/LM393 column
Supply current0.45 mA typ / 1 mA max (VCC = 5V, RL = infinity, 25 C); 0.55 mA typ / 2.5 mA max (VCC = 30V, full range)SLCS005AH Rev AH, Section 5.8, ICC rows, LM293/LM393 column
Common-mode input range0 to VCC - 1.5 V at 25 C; 0 to VCC - 2 V over full range (inputs must stay well below VCC; either input may go to VCC without damage but output state is only valid while one input is in range)SLCS005AH Rev AH, Section 5.8, VICR rows and note (2)
Output low voltage / sink capabilityVOL 130 mV typ / 400 mV max (IOL = 4 mA, VID = -1V, 25 C), 700 mV max over full range; IOL 6 mA min (VOL = 1.5V, VID = -1V, 25 C). Open-collector output only sinks - logic-high level is set by the external pull-upSLCS005AH Rev AH, Section 5.8, VOL and IOL rows, LM293/LM393 column; open-collector topology per Section 6.1 Overview and Section 6.3 Feature Description
Response time1.3 us typ (100mV input step with 5mV overdrive); 0.3 us typ (TTL-level input step) - VCC = 5V, TA = 25 C, RL connected to 5V through 5.1 kOhm, CL = 15 pFSLCS005AH Rev AH, Section 5.11 Switching Characteristics: LM193, LM239, LM393, LM2903, all 'A' and 'V' versions
Input voltage (absolute maximum)-0.3 V to 36 V on either input (non-B versions); input current IIK absolute maximum -50 mA. The voltage at either input can not be allowed to go negative by more than 0.3V otherwise output can be incorrect and excessive input current can flow - input current flows through a parasitic diode to ground and turns on parasitic transistors that increase ICC; normal operation resumes when the input current is removedSLCS005AH Rev AH, Section 5.1 Absolute Maximum Ratings, VI (input voltage, non-B versions) and IIK (input current) rows with note (5); Section 5.8 note (2)

Verified against the manufacturer datasheet on 2026-07-10. Confirm the current revision before production use.

Alternatives

  • LM393B: TI's next-generation drop-in replacement, covered by the same datasheet: 0.37 mV typ input offset, 3.5 nA input bias current, 2–36 V supply, −40 to 85 °C, and 2 kV HBM ESD. The obvious pick for new designs.
  • LM2903: the same dual comparator graded −40 to 125 °C; the LM2903V variant allows a 2–32 V supply. The fix when the LM393's 0 to 70 °C rating is the problem.
  • LM339: the quad version of the same comparator family in 14-pin packages, for when two channels aren't enough.

Common questions

Does the LM393 need a pull-up resistor on the output?
Yes — the output is open-collector and only sinks current, so without a pull-up there is no logic-high state at all. TI's switching specs are measured with a 5.1 kΩ pull-up to 5 V and 15 pF of load. The pull-up may go to a different rail than the comparator's supply, which makes the LM393 a free level shifter.
What is the difference between the LM393 and the LM358?
The LM393 is a dual comparator; the LM358 is a dual op-amp. The comparator's open-collector output only sinks current and needs a pull-up, but it switches decisively with no feedback network. The LM358's push-pull output can source current, but it is built for linear feedback circuits and makes a poor comparator. The part numbers get confused constantly — check which one the schematic actually calls for.
What supply voltage does the LM393 run from?
2 to 30 V recommended for the standard part, 36 V absolute maximum, single or split supply. Remember the input common-mode range stops 1.5 V below VCC at 25 °C (2 V below over the full temperature range), so on a low rail the usable input window is meaningfully smaller than the supply.
Why does my LM393 output oscillate near the switching threshold?
Because the part has no built-in hysteresis. With 1.3 µs typical response at just 5 mV of overdrive, any noise on a slowly moving input produces multiple threshold crossings and a burst of output transitions. Add positive feedback from the output to the non-inverting input to set a hysteresis band, keep the output trace away from the inverting input, and bypass the supply pin.

Sources