Electronic – What’s a simpler way to switch between power sources

batteriespower supplyswitches

I want to make a device that allows the user to switch between two different power sources (a wall mount and batteries).

I could perform this circuit using two DPDT switches, but I would need to switch the two switches each time I want to change sources. Is there a simpler way to perform this function without using relays?

Here's a schematic of my device as a reference:

Example for what's supposed to be done

Best Answer

The easiest solution (Initially suggested by @PeterJ) Would be to simply switch only the power connection:

schematic

simulate this circuit – Schematic created using CircuitLab


Alternatively, you can probably get away with just using some schottky diodes:

schematic

simulate this circuit

Wow, Circuitlab is a clumsy tool. It doesn't have entry/exit ports? Or Schottky Diodes? Really?

But if you're really loading your RPi or it's USB ports, the drop in the diodes could be large enough that you get brownouts, which would be a real pain in the ass to diagnose.

The best solution, I think, would be to put the diodes before the voltage regulator.
This would mean you would have to have a higher power supply voltage (>7V), but it would solve the problem with the diode Vf described above.