Preferential load sharing of a 5VDC power supply with varying current capability - Page 1
Forum section: electronics / projects

author: sidener
author_rank: Contributor
timestamp: January 26, 2016, 07:12:17 pm
content: Hi, I am hoping someone can point me in the right direction, I am trying to solve a problem that I haven't yet found an elegant solution after doing quite a bit of searching. Here is what I have:A 5VDC power source capable of anywhere from 20mA-500mA. At any point in time, the current capability will be somewhere in that range and it is "unknown" without measurement what the current capability will be at any given time (t).I want to hook two loads to this power supply with one load having priority. If there isn't enough current for both loads, I want all of the current to go to the priority load. If there is any surplus capability, I want to route the surplus current to the second load. For instance, if the power supply currently is able to generate 200mA and load A draws 20mA, I want to send 180mA to load B simultaneously. But, if in the mean time, the current capability of the supply drops off to 20mA then it should direct all of the current to load A.I want to share the current between both loads, not switch it like "power path management" ic's do.Here is the other unknown, Load A is an unknown load, I don't know ahead of time how much current it will draw, and that current is likely to change with time (Li battery charger).I suspect this is a complicated problem to solve without a priori knowing the source and load currents, but I hope someone may have some ideas.Thanks!Scott Sidener

author: Jeroen3
author_rank: Super Contributor
timestamp: January 26, 2016, 07:40:40 pm
content: I've used anLTC4411to switch between Solar energy and Battery power where solar gets the priority. Solar energy was already regulated using an mpp regulator. It did work fine, though it oscillated a bit sometimes. Due to the obvious reason that the solar would build up charge in the capacitors, when the voltage exceeded the limits it would switch over, but the voltage droop would be to much to sustain, thus switching back to battery. There was not real sharing since the load did not require both supplies together, one could always power it.I would buildd real DC load sharing using two regulators.(never done it before for DC)Since you want to share load, only diodes won't work. All the load would then just go to the highest voltage. You'll need to droop some voltage.You'd need to have the sum of the current of the load, and divide this to supply A and supply B and subtract voltage (use the tracking pin) as much as required to get a 50/50 (or other) ratio.If one supply is not power-good (also a pin), you can forcibly adjust the ratio to be 0/100 or 100/0. Could be some fancy analogs, or maybe an micro, how fast does it need to be?

author: station240
author_rank: Unknown
timestamp: January 26, 2016, 07:45:44 pm
content: Let me guess, the 5VDC supply comes from a solar panel, and you want to direct any spare power to batteries ?In theory making load B have a higher resistance should work.You do have a way to detect if you are drawing too much current from the supply, the voltage will drop.So some form of pwm switching could be used.

author: sidener
author_rank: Contributor
timestamp: January 26, 2016, 08:12:09 pm
content: Hi guys, thanks for the quick responses. The LTC4411 is almost the opposite type of problem. Here I would have two loads and one supply instead of two supplies and one load. Yes, this would be very similar to having a supercapacitor charged by solar and then regulating 5VDC from it to supply a load and siphon off the extra load carrying capability to a storage battery. That would be close, although I am not actually using solar.I have thought about what control logic would be needed. I could monitor the voltage and detect when it drops a certain percentage to indicate overload condition. Hadn't thought about how to modulate two regulators. I am using DC/DC buck boost to get the 5VDC, and the current capability depends on how much energy is in the supercapacitor at any given time.The primary load will be a USB port that is likely to get a small Li battery plugged into it. As that battery charges, the current drops, so I want to store the "extra" current in another battery which is my load B lower priority.In a perfect world I would want to turn around and use that load B battery (reserve) to fill in needed current for load A. Say load A needs 100mA but my supply can only deliver 20mA, then I would want to make up the extra 80mA from the battery that WAS load B automatically. But I realize I may be getting into circular logic at this point without disconnection and re-routing logic.All of this needs to be as efficient as possible as wellNot asking for much.

author: sidener
author_rank: Contributor
timestamp: January 26, 2016, 08:20:14 pm
content: As an analogy, I basically want the equivalent of a water well and pressure tank system. The well pumps at whatever rate it can, the pressure tank stores the excess water, and the user turns on the spigot to whatever flow they want.

author: Ian.M
author_rank: Super Contributor
timestamp: January 26, 2016, 08:32:46 pm
content: That's far from easy. You need to detect the max current available right now, the load A current and if there is an excess, control battery B charging circuit to use the excess.Its probably preferable to redesign the buck/boost to float charge a 2S 7.4V LiPO battery, then run a buck converter off that for 5V for the USB power port. It will also need some protection and control circuits e.g. to prevent overcharging of the 7.4V battery, and to shut down the 5V regulator if nothing is plugged in the charging port (or if the user wants the port switched off) and to protect the 7.4V battery from over-discharge.

author: sidener
author_rank: Contributor
timestamp: January 26, 2016, 08:49:37 pm
content: Thanks! Yes, I have thought the same, that I need to detect the max current that is available and the current going to load A. I can use a current shunt monitor for the latter, but determining the max current that is available is eluding me at the moment. Maybe it is possible to mathematically calculate that number based on the instantaneous voltage across the input supercapacitor and the cap specs and DC/DC efficiency curves and some other losses in the form of a fudge factor.I am trying to be very miserly with the power, so I don't want to loose energy charging up and pulling back out of a battery if I don't have to. So, in theory, the current that can bypass the reserve battery completely and go to load A doesn't have the losses associated with charging the battery and then also boosting back to 5VDC. Only the "extra" energy incurs the loss of having to be stored and recovered from a battery.Maybe I am chasing ghosts there with the efficiency, but the source power in this application is very precious.

author: Ian.M
author_rank: Super Contributor
timestamp: January 26, 2016, 08:59:51 pm
content: The 'bypass' power to load A doesn't have any losses from charging the B battery. It doeshave the losses from an extra DC-DC converter stage, but that is only an issue when there isn't quite enough power available to charge the B battery but there is enough to maintain the A output, as you save the losses of an extra converter stage to charge the B battery in your preferred arrangement + it would have to be conservative in diverting power to the B battery so would be wasting available power anyway if it didn't want the 5V oytput to drop below nominal.Incidentally, my suggestion almost exactly corresponds to your water well, pump, pressure tank and spigot analogy.

author: sidener
author_rank: Contributor
timestamp: January 26, 2016, 09:18:26 pm
content: Ok, I think I am following you better now. The front end buck/boost charges battery B as well as supplies current to the back end buck regulator. That's the bypass part. The back end buck regulator also is connected to battery B and will draw from it as needed.The bypass current to load A still has to go through the buck/boost then the buck.What is your thinking behind going up to a 2-cell 7.4V battery instead of a single cell design? I am assuming the design will have a 2-cell (or 1-cell) charger circuit between the front end buck/boost and the battery.Scott.

author: Ian.M
author_rank: Super Contributor
timestamp: January 26, 2016, 09:39:45 pm
content: The advantage of a two cell B battery is far lower (I^2)R losses in the final converter. and possibly in the boost-buck as well if the input voltage is generally above about 5.5V.There would be no charger circuit as such, the buck-boost simply being set to provide 8.0 to 8.2V to float the 2S LiPO, with a suitable current limit. although an overvoltage detector which would shutdown the buck-boost (and possibly crowbar a fuse to isolate the battery) if the voltage exceeds 8.5V, and an over-temperature detector would be advisable.

author: sidener
author_rank: Contributor
timestamp: January 26, 2016, 10:09:38 pm
content: Ok, that does make sense. I guess the only concern I would have is trickle charging the Lipo's indefinitely at the constant voltage. Or maybe that's not a big deal, it seems like there are always tons of warnings out there about charging Li batteries without the proper current/voltage and cutoff curve. I agree with the low voltage and high current protection.I would prefer to use 18650 type Li-ion batteries over LiPo if possible.Scott

author: Ian.M
author_rank: Super Contributor
timestamp: January 26, 2016, 10:24:17 pm
content: Shouldn't be a problem. You can float a 18650 cell at 4.0V-4.05V indefinitely, subject to usual loss of capacity with long term storage when fully charged.

author: sidener
author_rank: Contributor
timestamp: January 26, 2016, 10:53:17 pm
content: Excellent! Thanks for your help. I will do some experimentation along these lines.