LM339Quad differential comparator
Make four independent voltage decisions in one IC.
LM339 contains four independent voltage comparators in a 14-pin IC. Each compares two input voltages and uses an open-collector output transistor to signal the result. The output can pull a node LOW, but it needs an external pull-up resistor to produce a defined HIGH. The input range includes ground and requires headroom below the positive supply. This page uses the classic LM339N and LM339D, with a 5 V threshold circuit. Pin numbers define every connection; channel 1/2 names can be transposed in other manufacturers’ documents without changing the physical pinout.
Click a lead or use the arrow keys. Top view
OUT1
Function
Sinks current when IN+ is below IN−. Releases when IN+ is above IN−.
How to connect
Add a 10 kΩ pull-up to +5 V and connect a high-impedance logic input.
Electrical note
An external pull-up is required for a defined HIGH.
OUT2
Function
Sinks current when IN+ is below IN−. Releases when IN+ is above IN−.
How to connect
Leave open when unused.
Electrical note
An external pull-up is required for a defined HIGH.
VCC
Function
Shared positive supply for all four comparators.
How to connect
Use +5 V with 100 nF bypass to pin 12.
Electrical note
Classic LM339: 2–30 V operating range.
IN2−
Function
Negative input for the comparator whose output is pin 2.
How to connect
Connect to the 2.0 V reference when unused.
IN2+
Function
Positive input for the comparator whose output is pin 2.
How to connect
Connect to GND when unused.
Electrical note
Stay within the common-mode range.
IN1−
Function
Negative input for the comparator whose output is pin 1.
How to connect
Connect to the 2.0 V reference.
IN1+
Function
Positive input for the comparator whose output is pin 1.
How to connect
Connect to VIN, the adjustable signal.
Electrical note
Stay within the common-mode range.
IN3−
Function
Negative input for the comparator whose output is pin 14.
How to connect
Connect to the 2.0 V reference when unused.
IN3+
Function
Positive input for the comparator whose output is pin 14.
How to connect
Connect to GND when unused.
Electrical note
Stay within the common-mode range.
IN4−
Function
Negative input for the comparator whose output is pin 13.
How to connect
Connect to the 2.0 V reference when unused.
IN4+
Function
Positive input for the comparator whose output is pin 13.
How to connect
Connect to GND when unused.
Electrical note
Stay within the common-mode range.
GND
Function
Shared negative supply / ground.
How to connect
Connect to signal and supply returns.
OUT4
Function
Sinks current when IN+ is below IN−. Releases when IN+ is above IN−.
How to connect
Leave open when unused.
Electrical note
An external pull-up is required for a defined HIGH.
OUT3
Function
Sinks current when IN+ is below IN−. Releases when IN+ is above IN−.
How to connect
Leave open when unused.
Electrical note
An external pull-up is required for a defined HIGH.
At a glance
Quad differential comparator
Share the supply and reference, but give each used output its own suitable pull-up. The comparator is a switching device, not a linear op-amp.
Operating profile
LM339N
Operating conditions
Key parameters and their test conditions
- Supply
- 2–30 VConditions / notes: Single supply
- Ambient temperature
- 0 to 70°CConditions / notes: LM339 grade
- Input common-mode range
- 0 to VCC − 1.5 VConditions / notes: At 25°C
- Input common-mode range
- 0 to VCC − 2 VConditions / notes: Across the full temperature range
- Total supply current
- 0.8 mA typical; 2 mA maximumConditions / notes: Four channels; VO = 2.5 V; no load; 25°C
Package details
Follows the selected physical package
- Manufacturer
- Texas Instruments
- Part number
- LM339N
- Package
- PDIP-14
- Connections
- 14 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 collectors4 pins
Supply & return2 pins
Comparator inputs8 pins
Open collectors4 pins
Supply & return2 pins
Comparator inputs8 pins
Compare the inputs
Each channel responds to IN+ minus IN−. A sufficiently positive difference releases its output; a negative difference turns the sink transistor on.
Let the pull-up set HIGH
An open collector cannot drive HIGH by itself. The pull-up supplies the output node when the transistor is off.
Keep a margin near equality
Offset and noise determine the state near the threshold. Add intentional hysteresis when a noisy signal would otherwise cause repeated switching.
At equality, do not assume a precise output. The explorer highlights the offset-sensitive region and treats out-of-range inputs separately.
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 one classic LM339 channel. The ±9 mV region illustrates possible offset, not built-in hysteresis. A fixed 0.15 V LOW is illustrative; real output voltage depends on sink current and temperature. Timing and noise are not simulated.
Pin reference
Select a pin to explore its function and connection.
| Pin | Signal | Type | Function |
|---|---|---|---|
| OUT1 | Open-collector output | Sinks current when IN+ is below IN−. Releases when IN+ is above IN−. | |
| OUT2 | Open-collector output | Sinks current when IN+ is below IN−. Releases when IN+ is above IN−. | |
| VCC | Positive supply | Shared positive supply for all four comparators. | |
| IN2− | Inverting input | Negative input for the comparator whose output is pin 2. | |
| IN2+ | Non-inverting input | Positive input for the comparator whose output is pin 2. | |
| IN1− | Inverting input | Negative input for the comparator whose output is pin 1. | |
| IN1+ | Non-inverting input | Positive input for the comparator whose output is pin 1. | |
| IN3− | Inverting input | Negative input for the comparator whose output is pin 14. | |
| IN3+ | Non-inverting input | Positive input for the comparator whose output is pin 14. | |
| IN4− | Inverting input | Negative input for the comparator whose output is pin 13. | |
| IN4+ | Non-inverting input | Positive input for the comparator whose output is pin 13. | |
| GND | Supply return | Shared negative supply / ground. | |
| OUT4 | Open-collector output | Sinks current when IN+ is below IN−. Releases when IN+ is above IN−. | |
| OUT3 | Open-collector output | Sinks current when IN+ is below IN−. Releases when IN+ is above IN−. |
No pins match. Try a signal name or choose All pins.
Operating conditions
Classic LM339 · not LM339B
| Parameter | Value | Conditions / notes |
|---|---|---|
| Supply | 2–30 V | Single supply |
| Ambient temperature | 0 to 70°C | LM339 grade |
| Input common-mode range | 0 to VCC − 1.5 V | At 25°C |
| Input common-mode range | 0 to VCC − 2 V | Across the full temperature range |
| Total supply current | 0.8 mA typical; 2 mA maximum | Four channels; VO = 2.5 V; no load; 25°C |
No specifications match. Try a parameter name or a unit.
B variants have different supply, offset and temperature limits.
Electrical characteristics
5 V unless stated
| Parameter | Value | Conditions / notes |
|---|---|---|
| Input offset | 2 mV typical; 5 mV maximum | At 25°C; specified common-mode condition |
| Input offset across temperature | 9 mV maximum | Classic LM339 |
| Input bias-current magnitude | 25 nA typical; 250 nA maximum | At 25°C |
| Input bias-current magnitude | 400 nA maximum | Across temperature |
| LOW output voltage | 150 mV typical; 400 mV maximum | 4 mA sink; −1 V differential; 25°C |
| LOW output across temperature | 700 mV maximum | 4 mA sink |
| Off-state leakage | 0.1 nA typical; 50 nA maximum | VO = 5 V; 25°C |
| Typical response time | 1.3 µs | 100 mV step; 5 mV overdrive; 5.1 kΩ pull-up; 15 pF |
No specifications match. Try a parameter name or a unit.
Small-signal timing and output voltage depend on overdrive, pull-up, load and temperature.
Comparator channel connections
Physical pin numbers
| Parameter | Value | Conditions / notes |
|---|---|---|
| OUT1 pin1 | IN+7 / IN−6 | Used threshold channel |
| OUT2 pin2 | IN+5 / IN−4 | Second independent comparator |
| OUT3 pin14 | IN+9 / IN−8 | Third independent comparator |
| OUT4 pin13 | IN+11 / IN−10 | Fourth independent comparator |
| Shared supply | VCC3 / GND12 | Do not confuse this map with LM324 |
No specifications match. Try a parameter name or a unit.
Some manufacturers swap channel 1 and 2 names. The physical input/output groupings above are unchanged.
Threshold detector
5 V · 2 V reference
| Parameter | Value | Conditions / notes |
|---|---|---|
| Reference divider | 15 kΩ above, 10 kΩ below | 5 × 10 / (15 + 10) = 2.0 V nominal |
| Signal input | VIN → pin7 | Use 0–3 V for the reviewed full-temperature range |
| Reference input | VREF → pin6 | Same reference also biases unused negative inputs |
| Pull-up | 10 kΩ from output1 to +5 V | Required for logic HIGH |
| Supply bypass | 100 nF from3 to12 | Close to the package |
| Unused comparators | Positive inputs to GND; negative inputs to VREF | Leave their outputs open |
| Below reference | Output LOW | Transistor sinks pull-up current |
| Above reference | Output HIGH through pull-up | Transistor is off |
No specifications match. Try a parameter name or a unit.
Divider accuracy depends on resistor tolerances and input bias. The explorer uses a chosen reference value.
Package and stress limits
LM339N · PDIP-14
| Parameter | Value | Conditions / notes |
|---|---|---|
| Lead pitch | 2.54 mm | Through-hole; top view |
| Supply absolute maximum | 36 V | Classic non-B stress limit |
| Output absolute maximum | 36 V / 20 mA | Stress limits; design within operating conditions |
| Storage temperature | −65 to +150°C | Unpowered |
| Input/output distinction | Outputs can sink; inputs cannot power a load | Use a pull-up sized for the connected logic |
No specifications match. Try a parameter name or a unit.
Output pull-up voltage, input range and supply voltage are separate design constraints.
Threshold alarms
Compare sensor voltages with selected references for warning or control outputs.
Manufacturer application guideWindow detectors
Use two comparators to identify whether a signal is inside a voltage band.
Manufacturer application guideMulti-level indicators
Four comparators can compare one signal with four reference levels; each used output needs suitable loading.
Manufacturer application guideTake it into ProTech
Find LM339 in the Components Library to place its schematic symbol and connect its pins.
Reference page · circuit simulation model not yet availableOpen ProTech
