LM339 Comparator: Pinout, Circuits and Specs

Voltage comparator (IC) LM339, pinout, circuits – this is what we will consider today in this text. It was developed by the American company Texas Instrument (TI). Comparator is designed to create function generators. It is widely used in automation devices and various electronic equipment.

Pinout LM339

The comparator marked “LM339N” is available in standard plastic packaging for hole mount PDIP, and with “LM339” for surface – SOIC, SOP, SSOP. Such a designation on the package is the main difference between these devices, which are completely identical in electrical parameters.

Pinout LM339:

  1. 1out (Output pin of the comparator 1);
  2. 2out (Output pin of the comparator 2);
  3. VCC (Power supply);
  4. 2in- (Negative input pin of the comparator 2);
  5. 2in+ (Positive input pin of the comparator 2);
  6. 1in- (Negative input pin of the comparator 1);
  7. 1in+ (Positive input pin of the comparator 1);
  8. 3in- (Negative input pin of the comparator 3);
  9. 3in+ (Positive input pin of the comparator 3);
  10. 4in- (Negative input pin of the comparator 4);
  11. 4in+ (Positive input pin of the comparator 4);
  12. GND (Ground);
  13. 4OUT (Output pin of the comparator 4);
  14. 3OUT (Output pin of the comparator 3).

LM339 Specifications

The LM339(N) cannot be used in linear amplification mode like a normal op amp. The most common use is as an electronic key, it has slightly different requirements. One of which is high performance. Here are the main values ​​of its maximum specifications:

  • constant supply voltage (VCC) up to 36 V (or ± 18 V);
  • input differential voltage (VIN) from -36 V to +36 V;
  • common mode voltage range (VI) from -0.3 V to +36 V;
  • output current (IO) up to 20 mA;
  • infinite duration of the short circuit output “Output” to the ground;
  • temperature:
    • crystal at work (TJ) up to 150oC;
    • storage (TSTG) -65 oC to +150 oC.

LM339 Comparator circuits

What is the connection circuits of the lm339 comparator and how does it work? The operation of each of the 4 elements included in it is based on the simplest operational amplifier (op-amp), sharpened to operate in switch mode at high speed.

Let’s see how this “switch” works. A variant of one of the schemes for using a comparator for clarity and understanding of the process is shown in the figure below. As you can see, it has two inputs, marked with the symbols “+IN” and “-IN”. Potentials of different magnitudes are applied to them, relative to “GND”, which the device compares and outputs a signal to the “Output” output. A 12 V supply voltage is applied to the “VCC” and “GND” pins.

If the compared voltage on “+IN” is greater than on “-IN” relative to “Gnd”, then a positive potential will appear at the output “Output” – “logical one”. Through the LED VD2 with a limiting resistor R1, a current (IOUT) of the supply voltage will flow to the ground “GND”. VD2 will light up, and VD1 will be turned off.

If the situation changes, when the compared voltage at “-IN” will be greater than at “+IN”, a negative potential will appear at the output “Output” – “logical zero”. Accordingly, the VD1 LED will light up, and VD2 will be extinguished.

However, there are comparators whose output cannot form a “logical unit”, i.e. get a positive signal. Perhaps only “zero” or nothing. It is with such devices, they are also called “open collector”, that the four-channel LM339 is equipped.

This feature is explained by the presence of an internal transistor Q8 in the comparators of the microcircuit. Its collector is the “Output” pin and its emitter is connected to “GND”. It opens only with a higher potential on “-IN”, relative to “+IN”. If there is no signal, it is closed. The block diagram from the datasheet on the LM339 is shown in the figure.

Contact “-IN” is usually called inverting, and “+IN” non-inverting.

LM339 Equivalents

Equivalents LM339(N) are the following devices:

  • KIA339 (KEC);
  • HA17339A (Renesas);
  • UPC339GR (NEC).

Slightly worse in terms of parameters, but sometimes suitable as a replacement: Chinese SDP339 (Shaoxing Devechip Microelectronics Co.) or Uzbek K1401CA1 (OJSC Faton, Tashkent). Many well-known foreign companies produce it with standard marking under the TI license.


One of the possible schemes for using the LM339 for a 12 V battery indicator can be seen in the figure below.

The reference voltage of 4.7 V is supplied to the non-inverting inputs. It is obtained through the use of a KC147 zener diode and resistance R5. LEDs of different colors are connected by the cathode to the open collector of the comparator, and by the anode to the plus of the power source through current-limiting resistors.

The circuit operates from a power source, the level of which it also controls. Sources of the voltage under test are connected to the inverting inputs of the microcircuit through resistive dividers. When the battery is fully charged, the green LED will light up, when the battery is discharged, it will turn red.


Texas Instrument products are widely distributed, you can download the datasheet for LM339(N) here.

Rate article
Add a comment

By clicking on the "Post comment" button", I consent to processing of personal data and accept privacy policy.