ok, I found some inexpensive ones with the OUT +/- holes.
I read that some of the cheaper ones sometimes don’t cut off the charge at 4.2. Is this generally a simple one-time test? For instance, can I hook up a volt meter, monitor the battery, and as long as it stops charging at 4.2, then I’m good to go?
I don’t think the ones with the separate OUT and BATT connections actually switch between battery and USB power. The difference is that the ones with separate OUT connections have the battery protection circuit on the module’s PCB, and the ones without the separate terminals do not. Which one you decide to use will depend on if your battery has the protection circuit built into it. You only want one circuit protecting the battery, because I believe 2 of them connected to the same battery will not play nice with each other. However, whether it’s on the battery or the module, you must have a protection circuit. Lithium cells can catch fire if they are abused.
You can just connect the battery to the load, but because the charger is current limited it will take charging current away from the battery, making it take longer to charge.
The better solution is to connect both the battery and USB connector to the load (and USB to the battery charger) and have a circuit decide where power can come from. There’s a few ways to do this:
- A diode in series with the battery. This is the cheapest and simplest method, but also introduces a voltage loss and wastes power in the diode.
- A comparator+MOSFET solution like what’s used on the Uno and Mega boards that uses a P-MOSFET to block USB power when something is connected to VIN, but when VIN is disconnected lets power in from USB.
- If you aren’t afraid of surface mount chips and are willing to hunt, you can browse Digikey’s PMIC - OR Controllers, Ideal Diodes to find ICs designed to do exactly this thing, like the Texas Instruments TPS2115PW OR Controller Source Selector (just one example out of many)