Over 0V Comparator With Unipolar Power Supply?

Thread Starter

johnyradio

Joined Oct 26, 2012
434
You have both inputs at 0V so the output is ambiguous, determined by circuit offsets.
You need the (-) input slightly positive to have 0V at the output with 0V input.
How to make a comparator that switches when input goes over zero volts?
Or some other kind of over-zero detector?
 
Last edited:

crutschow

Joined Mar 14, 2008
34,409
How to make a comparator that switches at zero volts?
Or switches when both inputs are equal?
By definition you can't.
You need some finite voltage difference to cause the switch.
Otherwise what is the output when inputs are equal, high or low?
It can't be both.
 

Thread Starter

johnyradio

Joined Oct 26, 2012
434
Not sure. Just above a typical noise floor. i know, no such thing as typical! Sorry i don't have more detail at the moment. 1 uV? 1 mV?

Whatever's easy with about 5 parts or less.
 
Last edited:

Alec_t

Joined Sep 17, 2013
14,313
Opamps/comparators (other than expensive ones) typically have an input offset of a few mV, so a threshold of, say, 10mV should be readily achievable with an LM393 comparator or similar.
 

dl324

Joined Mar 30, 2015
16,909
Not sure. Just above a typical noise floor. i know, no such thing as typical! Sorry i don't have more detail at the moment. 1 uV? 1 mV?

Whatever's easy with about 5 parts or less.
I think your specs are going to cause you problems. Don't know of any comparators that will have an input offset voltage low enough. Signal coupling (from the air) will be an issue, so shielding will be required.
 

Thread Starter

johnyradio

Joined Oct 26, 2012
434
I think your specs are going to cause you problems. Don't know of any comparators that will have an input offset voltage low enough. Signal coupling (from the air) will be an issue, so shielding will be required.
i'm not that picky. Whatever's the lowest default offset i can get with common parts, no special circuitry to reduce offset, and no shielding.

What's lowest-parts-count way with LM393? I think this one from the LM393 datasheet will only give a pulse on zero crossings, rather than staying high when the input is over 0V which is what i need. And it's for bipoloar power, when i need unipolar.

1583595686320.png
 
Last edited:

schmitt trigger

Joined Jul 12, 2010
895
And.....let’s not forget about hysteresis.
All circuits and signals have noise, and as you get close to the threshold, the output will oscillate.

the question you must ask is how much noise does the compared signal have? Or are willing to tolerate?
And no. It won’t be zero.
 

dl324

Joined Mar 30, 2015
16,909
i want the output to go low when input = 0V, stay high when input goes over 0V.
When the difference between the non-inverting and inverting input is positive, the output will be HIGH.

With a single supply, you need a comparator with a common mode input range that includes ground.
 

Thread Starter

johnyradio

Joined Oct 26, 2012
434
And.....let’s not forget about hysteresis.
All circuits and signals have noise, and as you get close to the threshold, the output will oscillate.
the question you must ask is how much noise does the compared signal have? Or are willing to tolerate?
And no. It won’t be zero.
i assume that a resistor (hopefully just one!) will control my hysteresis, correct? If so, can you show the circuit? I can tune it on the bench.

When the difference between the non-inverting and inverting input is positive, the output will be HIGH.
With a single supply, you need a comparator with a common mode input range that includes ground.
So, not the LM393? Can you suggest a device? thx
 

dl324

Joined Mar 30, 2015
16,909
Here's the offset voltage spec:
1583601594296.png
1583601620788.png

A conservative design would use the worst case spec, plus or minus 9mV.

You could add circuitry to adjust the offset closer to 0V, but you might need a negative supply and a DVM accurate enough to measure it.
 

Thread Starter

johnyradio

Joined Oct 26, 2012
434
Last edited:

dl324

Joined Mar 30, 2015
16,909
So, about 20 mV?
It depends. If the input offset voltage was 9V and you wanted a difference of 20mV to cause the comparator to change states, it might change with only 11mV.
Can you share the circuitry to adjust hysteresis? Or is that what you mean?
Offset voltage and hysteresis are different things. Hysteresis introduces positive feedback to stop oscillations at the trip voltage.
Can't i just view the oscillation on a scope?
Don't know of any scopes that can measure uV or mV accurately.
 

Thread Starter

johnyradio

Joined Oct 26, 2012
434
it might change with only 11mV.
No matter for my usage. OTS behavior is fine. All i need is to tweak hysteresis to eliminate oscillation.
Don't know of any scopes that can measure uV or mV accurately.
not trying to measure, just to trim hysteresis R until oscillation stops. A scope can display oscillation, correct?

Can i find the circuit someplace?
thx
 
Top