Here's my problem:
I have a power supply rated at 5V, 2.1A
I need this to feed two devices, both running at 5V
- Device one is a single-board computer that can consume anything between 0.5A and 1.5A depending on what it's doing.
- Device two is a battery charger, which is happy to take anything it can get up to (and quite possibly beyond) 2A, and equally happy to take no power at all.
I need a way to feed device one with as much current as it is demanding right now, and give whatever is left to device two. In order to stay within the PSU limits, I'm going to be limiting the input current to 2A. I'm a beginner, and from my limited understanding (so please correct me if I'm wrong) the chances are that device one could end up current-starved otherwise.
I'm not happy with simply making two fixed current-limited paths (1.5A to A, 0.5A to B) - I really do want any excess current delivered to device B, if there is any available for it.
The only thing I can think of is to dynamically monitor the amount of current currently going to devices A and B, and to throttle down device B by opening and closing current-limited gates with transistors (or using a variable current-limiting circuit controlled by a digital pot) with a microcontroller until the sum of the two is less than (2A minus a safety buffer), along with some caps in there to keep things running during switching. However, that sounds a bit complex for something that I have a gut feeling ought to be much simpler, and possibly involves using some kind of specialized IC that I don't know the name of in order to search for it.
This is a problem I feel I'm going to run into with other things as well - not just charging a battery, so I'd like to know if there's any way (simpler than the complex microcontroller solution I imagined earlier) to manage the current distribution in a circuit when the supply doesn't meet the demand - some way to simply say "current goes here first, and what is left over goes there"