I just want to power a thing I’m designing with 5V from a USB plug or a LiPO battery, and to charge the battery if the USB is plugged in. Now well down a huuuuuuge rabbit hole of data sheets and YouTube vids: Buck/boost converters, charge controllers, LDO regulators, and on and on. Surely this is a standard thing with a standard solution? Any pointers appreciated and welcomed. #electronics #maker #MakerProblems #SoMuchToLearn 😂

@tammymakesthings
So... that is indeed one hell of a rabbit hole. The reason why there isn't one standard solution is because the implementation depends a lot on the details of what you want to achieve.

To simplify things. Lets break this problem into two problems. One is charging the battery, and the other is powering the electronics.

(I am out of characters I will continue in the next reply)

@tammymakesthings
If I am understanding your situation correctly, you want the electronics to still work, if there is no battery, but there is USB power.
This means that you are going to need to either bypass the battery (which will be a bit of a pain) or find a battery charger which doesn't just shut down when there is no battery connected. This could be any constant voltage, constant current power supply (you can probably find a buck converter that does this)

(more is coming)

@tammymakesthings
The scary part here, however, is the fact that you now have a charging circuit, without any battery protection circuitry. So look for a lipo with overvoltage, undervoltage, and preferably also overcurrent protection built in.

Then, to power your electronics, depends on what voltage they need. If the voltage is below the lipo range, you can use a buck converter or ldo, if it is above the lipo range, you need a boost converter.

@tammymakesthings
If it is within the lipo range, you need a boost-buck converter.

(I am sorry, this explanation turned into a mess)

@TT_392 that’s very helpful. Thank you so much! I feel like at least now I have a reasonable sense of the right questions to be asking, even though I don’t have answers yet. I appreciate your taking the time to walk me through it.

@tammymakesthings
Oh, just one more thing, though you probably already know this: don't underestimate the dangers of lipo batteries. If it is an option, get a lipo with a good built-in battery protection circuit. If that isn't an option, use an external battery protection circuit.

This kind of protection circuitry isn't always a perfect catch-all solution, but it sure helps eliminate a lot of the risks.