# How can I separate 2 power sources so only one can flow at a time?

I am building a battery charger circuit that can recieve power from 2 sources. However I need to avoid both sources from supplying power at the same to prevent any electronics from being damaged. So I need to find a way for only one source to run while both power supplies are connect.

For example: If power supply 1 is flowing, power supply 2 can not or vice versa

The first power suppply is 1A 5V and the second is 2.1A 5V vice versa.

How can I solve this in the smallest way possible as the size is very important?

• Use a relay to switch between them. – Solar Mike Dec 31 '18 at 10:31
• It need to be much smaller. Smaller the better. – Olly Dec 31 '18 at 10:35
• @Olly You can buy very small relays. A relay will probably be smaller that building custom electronics. You need to update your question to say how small you need your solution to be. – HandyHowie Dec 31 '18 at 10:51
• Find the smallest ssr (solid state relay) that will handle 2.5A... – Solar Mike Dec 31 '18 at 10:51
• This is missing some context for me. "However I need to avoid both sources from supplying power at the same to prevent any electronics from being damaged." What? Why and how might they be damaged? Will the sources have the same voltage if they are on simultaneously? Can you diode-OR them? then you might have current flowing from both sources if voltages are similar, but it shouldn't cause any problems. What exactly is going on here? – dmb Dec 31 '18 at 11:47

As stated in the comments, only one relay with normally-closed terminals will do the job.

simulate this circuit – Schematic created using CircuitLab

Relay is a simple relay with 5V coil voltage. SRC1 or SRC2 can be either 5V/2.1A or 5V/1A sources (i.e. whichever you want).

The NC (normally-closed) terminal is connected to SRC2, and the NO (normally-open) terminal is connected to SRC1.

If SRC1 is not available, SRC2 will be applied to the load through NC terminal of the relay.

If SRC1 is available, the relay coil will be energized and thus the load will be supplied through "only" SRC1 even if SRC2 is available too.

Use two diodes. The supply with the higher voltage will cause the other's diode to be reverse biased and not allow current flow.

simulate this circuit – Schematic created using CircuitLab