Optikon said:
RON, in your design, can U1A be used like an opamp as part of the battery current sink? I've never actually used a 393 like this before.. but I've heard rumors...
Saves a part if it can..
I can't remember if I have actually done this in hardware, but I've simulated it in several circuits. In this circuit, R1 and C2 form the dominant pole in the feedback loop, compensating it against oscillation. So long as the loop gain goes below 1 (0 dB) while the phase shift is less than 360 degrees (including the inversion), the loop will be stable. This means that the loop gain has to be below 1 before the other poles (RC time constants) inside the comparator become significant. Since we don't need high closed loop bandwidth or high slew rate, I figured the LM393 (with the MOSFET) would make a passable op amp if I added C2 to stabilize it.
To clarify:
Each RC lowpass node in the loop will contribute 90 degrees of phase shift in the limit. Looking at the schematic of the LM393, it has 3 gain stages including the output transistor. Each of these will contribute a pole at some frequency. We have to roll off the output stage at a low enough frequency so that the loop gain is less than one before the cumulative phase shift of the 3 gain stages is 360 degrees.