I needed a lipo battery management circuit for a project, so I decided to make my own. Just to clarify, there there are other sections of the circuit (microcontroller, LED, etc.) but those parts aren't relevant to my question. I am using various different tutorials for various different parts of the circuit:
Battery charger circuit
3.7V to 5V boost converter
Undervoltage protection circuit
Load switch
I want to order the PCB but I want to know for sure if the circuit will operate correctly. The battery charger takes 5V and charges a 3.7V battery. The boost circuit boosts that voltage up to 5V. The load switch switches to usb power when plugged in, then battery when its unplugged. And finally, the undervoltage circuit cuts the ground to the boost converter when the battery reaches 3V. Will all of this do what it should do, or are there parts that I am missing?
There is a readily available module for the 18650 that does all of that, but it has some serious flaws (board reviewed and flaws discussed here) and does not support load sharing. One problem is restarting the module when the undervoltage lockout triggers.
A forum member posted a simple modification that appears to overcome all those flaws.
Useful design info in both contributions.
I don't see how the load switches to USB power when it's plugged in. Where is that connection? You have "5V from source" driving the gate of the Q1 mosfet, but there's no connection to the final 5V rail.
@ShermanP I assumed that the diode that goes from the gate to the drain is what connects them. I could be wrong, but when I looked up the part form the stackoverflow answer that mosfet with the diode built in showed up.
It's actually between the gate and the source, and that's just an ESD protection diode. It will pass current only at a much higher voltage. This is what my datasheet for that part shows:

Anyway, I think you will have to add a Schottky diode to make the connection, and I also suspect R3 needs to be more like 10K because Schottky diodes can have significant reverse leakage.
There's one other thing you might want to think about. The similar circuits I'm familiar with have all the Q1, R3 and Schottky stuff located between the battery and the boost regulator, so the regulator is actually part of the load. But you have all that on the far side of the regulator. I'm not sure that works. The potential problem is that the 5V provided by USB will be lower than the 5V provided by the battery and regulator because the USB 5V has to go through the Schottky diode. So there may be some risk that current would flow through the mosfet's body diode even when the mosfet is off. Maybe others more familiar with the way you've done it can comment on how well it works.
If you place that junction back before the regulator, the USB 5V, even after the diode, will always be higher than the 4.2V battery voltage, so the body diode will be reverse-biased, and no current will flow through it. It also means the final 5V output would be the same regardless of whether it came from the battery or USB/Schottky since both sources go through the regulator. Anyway, the circuit shown in my video referenced above by jremington is an example of the alternate arrangement.

@jremington The 18650 that you suggested will not work for my application, because I want the battery management circuit to be on the same board as the other components. There are other sections of the circuit, but I am really just concerned about the battery section.