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
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 spec | Value |
|---|---|
| Function | Dual voltage comparator |
| Supply voltage | 2 to 36 V single |
| Inputs and outputs | Open-collector outputs: need a pull-up (10 kΩ typical) |
| Speed | Response about 1.3 µs |
| Package | DIP-8 or SOIC-8 |
| Watch out for | Output 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
Light and sound threshold switchesBattery-low detectorsZero-crossing detectors
Builds that use it
Guided build
Window comparator voltage monitor
Guided build
Thermistor bridge temperature alarm
Guided build
Visible light communication
Guided build
Schmitt trigger with hysteresis
Guided build
Read your electricity meter's LED
Guided build
Automatic night lamp with LDR and relay
Guided build
ESD wrist strap tester
Guided build
Op-amp comparator light switch
Showing 8 of 17
Alternatives
- LM358 Op-AmpOp-amp in the same pinout
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.
