LM339 quad comparator: four channels, single supply

Four comparators in one chip for multi-sensor line followers and threshold detection: supply, current, response and the pull-up each output needs.

By Jignesh S Panchal · Editorial & verification standards

  • TypeSensors
  • LevelIntermediate
  • ReviewedNov 2026

The LM339 is a quad comparator: four independent voltage comparators in one 14-pin chip, running from a single supply with an input range that includes ground, and a newer LM339B rated up to 38 V at 200 µA per comparator with a 1 µs response. It is the four-channel version of the LM393, useful for a multi-sensor line follower or a window detector. Figures are from the Texas Instruments LM339 and LM2901 datasheet.

Key specifications

Comparators4
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

ItemLM339B (new B version)
Comparators per package4, independent
Maximum supply ratingUp to 38 V
Supply current200 µA per comparator
Input offset voltage0.37 mV typical
Input bias current3.5 nA
Response time1 µs
Input common-mode rangeIncludes ground
Differential input rangeEqual to the maximum-rated supply, ±38 V
OutputCompatible with TTL, MOS and CMOS; low saturation voltage
ESD2 kV HBM
PackageSOIC-14, among others

The datasheet also lists the older LM139, LM239, LM339 and LM2901 parts with different limits, and points to the TL331B for a single comparator and the LM393B for a dual, so match the suffix on your chip. As with the LM393, the output is an open-collector stage and needs a pull-up resistor.

Using it on a robot

  • Give every output a pull-up to the logic supply, and share the ground with the controller.
  • Feed each channel from an IR or light sensor and a threshold from a potentiometer or divider.
  • Add a little hysteresis with a feedback resistor if the output chatters near the threshold.
  • For the analog value rather than yes or no, read the sensor with an ADS1115.

Sources and further reading

Last reviewed: November 2026. Limits are for the B version in the Texas Instruments datasheet; older versions and other 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.