Electronic – Comparator as a current detector

comparatorcurrentdetectoroperational-amplifier

I'm looking for a simple circuit that uses only a comparator (or an opamp) to detect the presence of a small current through a high-side current resistor. The idea is for a microcontroller input to go high when the current through the resistor exceeds a predefined value (of let's say 200mA).

This is to detect when a phone is actually pulling power from a +5V source. The circuit below illustrates my intent, by I feel that it is missing something, mainly that the comparator may not reset when the voltage across the sense resistor reaches zero. I'm not aiming for precision, but rather a rough "there is current" and "there is no current" type of circuit.

Draft Comparator current detector

Best Answer

TC75S58' spec
- common mode input voltage range : VSS to VDD− 0.9 V .

So this IC as a high side current detector will not work.
But you might use it on the low side. (Or find a high side Comparator.)

Choose shunt R to read 50mV at full scale. ( most common)

schematic

simulate this circuit – Schematic created using CircuitLab

You must be careful on matched R tolerances, input offset since the current sense is very low mV

THis puts the high side in the acceptable CM range. enter image description here

There are many advantages to low side sensing .