I made this project by shajeeb (linked below), and I am having trouble with noisy ground lines. The circuit I made is the same as the diagram below except for where I connect the speaker and amplifier board to the audio input breakout board. The schematic stub for that is below as well.

The problem is that, when the potentiometer is configured to connect the audio input to ground, I get electrical noise out of the speaker. I believe this is because it is picking up the noise from the LED switching from the LED matrix. When I unplug the power from the matrix, the noise stops. I have tried adding a large electrolytic capacitor on the power line to diminish the noise, but it does not help much. If I could just isolate the LED matrix ground from the ground that the audio input uses, I think that would fix it. I want this to run on only one power supply (5 volt wall-wart). How should I puzzle this out?

If the image of my breadboard isn't good enough, I'll get a better one if needed.

LM386 Board: https://www.amazon.com/Onyehn-Amplifier-Module-5V-12V-Arduino/dp/B07P38H4P8/ref=sr_1_3?crid=2WTANKL61848R&keywords=lm386+board&qid=1701987559&sprefix=lm386+board%2Caps%2C87&sr=8-3


Here are a few photos: enter image description here

enter image description here

enter image description here

EDIT: I am going to put a few notes here.

The LED matrix itself makes a small amount of noise when the LEDs are turning on and off. The digital signal lines from the Arduino also make audio-frequency noise. Then, the power draw from the LEDs (a heavy load) causes some instability on the power line as well.

It took me forever to find a way to isolate this, but I finally found something. When I connect the ground of the amplifier audio input closer to the ground of the arduino (digital ground) and further away from the ground of where the audio jack enters the board (analog ground), the noise is worse. When the analog ground stays away from the digital ground, the noise is less. This is tricky because all of the grounds need to be connected for the system to work together, though the physical proximity makes a difference.

  • \$\begingroup\$ In the hand-drawn schematic, a pot marked "volume adjustment" is shown. Why do you have this when there's a volume control on the LM386 board, can you not use that? Is this the pot that is causing the noise? \$\endgroup\$
    – LordTeddy
    Dec 7, 2023 at 23:09
  • \$\begingroup\$ The reason I use a potentiometer is because the volume adjustment is difficult to access and it is also very sensitive. I believe it adjusts the gain, so I wouldn't want to touch it anyway after I adjust it to give me the max gain without clipping on the output. \$\endgroup\$ Dec 7, 2023 at 23:37

3 Answers 3


I think the problem is in how you've connected your wiring.

It's clear that somehow the matrix is causing the problem, and it's most likely a GND issue due to the pot. If we look at the wiring. enter image description here

It looks like the GND connection to the POT is straight in the path of the power supply for the matrix (white arrows). What happens here, is the current in the GND wire causes its potential to rise, through V = IR. Though the voltage might be relatively small, once you add a lot of gain for Audio it can become significant. I'd suggest moving the GND connection of the pot somewhere closer to the amp, it looks like the module has a spare GND connection (yellow circle), this would be ideal.

GND paths are always important, but particularly when you're working with a breadboard that doesn't guarantee the lowest resistance connections then much more so.

  • \$\begingroup\$ The matrix power connections are on the bottom left of the breadboard (red and black wire pair). It does make sense to put the ground connected to the pot closer to the amp board, I'll try that. \$\endgroup\$ Dec 8, 2023 at 1:39
  • \$\begingroup\$ Oh yes I see I've got that a bit wrong, still the point remains if you get the GND wire of the pot as close to the Amp board that should help. I'd stress the value of using a direct connection to the board, not a shared track. \$\endgroup\$
    – LordTeddy
    Dec 9, 2023 at 23:05

There are different means to solve such problems (more and less) between analog and digital circuits - AFAIR:

  • use big ceramics capacitors (e. g. 100 nF to 470 nF, even Y5V ok) before/near the power pins of analog and or digital ICs
  • connect the 5 V and ground first to the analog parts and after that to the digital schematic parts - or separate ground/5V lines starting from the power supply, perhaps each of them even with LC filters
  • star ground plane (also for 5V) (for analog circuits) - or ground/5V planes
  • put all analog electronic in a metal box (connected to ground) - even a ferromagnetic? - or do not place/mix digital and analog electronics near/next to each other on breadboard/PCB layout
  • twist all analog electronic line pairs (or use coax cables) (to reduce disturbance by electromagnetic fields)
  • also twist all pairs/groups of isolated wires, that carry strong currents (to reduce emission)

PS: see here for LM386 ground problems

Some more/correcting inputs from more experienced guys?

  • \$\begingroup\$ I just moved the black and orange power input wires from the right side to the left side of the breadboard (right next to the LED matrix power wires) and put a large electrolytic cap next to them both, and that gets rid of 60%-80% of the noise. Not quite perfect, but putting the power source next to the most power-demanding device seems to help. \$\endgroup\$ Dec 7, 2023 at 23:36
  • \$\begingroup\$ @Jameson Gatewood: Good that you got a solution. a) A diagram/draft showing the connection in details/reality (without ground symbols) how is the solution now, that would be good, if you can provide one. b) electrolytic cap do not help with higher frequencies because its construction - use first a big ceramic capacitor (especially next to digital circuits), because they are good at high frequencies - and perhaps a Tantal or electrolytic cap if needed as well. \$\endgroup\$ Dec 9, 2023 at 10:22
  • \$\begingroup\$ I found that the output from the digital control pins used to control the LED matrix was coupling with the audio signal; I am working on reconfiguring my breadboard to try to separate the analog and digital to see if that will help. The 1000 uF electrolytic capacitor does help when placed on the power lines. I will update this post again when I get another result. \$\endgroup\$ Dec 10, 2023 at 5:50

So, I think the problem was that I wasn't properly isolating my analog and digital circuitry. When my ground wires for analog and digital devices were connected closely together, I had more unwanted feedback. When they were separated with some distance, the unwanted noise was minimized. The audio wires being short helped as well (I have picked up radio stations in my speaker because of loopy wire!). In this case, I suppose the star grounding system wouldn't work, though individual grouping of analog and digital grounds did help. After I got my grounding correct, the 1000 uF electrolytic capacitor I am using to smooth out the power lines close to where the LED matrix gets power makes only a small difference (though it still helps). Grounding is super important! Thanks for the answers, everyone!

I also accidentally fiddled the original LM386 amp to death in trying to improve the circuit. I found another audio amp in my parts, and it turns out that it is 1000 times better! Very easy to use and very configurable. It can get extremely loud too :). I won't use those LM386 boards again. https://www.sparkfun.com/products/11044

Also, the final setup: enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.