Charging Li-Ion battery without removing

The battery needs to be able to be easily charged without the user having to remove the battery from the device.

I included some diagrams that I made quick in paint. I’m trying to have the Li-Ion battery power both the micro-controller and servos. I was thinking that when the switch was OFF (not connected), the charger can be plugged into the circuit (DC connectors) without removing the battery.

I’m using a 7.4V Lithium Ion battery and a Li-Ion smart charger:

Would the charger harm the micro-controller if the switch was ON? What do you think, will this work?



I don't see a problem with that as the board has an on-board voltage regulator. The charger has an output of 500mA which may not be enough to power the servos if you tried to run them from the battery charger itself. I'm not sure if that would be a problem in your application but something to keep in mind.

A fail-safe solution would be to use a barrel connector with an internal disconnect (so when there is something plugged in, it disconnects another circuit).