An Introduction to the LM339AN Quad Voltage Comparator

06 November 2023


Ⅰ. What is a comparator?

Ⅱ. Overview of LM339AN comparator

Ⅲ. LM339AN symbol, footprint and pin configuration

Ⅳ. What are the features of LM339AN comparator?

Ⅴ. Technical parameters of LM339AN comparator

Ⅵ. Applications of LM339AN comparator

Ⅶ. Dimensions and package of LM339AN comparator

Ⅷ. How to use LM339AN to compare the voltages of two different input terminals?




Ⅰ. What is a comparator?


A comparator is a circuit that compares an analog voltage signal to a reference voltage. The two inputs of the comparator are analog signals, and the output is a binary signal. When the difference in input voltage increases or decreases, its output remains constant. Therefore, it can also be thought of as a 1-bit analog-to-digital converter. Comparators are used to detect when an arbitrarily changing input signal reaches a reference level or a defined threshold level. They can be designed using various components such as diodes, transistors, operational amplifiers, etc. These devices find widespread application in the realm of electronics, particularly in driving logic circuits.


Common chips include LM324, LM358, uA741, TL081\2\3\4, OP07, and OP27, all of which can be made into voltage comparators (without negative feedback). LM339 and LM393 are professional voltage comparators with fast switching speed and small delay time. They can be used in special voltage comparison situations.



Ⅱ. Overview of LM339AN comparator


5d7be7e35c569d0d1447945d0b95371e.png


LM339AN has four independent voltage comparators inside and is a common voltage comparator chip. It can be used in high-voltage digital logic gate circuits and can directly interface with TTL, CMOS and other circuits. It is specifically designed to operate from a single power supply over a wide voltage range and can also be operated from split power supplies. The comparator has a temperature range of 0°C to 70 °C and operates with one or two power supplies. The device uses bipolar technology and has 4 channels per chip.


Replacements and equivalents:

• LM339ANSR

• LM339ANE4

• LM239AN



Ⅲ. LM339AN symbol, footprint and pin configuration


1b44d36d6e69452ed9e83b8a43d4e1f1.png


LM339AN has a total of 14 pins, and their pin names and descriptions are as follows.


Pin 1 (Output 1): The output of IC's first comparator opamp


Pin 2 (Output 2): The output of IC's second comparator opamp


Pin 3 (Vcc): Positive supply of IC


Pin 4 (Inverting Input 2): Inverting input of IC's second comparator opamp


Pin 5 (Non Inverting Input 2): Non inverting input of IC's second comparator opamp


Pin 6 (Inverting Input 1): Inverting input of IC's first comparator opamp


Pin 7 (Non Inverting Input 1): Non inverting input of IC's first comparator opamp


Pin 8 (Inverting Input 3): Inverting input of IC's third comparator opamp


Pin 9 (Non Inverting Input 3): Non inverting Input of IC's third comparator opamp


Pin 10 (Inverting Input 4): Inverting input of IC's forth comparator opamp


Pin 11 (Non Inverting Input 4): Non inverting input of IC's fotrh comparator opamp


Pin 12 (Gnd): Ground


Pin 13 (Output 4): The output of IC's forth comparator opamp


Pin 14 (Output 3): The output of IC's third comparator opamp



Ⅳ. What are the features of LM339AN comparator?


• Its differential input voltage range is large enough to be equal to the supply voltage.


• LM339AN has a wide internal resistance limit for the comparison signal source and can operate normally within a larger resistance range.


• The modest offset voltage of around 2mV enhances the precision and linearity of the comparator by allowing for a more precise determination of voltage differences when comparing two input signals.


• It has a wide supply voltage range. Among them, the single power supply voltage is 2V to 36V, and the dual power supply voltage is ±1V to ±18V.


• It has flexible output potential setting function. Through simple configuration, users can easily select the threshold value of the output terminal potential to achieve diversified comparison result output.



Ⅴ. Technical parameters of LM339AN comparator


f1703aa22a4f2fff7c7b9c4a802a5100.png



Ⅵ. Applications of LM339AN comparator


• Proportional amplifier: LM339AN can be used as a signal proportional amplifier to amplify weak input signals to the required intensity range. By adjusting the feedback resistor of the amplifier, the amplification factor can be changed and the amplitude of the output signal can be precisely controlled.


• Electronic scales: Electronic scales employ comparators like LM339AN for the purpose of weighing objects. When an item is positioned on the scale, its weight is translated into a voltage signal, which is subsequently compared to a predefined reference voltage in order to ascertain the object's weight.


• Voltage monitoring: LM339AN can be used to monitor battery voltage, supply voltage, or voltage in other circuits. When the input voltage reaches or exceeds a certain threshold, the LM339AN can trigger an alarm or perform other actions to ensure that the voltage is within a safe range.


• Motor control: Comparators are required in motor control systems to detect the position and speed of the motor. For example, in stepper motor control, a comparator can compare the output signal of the encoder with a preset reference voltage to determine the position and speed of the motor, thereby achieving precise motor control.


• Analog switch: By configuring the LM339AN as a switch, we can control the operation of other circuit components such as LEDs, motors, relays, etc.


• Waveform generator: LM339AN can also be used with other components such as capacitors and resistors to build simple square wave and pulse waveform generators. By adjusting the input voltage and threshold, waveforms of different frequencies and duty cycles can be generated.


• Temperature control: The temperature sensor employs a thermal element to transform temperature into a voltage signal. It subsequently evaluates this voltage signal against a reference voltage to ascertain the present temperature. To facilitate rapid and precise comparisons in this application, comparators like the LM339AN can be utilized.



Ⅶ. Dimensions and package of LM339AN comparator


c6815961f2f60f521d7ef952dccca835.png


The LM339AN integrated circuit is housed in a PDIP package and tube packaging, with dimensions measuring 19.3mm in length, 6.35mm in width, and 4.57mm in height. Furthermore, it incorporates surface mount technology for streamlined automated production and high-density assembly.



Ⅷ. How to use LM339AN to compare the voltages of two different input terminals?


First, we connect the two voltages that need to be compared to the two input terminals of the comparator of LM339AN. Usually, the comparator of LM339AN has two independent input terminals, namely the non-inverting input terminal and the inverting input terminal.


Subsequently, we have the option to select either ground level or a stable voltage as the reference voltage and link it to the comparator's reference voltage input. Typically, the reference voltage input is connected to the non-inverting input via a resistor to create an adder circuit.


Then, depending on the output state of the comparator, we can choose to connect the output to the desired circuit. The output of the LM339AN comparator is an open-drain output transistor and requires an external pull-up resistor to connect it to a high level or ground level.


The threshold voltage can be adjusted by altering the pull-up resistor's value. This voltage level defines the state at which the comparator produces either a high or low output when the voltage difference between the two input terminals surpasses it.


Next, we connect the power and ground wires to the power and ground terminals of the comparator of the LM339AN.


Finally, by changing the voltage at both inputs, we observe whether the comparator's output state is as expected. If necessary, we can adjust the threshold voltage to ensure that the comparator's output meets requirements.




Frequently Asked Questions


1. What is the voltage comparator in LM339?


It is a 14-pin IC, that consists of four independent voltage comparators. These comparators are specially designed to operate from a single power supply. Also, there will be a possibility of operation from dual supplies is possible, as long as the difference between the two supplies is 2 V to 36 V.


2. What is the LM339AN?


The LM339AN is a quad voltage comparator IC (integrated circuit) that contains four independent voltage comparators in a single package. It is often used in applications where you need to compare voltages and make decisions based on those comparisons.


3. What is the response time of LM339AN?


The response time of LM339AN is 1.3us.


4. What is the purpose of a voltage comparator?


A voltage comparator is used to compare two input voltages and provide a digital output indicating which voltage is higher. When the non-inverting input voltage is greater than the inverting input voltage, the output goes high, and when the inverting input voltage is greater, the output goes low.


5. Is the LM339AN suitable for low-power applications?


The LM339AN is not typically designed for low-power applications. It consumes some power even when not actively switching, so it may not be the best choice for battery-powered devices where power efficiency is crucial.