The NEW Build Your Own Arcade Controls

Main => Raspberry Pi & Dev Board => Topic started by: raidersan on June 16, 2022, 04:06:57 am

Title: Ground loop in arcade cabinet?
Post by: raidersan on June 16, 2022, 04:06:57 am
I have started a revamp of an arcade cabinet I built years ago, replacing the ageing PC with an RPI4. I also used the opportunity to simplify the components when it comes to the electrical supply, which probably created the audio problem I am having.
I decided to keep the ATX power supply to provide 5V to the RPI4 and 12v to the amp. The RPI4 is connected to the amp through the 3.5 Audio out plug. By doing all this, I have ended up with horrendous electrical noise in the speakers as the RPI works. I initially thought I had a bad wiring issue with the video feed on the 3.5 plug but I have corrected this and it has not made a difference. I have tried to diagnose and searched the net for information but I am afraid my knowledge of electronics is far too limited to get to the bottom of the problem. My suspicion based on that research is that I have a ground loop, but that is an educated guess. If I have one, I am also looking for help as how to fix it. I am not interested in adding USB DACs and other sound cards, I would consider re-introducing another dedicated PSU for the amp if that is the only solution but would prefer to try to sort it out cleanly with the components as described. Here is the diagram of my setup. Many thanks in advance for the help!

(https://i.postimg.cc/DyhPtbZg/Meeting-10-Jun-2022-224007.jpg) (https://postimg.cc/MXsBBH1M)
Title: Re: Ground loop in arcade cabinet?
Post by: Zebidee on June 16, 2022, 06:04:06 am
Unfortunately, there are many things that might be going on. Here are a few things to thin about:

- Make sure that no DC grounds are connected with the 220v "ground"

- PSU might be failing, so try with a known good PSU

- Try using a typical arcade cab PSU, "Peter Chou" type, that provides both 12v and 5v power. They are not expensive.

- getting a separate PSU for your amp is a good idea to try

- Fit a line filter to your AC power inlet. This will help reduce electromagenetic interference from power lines (and reduce any interference your devices may put back)

- Maybe your Pi4's power regulation is crap. Try the amp with something else to rule this out.

- Long power lines can lose voltage over distance. A capacitor (say 100-470uF) at the device end, across the positive and negative power input terminals, can help to smooth out voltage variations as power demand fluctuates

- Long signal transmission lines can lose signal strength over distance. Worse, they can act as radio antennas. Use well-shielded (or high capacity, thick) signal cables and keep the lengths short.

- You could fit Zobel termination to your speakers to remove a lot of unwanted noise/static/oscillation: a simple way to do this is add a capacitor (say, 0.1uf (104) ceramic) and then a resistor (say, 10 ohm/1W+ rated, metal film or carbon film type, not wire wound type) across the positive and negative terminals (Values are suggestions only, exact values for your application may vary) So that your diagram looks like this:

POSITIVE(+)......CAPACITOR......RESISTOR......NEGATIVE(-)

As always, any home-baked advice I give is provided on the basis of all care but no responsibility. If you do something I suggest and your world turns into something FUBAR, please don't blame me :D

Cheers  :cheers:
Title: Re: Ground loop in arcade cabinet?
Post by: 10yard on June 16, 2022, 07:07:07 am
I had a similar problem with sound interference out of the Pi's 3.5mm jack.  It was resolved by taking sound instead from the HDMI via a simple VGA adapter (pictured below).

(https://i.imgur.com/7eZTZUG.png)



Title: Re: Ground loop in arcade cabinet?
Post by: raidersan on June 16, 2022, 03:48:11 pm
Thanks both for taking the time in replying.
It looks like the 3.5 audio out is clean, I can output it to a portable speaker without issues.
I can also get a clean enough sound from the amp if I power the Raspberry Pi from an external psu.
So the problem seems to be related to the RPI and the amp on the same PSU.
Noise from the RPI is making its way back to the PSU and down the amp, I can hear the activity corresponding the either sd-card reading or CPU busy.
Would I stand a better chance if I got power from a different molex for 5 and 12v lines? Or a different PSU rail (if I have another one)?
I assume that the HDMI adapter solution to extract sound is not going to help in my case
Title: Re: Ground loop in arcade cabinet?
Post by: pbj on June 16, 2022, 05:07:24 pm
Get a ground loop isolator for $5 and move on with life.

 :cheers:
Title: Re: Ground loop in arcade cabinet?
Post by: Zebidee on June 16, 2022, 06:19:11 pm
I doubt that ground loop isolators will solve your problem.

I think you'd be better trying a new PSU.
Title: Re: Ground loop in arcade cabinet?
Post by: raidersan on June 26, 2022, 05:06:41 am
Ok the verdict is in!

Tried different PSU's, even a brand new expensive one that I got for a PC build, tried a Jamma one too. No difference whatsoever.
A Ground loop isolator stopped the noise like magic. a few quids on eBay. One trick, keep the isolator close to the source. When I had I on the input of the amp, there was still some noise left, but on the output of the RPI, the sound is very clear

Thanks for your help!
Title: Re: Ground loop in arcade cabinet?
Post by: Zebidee on June 26, 2022, 07:12:22 am
Glad that worked out then.

By new PSU I also meant a completely separate ones for Pi and amp, whatever appropriate :)  It seemed to work for you too in your earlier post. In fact I always setup my cabs like this, separate PSU for audio, to avoid a potential hum. Of course, you could do both separate PSUs and ground isolators! Probably most people won't be able to tell the difference though.
Title: Re: Ground loop in arcade cabinet?
Post by: raidersan on June 26, 2022, 09:56:30 am
I am back to my old cheap ATX PSU recovered from a 15yr old PC and the ground isolator. The PSU feeds everything which simplifies a lot of things and the sound quality is great!