Electronic – LM339 Comparator IC is not responding to any input

comparatorintegrated-circuitldr

I came into Electronics through Arduino, so pardon me if my knowledge about non-Arduino circuits is somewhat silly. I am preparing a small electronics project for my school with LDRs to detect light levels. With, an Arduino I could easily detect light levels and when they go down a threshold, I turn on a relay.

But, I wanted to make this without an Arduino, so I though of using an LM339 Comparator. I connected pin 3 of IC to Vcc and pin 12 to Ground. Pin 4 has an input lower than the input on pin 5 which receives input from Vcc. Lastly, I had the output 1 from pin 2 connected to an LED.

This circuit is only to test the comparator. If it works I am going to change the reference voltage and in place of the LED place a transistor. Here is a quick circuit Diagram I created:enter image description here

But, the LED does not glow. Even if I switch the inupts, the LED does not glow. I tested this in circuits.io, the online simulator. It works perfect there. But, the problem persists on the breadboard.

How do I get the LED to glow in my circuit on the bench?

UPDATE: I just got the LED glowing with the help of Raj, but how can I connect the base of a transistor in place of the LED.

Best Answer

LM339 comparator output is open collector mean you can make the led glow by connecting the anode to vcc and cathode to the output pin.

please note:

add a series resistor to the LED or else the LED will make a short to the open collector output transistor of the LM339

simple comparator