I'm not sure, but I think there are some battery chargers with control in it which can be programmed to do what you want. There should also be other units that can monitor the voltages and gives alarm or shuts down the system at given point.
Greetings
Delly