I'm trying to build a li ion low charge current detector and cutoff circuit as a complement to my battery charging setup. Charging should be disconnected when the current reaches 400mA or below. I've started with the simplest circuit I could muster, and true to form - it doesn't work as expected.
Apologies, I realize I didn't draw in the INA180 and LM393 supply configuration. Both devices are powered by the 5V rail and decoupled by 100nF.
The circuit is pretty straightforward: high-side current sensing using the INA180 drives a comparator with a reference voltage of ~0.8V. When the comparator goes high, it switches on the SCR, which drives an LED in the schematic above, but will eventually drive a relay that cuts the 17V rail.
The SCR will latch so that the 17V rail is kept open until the power to the circuit is removed (the laptop power supply is turned off).
At this stage, I'd prefer to have everything powered from the laptop supply and I am aware of the issue of sharing grounds on either side of the dc-dc converter. I believe if I try to connect the laptop ground and converter ground together (which would be convenient) I would interfere with the converters ability to regulate the current, but I haven't experienced any issues with the setup above and that's not my main problem.
The problem I'm having is that when the laptop supply is turned on, and even with > 400mA expected to flow across Rsense, the SCR is triggered on (i.e., the charging is switched off). I believe the issue is that the reference is established before the current is sensed across Rsense, which will always drive the SCR on. A solution might be to delay the SCR triggering action until the comparator voltages are properly established. Any ideas?