

The LM339, manufactured by Motorola, Inc., is a quad comparator integrated circuit (IC) designed to compare two input voltages and output a digital signal based on the comparison. Each of the four independent comparators within the IC operates with low power consumption and high speed, making the LM339 a versatile component for a wide range of applications.








The LM339 is particularly valued for its ability to operate over a wide voltage range, making it suitable for both low-power and high-performance designs.
| Parameter | Value |
|---|---|
| Manufacturer | Motorola, Inc |
| Part Number | LM339 |
| Supply Voltage (Vcc) | 2V to 36V (single supply) or ±1V to ±18V (dual supply) |
| Input Offset Voltage | 2mV (typical) |
| Input Common-Mode Voltage | 0V to Vcc - 2V |
| Output Voltage (Low) | 0.2V (typical, at 4mA sink current) |
| Output Sink Current | 16mA (maximum) |
| Response Time | 1.3µs (typical, for 5mV input step) |
| Operating Temperature Range | -40°C to +85°C |
| Package Types | DIP-14, SOIC-14, TSSOP-14 |
The LM339 is available in a 14-pin package. The pinout and descriptions are as follows:
| Pin Number | Pin Name | Description |
|---|---|---|
| 1 | Output 1 | Output of Comparator 1 |
| 2 | Output 2 | Output of Comparator 2 |
| 3 | Vcc | Positive Power Supply |
| 4 | Output 3 | Output of Comparator 3 |
| 5 | Output 4 | Output of Comparator 4 |
| 6 | Input 4- | Inverting Input of Comparator 4 |
| 7 | Input 4+ | Non-Inverting Input of Comparator 4 |
| 8 | Input 3+ | Non-Inverting Input of Comparator 3 |
| 9 | Input 3- | Inverting Input of Comparator 3 |
| 10 | Input 2+ | Non-Inverting Input of Comparator 2 |
| 11 | Input 2- | Inverting Input of Comparator 2 |
| 12 | Input 1+ | Non-Inverting Input of Comparator 1 |
| 13 | Input 1- | Inverting Input of Comparator 1 |
| 14 | GND | Ground (0V reference) |
The following example demonstrates how to use the LM339 to compare an analog signal with a reference voltage and send the result to an Arduino UNO.
// LM339 Comparator Example with Arduino UNO
// This code reads the output of the LM339 and turns on an LED if the signal
// is above the reference voltage.
const int comparatorOutputPin = 2; // LM339 output connected to digital pin 2
const int ledPin = 13; // Onboard LED pin
void setup() {
pinMode(comparatorOutputPin, INPUT); // Set comparator output as input
pinMode(ledPin, OUTPUT); // Set LED pin as output
}
void loop() {
int comparatorState = digitalRead(comparatorOutputPin); // Read LM339 output
if (comparatorState == HIGH) {
digitalWrite(ledPin, HIGH); // Turn on LED if signal is above reference
} else {
digitalWrite(ledPin, LOW); // Turn off LED otherwise
}
}
No Output Signal:
Incorrect Output Behavior:
Noise or Instability:
Overheating:
Q: Can the LM339 be used with a single power supply?
A: Yes, the LM339 can operate with a single supply voltage ranging from 2V to 36V.
Q: What is the purpose of the pull-up resistor on the output?
A: The LM339 has open-collector outputs, which require a pull-up resistor to define the high logic level.
Q: Can the LM339 handle AC signals?
A: Yes, the LM339 can compare AC signals, but ensure that the input voltages remain within the common-mode range.
Q: How do I handle unused comparators?
A: Connect the inputs of unused comparators to a fixed voltage (e.g., GND or Vcc) to prevent floating inputs.
This concludes the LM339 documentation.