I'm trying to design a circuit to switch a voltage source between 12V and 24V for a load that draws 400mA. Initially I thought I could use a SPDT analog switch but the ones that can tolerate >24V have too high a Rds(on) (>20ohm) and therefore would drop too much voltage.
Instead I believe I need to implement this using transistors so I was thinking of a setup similar to this except using an NMOS instead of the BJT and where the on/off switch is controlled from an MCU (image sourced from https://forum.allaboutcircuits.com/threads/switching-between-two-voltage-sources.75408/):
Is there a neater solution to do this where one "enable" signal can disconnect the 12V and connect the 24V? The default configuration should be a 12V output. Any help would be greatly appreciated and schematic diagrams would also be useful.