I'm planning a device that can run off of AC mains or a battery. The AC will feed a power supply outputting 12VDC at up to 5A. The battery will supply 12VDC - 16.8VDC. I'd like a circuit that will cause the power supply to power the device when the AC is plugged in, and the battery otherwise. A DPDT relay solves the problem nicely (with the coil driven by the power supply), except that an appropriate relay and socket are nearly $30 (qty. 1). Plus, I'm generally inclined toward solid state solutions for size and cost. I initially thought I could use a couple of MOSFETs, but I'm not coming up with anything. Suggestions? Thanks for any tips.