avoid Li-Ion batteries explosion
1) Do the first test with a battery simulator. Don't connect it to a real battery until you're sure it's working as expected.







simulate this circuit &ndash; Schematic created using CircuitLab

Set R1 to a value according to the expected charge current and make V1 an adjustable lab power supply. You can then gradually increase V1 and check that charge stops at the appropriate point, and that the current flowing in R1 does not exceed expected values (don't forget to use a suitable wattage resistor).

2) If you're using the type of battery that comes with a thermistor, make sure you incorporate that correctly.