TP4221 Based "Powerbank" mods.
Note: We are dealing with unprotected 18650 LiPo cells here. If you don't understand the risks of playing with unprotected 18650 cells, go away and read up about them before proceeding. You can also read my previous project on this topic.
TP4221A/B/C based "Power Bank" chargers litter the internet, and are generally of relatively poor construction, however on the flip side, they are cheap. Cheaper in fact than buying cell holders and a USB charger module. Therefore they make an almost ideal hackable 18650 LiPo (3.8V nominal) source. I say almost... they suffer from a few failings.
Note that not all "Powerbank" chargers are based on the TP4221, those that are, however all share the design below, with a few variations (single or double USB output, greater output capacity, 2, 3, 4 or more 18650 cells and so forth. They typically have only one button and a 3,4 or 5 LED "user interface". They may, or may not have the "Torch" facility.
A). The datasheet for the TP4221A/B/C is in Chinese ( http://www.datasheetbay.com/PDF/download.php?id=914396 ) Translated (badly) ( https://translate.google.com/translate?hl=en&sl=zh-CN&u=http://datasheet.d4usemicon.netdna-cdn.com/pdf/914396/TP4221B.pdf&prev=search ). I have yet to find an English language version. Google translate will help you out, if you need more details.
However since the schematic is written a language we can all understand, I've included it here.
Notice the LIT output. This is, according to the datasheet a 100mA NMOS Fet acting as a low side switch, intended to be used as a torch with a 100mA max LED (as shown in the diagram). It is switched on by two short presses of the status button (S1 in the diagram). This means that we can wire up the SWT input, and send it a couple of 500ms low pulses, separated by a 500ms high and the controller will switch on the LIT output.... so... whip off the LED, fire on a 2 pin header and you now have a switch-able 100mA 3.6v nominal feed from our Lipo.
This is perfect for low power microcontrollers, and has the advantage that if the battery gets low the TP4221 will shut it down for us.
The picture above shows the board modified with header pins replacing the LED and the button (K1) wired to a socket. Additional wires are brought out of the front from the Lipo. Note that there is no over current protection, except for that tiny little 000 Ohm link between the B- and Gnd pads.
This is not ideal, I would suggest removing the zero ohm link and substituting a 2A micro fuse. However... I'm willing to live on the edge here, my metric calibrated eye suggests that little link will pop before the LiPos do. This brings me on to the next failing of these little power banks.
B) There is no protected 3.8V nominal output directly available, this is not a worry if you intend to use the 5V output, but if you want maximum efficiency, and therefore want to run directly from the cells, you will need to ensure your micro-controller, or whatever you intend to power shuts itself down when the supply drops to a point where it may damage the cells.
I will be using a Canon Powershot camera and CHDK with a dummy battery in the camera. Since the Canon camera shuts itself down when the battery voltage gets low (<3.2V typically), I wont worry too much about this. I would advise checking the cell voltage before each charging session, just in case it has dropped to a dangerous level (<2.8V), or any of the cells have failed.
Now for the third gocha.
C) The 5V USB outputs will shut down (or fail to start) if the load on them is <50mA, at least that is what the datasheet appears to say... I haven't verified this.
... and finally in my criticism of this otherwise useful little device.
D) The build quality of some of these "Power Banks" is dreadful. I guess for $2.45, what do you expect, gold plating?
Here is the ebay listing for the devices I purchased.
"I wonder if their app circuit would even work with that C4 connected in parallel to their internal MOSFET in a boost converter."
Interesting point, I didn't analyse the schematic, but I assume that it does.. I should really get the scope out and see just how lumpy all of the outputs are.
"There are USB power switch chips that have logic level control and built-in over current protection (UL recognized no less). e.g. Diodes Inc make tons of them. "
"Yea, but if it don't look a joke then it 'aint going to smoke.." and where's the peril in that...
This particular project sits firmly in the "cheap" corner of the iron triangle.. ( https://en.wikipedia.org/wiki/Project_management_triangle ) Quality at this price point is obviously optional.
I freely admit that these things wouldn't make it in to a production device if I were designing it for long term use, and even the minimum of safety, but that is not really the objective here.