When we want to use a voltage comparator circuit. accurate cheap and easy to use. Usually, we choose to use LM741, it is op-amp is very versatile in use. It is not suitable for this particular work. So low efficiency. We should use a specific IC to work better. I choose the LM339 Quad Comparator IC. They are the same price and easier to use.
The LM339 is a package of four comparators.
The comparator is an op-amp designed to run at its maximum gain.
So that the output is either fully ON or fully OFF.
It can be powered by a battery or other single-polarity supply over a very wide voltage range.
All four comparators are installed in a single 14-pin package. same LM324 Quad OP-AMP in the previous.
The LM339 has many applications.
Page Contents, Click
LM339 Datasheet specifications
- The power supply voltage range is +2 voltage to +36 volts.
- The power supply current is 0.8 milliamperes.
- The output current (positive supply to output) is 16 mA typical (6 mA minimum).
- Maximum voltage gain (typical) are 200,000 (50,000 minimum).
- No feedback resistor necessary.
- Response time for switching requirement in typical: 1.3 μS.
I love this IC. Because…
- It has four comparators in a single chip.
- Use a single power supply with 2 terminals, positive and negative. It is so easy to use.
The LM339 circuit may cause oscillated easily. If the output and input are too near together. We can avoid this by connecting all input pins to the ground.
Example LM339 circuits diagram
When I have read IC datasheet. I will look for circuit and circuits. And, I do not like to read too many texts. I think the example circuits are best for learning. Are you same me?
Other circuits lists
LM339 LED voltage monitor
LM339 is good at a low voltage checker. It’s quite accurate more than other OP-AMPs. Look at the circuit!
This circuit is Non-inverting comparator. Then, the voltage at pin 5(non-inverting) and the ground is a tested input voltage.
Next, R1 and R2 make the reference voltage pin 5 (inverting). Both resistors are set in voltage divider form.
If they have the same resistance. It causes always the reference voltage is half of Vcc. The Vcc is 9V. So, this voltage is 4.5V.
The LED display will light up. When an input voltage at pin 5 is lower than the reference voltage at pin 4.
Also, this circuit cannot detect a lower voltage of 6V. You should change a lower reference voltage.
VR1—adjust the level of input voltage that testing not too high.
R3—reduce the current to a safe level for LED1.
We modify the above circuit. It is the inverting comparator circuit. We switch input pin and LED1. The LED and R3 connect to pin 2 and ground.
When Vin is a lower voltage than Vref(Reference voltage). It causes LED light up.
Look at the circuit in the right graph.
The output is High when Vin is lower than Vref. On the other hand, the output is “Low” When Vin is higher than Vref.
Example Circuits using LM339
Battery voltage monitor circuit
Up to $20 shipping discount on first order now: https://jlcpcb.com/quote