Problems with LM393 voltage comparator

Thread Starter

SPQR

Joined Nov 4, 2011
379
Hello all, me again.

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).

Based on a previous suggestion (thanks kubeek!) from this forum, 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! :D
I etched the board, started putting it together and, surprise!!!!
It didn't work! :eek:

The diagram below is the starting diagram.
(the 4040 is powered by 5V, and the 555 by a different power supply - 6V)


After searching around the web a bit, I learned that open collector outputs require a pull-up resistor, so I added a 1K to the back of the PCB between pins 8 and 1.
See the diagram below.

It worked better, but there was a lot of oscillation and unstable behavior in the system. If you pull the LM393, the system seems to work OK.

After searching a bit, it seems that most of the circuits with the LM393 have voltage divider resistors on their inputs.
So I came up with the third diagram below. The divider gives about 1V to the negative input, and the pull down resistor keeps the positive low, until driven by the input signal.


Questions:
1. What is the problem with my circuit?
2. Are there general rules about driving voltage comparator inputs?

Again, I thank you all in advance.
 

Attachments

Last edited:

JohnInTX

Joined Jun 26, 2012
4,787
It looks like you could use some hysteresis to eliminate the oscillations. The other posts in the thread have much useful info.

There is some more info in the tutorial sections of the forum about getting hysteresis in a comparator circuit as well as some example circuits.

Have fun.
 

Thread Starter

SPQR

Joined Nov 4, 2011
379
Oh how excellent!


I put a 1.1 meg resistor between the output and "+", and it's magic!
Nice and stable.


The review section you noted is quite nice.
I also found some data sheets on line that have detailed schematics.


I think we all need more hysteresis...nice Italian dinner, vino...:D


Thanks very much!
 
Top