Problems with ESP32, PCM5102 ground-loop

Hello everyone,

I have a problem with my latest project. I am currently trying to create a multiroom audio device consisting of an ESP32 which receives an audio signal via WLAN, this digital audio signal is converted into an analog audio signal by means of a PCM5102 module. This signal is then amplified by a TPA3118 board and output through a loudspeaker. The real problem now is that a relatively loud permanent noise can be heard.

Background: both the ESP with the PCM5102 and the audio amplifier are operated via the same power source.

Attempted solution: I have operated the audio amplifier via a different power supply unit, which has solved the problem. Unfortunately, this is not a practical solution for me.

I also tried to connect a ground loop isolator (simply a 1:1 transformer) between the output of the PCM5102 and the amplifier. This reduced the noise problem but did not solve it (not nearly on the same level as with two power sources).

Does anyone have any ideas as to what could be causing this and how to solve the problem?

Many thanks for your ideas

So noise is to be expected.

It would help if you could post a schematic of the project, a photograph of the system as built clearly showing all connections and details on the power supply used.

Do you have an oscilloscope? I imagine it's very difficult to troubleshoot this problem without one, since you'll need to figure out the source and nature (esp. frequency) of the noise.

Sounds plausible; you mention the noise being caused by a ground loop, but that's likely to be one of the lesser concerns.

As you noted, the use of a separate power supply really helps. Consider this as a possible solution that's simple and proven to work.

If you must use a single power supply for the entire project, keep in mind that your digital devices inject noise into the Vcc line. Particularly the ESP32 (and certainly if it's using WLAN) will likely create HF noise on the 3.3V rail. I expect the higher frequencies to filter straight through the linear regulator into the Vin of your ESP board.

The logical thing to do is to decouple the digital and analog power supplies. Start with tapping off + and GND from your power supply into a common mode choke (feeding GND and Vcc to the audio section through it) and feed from there into one or two R/C filters to get rid of most of the noise. Especially the R/C filters will help. Dimension the filters to filter out the dominant frequencies; for capacitors, use a combination of values such as 100uF electrolytic, 1 ~ 10uF ceramic and 10 ~ 100nF ceramic in parallel. Choose the series resistors of the R/C filters based on the power consumption of the audio section.

Since the power amplifier will draw more current than the DAC, but will also have much better ripple rejection, I'd suggest splitting off a second pole from the audio power supply with additional filtering for the DAC section.

Keep in mind that the R/C filters will drop some voltage, so verify that you'll have sufficient voltage left at both the DAC and the power section. If you post a schematic, I could give some more concrete pointers. For instance, if you have some headroom, you can use a linear regulator to derive a supply from your main power supply for the audio part, and then apply whatever additional filtering that may be necessary to clean it up (see above).

When it comes to ground loops, physical circuit layout is important. Use a star ground for the audio section. Only connect digital/ 'dirty' GND and audio GND in a single place.
Do your audio modules (DAC and amp) have separate analog GND pins?

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.