Page 1 of 1

Problem met on LM393

Posted: Fri Mar 03, 2017 9:00 am UTC
by April_21

In the attached circuit, I have a comparator (LM393) that takes a sine wave (from pint "A") and produces a 5v square wave (at point "B"). Then it is fed to a limiter circuit to condition it for input to a TTL 3.3v micro.

When only the comparator circuit is present (i.e. other part not connected), I get a nice 5v square wave. But when I connect the second part of the circuit, the amplitude of the square wave at the output of the comparator itself is reduced to about half (and with some distortion).

Why is this happening? I have previously used the same second part of the circuit for conditioning all types of inputs to bring them down to 3.3v and worked fine but not here.


Re: Problem met on LM393

Posted: Fri Mar 03, 2017 2:44 pm UTC
by KnightExemplar

TI's LM393 has only 0.1 NANOamps of "source" current, and 6mA of "sink" current. TTL-logic assumes the use of pull-up resistors.

0.1 NANOamps * 10,000 Ohm resistor == +1-microVolt.


TTL Logic sucks. It sucks down a lot of power (due to the quiescent current + pullup resistor). They're cheap as hell though and are made from reliable BJTs. So you don't have to worry about ESD destroying chips or other beginner mistakes.

CMOS Logic is much easier to use, as long as the chip wasn't exploded to static. Something like this CMOS comparator will source / sink 5mA easily (which is more than enough to drive a 10k load)


Then it is fed to a limiter circuit to condition it for input to a TTL 3.3v micro.

Or hell, just attach the pull-up resistor to +3.3V and you should be fine.


One advantage of TTL logic is the ease at stepping down voltages I guess. TTL logic doesn't need "AND" gates either, because you just connect the open-collector of many chips to the common pullup. Open-Collector is actually a very useful circuit pattern now that I think of it....

Hmmm... maybe that's why everyone keeps using the ancient LM393...

Re: Problem met on LM393

Posted: Sat Mar 04, 2017 6:17 am UTC
by April_21
Much thanks for you answer, it is really clear to me and help me a lot. :)

Re: Problem met on LM393

Posted: Wed Apr 12, 2017 6:07 pm UTC
by LulaNord
Hi....I'm building a little circuit that takes the output from a 555 and puts it on a counter (75HC4040) so I can watch LEDs flash (my ultimate goal is to take any reasonable voltage up to 18V and put it on the 4040 counter).
I added a voltage comparator (LM393) between the 555 and the 4040 which will allow me to use different voltage inputs to the comparator, and a fixed voltage output (the 4040 max is 6V).
So I looked at the LM393 and said to myself "the hookup looks straight forward" so I added an 8 pin DIP pad and a couple of extra traces to the board, WITHOUT TESTING! I etched the board, started putting it together and, surprise!!!!It didn't work!

pcb turnkey assembly

Re: Problem met on LM393

Posted: Fri Nov 23, 2018 7:25 am UTC
by johnyjackson
The trouble I'm having is that when the input signal goes high at all, both outputs of the LM393 comparators stay high at V+.
I've tried changing the value of the 10M ohm feedback resistors (R11 and R12), and I've bypassed and removed from the board the op amp buffer between the input signal and the comparator as it was oscillating oddly when I had it in the circuit.

The only thing that seems to work is touching one finger to the input pin and another finger to ground. When I do this, the output of the comparators is accurate compared to the input, and it doesn't hang at V+ regardless of the input voltage.

I tried adding various sizes of capacitors between the input and ground, and I tried adding a 10M resistor between the input and ground. None of these solutions seem to work.

I'm not sure what else to try to get the comparator to stop getting stuck at V+ when there's any input voltage applied to it.