LM393 comparator

Thread Starter

MRUNAL123456789

Joined Oct 18, 2023
7
hii! can someone tell me what is wrong with the following circuit ?
it consists of lm393 with a supply of 3v and it is compared with ref voltage generated by resistors (1k and 9k) connected via supply.
 

Attachments

dl324

Joined Mar 30, 2015
16,726
can someone tell me what is wrong with the following circuit ?
  1. LM393 outputs are open collector. They can't source current.
  2. You're violating the common mode input voltage range. The non-inverting input needs to be 1.5V below the supply voltage.
You'll also likely have problems with the supply voltage not being high enough for a blue LED.
 

MrChips

Joined Oct 2, 2009
30,505
This is a common newbie mistake. Many analog comparators have open-collector outputs.
Open-collector outputs can sink current, not source current. You need to drive a pull-up resistor as the load.

You have two or more options.
1) Put a pull-up resistor from the positive rail to the output.
2) Put a resistor and LED in series driven from the positive rail, not to GND.
 

Thread Starter

MRUNAL123456789

Joined Oct 18, 2023
7
This is a common newbie mistake. Many analog comparators have open-collector outputs.
Open-collector outputs can sink current, not source current. You need to drive a pull-up resistor as the load.

You have two or more options.
1) Put a pull-up resistor from the positive rail to the output.
2) Put a resistor and LED in series driven from the positive rail, not to GND.
okay thank you so much I'm still new to this can you please explain or give some reference so that I can understand more about pull up resistors?
 

crutschow

Joined Mar 14, 2008
34,062
can you please explain or give some reference so that I can understand more about pull up resistors?
It's quite simple.

The transistor open-collector output of the comparator can only conduct current to ground, it can't supply any voltage or current, so a pullup resistor is connected to a positive supply voltage to generate the output voltage.

Thus when the (+) input voltage of the comparator is higher than the (-) input, the output transistor is off and the output voltage is "pulled up" to the positive voltage connected to the resistor (logic high).

And when the (-) input voltage of the comparator is higher than the (+) input, the transistor is ON which shunts the resistor current to ground, making the output voltage near zero (logic low).

Make sense?
 

ElectricSpidey

Joined Dec 2, 2017
2,753
If you connect the load between the output and the positive rail the amp will act as a low side switch.

If you use a pullup resistor, then the output should be considered a "signal". (high/low)

But in your example, you can use the pullup to provide current to a load connected to the negative power rail...but current will be drawn at all times in contrast to setting up as a low side switch.
 
Top