The SS34 typical leakage appears to be about 0.14mA at 75C. So that's equivalent to 4.2V through a 30K resistor. To keep the gate voltage at 1V or lower with that leakage current, the pulldown should be:
1 * 30000/(4.2 - 1) = 9.375K
However, at the module's rated capacity of 1A, it may not get anywhere near 75C. Well, it will dissipate maybe 400 mW. I don't know how hot that gets it in theory, but at 1A I can touch it with my finger and it's just a bit warm.
Zak makes the point that the pulldown does draw down the battery to the extent that leakage current takes place. But once the diode cools down, leakage is much lower - roughly 100 times lower at 25C - so it won't matter much then. But still, a higher value pulldown would reduce battery current to some extent, so the highest value that works is what you want.
There are specific chips for this , google â pass through chargingâ
Canât recall number of the top of my head , but they measures load and battery charging current separately and can Charge whilst also supplying load
I didn't find a lot doing that search except for power bank chips, which are not what I want. There is the MCP73871, but I've never seen a successful module using that chip. I'm sure there's a TI part that does it right, but it will not have hobbyist friendly packaging, nor will a module from the Far East be available. Adafruit has one that even accepts solar input, but it's $15.
Well, it sounds like the 200K resistor on your module isn't a very good idea then? Replacing it with a 10k resistor sounds like a safe bet, and it would still cause only a very minor drain from the battery (420 ”A max for a 4.2V battery, but will likely be even lower than this if the diode is cool).
In theory 10K would be the better choice. But I ran the module for quite a while at 1A output, with my scope connected to the output, and when I pulled the plug on the 5V input, nothing happened. The battery took over, and there wasn't even a modest dip in the output voltage. So it looks like 200K works ok. I think I'll just leave it be.
I Just thought of something. SMPSâs normally have a bleeder resistor connected in parallel with the DC output, in order to discharge the filter capacitors. So, once the PSU is discharged, this would also act as a pulldown resistor for the gate of the mosfet in this UPS circuit.
I guess that's right. I measured the resistance across the outputs of the two wall warts I've tested with this module, and both were under 1K. But when I tested the disconnect before, I pulled the connection at the USB port of the module, so nothing before that would have any effect. But for the typical case where you're protecting against power being lost in the mains, whatever is in the switching supply output would affect the gate. Of course that could work both ways if there's a lot of capacitance in the SMPS that's holding up the voltage.
I think what makes it work reasonably well under almost any circumstance is the fact that current can still flow from the battery through the body diode even if the mosfet doesn't turn on right away. It's less reliable if you're driving a 3.3V LDO because you have more risk of a dropout. But a boost converter will just draw more current through the body diode for a few milliseconds if needed, and still produce 5V at the output.
Yes, that's the ubiquitous "18650 battery shield V3". It lacks a load sharing circuit, so doesn't really work well as a UPS. Moreover, later versions of that module, named the same, have been converted to power banks, so they now shut down when load current is less than about 50mA, and produce a dropout when external power is connected or removed. Not good for a UPS. The hope was that the module discussed here would correct all that by including load sharing in the original UPS circuit. And it does that, but you have to add a switch and a capacitor, and it doesn't have a type-A USB port at the output. So not exactly ideal.
I always thought it curious that Andreas refers to the battery "charging and discharging at the same time", which of course is nonsense. I think he means charging the battery while powering the load.
Here's my video on modifying the V3 to add load sharing. Fortunately, it's no longer really relevant since this new module is available.
That is a very well presented and informative video. I actually have one of the old v3 style two cell "UPS" devices which I have never used. But I'll probably dispose of it now rather than upgrade it.
With the latest "load sharing" devices, it would be good if there was a 3.3v output option in addition to the 12v, 9v and 5v versions. That may be the next improvement to use a buck/boost converter on that board instead of simply a boost converter. Of course you could always select the 5v version and add a linear voltage regulator but with some reduced efficiency.
Anyway, that device is very useful now for example as a power supply for a portable electronic project, say a radio.
The old 2-cell versions were called "V8". I have one from several years back, but it was not really a UPS design. It used a single chip - TP5602 - for both charging and boost conversion, and my memory is that it didn't work at all, and was basically a power bank.
I would be inclined to just use an LDO for the 3.3V version, one with very low dropout. Efficiency only matters when you're on battery, and there would be very little excess input voltage when on battery, particularly when it has discharged a bit. I think it would be pretty efficient, particularly if your project spends a lot of time in deep sleep.
Yes, that's a single chip solution. It looks like SW6115, a QFN32. It appears to provide a switching charge circuit as well as a boost converter. But there's only one inductor. Anyway, things to check for:
What is the module's output voltage when the battery is being charged?
Is there a dropout at the output when the external 5V supply is connected or disconnected?
I can finally get around to answering this since I have now got hold of two 18650 cells to test this device.
The module's output is 4.74 volts while the batteries are being charged. If I disconnect power to the charger, the voltage drops momentarily; my DVM shows 2.65 volts but this is not stable long enough to be a valid measurement. After that, the voltage actually rises to 5.06 volts, slightly above the voltage while charging. All measurements with a ~20mA load.
Ok, it looks like the 4.74V may be the cathode side of a schottky diode from the 5V USB input. So that should work ok. But that dropout when you disconnect USB is a deal breaker. Apparently it has to fire up the boost converter, and that just takes time. But you would have to set your scope to single shot to see how low it actually goes.
It has two 18650s in parallel (or you could just have one), and uses what seems to be a popular Chinese meme of having multiple parts in parallel. So it has two schottky load sharing diodes, four P-channel mosfets, two battery protection chips, and two electrolytic output capacitors, all of which I assume are intended to deal with the increased current.
Like the single-cell version, this one has no output connector, such as a type-A socket. But unlike the single-cell version, this one has plenty of input capacitance on both USB power and the batteries. Another difference that I think is important is that the 2-cell version makes no provision for an on/off switch just ahead of the boost converter. So the only way to stop the battery from powering the converter is to remove the batteries. That's not something you want to be doing. I may see if there's an easy way to deal with this problem by cutting a trace and installing a switch.
I tested the charger portion, which worked fine, but haven't done any high-current tests or protection tests. It does work fine as a UPS, with no glitches when USB is connected or disconnected, and of course no minimum current requirement to keep it running. It is not a power bank.
Been following along with interest and recently bought a few of these 12v packs for testing and wanted to use in a project. I've wired 2 of these in parallel in hope of making a simple battery pack with built in charge circuit.
I've wired both inputs together and the packs charge as expected. The outputs are connected to a project board and both positive leads have a schottky diode inline, I didnt know how these output circuits would react being wired in parallel so thought that was a good idea?
Things ive noticed:
The UPS packs dont discharge evenly, my project draws less than 1a (a 12v peristaltic pump being the main draw) and when one pack is reading 3.55v, the other is around 3.84v. Both starting at 4.2v.
The packs run down to around 3.2v and then their output drops quickly. I havent pushed them futher, my arduino project has a voltage divider and Im tracking the voltage of 1 pack, and then shut down functions when low. In trying to find a sweet spot for giving a charge warning I then noticed the following...
When charging, and the voltage is <3.6v, the packs are incapable provinding enough power to drive the pump, at this point I'm thinking I need to flash charge warnings at 3.6v, which is a shame tbh...
I've just fully charged a different set of 18650's on a real charger and testing voltages again, but so far it looks like one pack is not carrying its weight, might this be expected?