Maker Pro
Maker Pro

MP3 player hum

BlueObsecurit

Mar 24, 2021
36
Joined
Mar 24, 2021
Messages
36
Hi. Got a project going where I use a DfPlayer mini as an Mp3 player.

When starting to play, there is a hum. It isn't there/not noticable when the song starts really playing, but this depends on the song. Low volume on the song tends to mean there is a hum. I'm not sure if the hum is always there, and gets drowned out by the music, or if it stops because the song "uses" those frequencies? As probably quite apparent, I'm no expert. I can imagine it may be interference.

The player sends audio to a 3.5mm jack.

If you search for noise or hum with this playing module, you will get plenty of results. Typically what they refer to is not what I am hearing. There is usually talk about resistors on the TX/RX pins, I have a 1K resistor on one line, nothing else helps on this, 10K, both lines, 1K both lines etc etc doesn't help for this. The noise they refer to is a alternating loud drone. I have this, but don't get it into the audio because I have separated the two grounds of the module. (one ground to ground electrically, one ground to ground audio).

I think I need a filter of some sort, but I don't know where to start. Can someone help? If you need more info let me know.

module: https://wiki.dfrobot.com/DFPlayer_Mini_SKU_DFR0299
 

BlueObsecurit

Mar 24, 2021
36
Joined
Mar 24, 2021
Messages
36
an amplifier and speakers or headphones ?
Headphones, although I plan to use it for a variety of devices with 3.5mm jack, such as battery powered speakers and car audio system. Have not checked if it is present at those playback devices, but it will be used mostly with headphones.
 

BlueObsecurit

Mar 24, 2021
36
Joined
Mar 24, 2021
Messages
36
show a circuit of your layout.
VW7WhXu.png

Hopefully this is decent
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
To determine whether the hum comes from the step-up converter (U1V11F5), remove the converter and connect the rest of the circuit to a good 5 V power supply (not power bank, not a USB wall wart). If the hum vanished, the switching of the step-up regulator is responsible. In that case an LC filter between the step-up regulator's output and the VCC of the other modules can help.
If the hum persists even with a good clean 5 V power supply, check the wiring. Keep the wires as short as possible, connect GND at one point only (star connection), namely the GND pin of the voltage regulator. Do the same for Vcc.
Use shielded wire for the audio output from the player to the audio jack (shield connected to GND).
 

BlueObsecurit

Mar 24, 2021
36
Joined
Mar 24, 2021
Messages
36
good 5 V power supply (not power bank, not a USB wall wart)
Don't have this. Could I "simply" make an LC filter to see if this is the case? How do I begin to put that together? I have 470uf, 10uf and some ceramic caps, can I cobble something together with that for now just to see if it works?

Keep the wires as short as possible
This project is on breadboard currently, so not ideal in that respect. Sorry if I'm fumbling in the dark here, but how about putting some metal over it? (making sure it won't short anything) Like a faraday cage?

Use shielded wire for the audio output from the player to the audio jack
I'll see if I can fix something up, don't have actual shielded wire, and I suspect it would be a bit impractical to connect. In this case, which ground should I gonnect it to? The audio ground or the "electrical" ground?

I'll also see if I can analyze the audio somehow, to see if I can find out what frequency the noise is, but I'm not sure if I'll be successful.

EDIT: I am able to use the line in on my computer to analyze the audio, however I don't know what I am looking at/for, and there is no clear output suggesting a frequency for the noise
 
Last edited:

BlueObsecurit

Mar 24, 2021
36
Joined
Mar 24, 2021
Messages
36
Alright, some experimentation later.

a 470uf cap between VIN and GND to the 5V regulator does nothing.

If I don't call the function to adjust gain on the DFPlayer DAC, it starts at max volume. This does not produce the noise, but it is LOUD and unless your headphones has onboard volume adjust you will destroy your ears. Alternative might be to have max volume, but adjust volume with a pot at output. But I'd prefer to not do it this way, because it's a bit backwards...
 

Audioguru

Sep 24, 2016
3,656
Joined
Sep 24, 2016
Messages
3,656
Every audio system built on a breadboard produces hum and other interference.
Each wire and each strip of contacts on the breadboard is an antenna that picks up electrical 50Hz or 60Hz that is all around the breadboard.
ALL home audio systems are connected together with shielded audio cables.
 

BlueObsecurit

Mar 24, 2021
36
Joined
Mar 24, 2021
Messages
36
The inline inductor of a LC filter should take much of the hum noise away.
Or, just use a ferrite choke.
Ferrite choke on power, aux, cables from module to jack, etc etc no change. Any ideas on inductor values? How to make it? (I may have unsuitable cable) It leads me to believe this may be something else I am hearing. It may be better described as white noise?

ALL home audio systems are connected together with shielded audio cables.
Right, but what does this look like when we are talking breadboard scale? I get that there is interference, but the shielded cables I can get are large, at least 1.5mm^2. I don't see how I would work this on a breadboard, because it is tiny distance with large cable that will be even smaller distance when I eventually mount this on some kind of board. How do I practically solve this?

I've tried using other audio jack, various different grounding, various 470uf cap positions, ferrite bead here and there.
The board has an onboard DAC. I can set the gain and volume in software. If the volume and gain is max, there is no noise. leads me to believe I should look at doing something in the region between the Mp3 module and the 3.5mm jack.
 

Audioguru

Sep 24, 2016
3,656
Joined
Sep 24, 2016
Messages
3,656
Breadboards guarantee hum and interference, don't use a breadboard for audio or video.
The contacts on a breadboard corrode and wear out causing intermittent connections.

In my career and hobby I made thousands of prototype circuits and they all worked perfectly because I planned a perforated stripboard layout, then cut the copper strips to length, then soldered all the parts and a few short jumper wires on the copper strips..
The copper strips and a few short jumper wires formed most of a compact pcb then the parts are soldered on.
Most of the circuits were custom designed by me and only one was needed. My prototype on a stripboard looked professional enough to be sold as the final item. Most of these items I made worked for years and none failed.

I laugh for hours when I see the photo of a breadboard with its wires all over the place.
 

BlueObsecurit

Mar 24, 2021
36
Joined
Mar 24, 2021
Messages
36
Breadboards guarantee hum and interference
Just let me type out my understranding of what you're saying. You think what I am hearing is EM interference. That's obviously resonable. The steps I have taken so far to eliminate the noise has not been successful.

I get the position with breadboards. What I am trying to do is to make sure I have the source of the noise before I go the the step of permanently building the circuit. The ferrite bead didn't help, is this because I am misunderstanding something about it? Maybe I've done something wrong? I placed it on the wires feeding the audio to the jack, on the headphone wire right after the jack and on the headphone wire where it connect to the headphones. I want to do this so that I don't build a more permanent circuit that needs to be modified because i need to add something more.

How else can I test if the source of the noise is external?

The copper strips and a few short jumper wires formed most of a compact pcb then the parts are soldered on.
This sounds like a technique I have not discovered before. Do you cut appropriate strips and then freehand it? Do you have a picture?

I laugh for hours when I see the photo of a breadboard with its wires all over the place.
Why is that?
 

Martaine2005

May 12, 2015
4,932
Joined
May 12, 2015
Messages
4,932
I think the general concensus is to not use a breadboard for this type of circuitry.
Or expect some kind of noise that should disappear when assembled properly on a PCB.
How else can I test if the source of the noise is external?
remove the converter and connect the rest of the circuit to a good 5 V power supply
Don't have this.
Well you need to get one to start the process of elimination.

You don't have to make a permanent circuit, just solder the components to a perf/strip board keeping all connections as short as reasonably possible. It's just proof of concept before a final build.
Many, many prototypes and versions are normally tried before finally getting it right.
How else can I test if the source of the noise is external?
You could build yourself the "Carlson Super Probe"
www.youtube.com/watch?v=tS7SvoT8Ivw

Martin
 

BlueObsecurit

Mar 24, 2021
36
Joined
Mar 24, 2021
Messages
36
I think the general concensus is to not use a breadboard for this type of circuitry.
That's completely valid and I don't have an issue with that. But that's what I currently have for better or worse. I guess what I need help with is how to easily and cheaply:

1. Use the process of elimination to find the source of the noise
2. Implement a permanent fix to this for the actual prototype

Well you need to get one to start the process of elimination.
When I see "good power supply" I'm thinking lab power supplies. I'm not in a position in life where I can aquire one, it is just not feasible for various reasons I won't go into here. The entire circuit can be powered using USB-c power from my desktop computer, but I imagine this isn't good enough when it comes to power supply. (I've tried, it doesn't help)

The big issue when using sub-par tools and methods to test something is that you can't be sure if it didn't work because of the shitty tools or because you're tackling the wrong issue. And that's entirely on me. But part 1 of what I need help with doesn't have to be practical, it just has to eliminate an option. This is why I'm wondering about a faraday cage.

I found out the microcontroller also has a noisy ground. I don't have protoboard right now, but I'll get some and try to eliminate components and shorten connections to see what happens.

Hope this isn't taken the wrong way, I'm very grateful to be able to benefit from the vast amont of experience and knowledge here. Thank you all.
 

Audioguru

Sep 24, 2016
3,656
Joined
Sep 24, 2016
Messages
3,656
Here is an example of a circuit made on stripboard. The parts and a few jumpers are all soldered on the bottom where the copper strips are. Some of the copper strips are cut to length then the same strip is used again in a different location.
The parts are close together and there are no long antennas that pickup hum and other interference.
 

Attachments

  • stripboard curcuit.png
    stripboard curcuit.png
    222.8 KB · Views: 3

BlueObsecurit

Mar 24, 2021
36
Joined
Mar 24, 2021
Messages
36
Alternatively try 3 AA alkaline batteries.
Done, switching regulator completely out of the circuit, no change.
I'm pretty sure I'm hearing noise introduced by the DFPlayer module.
Still working on doing a test with an absolute minimum of components.

Here is an example of a circuit made on stripboard.
Alright, I'm familiar. I misunderstood what you meant by cut earlier. What tool did you use to design that? It's always been the plan to move the project to a stripboard, but I struggle with planning it. Seeing as it is meant to be a functional prototype that I can carry around and at some point 3d print an enclosure for, I'd really like it to be compact and with some kind of design intent.
 

Audioguru

Sep 24, 2016
3,656
Joined
Sep 24, 2016
Messages
3,656
There are programs available for stripboard layout but I like using my brain instead.
A drill bit or one made with a handle on it cuts the strips.
 

BlueObsecurit

Mar 24, 2021
36
Joined
Mar 24, 2021
Messages
36
using my brain instead.
I don't think anybody on here dislikes this, but sometimes it can be slightly difficult to keep track! :)

Experiment with a minimal amount of components - one button, DFPlayer and jack and ferrite bead.
Still there. At this stage I'm pretty sure that what I am hearing is introduced by the DFPlayer.

1. What can I try to filter it?
2. Failing that, how do I best use a pot to make a volume control after the module audio output? What is a good value?
(Seeing as the hum is not present at max module volume)
 
Top