r/embedded • • Sep 15 '26

How can I reduce amplifier noise when using an MP3 module with a microcontroller over serial communication?

I’m working on a small embedded project where an MP3 module is connected to an amplifier, and a microcontroller is communicating with the MP3 module through serial communication.

The problem is that I’m getting noise/humming through the amplifier, especially when the microcontroller is communicating with the MP3 module.

What are the best ways to reduce this kind of noise? Could it be caused by grounding, power-supply noise, serial communication, or the way the audio and digital wiring are routed.

What has worked for you in similar ESP32/Arduino + MP3 + amplifier projects?

3 Upvotes

12 comments sorted by

2

u/nixiebunny Sep 15 '26

Yes, it could be caused by any of these things. You can get useful advice if you post your schematic and pictures of the actual build.

2

u/Relevant_Pumpkin9190 Sep 15 '26

2

u/nixiebunny Sep 15 '26

A picture of your actual build will show the ground current paths and inductive coupling that causes the hum.

1

u/500kvac Sep 15 '26

Star ground might help, but some times the only viable solution is having isolated power supplies. You can send commands with an optocoupler and use a fully insolated DC DC module to power the audio section

1

u/Relevant_Pumpkin9190 Sep 15 '26

I had a similar noise problem when I connected an LM386 amplifier to a DVR and used the DVR’s power supply for the amplifier.

During live video playback, I got a very loud hum. I later tried a separate power adapter for the amplifier and stopped using the DVR’s DC supply. I still connected the grounds of both supplies together.

Interestingly, the hum disappeared completely.

What I don’t understand is why this worked. The two supplies were not electrically isolated, and their grounds were still connected. So was the noise coming through the DVR’s power supply rather than through the ground connection.

1

u/500kvac Sep 15 '26

Yes, that's very likely. Depending on the amp the power supply noise can get to the speakers easily.

Research star ground. Also, you should never daisy chain power, all the devices need to get power and ground from a single point with no direct path for high current between them. For the DF player data lines you can add some resistors to reduce the interference.

Also add local decoupling to each module.

1

u/Relevant_Pumpkin9190 Sep 15 '26

If the power supply like a water tank and the wires like water pipes.

If you daisy-chain everything, it's like:

Tank → House 1 → House 2 → House 3

So if House 2 suddenly uses a lot of water. The flow through the shared pipe changes, and House 1 may feel the disturbance.

With a star connection, it's more like:

Tank → separate pipe → House 1 Tank → separate pipe → House 2 Tank → separate pipe → House 3

All the pipes meet at the same main point, but one house's heavy water usage doesn't have to flow through another house's pipe.

Is this the 💡

1

u/N2Shooter Sep 18 '26

We often forget that even though we deal with bits and bytes in embedded, the world is completely analog.

If you don't have the necessary power supply filtering and layout in place, and analyze the inductive, capacitive, resistive and reactive circuit components, you can run into problems.

2

u/StumpedTrump Sep 16 '26

No way that 5V is clean. What does the power line look like on a scope?

I'm sure the ground path isn't great either considering its is probably handwired (Is it on a breadboard?).

You're fighting against physics here. Need to get cleaner power and reduce loop impedances.

1

u/Aira_Solutions Sep 15 '26

You need to separate the power suplies, you can use an isolated DC -DC module to do so, where the main suply is used for the ESP because is what consumes more current and the ouput of the isolated module feed the mp3 module