I have a unit that needs to run on two different power sources...
1) An external 12V DC supply or
2) An external AC supply which can be anywhere in the range 8-18V rms, this is FW rectified and turned into DC in the range 9-24V DC.
These appear on separate hard-wired connections.
If the DC supply is present then it should be used, otherwise use the AC supply. Total current no more than 500mA.
If the rectified and smoothed AC was always less than the DC supply it would be easy - two diodes (actually 1 because of the bridge). The 12V DC would 'win' if present.
The simplest would be a SPDT relay with its coil fed from the 12V DC, but that feels a bit 'old school'.
I've tried various high-side P-channel MOSFET schemes but they all fall apart because the rectified AC can be both higher and lower than the 12V DC.
Anyone have any clever ideas? I'd like something nice and simple.