Rail-To-Rail Comparator Design

comparatoroperational-amplifier

I'm trying to detect small current pulses (~1.5mA). Currently I'm generating a ~20mV pulse on a sense resistor and feeding that to the input of an opAmp with some hysteresis. I'm having a bit of trouble where the output of the OpAmp will sometimes latch low and not return after the pulse passes and would like to try to use a comparator for the circuit. The problem I'm having with that is that my supply and my input are both at 6V.

Can someone recommend a good comparator that has full common mode input range with no more than 10mV of hysteresis? Or instead a better design overall?

I've found this part that seems to come close but the hysteresis might be too much.

*Based on some of the replies so far, I should mention I have a 3V3 rail available as well on the board if that helps.

enter image description here

EDIT: Redesigned circuit based on below suggestions- yet to evaluate

enter image description here
enter image description here

Best Answer

Try this circuit with a dual op-amp. It uses the suggestion by @horta to move the voltage away from the rails.

U1A produces a stable voltage at +3V. The input is capacitively coupled to that voltage. Since your pulses are -22.5mV, the threshold is set at 3V - 11.25 mV approximately (set by the ratio of R9 to R8 approximately) +/- 2mV of hysteresis (set by the ratio of R7 to R8||R9 ~= R8)

schematic

simulate this circuit – Schematic created using CircuitLab

If you want to continue to use a R-R op-amp, you could adjust the circuit values in your schematic to give similar hysteresis and threshold, as in my diagram. If the input offset voltage of the op-amp is less than 1mV, similar values for the voltages could be used. In that case,

330 (your schematic)-> 100 ohms

100K(your schematic)->68K

390K(your schematic)->150K

However, the failure of the circuit you have now to work properly indicates something else may be wrong- the bias current of the amplifier or the voltage offset is preventing the non-inverting input from rising high enough to reset the hysteresis. There also will be very little useful hysteresis for a 250usec pulse with that 47nF capacitor on there- the positive feedback will take a long time to build up (time constant 3.7msec).