Hello again,
Disclaimer: Not an electrical engineer. Everything based on 20+ years audio-visual engineering experience in broadcast/film/recording studio. Not trying to teach anybody how to suck eggs. All provided such that somebody facing similar problems might have an “ah ha!” moment, potentially saving further headache.
TL;DR: Source of USB power can introduce catastrophic interference to USB-powered analog audio devices dependent on ground?/earth?/0V?/5V? referencing between connected devices and USB power sources.
The following are real-world examples of several forms of audio interference which may occur when utilising USB power at one or more points in an audio signal chain. The only factor changing between these recordings is the source of 5V USB power. Everything else remains entirely consistent between takes.
This setup is not intended to precisely replicate Dave Jones’s problem, instead a quick-and-dirty demo that I happened to have lying around.
Playback:Really, desperately cheap USB-powered analog PC speakers. Can detect power supply interference on Mars and beyond. Power via a USB-A and audio via a 3.5mm jack. No volume control, so permanently pegged at 100% volume. Why? Because they exhibit precisely the problem of interest out of the box.
Audio from the rear 3.5mm speaker jack of a Gigabyte Aorus x570 Master motherboard.
Recording:Behringer ECM8000 reference mic positioned almost in contact with speaker cone.
Focusrite Scarlett 2i2 (coincidentally) at 192KHz/24bit. In a known-good and well-used configuration that is completely free from the type of interference we’re interested in.
Test 1 - BaselineBaseline.mp3No power to speakers. Ambient noise only. Quiet ticking of clock. Breathing of nearby human. Perhaps a distant seagull.
Test 2 – Motherboard USBMotherboard 5V.mp3It doesn’t matter which USB socket, rear or front nor USB 2/3/3.1. They’re all the same in this regard despite drawing power from different parts of the motherboard internally.
Result: The unbearable sound of the computer “thinking”. Precisely that Dave records.
Test 3 – Anker 6-way mains USB power brick.Anker 5V.mp3Actions: During the test we repeatedly plug/unplug a phone which draws an additional 1.73A.
Result: Loud SMP switching noise when power bank is under low load. Noise disappears (ultrasonic?) when the phone’s 1.73A demand is added.
Test 4 – “Good” mains USB phone charger.Good USB 5V.mp3Came with a long-forgotten HTC phone according to the markings. Much less substantial than modern phone chargers and of unknown age.
Result: Much less discernible interference. Reason unknown. Perhaps permanently-high/ultrasonic switching frequency?
Test 5 – USB battery bankBattery Bank 5V.mp3Small mophie battery bank of unknown age. Looks and feels like a 2x 18650 effort.
Result: Again, something there, but as per the "good" charger test in that it's no longer aggressively disturbing.
Test 6 – Optionally-powered USB3 hub #1Powered USB Battery PC Switchover.mp3Actions: During the test we repeatedly apply and remove external power supplied by the mophie power bank.
Special note: Keyboard and mouse are also plugged in to this hub.
This one is interesting. The hub is optionally-powered in that it will draw current from the Motherboard unless 5V is provided to a micro-USB power input.
Result: Clear difference in that motherboard noise in greater evidence util battery 5V is applied, at which point interference is quieter, yet remains. Potential digital crosstalk/leakage within the hub itself?
Test 7 - Optionally-powered USB3 hub #2 on 5V battery powerPowered USB Battery changing keyboard lights.mp3The connected keyboard has a fancy per-key dimmable backlight. Can this affect power supplied to speakers via the hub?
Actions: Switching backlight between four factory default off/low/med/high presets.
Result: Yes.