Components / Integrated circuits / LM393 Comparator

LM393 Comparator

Compares two analog input voltages and drives an output state.

FunctionDual voltage comparator
Supply voltage2 to 36 V single
Inputs and outputsOpen-collector outputs: need a pull-up (10 kΩ typical)
SpeedResponse about 1.3 µs
Integrated CircuitsReviewedMPN LM393PUsed in 17 projects
LM393
In short

What is the LM393 Comparator and what is it used for?

Compares two analog input voltages and drives an output state. Makers use it for light threshold detection.

Add a little hysteresis (a large resistor from output to IN+) to stop chatter near the threshold.
In the real world

Threshold sensors and monitoring

How it works

Integrated circuits combine multiple circuit functions. Always check the exact package, supply rails, pinout and operating conditions.

Key specifications

Integrated circuit specValue
FunctionDual voltage comparator
Supply voltage2 to 36 V single
Inputs and outputsOpen-collector outputs: need a pull-up (10 kΩ typical)
SpeedResponse about 1.3 µs
PackageDIP-8 or SOIC-8
Watch out forOutput only pulls low; without a pull-up you will read nothing

Pinout

1OUT AOutput A (open collector)
2IN− AInverting input A
3IN+ ANon-inverting input A
4GNDGround
5IN+ BNon-inverting input B
6IN− BInverting input B
7OUT BOutput B
8VCCSupply

How to use it

Compares two voltages and gives a clean on/off output. This is the chip on most "sensor module with a blue trimmer" boards: the trimmer sets the threshold.

Applications

Alternatives

Buy at

Common questions

What is the LM393 Comparator used for?

In products: threshold sensors and monitoring. In maker projects: light threshold detection.

How does the LM393 Comparator work?

Integrated circuits combine multiple circuit functions. Always check the exact package, supply rails, pinout and operating conditions.

What voltage does the LM393 Comparator need?

2 to 36 V single.

What can I use instead of the LM393 Comparator?

LM358 Op-Amp.