USB Battery Bank Auto Shutoff - Page 1
Forum section: electronics / projects

author: engrguy42
author_rank: Frequent Contributor
timestamp: May 11, 2020, 11:58:28 pm
content: Interesting...you learn something new every day.I have a 10 amp-hour battery bank for USB stuff (cellphone, etc.) lying around, and it occurred to me "hey, it's free 5 volts, why the heck not use it?". Quick and easy for a quick, flat, 5V....and 10 AH is nothing to sneeze at.So I tried it (modified a USB cable to just use the power wires) and it works great. Until it suddenly shut off. I was powering some stuff, and suddenly it shuts off all by itself. WTF??So apparently those battery banks have internal circuitry to shut the thing down when it thinks nothing is connected. Go no, right?So the other day I just happened to finish some software to access my Labjack USB data acquisition device, and it grabs data and plots it. So I figured I'd try to get to the bottom of this. So I hook up the battery to the Labjack, turn on the recorder, and it gives me the attached plot. With no load on the bank it shuts off about 35 seconds after you turn it on.So I then applied a 20 ohm resistive load (250mA) and it stayed on forever. So I tried a 47 ohm resistor (106 mA) and it stayed on forever. So I applied a 100 ohm load (50 mA) and it shut off in 35 seconds.So apparently these things shut off if there's less than 100-150 mA of output current. So what people do is put together a circuit to apply a burst of load every 10 or 15 seconds to keep the thing awake. Of course you could just tie a resistor, but that's just a waste of amp hours.I'm curious, anyone know of a cheapo device I can get to do this load cycling? I saw a TI paper on this phenomenon, and they have some recommended circuits, but I'm too lazyThanks.

author: Peabody
author_rank: Super Contributor
timestamp: May 12, 2020, 05:03:27 am
content: Power banks are designed to charge other batteries, such as your phone's battery. Partly to save their own battery power, and partly out of concerns about lithium battery safety, they are designed to shut down when the other battery has been fully charged. And they conclude the charging is finished based on the low current draw. But if "low" means 100mA, that won't work for most microprocessor projects. And you know, sinking excess current just to keep the powerbank turned on kinda defeats the purpose of battery power.There is a line of powerbanks by Voltaic Systems which have an "always on" option, but they are about US$30. And there is this much cheaper design that's only safe to use for 60mA loads or less if you are also charging the powerbank at the same time:Apparently, sinking extra current periodically, as you described, works to keep most powerbanks on. I'm not familiar with the circuit you described to do that, but maybe someone will point us to it.

author: engrguy42
author_rank: Frequent Contributor
timestamp: May 12, 2020, 01:46:24 pm
content: Okay, well I kludged together a 555 timer with some parts I had lying around and came up with the attached, which I tweaked in LTSpice.Basically it turns a MOSFET on with 50% duty cycle to apply a 120mA load to the battery bank. It's pretty much 7 seconds on, and 7 seconds off. I suppose I could further tweak it to see how short I can make the ON time, but my knowledge of 555's is lost in a foggy memory from years ago.Attached is the LTSpice circuit, which I duplicated on a breadboard, and then applied to the actual battery bank. BTW, that's the C# app I just finished last week to access and plot from my Labjack data acquisition unit, showing the input to the gate of the MOSFET. It came to the rescue just in timeAnd, SUCCESS!!! The battery bank stays on indefinitely.Any suggestions for shortening the duty cycle would be welcome. Thanks

author: engrguy42
author_rank: Frequent Contributor
timestamp: May 12, 2020, 02:04:51 pm
content: Quote from: blueskull on May 12, 2020, 01:58:58 pmThanks, but it's something I rarely/never use in the first place, so replacing it isn't really under consideration. In fact, I could probably just tie a 22 ohm resistor to the output without all this stuff and be done with it.But as it stands I can just look for a tiny plastic box, stuff these parts inside, and I'm good to go.Thanks.

author: SilverSolder
author_rank: Super Contributor
timestamp: May 12, 2020, 02:35:57 pm
content: Some battery banks don't have the auto-shutoff feature.I have an old 13000mAh power bank here where the cells are so worn out that the capacity is only around 1,000mAh now... but it doesn't auto shut down, so is great for powering an Arduino etc. for several days!

author: Peabody
author_rank: Super Contributor
timestamp: May 12, 2020, 02:37:33 pm
content: I found this circuit:https://www.electroschematics.com/pulse-generator-with-555/But I think for long delays (tens of seconds) between pulses, you could need some kind of counter chip.

author: Peabody
author_rank: Super Contributor
timestamp: May 12, 2020, 02:43:26 pm
content: Quote from: SilverSolder on May 12, 2020, 02:35:57 pmDo you have a link to that one? What I've found is that the circuits of these things have been "updated" over time to use new, cheaper, single-chip solutions that handle both charging and 5V output regulation, but that also include auto-off which can't be disabled. So over time, they've pretty much all become auto-off even if they weren't that way a few years ago. Anyway, if you have a link to the one you have, I'd like to take a look at it.

author: engrguy42
author_rank: Frequent Contributor
timestamp: May 12, 2020, 02:44:24 pm
content: Quote from: Peabody on May 12, 2020, 02:37:33 pmYou didn't see the circuit I posted?

author: Peabody
author_rank: Super Contributor
timestamp: May 12, 2020, 03:01:45 pm
content: Quote from: engrguy42 on May 12, 2020, 02:44:24 pmYes, but I thought you wanted to be able to generate a short pulse after a long delay, with both adjustable. From what I've seen reported in the past, that will keep at least some of the powerbanks alive. You could use the 555 to generate a clock, and something like a CD4020 or 4040 to generate the pulse.

author: engrguy42
author_rank: Frequent Contributor
timestamp: May 12, 2020, 03:13:37 pm
content: Quote from: Peabody on May 12, 2020, 03:01:45 pmThanks. I was hoping there's a way to adjust the R/C values in my existing circuit, or do some simple modifications, to tweak the duty cycle. This is one of those things that isn't really worth much investment, so if I can do some minor tweaks to what I have that's preferable.

author: engrguy42
author_rank: Frequent Contributor
timestamp: May 12, 2020, 03:26:53 pm
content: Well after some searching I found you can apparently use this simple modification to get adjustable duty cycle on a 555...

author: Peabody
author_rank: Super Contributor
timestamp: May 12, 2020, 04:14:39 pm
content: I keep having to remind myself, because I'm old, that the new way to deal with this kind of problem is to get a little 8-pin microcontroller like an ATTiny or PIC or MSP430 with its own internal oscillator, and program it to drive the mosfet with the exact pulse duration and interval you want. That takes the place of all the 555 stuff, resistors, capacitors, pots, diodes, etc. Cheaper, easier, more precise, fewer parts, less space, less power.Anyway, I hope you'll report back with the final shortest, least frequent, lowest current, pulse you can get away with to keep the powerbank alive. It may be that the total mAh penalty isn't all that great.

author: SilverSolder
author_rank: Super Contributor
timestamp: May 12, 2020, 04:24:20 pm
content: Quote from: Peabody on May 12, 2020, 02:43:26 pmMine is a "SCUD P130" but the same item was sold under many names, apparently - "Huawei AP007 13000mAh Portable Power Bank" and "FREMO P130" look exactly the same, for example.Might be hard to find these now, they are definitely an old model. I only found one for sale, and it wasn't cheap.

author: SilverSolder
author_rank: Super Contributor
timestamp: May 12, 2020, 04:26:28 pm
content: Quote from: Peabody on May 12, 2020, 04:14:39 pmThat is exactly what to do for this kind of project, I think. I abandoned a 555 project and used a Pro Mini Arduino simply because the timing of the 555 was less accurate, and it didn't do exactly what I wanted, and ended up being a lot more work than knocking up the 3 lines of code needed... Welcome to 2020!

author: engrguy42
author_rank: Frequent Contributor
timestamp: May 12, 2020, 04:27:10 pm
content: Wow that last circuit I posted seems to work !!! At least in LTSpice...Just need to tweak a bit to bring the OFF time down a bit. Coolness...

author: engrguy42
author_rank: Frequent Contributor
timestamp: May 12, 2020, 04:32:44 pm
content: Quote from: SilverSolder on May 12, 2020, 04:26:28 pmAnd sometimes accuracy is irrelevant, as is spending any money and ordering stuff and starting from scratch when I have a perfectly good design already. Changing from 50% to any other duty cycle, like I said, is a nice-to-have but largely irrelevant.Actually I'm kinda surprised there were no responses on how to design a PWM on an ever-so-popular 555. I thought you guys would be all over that.

author: SilverSolder
author_rank: Super Contributor
timestamp: May 12, 2020, 04:48:07 pm
content: Quote from: engrguy42 on May 12, 2020, 04:32:44 pmI guess the reason is that it can be a lot more work to get a 555 circuit to do certain things than a $2 Arduino. I tried this recently for a hobby project that needed something similar (a pulse every 15 - 30 minutes in my case) and it was surprisingly hard to get a 555 to do that.

author: engrguy42
author_rank: Frequent Contributor
timestamp: May 12, 2020, 07:44:27 pm
content: Houston, we have liftoff...Got me some yummy PWM goodness. Tried the latest circuit I showed, it gives me 25% duty cycle (5 seconds ON, delivering 120mA, then 13 seconds OFF), and it keeps the battery bank on continuously.Sweet. I think that's a wrap.

author: Peabody
author_rank: Super Contributor
timestamp: May 12, 2020, 10:11:36 pm
content: That's great, but how about 1 second on, 13 seconds off? Or 100mS on, or even 1mS on?

author: engrguy42
author_rank: Frequent Contributor
timestamp: May 12, 2020, 10:19:33 pm
content: Quote from: Peabody on May 12, 2020, 10:11:36 pmDo I owe you something??You're certainly welcome to do your own research, but personally I couldn't care less about what you seem interested in.

author: Peabody
author_rank: Super Contributor
timestamp: May 12, 2020, 10:45:42 pm
content: No, certainly not. Having gone this far, I just thought you might want to know how little current it would actually take to keep it alive. But I guess that's not the case.

author: SilverSolder
author_rank: Super Contributor
timestamp: May 13, 2020, 01:58:06 am
content: To get to the absolute minimum current to keep it alive will probably require a micro to do accurate timing, and go into deep sleep while it is waiting until the next "kick".

author: engrguy42
author_rank: Frequent Contributor
timestamp: May 13, 2020, 07:34:46 pm
content: Well, FWIW, this thing is all soldered and done, just waiting for a USB female plug and a box. Seems like a lot to go thru just to get a pulsed load, but hey, it should be of use for a long time.I was surprised when it was all soldered that it actually worked !!! Now I have a solid 10 amp-hour, 5VDC supply.Hmmm....do I need a boost converter?

author: SilverSolder
author_rank: Super Contributor
timestamp: May 13, 2020, 09:12:31 pm
content: Quote from: engrguy42 on May 13, 2020, 07:34:46 pmLooks good! These 5V power banks are super useful for electronic projects.Would be cool to open one up and modify it inside. Mine is completely sealed so it would not be a good candidate... wonder if that is true of all of them...

author: kjr18
author_rank: Regular Contributor
timestamp: May 15, 2020, 10:54:05 am
content: Quote from: SilverSolder on May 13, 2020, 09:12:31 pmThat would be difficult on some of them, as some of designs reuse parts inside for charging and boost, keeping smaller parts count. For it to work, they should has ups function. You don't really need to open them, just small box with plug and socket on the other side, even you could buy one of the cheapest usb doctors and use it's case for this purpose.