I am building a bluetooth speaker with two power sources: AC power supply and LiPo battery with a charging module (BMS PCM). As you can see from the diagram I have three switches. The goal is to allow for several states: 1. Speaker working on Battery module 2. Speaker working on Power Supply 3. Speaker off, but Power Supply is charging the battery I don't like the fact that there are three switches for this and the operator has to know different sequences for s1, s2, s3 positions in order to operate the bluetooth speaker. Is there a smarter way to manage this using different logic?
Use two diodes to form a diode-oring function between the battery output and the AC adapter output. The system will then draw power from whichever source is at the higher voltage without the user having to do anything. If you want higher efficiency you can use an ideal diode controller. Linear Tech sells lots of them.
One possible option is the LT1760. It includes a lithium smart battery charger and an ideal diode or-ing function all in one chip.