This seems like a very basic problem but I cannot really find a solution or come up with one on my own. The setup is simple (also picture for clarity):
- A circuit that takes 5V input
- Put a UPS with battery before, so it can run uninterrupted (based on this design)
- The UPS input is 5V, either from the device's USB plug or an external power source (handled by a buck converter)
- Any device on USB gets also powered when using the external power source
Problem: How can I supply 5V from the UPS when on battery power without feeding back into the input of the UPS? I thought of simple diodes, but since we have 5V everywhere, that doesn't work, or not? Is there some circuit that can control the flow based on applied potentials?
This is more a bonus for the circuit, if I cannot deliver 5V during battery operation, it's okay as well.
