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'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!