The LM311 is a single high-speed voltage comparator, and the one thing that separates it from every other jellybean comparator is its output stage. Both the collector and the emitter of the output transistor are brought out to pins. The output does not have to return to the negative supply, which means a single LM311 can compare signals on one supply rail and switch a load on a completely different one.
That single property is why a part first released in 1973 is still specified into new designs.
Key specifications
All figures below are for the LM311 at 25 °C with ±15 V supplies unless noted.
| Parameter | Value |
|---|---|
| Supply voltage (VCC+ − VCC−) | 3.5 V to 30 V recommended, 36 V absolute maximum |
| Input offset voltage | 2 mV typical, 7.5 mV maximum (10 mV over the full temperature range) |
| Input bias current | 100 nA typical, 250 nA maximum (300 nA over the full temperature range) |
| Input offset current | 6 nA typical, 50 nA maximum (70 nA over the full temperature range) |
| Differential input voltage | ±30 V absolute maximum |
| Common-mode input range | −14.7 V to +13.8 V typical |
| Large-signal voltage gain | 200 V/mV typical |
| Response time, low to high | 115 ns typical |
| Response time, high to low | 165 ns typical |
| Output type | Open collector with isolated emitter |
| Output sink current | 50 mA |
| Output low voltage at 50 mA | 0.75 V typical, 1.5 V maximum |
| Collector output to VCC− | 40 V absolute maximum |
| Emitter output to VCC− | 30 V absolute maximum |
| Supply current, output low | 5.1 mA typical |
| Operating temperature | 0 °C to 70 °C |
Response times are specified for a 100 mV input step with 5 mV of overdrive, a 500 Ω pull-up to 5 V and 5 pF of load. Real circuits rarely match that, for reasons covered under pull-up sizing below.
Two of these deserve a warning, because they are widely misquoted.
The first is the output voltage rating. The datasheet description says the family can switch voltages up to 50 V at 50 mA, and that sentence gets copied everywhere. Check the absolute maximum ratings table and the 50 V figure belongs to the LM111 and LM211. For the LM311 the collector output is rated to 40 V above VCC−, and the emitter output to 30 V. Design to 40 V, not 50 V.
The second is the temperature range. The LM311 is the commercial grade part at 0 °C to 70 °C. If the design has to survive an unheated cabinet or an automotive environment, the part number changes: LM211 covers −40 °C to 85 °C, LM111 covers −55 °C to 125 °C, and LM211Q covers −40 °C to 125 °C. The die is the same; the specified range is not.
Pinout and package options
The LM311 comes in an 8-pin package. Viewed from the top:

| Pin | Name | Function |
|---|---|---|
| 1 | EMIT OUT | Emitter of the output transistor |
| 2 | IN+ | Non-inverting input |
| 3 | IN− | Inverting input |
| 4 | VCC− | Negative supply |
| 5 | BALANCE | Offset trim |
| 6 | BAL/STRB | Offset trim and strobe |
| 7 | COL OUT | Collector of the output transistor |
| 8 | VCC+ | Positive supply |
Pin 1 is the pin that causes confusion. A large number of application notes and hobby schematics label it GND, because in the most common configuration it is wired to ground. It is not a ground pin. It is the emitter of the output transistor, and treating it as a ground connection throws away the feature the part exists for.
Pins 5 and 6 are equally misunderstood. If offset trimming is not being used, leave both unconnected. Shorting them together is also acceptable. What is not acceptable is tying pin 6 to ground, for reasons covered further down.
Package suffixes matter when the part is going onto a purchase order:
| Orderable part | Package |
|---|---|
| LM311P | PDIP-8, tube |
| LM311D | SOIC-8, tube |
| LM311DR | SOIC-8, tape and reel |
| LM311PSR | SO-8, tape and reel |
| LM311PW / LM311PWR | TSSOP-8, tube / tape and reel |
LM311N is worth calling out separately. It is not a Texas Instruments part number. N was the National Semiconductor suffix for the plastic DIP, and it is still used by several other manufacturers for their DIP-8 version. If a BOM specifies LM311N and the quote comes back as LM311P, the packages are equivalent, but the manufacturer is not. Confirm which one the design was qualified against before substituting.
Datasheet
The full electrical characteristics, switching waveforms, and the 18 reference application circuits are in the manufacturer datasheet.
Download the LM311 datasheet (Texas Instruments, PDF) — document SLCS007, 8-pin SOIC / PDIP / SO / TSSOP, 3.5 V to 30 V supply, 165 ns response time.
The floating output stage
The LM311’s output is an open-collector NPN transistor, which by itself is unremarkable. What is unusual is that the emitter is not tied internally to VCC−. Both terminals of that transistor are available at pins 1 and 7, so the output behaves like a switch with two free ends rather than a switch with one end welded to the negative rail.
Three configurations follow from this.
Emitter to ground, collector pulled up. The standard arrangement. The output swings between the pull-up rail and VOL. Because the emitter defines the low level, tying it to a clean system ground gives a well-defined VOL instead of one that moves with the negative supply.
Collector to a different rail. The comparator can run on ±15 V while the output pulls up to 5 V logic. No level-shifting circuitry is required, because the output transistor is genuinely floating with respect to the comparator supplies.

Emitter output. Tie the collector to VCC+ and take the signal from the emitter with a resistor to VCC−, and the output is now a source rather than a sink. The emitter output is rated to 30 V above VCC−, lower than the collector’s 40 V, so check the headroom before using it.
The practical consequence is that inputs and output can be referenced to entirely separate grounds. This is what makes the LM311 the standard choice for interfacing a sensor sitting on one ground to logic sitting on another, and it is exactly what the LM393 and LM339 cannot do.
Basic comparator circuit
The minimum working circuit on a single 5 V supply: signal into IN+, a reference divider into IN−, emitter grounded, collector pulled up to the logic rail.

Sizing the pull-up resistor is the one calculation that is easy to get wrong in both directions.
The lower bound is set by output current. The transistor sinks the pull-up current when the output is low, so RPU must be large enough to keep that current within the 50 mA rating and to keep VOL low enough for the receiving logic. VOL is proportional to output current: 0.75 V typical at 50 mA, but only around 0.23 V at 8 mA on a 4.5 V supply. Running the pull-up hard costs noise margin.
The upper bound is set by rise time. The output transistor pulls the node down actively but the pull-up resistor charges it back up passively, so the low-to-high edge is an RC curve against whatever capacitance is on the node. The datasheet approximates the positive response time as RPU × CL. With 20 pF of trace and input capacitance, a 10 kΩ pull-up gives roughly 200 ns of rise time on its own, which is longer than the comparator’s own 115 ns propagation delay. If edge speed matters, the pull-up is usually the limit, not the part.
For most 5 V logic interfaces, 2.2 kΩ to 4.7 kΩ sits in the middle of the usable window.
Adding hysteresis
An LM311 with 200 V/mV of gain and no hysteresis will oscillate on any input that crosses the threshold slowly or carries noise. The fix is positive feedback: a resistor from the output node back to IN+, which shifts the threshold in the direction that opposes further transitions.

With R1 from the reference to IN+ and R2 from the output node back to IN+, the two thresholds are:
- Upper threshold, output high: VTH = (VREF × R2 + VPU × R1) / (R1 + R2)
- Lower threshold, output low: VTL = (VREF × R2 + VOL × R1) / (R1 + R2)
- Hysteresis band: ΔV = R1 × (VPU − VOL) / (R1 + R2)
The band is set by the ratio R1 / (R1 + R2). Making the feedback resistor large relative to the reference resistor narrows the band; making it comparable widens it toward the full output swing.
Comparator design calculator
One constraint that catches people out: with an open-collector output, the high level is not exactly the pull-up rail. When the output is off, current flows from the pull-up rail through RPU and into the feedback network, so the node sits slightly below VPU. Keep R2 at least an order of magnitude larger than RPU and the error stays negligible. If R2 is comparable to RPU, calculate the divider explicitly.
A useful starting point is to size the band at three to five times the expected input noise amplitude, then check that the resulting thresholds still sit inside the common-mode input range.
Using the strobe pin
Pin 6 disables the output. Pull current out of it and the output transistor turns off regardless of what the inputs are doing, which is how the LM311 is used in sampled comparison, multiplexed comparator arrays, and any circuit that needs the output blanked during a transient.
The rule that the datasheet states in bold and that gets ignored constantly: the strobe pin must not be shorted to ground. It has to be current driven, at 3 mA to 5 mA. Grounding it directly pulls uncontrolled current and damages the part. The standard implementation is a series resistor of around 1 kΩ into the collector of a small NPN driven from logic.
Note also that strobing off the output stage does not strobe off the input stage. Input current stays at normal levels unless the inputs are separately gated, which matters if the LM311 is sitting across a source that cannot tolerate bias current.
Driving relays, lamps, and higher-voltage loads
The 50 mA sink rating is high for a comparator, and it is a rating the LM311 is expected to use. Relay coils, indicator lamps, opto-isolator LEDs, and small solenoids can all hang directly off pin 7 with no buffer transistor.

Three things to get right:
Flyback protection. Any inductive load needs a diode across the coil, cathode to the supply. Without it the collector sees the coil’s inductive kickback, which exceeds the 40 V rating immediately.
Voltage headroom. The load supply is measured from VCC−, not from ground and not from VCC+. On a single-supply design with VCC− at ground, the collector sees the load supply directly, so a 24 V relay is fine and a 48 V one is not.
Power dissipation. At 50 mA and 0.75 V of VOL, the output transistor dissipates around 38 mW. That is comfortable in a PDIP, whose junction-to-ambient thermal resistance is 57.5 °C/W, but the TSSOP package sits at 162 °C/W. In a small package with a continuously energised load, check the junction temperature rather than assuming the current rating is the only limit.
LM311, LM393, and LM339
The three parts are often treated as interchangeable comparators that differ only in channel count. They do not.
| LM311 | LM393 | LM339 | |
|---|---|---|---|
| Channels | 1 | 2 | 4 |
| Output emitter | Brought out to pin 1 | Internally tied to VCC− | Internally tied to VCC− |
| Strobe | Yes | No | No |
| Offset trim pins | Yes | No | No |
| Response time | Sub-200 ns | Roughly an order of magnitude slower | Roughly an order of magnitude slower |
| Output sink current | 50 mA | Lower | Lower |
The selection logic is straightforward. If the design needs more than one comparison and the thresholds are slow and referenced to a common ground, the LM393 or LM339 does the job at a fraction of the cost per channel. If the design needs speed, an output that switches a load on a different rail, an output that can be blanked, or output current beyond what a dual or quad can sink, the LM311 is the part, and it stays a single-channel part precisely because those features cost die area.
Where a design uses several LM311s, the collector outputs can be wire-OR connected onto a single pull-up, which recovers some of what the multi-channel parts offer.
