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.
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 it's 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 me a better option for high side current sensing/limiting or some procedure for stabilizing the circuit?