I've made a simple charger out of 4 TP4056 modules and 4 18650 sockets. These modules have overcharge, undercharge and overcurrent protection included, but I also want to know how simple it would be to make it also reverse-polarity protected since that condition is much more likely as the above 3 combined, given that I'll swap batteries often and am bound to be mistaken once in a while. I'll also likely build some chargers for other people for their needs and this could be a nice feature. Could I just use the MOSFET trick to make reverse polarity protection for the charger or is there something I'm missing?
The p-mosfet trick won't work as both sides supply voltage. You could use a latching circuit (P-mosfet + npn bjt) but it would only work for the first battery you charge, unless you power cycle the circuit every time you change the battery. A further improvement would be to use a microcontroller to check the battery status before turning on a MOSFET, but at that point it is getting stupidly complex.
The cheapest and easiest method would be to use a diode and a fuse as protection.
If you were to add the battery in backwards, the diode would protect the charger IC from the bulk of the current while the fuse would disconnect the battery. Don't use a 1N4148, (they are low current signal diodes), I forgot to remove the name. A >2A schottky diode would be ideal.
The latching circuit previously mentioned would look like this:
When initially given power, R1 pulls the gate of the MOSFET close to the source, keeping the mosfet from turning on. Once a lithium cell to be charged is added, current from the cell flows trough R2 to the base of Q1, turning it on. Q1 then pulls the gate of the MOSFET low turning it on. If the battery is connected backwards Q1 never turns on and the MOSFET never conducts. D1 is there to protect the base of Q1 from the negative voltage of the battery.
The problem is that even after removing the cell the MOSFET stays on, allowing Q1 to stay on and keep pulling the gate low in a positive feedback loop.
Now that I think of it, the latching circuit would work after all: If the MOSFET is on when adding a cell the wrong way, the charger IC goes into short circuit protection which causes the charger output voltage to fall below the threshold voltage of the MOSFET switching it off, and interrupting current flow.
Jms's solution works. I tested it with a 30V/1.1A RUEF110 (thanks mkeith) PTC fuse, and it does the trick, the tp4056 does not even get hot. By the way im using a random diode i found. Sometimes the cheapest and the most simple solution is the best! Only drawback - it will take a few seconds after the short for the ptc to recover though.
Thank you for the simple solution, i have worked a lot with tp4056 and have blown my diy tp4056 parralel 10A chargers with reverse polarity on the battery ends. I thought of using a mosfet but my solution came to same problems as jms-s. So forget the mosfet idea.
I have successfully done this on several projects so far. I found this video at hackaday, which explains very nicely how it works.