I'm planning to build myself a small portable speaker. I'd like to include a Li ion battery and a jack for an external 12V-ish power supply. I'd also like to add a jack that will be used to charge the battery from an external Li ion charger.
If the first one turns out well I might make more to give as gifts. As such, I'd like to make the design as dummy proof as I can. I'd like to wire the power supply jack and the charger jack so that:
1) When the power supply is plugged in, the battery is disconnected from the circuit to prevent the power supply from damaging the battery.
2) When the battery is charging, the battery is disconnected from the amp so that I'm not drawing current from the battery at the same time that I'm trying to charge it. (Again to protect the battery)
3) I can run the speaker from the power supply while simultaneously charging the battery with the charger.
I think I can solve the first issue using the switched power jack as in the following (poorly drawn) diagram.
I'm not sure how to do #2, but I imagine I would have to include a switched jack for the charger as well. Just not sure how to hook it all up. Anyone have any ideas? Thanks!
Best Answer
To implement 2) break the vertical wire above the battery -pin (above the first junction). Then reconnect the upper wire to the charger jack pin that you labeled as ???. So now when you insert the charger plug the battery -pin will be disconnected from the upper circuit, and when you remove the charger plug the battery -pin reconnects to the upper circuit. (See revised circuit below)
Your drawing does not show any over charge protection for the battery. If you are going to use a Li Ion battery this is absolutely required. It may be best to just buy a battery assembly that already has a protection/charging circuit built in. For most any other type of battery you should still have some minimal over charge protection, either directly in line with the battery or in the charger module itself. What ever battery type you use be sure to read the manufacturer's recommendations for properly charging the battery.
Lastly be absolutely sure that the Power Supply and the Charger you use are simple isolated types, with no common earth ground. Since you are switching the ground pins in the circuit you do not want any extra ground paths making a connection. After assembly carefully test the circuit to verify that the battery connects and disconnects properly.