The IC LM 339 is primarily created to compare two input voltages and generate a coresponding output. Having said that, before we try to learn regarding the various LM339 based circuits, it would eb important to go through the standard features of the LM 339.
It is basically a quad comparator IC, meaning we can find four numbers of individual voltage comparators in a single 14-pin package of LM339 IC. These comparators are built to work from a single dual voltage supply source, which can be anywhere of 2 V to 32 V. The quiescent current drain of the IC is incredibly low (generally under 1 mA) and it is not dependent on the supply voltage input.
The input voltage supplied to the input pins of the IC LM339 could be as high as the supply voltage. The output of he IC is an open NPN collector and is designed to tolerate a short circuit to ground without getting damaged.
The pinout of the IC LM 339's pinout can be seen in the figure below. Observe that pin 3 is the positive input supply pinout while pin 12 is the ground supply pinout of the IC.
In the next figure above we can find how the IC LM339 can be configured as a non-inverting comparator-circuit . The inverting input pin4 of the fixed with 3V reference by the voltage divider network formed by R1, R2. As long as the potential at pin 5 stays over 3 volts the output stays high, and the moment it drops below 3 volts the output of the IC turns low.
Remember, normally this should have caused the output to become high, but in IC LM339 the output turns low because of the internal transistor which inverts the response for the output of the IC.
The above condition causes the LED at the output to switch ON due to a low logic from the IC output.
An LM339 inverting comparator circuit diagram can be witnessed in the figure above. Here pin5 of the IC is fixed with a reference voltage of 3 V by the voltage divider formed by R1 and R2.
As long as the potential at pin 4 of the IC is higher than 3 volts, the output of the IC stays low, but the moment it goes below below 3 volts, the output switches to low logic. The condition again causes the LED to switch ON due to the low logic from the IC output.
The LM 339 comparator circuit can be quickly converted into an oscillator circuit, as indicated in the figure below. Resistor R5 and capacitor C1 work like the RC timing network which determines the frequency the oscillation.
These are selected so that the LM339 circuit oscillates at a frequency of about 1.5 Hz. If you reduce the value of any one of the RC components will cause an increase in the output frequency of the oscillator. If you do the opposite will cause the oscillator frequency to reduce.
Alternate LED Flasher
A flashing LED always looks more attractive than a solidly lit ones, and that is precisely what happens if the oscillator circuit is configured as given in the above figure. Here the LEDs oscillate and turn ON/OFF alternately.
LED Strobe Light
The above IC LM339 circuit can be used to create even more impressive looking LED strobe light blinker which intermittently flashes and then turns OFF, then again turns ON , flashes intermittently and then turns OFF.
This effect is achieved by integrating a IC 555 astable oscillator with the output of the LM339 oscillator circuit.
The LM339 provide the slow ON/OFF square wave pulse to the LED that causes LED to switch ON/OFF at moderately slow erate, while the IC 555 strobes the flashing LEDs into to rapidly switching ON/OFF pulses. The LEDs can be 20 ma high bright RED or white LEDs.
To get a dual color strobe light, you an add another string of LED (green) connected parallel to the RED LEDs but in the opposite direction (reverse polarity).
LM339 Vibration Detector
A very sensitive vibration detector circuit can be built using a single LM339 op amp as shown in the following figure.
A tiny 8 ohm speaker is used as the vibration sensor while the opamp is configured in the non-inverting comparator mode. When the speaker detect a vibration, it develops a voltage difference at pin5 of the IC that may exceed the reference voltage at pin4 as set by the preset R6. This cause the output of the op amp to go high momentarily, triggering the SCR ON, and the SCR LED lights up indicating the presence of the vibration on the speaker.
Initially when there's no vibration on the speaker, the potential at pin5 of the IC remains lower than the pin4 reference voltage, which causes the output of the opamp to remain low, and the SCR remains switched OFF.
The SCR can be any low voltage low current SCR.
The R6 preset must be set carefully so that the potential of pin4 is hardly 0.3 V higher than the pin5 potential.
Touch Sensor using LM339
In this touch sensor circuit also, the LM339 opamp can be seen wired in the non-inverting mode. The pin4 of the IC is clamped at some potential which is just lower than the pin5 potential.
Due to this the pin5 potential remains higher than the pin4 potential causing the output pin2 to remain high initially.
The situation causes the LED to remain shut off.
When the indicated touch pads are touched, causes the pin5 voltage to drop below the pin4 voltage, due to the ground potential delivered to pin5 through the finger contacts.
When this happens, the output of the op amp quickly turns low, and the LED gets the required ground potential for illuminating and indicating the existence of a touch contact on the touch plates.
So these a few LM339 circuits that you can build at home, if you have any more similar ideas do let us know through your comments, we will try to update them quickly in the above article.