Diode oring and charger
simulate this circuit &ndash; Schematic created using CircuitLab

Figure 1. Relay voltage source selector.

You might find this circuit less scary than MOSFET switches.


A relay with a 24 V coil monitors the 24 V supply.
When 24 V supply is present the relay is energised and 24 V is fed to the output.
When the 24 V supply fails the relay drops out D1 powers the load from the battery for a couple of hundred milliseconds while the relay switches over and connects the battery directly to the output. D1 needs to be able to handle the maximum current for this short duration.
There is no power loss across the contacts. There is some power consumed by the relay coil.


Select a relay with contacts rated for your maximum current and with a DC rating. (AC is easier to switch because the current falls to zero at each zero-cross whereas with DC it is usually continuous.) You have plenty of choice for 24 V relays as they are very widely used in industrial systems but also used in trucks and buses with 24 V electrical systems.