LM311Single differential voltage comparator
A fast voltage decision with a flexible output transistor.
LM311 is a single voltage comparator with separately accessible collector and emitter output pins. It compares two input voltages and switches its output transistor rather than amplifying a signal linearly. Our 5 V example compares VIN with a 2 V resistor reference. The emitter is grounded and the collector uses a 10 kΩ pull-up, giving a LOW output below the threshold and a HIGH output above it. Balance and strobe contacts add flexibility, but they require the correct external network. This reference follows TI’s commercial LM311P and LM311DR with both optional contacts left open in the basic circuit.
Click a lead or use the arrow keys. Top view
EMIT
Function
Emitter of the output transistor, separate from the negative supply.
How to connect
Connect to ground for the illustrated logic output.
Electrical note
Do not leave the emitter floating.
IN+
Function
Signal input in the threshold detector.
How to connect
Connect VIN; keep it within 0.5–3.5 V for the 5 V example.
IN−
Function
Reference input in the threshold detector.
How to connect
Connect the 2.00 V divider node.
V−
Function
Negative power rail for the comparator.
How to connect
Connect to ground in the single-supply example.
Electrical note
This is a supply pin; it is not internally interchangeable with output emitter pin 1.
BAL
Function
Optional offset-balance connection.
How to connect
Leave open when offset trimming is not used.
BAL/STB
Function
Optional balance and current-driven output-disable connection.
How to connect
Leave open in this unstrobbed circuit.
Electrical note
Do not short to ground. Use the manufacturer’s current-driven strobe network when required.
COL
Function
Collector of the output transistor.
How to connect
Add 10 kΩ to +5 V and read this node.
Electrical note
HIGH requires an external pull-up; this pin sinks current when the transistor is on.
V+
Function
Positive comparator supply.
How to connect
Connect +5 V with 100 nF bypass to pin 4.
At a glance
Single differential voltage comparator
The output collector and emitter are both exposed. The chosen emitter return and external pull-up determine the logic levels.
Operating profile
LM311P
Operating conditions
Key parameters and their test conditions
- Supply span
- 3.5–30 VConditions / notes: V+ minus V−
- Ambient range
- 0 to +70°CConditions / notes: LM311 grade
- Recommended input range
- V− + 0.5 V to V+ − 1.5 VConditions / notes: Subject to the manufacturer supply conditions
- Inputs in the 5 V example
- 0.5–3.5 VConditions / notes: Both VIN and VREF
- Balance / strobe
- Open in the basic circuitConditions / notes: Optional networks shown in the manufacturer PDF
Package details
Follows the selected physical package
- Manufacturer
- Texas Instruments
- Part number
- LM311P
- 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.
Output transistor2 pins
Comparison inputs2 pins
Supply rails2 pins
Balance & strobe2 pins
Output transistor2 pins
Comparison inputs2 pins
Supply rails2 pins
Balance & strobe2 pins
Compare VIN and VREF
VIN enters IN+ pin 2; the 2 V reference enters IN− pin 3. Their difference determines the unstrobbed output state.
Switch the output transistor
Below the threshold, the transistor conducts from collector pin 7 to emitter pin 1. Above it, the transistor releases the collector and the pull-up establishes HIGH.
Control the transition
Offset creates uncertainty around equality. Positive-feedback hysteresis can stabilize a noisy threshold; it is not included in this simple example.
A comparator needs a defined output load. Keep inputs inside their common-mode range and use hysteresis when noise could cause repeated switching.
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.
Unstrobed DC teaching model with emitter pin 1 grounded. Valid input range is 0.5–3.5 V. The ±10 mV uncertainty band follows the full-temperature offset limit; it is not hysteresis. LOW uses an illustrative 0.23 V estimate from a different test load. Actual saturation, transient delay, leakage and noise are omitted.
Pin reference
Select a pin to explore its function and connection.
| Pin | Signal | Type | Function |
|---|---|---|---|
| EMIT | Output emitter | Emitter of the output transistor, separate from the negative supply. | |
| IN+ | Non-inverting input | Signal input in the threshold detector. | |
| IN− | Inverting input | Reference input in the threshold detector. | |
| V− | Negative supply | Negative power rail for the comparator. | |
| BAL | Offset balance | Optional offset-balance connection. | |
| BAL/STB | Balance / strobe | Optional balance and current-driven output-disable connection. | |
| COL | Output collector | Collector of the output transistor. | |
| V+ | Positive supply | Positive comparator supply. |
No pins match. Try a signal name or choose All pins.
Operating conditions
TI LM311 commercial grade
| Parameter | Value | Conditions / notes |
|---|---|---|
| Supply span | 3.5–30 V | V+ minus V− |
| Ambient range | 0 to +70°C | LM311 grade |
| Recommended input range | V− + 0.5 V to V+ − 1.5 V | Subject to the manufacturer supply conditions |
| Inputs in the 5 V example | 0.5–3.5 V | Both VIN and VREF |
| Balance / strobe | Open in the basic circuit | Optional networks shown in the manufacturer PDF |
No specifications match. Try a parameter name or a unit.
Supply range and input range are separate constraints.
Electrical characteristics
±15 V test supply unless stated
| Parameter | Value | Conditions / notes |
|---|---|---|
| Input offset voltage | 2 mV typical; 7.5 mV maximum | 25°C; 10 mV maximum over temperature |
| Input bias current | 100 nA typical; 250 nA maximum | 25°C; 300 nA maximum over temperature |
| Input offset current | 6 nA typical; 50 nA maximum | 25°C; 70 nA maximum over temperature |
| Collector-emitter LOW | 0.23 V typical; 0.4 V maximum | 4.5 V single supply; 8 mA sink; VID = −10 mV |
| Positive supply current | 5.1 mA typical; 7.5 mA maximum | Output LOW; no load; 25°C |
| Negative supply current magnitude | 4.1 mA typical; 5 mA maximum | Output HIGH; no load; 25°C |
No specifications match. Try a parameter name or a unit.
The LOW-voltage test is load dependent. It is not a fixed voltage for every collector current.
Response and output behavior
Manufacturer switching test
| Parameter | Value | Conditions / notes |
|---|---|---|
| LOW-to-HIGH response | 115 ns typical | ±15 V supply; 100 mV step; 5 mV overdrive |
| HIGH-to-LOW response | 165 ns typical | Same step and overdrive |
| Test output load | 500 Ω to 5 V; 5 pF | Different loading changes delay |
| VIN below VREF | Output transistor ON | Collector pulled toward emitter |
| VIN above VREF | Output transistor OFF | Pull-up creates HIGH |
| No pull-up, output OFF | Floating collector | Not a valid HIGH |
No specifications match. Try a parameter name or a unit.
Near equality, offset and noise can dominate. Typical response is not a guaranteed delay.
5 V threshold detector
A 2.00 V reference and 10 kΩ pull-up
| Parameter | Value | Conditions / notes |
|---|---|---|
| Reference upper resistor | 30 kΩ | +5 V to VREF |
| Reference lower resistor | 20 kΩ | VREF to ground |
| Reference result | 2.00 V | 5 × 20 / (30 + 20) |
| Signal input | 1.50 V initially | IN+ pin 2 |
| Output pull-up | 10 kΩ | +5 V to collector pin 7 |
| Emitter and negative rail | Pins 1 and 4 to ground | Two distinct terminals |
| Supply bypass | 100 nF | Pins 8–4; short local loop |
No specifications match. Try a parameter name or a unit.
The high-impedance output meter adds negligible loading.
Optional controls and stress limits
LM311P · PDIP-8
| Parameter | Value | Conditions / notes |
|---|---|---|
| Offset trim | Balance pins 5 and 6 | Use the manufacturer network |
| Strobe drive | Current driven, approximately −3 to −5 mA | Do not short the strobe contact to ground |
| Supply absolute maximum | 36 V total | Stress only; recommended maximum 30 V |
| Collector to V− absolute maximum | 40 V for LM311 | The 50 V rating belongs to other family members |
| Storage temperature | −65 to +150°C | Unpowered storage |
| Pin pitch | 2.54 mm | Through-hole |
No specifications match. Try a parameter name or a unit.
Stress ratings do not describe recommended continuous operation.
Level detection
Turn a suitable sensor voltage into a logic decision with a defined pull-up.
Manufacturer application guideThreshold oscillators
Combine feedback and timing networks, including hysteresis and the actual propagation delay.
Manufacturer application guideLogic interfacing
Choose collector pull-up and emitter return to suit the receiving logic while observing every voltage/current limit.
Manufacturer application guideTake it into ProTech
Find LM311 in the Components Library to place its schematic symbol and connect its pins.
Reference page · circuit simulation model not yet availableOpen ProTech
