I would like a circuit where 1) two protected LiPo batteries are wired in serial to power the load; and 2) when external power is plugged in the load is disconnected and the batteries are charged separately. I have come up with this circuit:
The external power plug is indicated with a switch, and the intention is that connecting the power switches off the two P-channel MOSFETs M1 and M2 to disconnect from the load and then switches on the N-channel MOSFET M3 to connect B2's negative terminal to ground for charging. The chargers would be boards based on a LiPo charger IC such as MCP73831. Each battery would be a pack of 3 18650's wired in parallel with a protection circuit.
I am concerned that if the FETs switch at different times (for example, if M3 switches on before M1 switches off) that a short circuit could be temporarily created. I'd like to know if this is a possibility, if this circuit has other problems, or if there is a well-known circuit that better solves this problem.
Here is a falstad simulation I was using to test switching different FETs at different times. I considered adding a Schottky diode or FET between R1 and the 5V source's negative terminal, but would they introduce a voltage drop that would cause problems with charging B1?