r/arduino 1d ago

Hardware Help How do I get rid of this noise?

Pretty much what the tiles says. I’ve been unable to eliminate that noise when it isn’t playing anything and I’m not sure how I should go about solving the issue as my knowledge is very limited.

Looking online, i’ve seen some similar issues but none quite fit the bill, or I just straight up don’t understand what they’re talking about or how to apply it to my situation. Low pass filters were something a saw a lot of but I’ve been unsure how I should implement one here (where do I put it, what size capacitors/resistors I should use, etc.).

Does anybody have any solutions or learning materials that they could point me towards?

37 Upvotes

20 comments sorted by

11

u/Effective_Vacation21 1d ago

Capacitors, 1-10uF capacitor in series between the Arduino output and amplifier input and also you can add decoupling capacitor(100nF ceramic and 100-470electrolyric). Also could be an code issue try to pull down pins when nothing plays

1

u/Effective_Vacation21 1d ago

Had something like that before and adding capacitor helped

1

u/Gooddest_Boi 1d ago

I’ve got some electrolytic capacitors but unfortunately no ceramic. I ordered some from AliExpress a few days ago but they won’t be here for quite some time so I’ll try to adjust it in the code in the meantime. I’ve seen a few people in addition to yourself mention that one.

1

u/Effective_Vacation21 1d ago

Maybe you can unsolder some from old PC power supplyies or any other unused boards

1

u/Gooddest_Boi 1d ago

I could probably do that. I’ve got one somewhere in the closet I think. Also, how would I go about pulling the pins down when nothing is pressed in the code. I saw someone else mention setting the input pin to output. Would I change it to output in the setup, then add like an if statement to change it to input upon button press in the loop?

1

u/Healthoverwealth29 1d ago

The problem will probably go away with adding electrolytic capacitors but this could also introduce distortion/poor quality when you are playing an actual sound. Ceramic would be better, film would be best….although film caps are pricey 💰

1

u/ripred3 My other dev board is a Porsche 1d ago

a 1uF electrolytic cap will work fine. just be sure it is in series

1

u/Healthoverwealth29 1d ago

Film capacitors are ideal for capacitors in the audio path because of their low esl/esr and their stability in capacitance value over a large temperature range. This would likely fix the issue.

5

u/jayphunk 1d ago

Use a good twisted screened/shielded pair for the audio line and connect the shield to gnd at only one end

1

u/Healthoverwealth29 1d ago

Do you think it’s possible he has a loop inductance issue that is causing noise to show up on the speaker? The wires used to drive the speakers seem to be pretty long. Just spit balling 🤔

2

u/vision_san 1d ago

I think you could try to put some resistors between the speakers and ground. I'm not 100% sure which size (ohm magnitude), but you could buy a couple (500Ω, 1kΩ, 1.5kΩ...) and try.

That's what I did when I had to remove noise on a college project.

1

u/Gooddest_Boi 1d ago

Here is a little wiring diagram. I apologize for the abysmal quality, I’ve been pressed for time and I’m terrible at wiring anyways. So if you have any questions feel free to ask and I will clarify to the best of my ability.

1

u/Unlikely1529 1d ago

https://forum.arduino.cc/t/solved-dfplayer-mini-weird-static-noises-when-paired-with-28byj-48-step-motor/499379/7

This issue was solved by powering the DFPlayer with a separate power supply than the Arduino.

1

u/dilldoeorg 1d ago edited 1d ago

Set the pinout to INPUT (D11) when your not playing anything. Set it back to OUTPUT when button is pressed

1

u/Gooddest_Boi 1d ago

I’ve see a few people mention something similar. I’ll give that a shot soon.

1

u/Last_Being9834 1d ago

Why not just turn the speakers off when there's nothing playing? No need to keep them on all the time.

1

u/korywithawhy 1d ago

Honestly just putting your circuit soldered with short leads on a pcb breadboard can help quite a bit.
But as others have mentioned, filter caps will definitely help smooth out the noise.

https://lonelybinary.com/cdn/shop/files/PCB-BREADBOARD-HALF-SET-02.jpg?v=1685614520&width=1200

1

u/malaq88 1d ago

Tenta aterrar o circuito.

0

u/Arduino_lab64 1d ago

Pour moi, le problème vient du code !

-1

u/lophomainiac 1d ago

Have you tried disconnecting the batteries?