LM393Dual voltage comparator
Turn a voltage threshold into a clear digital decision.
LM393 contains two independent voltage comparators in an eight-pin IC. Each compares its positive and negative inputs and controls an open-collector output. When IN+ is below IN−, the output transistor conducts and pulls the output LOW. When IN+ rises above IN−, it releases the output and an external pull-up resistor establishes HIGH. This reference covers the classic LM393P and LM393D, with a 5 V threshold detector and a 2 V reference.
Click a lead or use the arrow keys. Top view
OUT1
Function
Channel A sinks current when IN1− is above IN1+.
How to connect
Add a 10 kΩ pull-up to +5 V; read this node with a high-impedance input.
Electrical note
The IC does not actively drive HIGH.
IN1−
Function
Channel A reference input in the illustrated circuit.
How to connect
Connect the 2.00 V divider node.
Electrical note
Keep both example inputs within 0–3 V at a 5 V supply.
IN1+
Function
Channel A measured signal.
How to connect
Connect VIN and a common ground.
GND
Function
Ground reference for both comparators.
How to connect
Connect the supply return and bypass capacitor.
IN2+
Function
Channel B positive input.
How to connect
Tie to GND when unused in this example.
IN2−
Function
Channel B negative input.
How to connect
Connect to the same 2 V reference to give the unused channel a defined state.
OUT2
Function
Channel B current-sinking output.
How to connect
Leave unconnected in the single-channel example.
Electrical note
Use a separate pull-up when using channel B.
VCC
Function
Shared positive supply for both comparators.
How to connect
Apply +5 V; place 100 nF between pins 8 and 4.
Electrical note
Classic LM393 recommended supply: 2–30 V.
At a glance
Dual voltage comparator
An open-collector output needs a pull-up resistor. It sinks current instead of sourcing a HIGH level.
Operating profile
LM393P
Operating conditions
Key parameters and their test conditions
- Supply
- 2–30 VConditions / notes: Single supply; example uses 5 V
- Ambient temperature
- 0 to +70°CConditions / notes: LM393 / LM393A grade
- Input voltage range
- 0 to VCC − 2 VConditions / notes: Recommended full-temperature range
- Example input range
- 0–3 VConditions / notes: At VCC = 5 V
- Output HIGH
- External pull-up requiredConditions / notes: Output transistor is off
Package details
Follows the selected physical package
- Manufacturer
- Texas Instruments
- Part number
- LM393P
- Package
- PDIP-8
- Connections
- 8 pins
- Mounting
- Through-hole
- Lead pitch
- 2.54 mm
- Package code
- dip
- Thermal reference
- Board and package dependent; see manufacturer data
Connections by function
Select a pin to open its function, electrical notes and wiring guidance.
Open-collector outputs2 pins
Comparison inputs4 pins
Supply & return2 pins
Open-collector outputs2 pins
Comparison inputs4 pins
Supply & return2 pins
Compare the two inputs
The differential input stage responds to IN+ minus IN−. No analog-to-digital converter or firmware is needed.
Sink current or release the node
A negative input difference turns the output transistor on. A positive difference turns it off. The external pull-up supplies the HIGH level.
Make a stable decision
Keep inputs in their common-mode range. Add positive-feedback hysteresis when a slowly changing or noisy signal would chatter around the threshold.
The explorer illustrates a DC threshold and a pull-up. It does not replace a transient simulation, and it deliberately marks the offset-sensitive region near equality.
Find the switching threshold
Adjust VIN and the reference. Remove the pull-up to see why it matters.
Enable JavaScript to explore the comparator.
Violet: offset-sensitive transition · Amber: input outside the recommended range.
DC teaching model for channel A. The ±9 mV band uses the maximum input-offset magnitude over 0–70°C; it is uncertainty, not hysteresis. LOW uses a 0.13 V illustrative estimate. Propagation delay, input bias, leakage and noise are omitted.
Pin reference
Select a pin to explore its function and connection.
| Pin | Signal | Type | Function |
|---|---|---|---|
| OUT1 | Open-collector output | Channel A sinks current when IN1− is above IN1+. | |
| IN1− | Inverting input | Channel A reference input in the illustrated circuit. | |
| IN1+ | Non-inverting input | Channel A measured signal. | |
| GND | Supply return | Ground reference for both comparators. | |
| IN2+ | Non-inverting input | Channel B positive input. | |
| IN2− | Inverting input | Channel B negative input. | |
| OUT2 | Open-collector output | Channel B current-sinking output. | |
| VCC | Positive supply | Shared positive supply for both comparators. |
No pins match. Try a signal name or choose All pins.
Operating conditions
Classic LM393 · not the B revision
| Parameter | Value | Conditions / notes |
|---|---|---|
| Supply | 2–30 V | Single supply; example uses 5 V |
| Ambient temperature | 0 to +70°C | LM393 / LM393A grade |
| Input voltage range | 0 to VCC − 2 V | Recommended full-temperature range |
| Example input range | 0–3 V | At VCC = 5 V |
| Output HIGH | External pull-up required | Output transistor is off |
No specifications match. Try a parameter name or a unit.
TI SLCS005AH recommended conditions for the classic device.
Electrical characteristics
5 V supply unless stated
| Parameter | Value | Conditions / notes |
|---|---|---|
| Input offset voltage | 2 mV typical; 5 mV maximum | 25°C; VCC = 5–30 V |
| Offset over temperature | 9 mV maximum | 0–70°C |
| Input bias current | 25 nA typical; 250 nA maximum | Magnitude at 25°C |
| Output LOW voltage | 0.13 V typical; 0.40 V maximum | 4 mA sink; VID = −1 V; 25°C |
| Output LOW over temperature | 0.70 V maximum | Same 4 mA test; full range |
| Total supply current | 0.45 mA typical; 1 mA maximum | 5 V; unloaded; 25°C |
| Response time | 1.3 µs typical | 100 mV step; 5 mV overdrive; 5.1 kΩ pull-up; 15 pF |
No specifications match. Try a parameter name or a unit.
Response time and typical LOW voltage are not guaranteed operating limits.
Output behavior
Voltage difference and pull-up
| Parameter | Value | Conditions / notes |
|---|---|---|
| IN+ < IN− | Output transistor ON | LOW; current flows through the pull-up |
| IN+ > IN− | Output transistor OFF | HIGH only with a pull-up or another defined load |
| Inputs nearly equal | Offset and noise matter | Output state is not guaranteed at exact equality |
| No pull-up; transistor OFF | Floating output | Do not call this HIGH |
| Noisy threshold | May switch repeatedly | Use calculated hysteresis for a stable transition |
No specifications match. Try a parameter name or a unit.
This example has no positive-feedback hysteresis.
Threshold detector values
Nominal 5 V example
| Parameter | Value | Conditions / notes |
|---|---|---|
| Upper reference resistor | 30 kΩ | From +5 V to VREF |
| Lower reference resistor | 20 kΩ | From VREF to ground |
| Reference voltage | 2.00 V | 5 × 20 / (30 + 20) |
| Output pull-up | 10 kΩ | From +5 V to OUT1 |
| Supply bypass | 100 nF | Close to pins 8 and 4 |
| Unused comparator | IN2+ to GND; IN2− to VREF | OUT2 unconnected |
No specifications match. Try a parameter name or a unit.
Divider tolerance, input bias and supply error affect the threshold.
Package and stress limits
LM393P · PDIP-8
| Parameter | Value | Conditions / notes |
|---|---|---|
| Lead pitch | 2.54 mm | Through-hole; top view |
| Supply absolute maximum | 36 V | Stress rating; recommended maximum is 30 V |
| Output voltage absolute maximum | −0.3 to +36 V | Observe the load and current limits |
| Output current absolute maximum | 20 mA | Not a recommended design current |
| Junction temperature limit | 150°C | Absolute maximum |
| Storage temperature | −65 to +150°C | Unpowered storage |
No specifications match. Try a parameter name or a unit.
Use the manufacturer thermal data for the actual board and package.
Threshold and level detection
Compare a sensor voltage with a reference and feed the result to logic. Choose a pull-up voltage compatible with that logic.
Manufacturer application guideWindow detectors
Use both comparators for upper and lower limits. The output circuit determines how the two decisions combine.
Manufacturer application guideSlow sensor signals
Convert a temperature, light or position voltage into an alarm state. Hysteresis prevents noisy repeated transitions.
Manufacturer application guideTake it into ProTech
Find LM393 in the Components Library to place its schematic symbol and connect its pins.
Reference page · circuit simulation model not yet availableOpen ProTech
