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
| Comparators | 2 |
|---|---|
| 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 range | includes ground |
What the datasheet promises
| Item | LM393B (new B version) |
|---|---|
| Comparators per package | 2, independent |
| Maximum supply rating | Up to 38 V |
| Supply current | 200 µA per comparator |
| Input offset voltage | 0.37 mV typical, 4 mV maximum |
| Input bias current | 3.5 nA |
| Response time | 1 µs |
| Input common-mode range | Includes ground |
| Output | Compatible with TTL, MOS and CMOS; low saturation voltage |
| ESD rating | 2 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
- Texas Instruments LM393B, LM2903B, LM193, LM293, LM393 dual comparators datasheet (SLCS005) — the supply, current, offset, bias, response time and output figures above.
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.