Over 0V Comparator With Unipolar Power Supply?

Thread Starter

johnyradio

Joined Oct 26, 2012
434
Great! So i can just connect Vref to ground to get over 0 detection, correct?
Is this inverting? Can i simply switch the inputs for non-inverting?
Can you help me understand the role of each R?
RL just means impedence of whatever i'm connecting to externally, and not necessarily an explicit R in this circuit, correct?
thx!
 

Thread Starter

johnyradio

Joined Oct 26, 2012
434
Thx! So i trim R2 to adjust the amount of oscillation?

i'm guessing Vth1 is amount of hysteresis on the upswing, and Vth2 is amount of hysteresis on the downswing, correct?
 

Alec_t

Joined Sep 17, 2013
14,280
So i can just connect Vref to ground to get over 0 detection, correct?
Not necessarily. It depends whether the input offset happens to be positive or negative. In one case the trip point would be slightly above ground, whereas in the other case the trip point would be slightly below ground.
 

Thread Starter

johnyradio

Joined Oct 26, 2012
434
The chip. If you want the manufacturer to screen parts, you're getting into the military grade price testing. That $0.25 comparator is going to cost more than 10 times more.
The specs indicate the offset tolerances, as discussed.
If we assume 20 mV, then i just need to ensure my trip point is more than 20 mV above ground, and then i can switch the inputs. Correct?
 

dl324

Joined Mar 30, 2015
16,846
If we assume 20 mV, then i just need to ensure my trip point is more than 20 mV above ground, and then i can switch the inputs. Correct?
Not quite. The spec said +/- 9mV. You could get one where the offset is in the direction that makes your 20mV above ground need to be 29mV.

If you require very tight observation of parameters, you should consult the datasheet for the specific manufacturer. Not all "direct replacements" would have exactly the same specifications. We normally design circuits to be tolerant of variations. When we need tighter control, we either pay the manufacturer to do extra testing or we do 100% testing ourselves (or cherry pick parts).
 

Thread Starter

johnyradio

Joined Oct 26, 2012
434
Not quite. The spec said +/- 9mV. You could get one where the offset is in the direction that makes your 20mV above ground need to be 29mV.
Thx for that!

If you require very tight observation of parameters, you should consult the datasheet for the specific manufacturer. When we need tighter control, we either pay the manufacturer to do extra testing or we do 100% testing ourselves (or cherry pick parts).
As mentioned, OTS tolerances are acceptable for my application. I just need to compensate by my choice of R's, correct?

Now that we have a passable solution using the LM393, i must say i'm surprised there isn't a simple way to get tighter over-0V tolerances. Only because 0V seems different than other V's, because, well, it's 0. And because in this case it's the supply limit. So it seems a special case. But i understand that in the analog world, 0 doesn't always equal 0 :)
Is there a common part other than a comparator which can detect over-0V?
thx
 

dl324

Joined Mar 30, 2015
16,846
Is there a common part other than a comparator which can detect over-0V?
Not likely. You're using a jelly bean part; nothing special and good for general purpose applications. If you have more demanding applications, you start looking for parts with parameters for which you have specific requiements.

LM395 LM393 are perfectly good zero detectors. You may be having unreasonable expectations or are asking for something you don't need. For zero crossing, we usually don't specify zero crossing to mean within 10's of mV (1uV is unrealistic for most circuits). In general, zero crossing circuits are trying to minimize surge currents, but they don't expect them to be exactly zero. It's all about expectations. Some are important/reasonable, some aren't. The key is to spec for things that matter.

EDIT: corrected typo.
 
Last edited:

Thread Starter

johnyradio

Joined Oct 26, 2012
434
This works. Great! Switches at 10mV.
The output isn't inverting, but it is offset by -5V. That is, LOW = -5V, HIGH = 0V, which isn't desired.
How to make the outputs 0 and 5V?
1583630612596.png

Update: Someone on Stack noticed the sim part has no power pins, and is thus assumed to have -5V and +5V power. That may explain why output is offset by -5V.
 
Last edited:

Thread Starter

johnyradio

Joined Oct 26, 2012
434
(I can move this question to a new post, if that better.)

This is the same circuit, but with an oscillator sweep on the input. It's not triggering the comparator, even though it goes to 0V, same as the previous circuit.

Why won't this trigger?

http://tinyurl.com/qrvgdrz
1583644514627.png
 
Last edited:

Alec_t

Joined Sep 17, 2013
14,280
Give the triangle generator a DC offset of less than 2.5V, so that its output goes below 0V. Perhaps the generator sim model allows for non-ideal behaviour.
:confused: That simulator is weird. The comparator output voltage is always negative, yet the feedback voltage to its V+ input is always positive!
 

Thread Starter

johnyradio

Joined Oct 26, 2012
434
Give the triangle generator a DC offset of less than 2.5V, so that its output goes below 0V.
Thx. I have done, and got switching. But my real application won't go negative.
Also it switches correctly with a simple DC source going no lower than 0V, so why not a sweep?
If this is just a quirk of the sim, then no matter.

That simulator is weird. The comparator output voltage is always negative, yet the feedback voltage to its V+ input is always positive!
I'm guessing that's because it's supply V is implicitly bipolar.
 
Last edited:
Top