A project log for today's assorted project ramble "grab-bag"

Assorted project-ideas/brainstorms/achievements, etc. Likely to contain thoughts that'd be better-organized into other project-pages

esot.ericesot.eric 08/24/2019 at 22:430 Comments

The not-so-easy part of using all these usb-batteries in series is charging. That's most of half a spiral notebook...

These aren't simply batteries, they're batteries with a built-in charge-controller on the input and boost converter on the output. [4 terminals!]

If you thought charging regular batteries in series was difficult or prone to over-charging one while undercharging another, I challenge you to consider what happens with two series charge-controllers when one battery completes its cycle before another. Where's all that series current gonna go? What's gonna keep it dropping 5V?

Then, to make matters more complex, I really woulda preferred being able run the load off the car-power/batt/alternator *while* charging. No prob, the USB-batts have a 'bypass' mode, putting the input 5V on the output while charging [except, they actually disabled that feature, probably due to current-handling ability either on the charging/output circuit, or in consideration someone might try to charge it and an attached phone at 4A from a 2A port, so you gotta take ground from the input-terminal for both input and output]. And... in series, that means needing separate 5V supplies, put in series, to charge and handle the loads of the now charging batteries in series. Whew!

But, more difficult is switching from charging to output... [e.g. if i bump the car-plug] the batteries are actually 3.75V, the output is 5V, that means a boost-converter at the output. It takes about a quarter-second to turn on. That means a quarter-second "blackout" when the car power is unplugged. At 5V 2A I calculated needing a 0.1Farad power-cap to prevent blackout. 

But then it gets even more complicated! The batteries switch to output-mode by detecting a current-draw... if a big ol' cap was put in parallel to the batt when it's off, the *cap* will handle the current-draw until it reaches 3.75V, or slightly lower, then some current will be drawn from the batt, telling it to switch on, then another quarter-second until it's outputting 5V. But, as far as I can tell, it's not 3.75V *direct* from the batt, but 3.75V through a high-value resistor. Then the cap voltage may well drop quite a bit lower than 3.75V by the time the 5V switches on. WHEW!

I've come up with countless possible solutions for charging, outputting while charging, and outputting without brownout when external power's disconnected, mostly relying on switching them from series-for-output to parallel-for-charging. [That's a lot of switches/relays/fets, and considerations regarding make-before-break, or vice-versa. And the extra time switching.] I've also pondered a few gnarly-hacks, like using two daisy-chained *non*-floating DC-converters [which allegedly don't like sinking current, but *might* actually be capable, since they have both high-side and low-side mosfets, a feedback path, and PWM-control].

Oh yeah, it gets even better! ... erm, what was it...? 


Then these floating-output converters came my way... So, dig this... I can "boot" the system from 8x5V batteries, 40V. Then, because the 40V->5V converters' outputs are isolated, and because the batts can charge and output [bypass] at the same time, the 5V from the floating-output converter can be used to charge one of the batts *and* maintain the 40V source it needs in order to create that 5V in the first place!

It's not free-energy, of course, the power going into charging that batt will be coming from the other batts [at 1/7th the charge, each]. But, now, again, because the system itself is floating [entirely battery-powered] I can *also* bypass two [maybe three] [and possibly also charge] batteries by powering *anywhere* in the battery-chain from the car.

So, now, 3/7ths of the charge-power is coming from my alternator, 4/7ths from 4 other batteries, which, after, can be fully-charged by depleting the recently-charged batteries by 1/7th charge... or something, here's where it gets a little vague. But, the interesting bit to continue pondering is that the system can be used to charge itself... as yet another tool in the charging-solution... and, doing-so, now we only need a single 10,000uF [40V] capacitor to prevent brownout, even for 40V 2A [?!]. And much much more!

So, it's no longer about using the car to power everything, then having a battery-backup/UPS sorta thing, but now about having a completely portable power-supply which can also be charged while in use.


Oh, that other thing... what was it? Oh yeah, the other issue with using these like a backup-battery was trying to *remove* that power-up time, altogether... Then, e.g. a simple diode could direct power as-needed. E.G. with 10V's worth of batteries, through a diode to the load's positive rail, which can also be directly connected to 12V.... then there's no load on the batts when powered externally, then if I bump the 12V lighter-plug, it'd start immediately drawing current from the 10V battery-supply. Great idea with normal batts, more difficult with start-up-times and brownouts. So, then, the idea became how to keep the batteries "on" even though the load is coming from the car... 

Wherein I designed my very first 555 circuit [oh, sure, I've *used* 'em, but never *designed* one from the standpoint of understanding how that mysterious 8-pin black-box functions. BTW look at ST's datasheet, best I found, showing the internal structure using a two-point voltage-divider with three 5k resistors, two comparators, a RS-latch, and an NPN transistor. That coupled with info on which RS-latch inputs take priority makes designing with the thing almost intuitive!]. This circuit was designed to first prevent flow from the 12V source, when initially powered, thus turning on the batteries, then, once the batteries are on, the 12V source is switched-in... a few seconds later the 12V source is switched-off, until current is detected to be flowing from the battery [which might be a little while, and unpredictably, depending on the load, since it would output 10V through a diode, which means the capacitor would have to discharge from 12 to 9.4V first]. Then, after current's detected to be flowing from the battery, it'll switch back to the 12V source again for a few seconds. Thus, the battery wouldn't go into 'sleep,' as a minimal amount of current would be drawn periodically to keep it awake. Hey, how does one measure a positive current-flow [through a diode]? A comparator! And lo and behold that's exactly what's at several inputs of the once-mysterious-to-me 555. Weee! Oh, and, since it uses cutting the current-flow from the external source to keep-awake, it inherently handles the case where I might bump the external source outta its socket.

But, that, keep-awake, is not necessary with the new system, since its purpose is to run the load off a comparatively-huge battery-bank at all times, which just happens to be incrementally-chargeable while in-use. 80W, 2hr... 40W 4hr, and so-on should be plenty for most my needs.