Despite being someone roughed up by a toddler, the panda is still alive :-)
As they say in a certain cartoon series involving animals who love jumping up and down in muddy puddles: Hurray!
Sound quality issues
Over time, the sound quality, which was never Hi-Fi but still better than initially expected, started to degrade. To the point it became somewhat unbearable. My first thought was that the cheap usb sound card had an issue, but the sound was good when using headphones.
Second and third culprits were the amplifier and speakers. Plugging them on a mobile phone revealed that there was a bit of an issue but nothing very obvious.
Nevertheless, I replaced the embedded amplifier with an ubiquitous PAM8403 perfectly suitable to the task. I also took the opportunity to remove the flimsy jack connector and to solder the wires directly on the USB sound card.
Sound was definitely louder and clearer. Yet the Signal/Noise Ratio wasn’t good (however it was fine a year ago) and it was a bit of a mystery. Even adding a capacitor between Vcc and Gnd on the PAM8403 board didn’t help much.
(A word of warning: on a PAM8403, like on other class-D audio amplifiers, the output grounds are floating and SHOULD NOT be connected together!!!)
The Jukebox uses a powerbank to power the Raspberry Pi. The amplifier is powered via one of the usb socket. While puzzled by the problem, I tested a new setup using a second powerbank to power the amplifier... and sound became clear!
I still don’t really know what element injects some noise on the USB port (the sound card?, the Raspberry itself?, The RFID reader?...) but it has a strong effect. Probably that a capacitor somewhere has lost its mojo...
The easiest and fastest workaround was to bypass the Raspberry by using a Y splitter USB cable and a breakout board I had lying around... Sorted!
On the new setup, one power cable goes from the powerbank to the Raspberry Pi (as before) while the second one now powers directly the PAM8403 amplifier (via the breakout board).