Comparator IC with negative input voltage

Thread Starter

mos_6502

Joined Dec 11, 2017
28
The specification is written for the input voltage in relationship to Vcc-.
If you Vcc- is ground you should not have an input at -3.3 volts. It should not be more negative than -.3 volts.
If your Vcc- is -3.3 volts you would be fine. This is why people are asking what the negative supply voltage is.
/
Maybe I was not clear, I apologize, but maybe there is a problem with my English.

I thought it was clear that the supply voltage is dual (+ 3.3V and -3.3v) then, my Vss is -3.3V
 

Bordodynov

Joined May 20, 2015
2,469
If you power the comparator from 3.3 V and supply 0 V minus the power supply, you will have logical output levels. If you supply the comparator with bipolar power (+3.3V and -3.3V), the value of "zero, low level" may be negative. This is not a problem for the one used in my example, as the output of the comparator emitter can be connected to the common wire. But with other (not so flexible in use) comparators it may not be so and a negative "zero" may be a problem (you can't control the microcontroller for example)
 

Thread Starter

mos_6502

Joined Dec 11, 2017
28
If you power the comparator from 3.3 V and supply 0 V minus the power supply, you will have logical output levels. If you supply the comparator with bipolar power (+3.3V and -3.3V), the value of "zero, low level" may be negative. This is not a problem for the one used in my example, as the output of the comparator emitter can be connected to the common wire. But with other (not so flexible in use) comparators it may not be so and a negative "zero" may be a problem (you can't control the microcontroller for example)
This is precisely my problem: to prevent the comparator output from being less than zero, because the output must go to an FPGA that does not accept values lower than 0Volt
 

WBahn

Joined Mar 31, 2012
25,104
This is precisely my problem: to prevent the comparator output from being less than zero, because the output must go to an FPGA that does not accept values lower than 0Volt
Gee, seems like this issue was mentioned much earlier in the thread -- like in Post #6:

Though it would also mean that the output would be down around -3.3 V. If you need the output to be around 0 V, then you need to do something to shift or clip it.
There are several simple ways to do this. A simple resistor and clamping diode will prevent the input to the FPGA from going more than a diode drop below it's negative supply. Use a Schottky diode for best results. This approach may not be suitable if you are working with high speed signals. How fast is your system running?
 

Thread Starter

mos_6502

Joined Dec 11, 2017
28
Thanks for the reply.
I'm using a cyclone IV but I don't think the signals will ever have a frequency greater than 5 - 10 MHz.
Could you recommend a suitable diode, please?

In addition to the diode, in the meantime I also thought of using a transistor.I think this solution can be faster and safer, what do you think?(I attach diagram to understand what I mean)
 

Attachments

ronv

Joined Nov 12, 2008
3,770
Thanks for the reply.
I'm using a cyclone IV but I don't think the signals will ever have a frequency greater than 5 - 10 MHz.
Could you recommend a suitable diode, please?

In addition to the diode, in the meantime I also thought of using a transistor.I think this solution can be faster and safer, what do you think?(I attach diagram to understand what I mean)
A diode like a BAT 54 or BAT 41 would work. Maybe a resistor of 33K or so.
 

Analog Ground

Joined Apr 24, 2019
277
What you need is a comparator with "rail-to-rail" inputs using +/-3.3V power supplies. The key is to search for "rail-to-rail" inputs. For example, Analog Devices has the LT1711 and related parts. These are high speed. Anyway, these types of parts exist. Search analog.com and ti.com. Good luck getting the package you want.
 

Analog Ground

Joined Apr 24, 2019
277
The proper comparator should put out a 3.3V logic level suitable directly for an FPGA with 3.3V I/O. Even though the comparator is operating at +/-3V, the output will be a positive logic level referenced to ground.
 

riscy00

Joined Jun 23, 2010
6
You can invert the negative voltage with a simple inverter or push the negative signal into the positive region using stable 3V3 or reference and two resistors, it would reduce the signal range in this process but workable as long comparator offset is small.
 

to3metalcan

Joined Jul 20, 2014
261
Okay, let me make sure I understand...the OP wants a comparator that is powered by +/-3V3, but outputs a voltage that is referenced to 0V rather than -3V3, yes? Isn't that what the LM311 and similar comparators are for? You connect the emitter pin to 0V instead of V--, give it a pull-up resistor, and you should be good to go, unless I'm missing something.
 

Bordodynov

Joined May 20, 2015
2,469
I've shown you a way to shift the input signals to minus. But the comparator used in my example is not very suitable (whatever the simulation shows). You need a comparator that allows for a full range of input signals (from 0V to VCC). And you can use a n-channel transistor with a pullup resistor to get a zero level. However, the inputs must be reversed (due to additional inverting).
 

to3metalcan

Joined Jul 20, 2014
261
I've shown you a way to shift the input signals to minus. But the comparator used in my example is not very suitable (whatever the simulation shows). You need a comparator that allows for a full range of input signals (from 0V to VCC). And you can use a n-channel transistor with a pullup resistor to get a zero level. However, the inputs must be reversed (due to additional inverting).
Can't you already do this with the LM311 style of comparators? They give you access to both the collector and emitter of the output device. The power pins and the inputs can run from +3V3 to -3V3 and you can reference the output to 0V at the emitter and [whatever] via the collector pull-up resistor. They allow all the way from the negative rail to the positive rail as input range. Is there some reason why that type of device won't work, here?
 

Bordodynov

Joined May 20, 2015
2,469
In the previous post, I described what a comparator should be like. The reason is in the circuit diagram. The input stage should be on different types of transistors, or there should be a voltage boosting stabilizer inside the circuit. This is not the case with the comparator you are proposing. And the fact that in my example the comparator "as if works" is not my fault. It's just a bad choice of comparator.
 

TeeKay6

Joined Apr 20, 2019
565
Can't you already do this with the LM311 style of comparators? They give you access to both the collector and emitter of the output device. The power pins and the inputs can run from +3V3 to -3V3 and you can reference the output to 0V at the emitter and [whatever] via the collector pull-up resistor. They allow all the way from the negative rail to the positive rail as input range. Is there some reason why that type of device won't work, here?
@to3metalcan:
Your interpretation of LM311 operation is correct. However, there is a problem: the inputs of the LM311 are not rail-to-rail. Therefore the LM311 cannot accept the +3.3V and -3.3V signals provided via the rotary switch.

@mos_6502:
Perhaps you can explain why you use such complicated circuitry to provide nothing more than fixed voltages of +3.3V and 0V to your FPGA? I am puzzled as to what you are really trying to accomplish--surely more than that? Your MOSFET solution can (as can others suggested) work provided your comparator output can swing close enough to the +3.3V power supply to allow the MOSFETs to turn off and your comparator allows rail-to-rail input voltages...but simply connecting voltages directly from a switch(s) to the FPGA inputs can work too.
 

to3metalcan

Joined Jul 20, 2014
261
@to3metalcan:
Your interpretation of LM311 operation is correct. However, there is a problem: the inputs of the LM311 are not rail-to-rail. Therefore the LM311 cannot accept the +3.3V and -3.3V signals provided via the rotary switch.

@mos_6502:
Perhaps you can explain why you use such complicated circuitry to provide nothing more than fixed voltages of +3.3V and 0V to your FPGA? I am puzzled as to what you are really trying to accomplish--surely more than that? Your MOSFET solution can (as can others suggested) work provided your comparator output can swing close enough to the +3.3V power supply to allow the MOSFETs to turn off and your comparator allows rail-to-rail input voltages...but simply connecting voltages directly from a switch(s) to the FPGA inputs can work too.
The datasheet I have says the inputs can go from "ground" (the negative power rail) to Vcc or +15V (whichever is less.) Seems like it'd be well in the clear, but even if it wasn't, a simple resistor divider should take care of that. The OP mentioned signals in the MHz range, so I'm guessing he is converting digital output from one device to the level accepted by another, not simply providing fixed voltages via a switch, though his test schematic shows that.
 

TeeKay6

Joined Apr 20, 2019
565
The datasheet I have says the inputs can go from "ground" (the negative power rail) to Vcc or +15V (whichever is less.) Seems like it'd be well in the clear, but even if it wasn't, a simple resistor divider should take care of that. The OP mentioned signals in the MHz range, so I'm guessing he is converting digital output from one device to the level accepted by another, not simply providing fixed voltages via a switch, though his test schematic shows that.
The datasheet I have says the inputs can go from "ground" (the negative power rail) to Vcc or +15V (whichever is less.) Seems like it'd be well in the clear, but even if it wasn't, a simple resistor divider should take care of that. The OP mentioned signals in the MHz range, so I'm guessing he is converting digital output from one device to the level accepted by another, not simply providing fixed voltages via a switch, though his test schematic shows that.
@to3metalcan:
Looking at the T.I. datasheet (2017 revision) I find that the input common mode range--when using recommended +/-15V power--extends from about +13 to about -14.7. That is, close but not at Vcc-. Elsewhere in the datasheet, Table1 on pg12, the "input range" is "casually" given as -15 to +13V...but immediately following on pg13, in section 9.2.2.1 "Input Voltage Range" it is made clear that operation outside the common mode range is indeterminate. Detailed operation limits using low voltage power supplies is unfortunately not given. Since the TS schematic shows an input driven directly from Vcc+ and Vcc-, I conclude that it is not a safe design. Since the schematic given shows only fixed input voltages (Vcc+, Vcc-, Vref_p, Vref_n)--with no discussion as to whether any input voltage varies and over what range, I concluded that I did not know whether the circuit (schematic) could accomplish whatever the TS wanted to accomplish. Certainly, there are many other circuit modifications that can possibly (cannot say for certain with only the given schematic) resolve all problems, but I was addressing only the schematic and info given by the TS.
 

to3metalcan

Joined Jul 20, 2014
261
You're right, that is in the recommended operating conditions (as per the attached screenshot.) I learned something! :) However, in max allowable operating conditions, they do say it can deal with rail-level inputs. The fact that it's not "recommended" I suspect just means it slows the device down slightly (probably saturates something that isn't meant to be) because I can tell you from experience I've been running them on 5V rails and slapping the inputs with 5V levels for quite awhile, with no discernible trouble! Then again, I'm not usually running them at extremely high speed. However, there are other similarly-designed comparators that use CMOS tech that ought to be able to handle low-voltage rail-to-rail input and allow a ground-referenced output. The LT1011 is one. I don't know if it's available in the TSOP package the OP designated, though. Hmmm...
 

Attachments

TeeKay6

Joined Apr 20, 2019
565
You're right, that is in the recommended operating conditions (as per the attached screenshot.) I learned something! :) However, in max allowable operating conditions, they do say it can deal with rail-level inputs. The fact that it's not "recommended" I suspect just means it slows the device down slightly (probably saturates something that isn't meant to be) because I can tell you from experience I've been running them on 5V rails and slapping the inputs with 5V levels for quite awhile, with no discernible trouble! Then again, I'm not usually running them at extremely high speed. However, there are other similarly-designed comparators that use CMOS tech that ought to be able to handle low-voltage rail-to-rail input and allow a ground-referenced output. The LT1011 is one. I don't know if it's available in the TSOP package the OP designated, though. Hmmm...
@to3metalcan
"Max op" or "Abs Max op" conditions are those that will not damage the device. Operation "to spec" is not guaranteed at max conditions. Always operate within the "recommended operating range" conditions! Since operation outside the input common mode range is not well documented (either in the device or the datasheet), it is certainly possible that some devices may operate, or seem to operate (i.e. the output state is what you expect but not knowing what happens within the IC to create that output), outside the common mode range. Nevertheless, such operation is not guaranteed and not recommended. You might find that devices from a different manufacturer, or even a different date code from the same manufacturer, operate slightly differently outside the common mode range. Any design that operates outside the recommended operating conditions range is suspect unless the datasheet specifically permits (and explains) some exception.

In this case, if we knew (in detail) what the TS was trying to accomplish, we could offer solutions.

I hope to learn something new every day. Unfortunately what I often learn is that I was wrong yesterday. :)
 
Top