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?