The LM339 is a widely used voltage comparator IC designed to monitor and compare electrical signals. It contains four independent comparators in one package, allowing several voltage conditions to be checked with a single device. This article explains the LM339 pinout, internal working principle, electrical specifications, possible replacement ICs, and practical application circuits.

The LM339 is a quad voltage comparator IC that contains four independent comparators in one 14-pin package. Each comparator compares the voltage at its inverting and non-inverting inputs, then changes the output state according to which input voltage is higher.
The LM339 operates from a 2 V to 36 V single supply or a ±1 V to ±18 V dual supply. Its input voltage range includes ground, making it suitable for single-supply circuit designs. It has low current consumption, typically 0.8 mA, with a typical input offset voltage of 2 mV and input bias current of 25 nA.
The IC uses open-collector outputs, so an external pull-up resistor is normally required. Its outputs can interface with TTL, MOS, and CMOS logic when properly configured.
If you are interested in purchasing the LM339, feel free to contact us for pricing and availability.

| Pin Number | Pin Name | Function |
| 1 | 1OUT | Open-collector output of comparator 1. Requires an external pull-up resistor. |
| 2 | 2OUT | Open-collector output of comparator 2. Requires an external pull-up resistor. |
| 3 | VCC+ | Positive power-supply input. |
| 4 | 2IN− | Inverting input of comparator 2. |
| 5 | 2IN+ | Non-inverting input of comparator 2. |
| 6 | 1IN− | Inverting input of comparator 1. |
| 7 | 1IN+ | Non-inverting input of comparator 1. |
| 8 | 3IN− | Inverting input of comparator 3. |
| 9 | 3IN+ | Non-inverting input of comparator 3. |
| 10 | 4IN− | Inverting input of comparator 4. |
| 11 | 4IN+ | Non-inverting input of comparator 4. |
| 12 | GND | Ground or negative power-supply connection. |
| 13 | 4OUT | Open-collector output of comparator 4. Requires an external pull-up resistor. |
| 14 | 3OUT | Open-collector output of comparator 3. Requires an external pull-up resistor. |

This simplified internal circuit diagram shows how the LM339 voltage comparator processes two input signals and produces a digital-style output. The IN+ (non-inverting) and IN− (inverting) inputs feed a differential input stage, where the transistor pair compares the two input voltages. Small bias currents supplied by the internal current regulator keep the input stage operating correctly and maintain stable performance over different supply voltages.
The 80 µA current regulator and current mirrors distribute controlled currents throughout the internal circuit. These constant-current paths provide proper transistor biasing, improve comparison accuracy, and reduce the effect of supply voltage changes. The transistors work together to amplify the small voltage difference between the two inputs until one side becomes dominant.

The amplified signal then drives the open-collector output stage. Unlike a standard logic output, the LM339 output transistor can only pull the output low (toward GND). When the output transistor turns ON, the output is connected to ground, producing a logic LOW. When it turns OFF, the output is left open, so an external pull-up resistor is required to produce a logic HIGH.
The component count shown in the diagram highlights the internal complexity of the LM339. Although it appears as a simple 14-pin IC externally, it contains multiple transistors, resistors, and diodes that work together to provide fast, reliable voltage comparison while maintaining low power consumption and stable operation.
| Feature | Specification |
| Device Type | Quad differential voltage comparator |
| Number of Comparators | Four independent comparators |
| Supply Voltage Range | 2 V to 36 V single supply or ±1 V to ±18 V dual supply |
| Input Offset Voltage | 3 mV typical, 5 mV maximum at 25°C |
| Input Bias Current | 25 nA typical, up to 250 nA maximum |
| Input Offset Current | Approximately ±5 nA typical |
| Input Common-Mode Range | Includes ground and extends to approximately VCC − 1.5 V |
| Differential Input Voltage Range | Equal to the supply voltage within absolute maximum ratings |
| Output Type | Open-collector |
| Output Saturation Voltage | Approximately 250 mV at 4 mA |
| Propagation Delay | Approximately 1.3 µs |
| Total Supply Current | Approximately 0.8 mA typical for the complete IC |
| Operating Temperature | 0°C to +70°C for the commercial LM339-N |
| Output Logic Compatibility | Compatible with TTL, CMOS, MOS, DTL, and related logic when properly pulled up |
| External Pull-Up Resistor | Required to obtain a HIGH output level |
| Typical Packages | 14-pin PDIP and 14-pin SOIC |
| IC | Supply Voltage | Offset Voltage | Propagation Delay | Temperature Range |
| LM339B | 2 V to 36 V | 3.5 mV max | About 1 µs | −40°C to +85°C |
| LP339 | 2 V to 36 V | 5 mV max | About 8 µs | 0°C to +70°C |
| <a href="https://www.y-ic.com/pdf/TI/TLC339.html" target="_blank" "="" style="cursor: pointer; color: rgb(0, 0, 238);">TLC339 | 3 V to 16 V | 5 mV max | About 2.5 µs at 5 mV overdrive | Depends on version, up to −55°C to +125°C |
This circuit uses one comparator inside the LM339 to detect changes in light intensity using an LDR (Light Dependent Resistor). The LDR and resistor R1 form a voltage divider that generates a voltage proportional to the surrounding light level. The variable resistor VR1 provides an adjustable reference voltage to the non-inverting (+) input, allowing the light detection threshold to be set.

The LM339 continuously compares the two input voltages. When the voltage from the LDR becomes higher or lower than the reference voltage, the comparator changes the state of its open-collector output. The LED, connected through resistor R3, turns on or off depending on the comparison result. This simple circuit is commonly used in automatic lighting systems, day/night detectors, and light-activated switches.
This circuit uses the LM339 as a voltage monitoring comparator. The input voltage is applied through VR1, which allows the trip point to be adjusted, while the 6 V Zener diode (ZD1) provides a stable reference voltage. The comparator continuously compares the monitored voltage with this reference to determine whether the input has exceeded the preset limit.

When the input voltage rises above the reference voltage, the LM339 output changes state and sinks current through LED1 and the buzzer BZ1. The LED provides a visual warning, while the buzzer generates an audible alarm to indicate an overvoltage condition. Resistors R1 and R2 limit current and ensure proper operation of the comparator and output devices.
This circuit uses a phototransistor D1 to detect the amount of ambient light. The phototransistor conducts more current as the light intensity increases, changing the voltage applied to one input of the LM339. Resistors R2 and R3 create a fixed reference voltage at the other comparator input, establishing the switching threshold.

When the surrounding light falls below the preset level, the voltage produced by the phototransistor changes enough for the LM339 to switch its output. Because the LM339 has an open-collector output, it sinks current to turn on indicator L1. As the light level increases again, the comparator changes state and the indicator turns off. This type of circuit is commonly used in automatic night lights, security lighting, and light-sensitive control systems.
• Battery management systems (BMS)
• Battery chargers
• Uninterruptible power supplies (UPS)
• Switched-mode power supplies (SMPS)
• AC-DC power adapters
• Solar power systems
• Solar charge controllers
• Inverters
• Voltage stabilizers
• Automotive electronic control units (ECUs), etc.

Texas Instruments (TI) company uses its global wafer fabrication, assembly, packaging, and testing facilities to produce and verify devices before shipment. TI’s in-house manufacturing capabilities support high-volume production, consistent electrical performance, quality control, and long-term supply. The company also provides official datasheets, CAD models, package information, quality documentation, and technical support for the LM339. Different LM339 orderable versions may have different package types, temperature ratings, and compliance details, so the complete part number should always be checked before purchasing.