The problem I see with your circuit is that you are charging your battery with a 15V rectangular wave with no peak current limiting other than the internal resistance of the 15V supply and the battery (and the 1.5milliohm shunt). Therefore you will get very high peak currents, which will probably damage the battery, and perhaps other components too. You need to change the circuit so that the battery is charged in such a way that the peak current limited to a suitable value. There are two ways to do this:
OK, I guess this could be the difference in using this with a charger as opposed to a solar panel (it's eventual use). A Solar panel is naturally current limited.
The battery is a 115Ah battery (and will likely be a 2-3x bigger bank eventually). So I was thinking that its internal resistance should limit the current. I didn't think it would mind the square wave and its internal capacitance and resistance would smooth that out, but maybe I do need to do something manually myself.
1. Run the mosfet in the linear mode, by feeding it from an analog output pin followed by an RC network to smooth the PWM. Ramp the PWM up slowly, monitoring the current, until you reach the desired maximum charging current. The mosfet will dissipate a lot of power, so it will need a good heatsink, and the circuit will not be very efficient.
2. Smooth the PWM output using an inductor and flyback diode. You will need to increase the PWM frequency to a much higher value in order to use a low enough value of inductor for this to be feasible. The advantage of this approach is that it doesn't waste a lot of power. However, because of the higher switching frequency, you may need to use a mosfet driver in order to keep the mosfet switching losses low, otherwise you will need a heatsink again.
I just found this example which shows high side switching with a capacitor, inductor and diode:http://archive.siliconchip.com.au/cms/A_112335/article.html
Would that circuit still work if you were low-side switching? Would you keep the capacitor and inductor on the high side?
If you were to change the circuit to use high side switching (which will be easier of you use a mosfet driver chip), then you could monitor the battery voltage as well, which will help you tell when charging is complete.
I was hoping to not require a MOSFET driver. Looks like there is no real reason to do high-side switching unless I can't switch on the ground (e.g. the solar panel/charger and battery are common grounded via another path, e.g. vehicle chassis).
The INA219 is already doing voltage monitoring. That is how I'm adjusting the PWM signal. As I said, it is currently working and seems to be OK, I just want to make sure it is a bit more robust and I try and work out how I managed to kill the INA219 last time and don't do it again!
Here is a basic sketch and idea of how it is working... this is using a voltage divider to read the voltage in lieu of the INA219 until the replacement one turns up... but the MOSFET side is the same:http://opensourcebatterymonitor.blogspot.co.uk/2013/02/simple-but-it-works.html