Now that the paint has dried, it's time to talk about circuitry.
Class AB vs Class D
No doubt, a class D amp would surely be more efficient and provide some additional hours of fine music plus would save some space in the housing for other cool things. But well, I still got several TDA2030A, throwing them away would also not be very efficient. Also, they offer superior THD, and the circuit is so simple I can just solder it to a perfboard.
Schematic source: ST datasheet for the TDA2030A from July 2011, page 4
Some of you may doubt that you can/should charge four LiPo cells with four cheapo TP4056 modules in a single application. I also had doubts, but my tinkerplementation works well so far. It's based on the tiny but powerful Axicom FP2 relays.
During charging, this simple circuit isolates each battery and connects it to its own TP4056 module using the two changeover switches of one Axicom FP2. All TP4056 modules share a common ground and charging power input, but of course only charge one cell each. The charging power input also magnetizes the coils of the relays, so when no charging voltage is applied, the relays fall back to their idle state, connecting all cells in series to power the amp with +/- 7.4 V or 14.8 V respectively.
I als made sure within the expected failure modes, there's nothing bad that can happen:
- I'm drawing current from the cells in an unbalanced series connection, but all cells have their own PCM (protection circuit module), so the worst that can happen is that some of the cells are not fully discharged when the first PCM shuts down
- The relays may fail by getting stuck open or staying closed, even half open or half closed, and nothing bad happens, the speaker will simply not turn on
The circuit is damn simple, very cheap and can be assembled on a breadboard with ease. It charges four cells simultaneously with a total current of 4A max. Unfortunately, that's also the end of the benefits, downsides are that you have to charge in silence and the cells are unbalanced. So not very sophisticated.
LED charging indicator
The TP4056 has two open collector status indicator outputs for i.e. attaching LEDs. I figured I could use four RGB LEDs with common anode to indicate the charging status of each cell. While charging, a LED would light up red, once finished it would light up blue. The green remains unused for now.
Have I mentioned the cells are unbalanced? That could be easily fixed by adding an Arduino to the project and configuring it to use some MOS-FETs and dummy load resistors to balance the cells while in use. The Arduino could also read the charging status from the TP4056 modules and display them in a bargraph or on a display, or instead of an Arduino something more powerful could be used, too.
Also, of course, there is still the option of adding a class D amplifier, as suggested in the comments. A class D amplifier would save a lot of space in the housing. That space could be filled with boost converters for higher sine power, or with a Raspberry Pi to do cool streaming stuff, and maybe a touch display, or just more batteries. Maybe I'll add all of those improvements in the future, we'll see.