I'm playing around with opamps trying to build power supply for lead acid battery charger, but in general I want to learn a bit about opamp based design. I'm stuck with constant current mode.
I'm trying out various current sense amplifiers to sense current on the high side. I'm not using OA2 and M3 per se - they are packaged into current sense amplifier IC such as LTC6101, LTC6102, MAX9938. I've tried differently designed voltage output current sense amplifiers like AD8218 too.
So, OA2 and M3 are here to designate current sense amplifier IC that outputs voltage proportional to voltage drop on R1.
I've tried LM358, LM8272, LM8262 as OA1.
My problem is that whatever I do, it either oscillates or does not limit current from some point.
I've tried slowing down OA1 by adding a capacitor on negative feedback path or a low pass filter after current sense amp output, but then, either oscillations become worse, or, when I increase the load, OA1 stops decreasing its output at some point, voltage at output of M1 becomes fixed and I have no regulation.
The best I could achieve was by using high speed opamp such as LM8262 as OA1 and small (1nF) cap across the current sense amp output. On the maximum load, the system was oscillating a bit, but average current was somewhat right.
When I've tried doing low side current sensing using the same type of opamp for current sensing and for regulation, it just worked.
My suspicion is that mentioned current sense amplifiers are not designed to work in linear regulation, but rather as current feedback for some ADC to read (at least, all of them have such application as typical in their datasheets). What I suspect is that phase shift from them is too big. Am I right?
Can anyone recommend a better option for high side current sensing/limiting or some procedure for stabilizing the circuit?