# LM393 comparator...

#### dtvonly

Mar 14, 2012
11
Hi. The LM393 is an IC with two comparators. It is an open collector output comparator. As such, I put a 10k pullup resistor (Vcc=3.3V and VSS=GND). The comparator did switch from lo to high correctly but from hi to low (voltage), the low voltage is not toward VSS (which is ground) but rather only to 0.45V. It wasn't until I changed the pullup from 10k to100k that the hi to low switching was correct; i.e. the low voltage is now (essentially) ground. Why do I need such a high output pullup when 10k would have been sufficient; i.e. not loading to output? thanks.

#### BobK

Jan 5, 2010
7,682
For pretty much any logic family, 0.45V is low. Low does not mean ground, it means below the low logic threshold of whatever logic you are using.

Bob

#### dtvonly

Mar 14, 2012
11
comparator output...

Thank you for replying. Yes .45 is a digital low. It worked fine as is. I was wondering this more from an "electronics" POW. Why does a 10k pullup causes a 0.45V low while a 100k pullup causes a 0.006V low. According to the LM393N datasheet, when I apply:

R-pullup (minimum) = Vout/I_output_lo = 3.3V/6mA = 550 ohms.

wouldn't a 10k be more than sufficient?

Last edited:

#### gorgon

Jun 6, 2011
603
You should be aware that the input common mode range is 0V to Vcc-1.5V or 0 - 1.8V if your supply is 3.3V. If your inputs get above this value things can happen inside the chip. I've seen LM339 letting out the magic smoke, putting enough current into the inputs at these levels close to the Vcc.

10k pullup could be ok, depending on what you are feeding from the output, and the frequency you are working on.

#### KrisBlueNZ

##### Sadly passed away in 2015
Nov 28, 2011
8,393
Thank you for replying. Yes .45 is a digital low. It worked fine as is. I was wondering this more from an "electronics" POW. Why does a 10k pullup causes a 0.45V low while a 100k pullup causes a 0.006V low. According to the LM393N datasheet, when I apply:
R-pullup (minimum) = Vout/I_output_lo = 3.3V/6mA = 550 ohms.
wouldn't a 10k be more than sufficient?
The LM393's outputs are designed to pull "fairly low". Often they're used with digital logic, where low is anything between 0V and 0.8V, often more.

There will be some variation from one manufacturer to another. I'm working from the data sheet from Texas Instruments for the device that was originally made by National Semiconductor.

The relevant specifications are VOL (low-level output voltage), which is typically 0.15V, maximum 0.4V, at room temperature when the output is sinking 4 mA, and IOL (output current with output low), which is specified as typically 6 mA when VOL is 1.5V. No minimum value for IOL is specified.

The output pin comes from the collector of a transistor whose emitter is connected to the negative supply. According to the equivalent diagram, the base is driven with 80 µA to turn it ON.

With 80 µA of base current into a common emitter stage, with a current gain around 100, the transistor's collector voltage depends on the current that it is sinking. For a relatively low current, such as 50 µA for example, the transistor will be saturated and will pull its collector pretty close to 0V. Typically less than 50 mV.

But when the collector current starts to approach the base current multiplied by the current gain of the transistor, the transistor is no longer saturated and the collector voltage will rise.

80 µA of base current is not necessarily enough to saturate the transistor when it is sinking the maximum current (typically 6 mA). That's why this figure is specified when VOL = 1.5V. In other words, if you force the output pin to sink that maximum current figure, you can expect the collector voltage to be more than 0.4V. The 0.4V figure is specified at a collector current of 4 mA.

So I would conclude from this that the collector voltage will change from being quite low (transistor saturated, or nearly) at a collector current less than 4 mA, to a significantly higher voltage (transistor out of saturation) at a collector current of 6 mA or higher.

#### BobK

Jan 5, 2010
7,682
With a 10K pullup to 3.3V that is only 300uA of current, so I would think it would pull lower than the 0.45V that was observed.

Bob

#### KrisBlueNZ

##### Sadly passed away in 2015
Nov 28, 2011
8,393
Those specifications are for VCC = 5V. Sorry, I should have pointed that out. The data sheet claims it can operate down to 2V but clearly its performance will suffer. My guess is that the current source for the base of the output transistor doesn't work properly at 3.3V.

To the OP: I wouldn't use an LM393 at 3.3V supply. There are plenty of more modern comparators that are designed to work at low supply voltages. Look in the selection tables on the Digikey or Mouser web site.

Replies
12
Views
3K
Replies
4
Views
5K
Replies
4
Views
11K
Replies
2
Views
2K
E
Replies
34
Views
6K
Paul Burke
P