LM393 dual comparator: single supply, ground-sensing inputs

A dual comparator behind most sensor-module digital outputs: supply, current, offset, response time and the pull-up it needs.

By Jignesh S Panchal · Editorial & verification standards

  • TypeSensors
  • LevelIntermediate
  • ReviewedNov 2026

The LM393 is a dual voltage comparator that runs from a single supply, with an input range that includes ground and an output compatible with TTL, MOS and CMOS; the newer LM393B is rated up to 38 V, draws 200 µA per comparator and responds in about 1 µs. It is the chip behind most digital outputs on IR, sound and light sensor modules: the analog signal is compared with a reference set by a potentiometer. Figures are from the Texas Instruments LM393 family datasheet SLCS005.

Key specifications

Comparators2
Supply rating (B)up to 38 V
Current (B)200 µA per comparator
Offset (B)0.37 mV typ
Response time (B)1 µs
Input rangeincludes ground

What the datasheet promises

ItemLM393B (new B version)
Comparators per package2, independent
Maximum supply ratingUp to 38 V
Supply current200 µA per comparator
Input offset voltage0.37 mV typical, 4 mV maximum
Input bias current3.5 nA
Response time1 µs
Input common-mode rangeIncludes ground
OutputCompatible with TTL, MOS and CMOS; low saturation voltage
ESD rating2 kV HBM

The datasheet table of the whole family shows older LM393 parts with a narrower supply range, so look at the suffix on your chip. The output is an open-collector stage, which means it can only pull low: it needs a pull-up resistor to the logic supply to produce a high level.

Using it on a robot

  • Add the pull-up on the output; without it the pin floats high-impedance and the module seems stuck.
  • On sensor modules, turning the potentiometer moves the switching threshold; the on-board LED shows the comparator state.
  • A little hysteresis (a resistor from output to the non-inverting input) stops chatter when the signal hovers near the threshold.
  • For the analog value rather than a yes/no, read the sensor pin directly with an ADC, for example the ADS1115.

It is a comparator, not an op amp: for linear amplification use a part such as the LM358.

Sources and further reading

Last reviewed: November 2026. Limits are for the B version in the Texas Instruments datasheet; other versions and makers differ. No price is quoted because it has not been checked.

Where to buy in India

These open a store search. Compare seller, price and reviews before you order.

Free: the final-year project pack

A shortlist with BOMs, a report outline that matches the usual chapter scheme, a costing sheet and 40 viva questions. Built for the February–April submission season.

The Build Note

One short email when something is worth your bench time.

A new build sheet, a part price that moved, or a mistake worth avoiding. No daily drip, no recycled news.

One short email when a build or a price is worth your time. Unsubscribe in one click.