ant_thomas
Posts: 115
Joined: Fri May 04, 2012 4:33 pm

Audio interference - Ground Loop - Power Supply - Issues

Sun May 25, 2014 10:07 am

Hello,

I'm in the process of making a Raspberry Pi based "boombox" running Volumio. From a software POV this all works great.

My issue lies with audio interference which seems to be related to power. Hopefully someone can point me in the right direction to correct it.

I'm using the following hardware

Raspberry Pi Model B rev2 (512MB)
CM108 based USB Soundcard - Link
VMA2012 Amplifier - 5V - Link
3.5mm audio cable
Pair of Creative speakers (probably not relevant)

A few scenarios I have tried and their results:

1.
Power Supply - HTC 5V/1A or EasyAcc 5 port or Asus 5V/2A
Ethernet connected
Amplifier powered via 5V/GND on RPi GPIO pins
Result: Lots of noise when powered up. Noise seems to link to CPU/Ethernet activity.
Other: When GND is removed the amp stays powered but the noise increases in volume, if 3.5mm cable is then removed amp is powered off (ground loop through 3.5mm cable?).

2.
Power Supply - 12V/2A through 5V converter
Ethernet connected
Amplifier connected direct to the 5V conveter
Result: Identical to scenario 1 - including the removal of ground and the amplifier still being powered.

3.
Power Supply - 12V/2A through 5V converter
Ethernet connected
Amplifier connected to a separate 5V converter which is connected to the same 12V supply.
Result: Identical to scenario 1 - including the removal of ground and the amplifier still being powered.

4.
Power supply - HTC 5V/1A or Asus 5V/2A
Ethernet connected
Amplifier connected to 4xAA rechargeable batteries - totally separate power supply.
Result: No noise at all.

5.
Power supply - HTC 5V/1A or Asus 5V/2A
Ethernet connected
Amplifier connected to totally separate 5V/1.2A power supply.
Result: No noise at all.


Realistically I do not want to use a different power supply for the RPi and Amp.

I don't mind using the 12V supply and having two 5V converters if it is reasonably easy to isolate them so there's no interference across them or ground loops (if that's the issue here).

Do I need a load of ferrite cores?

User avatar
redhawk
Posts: 3465
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1

Re: Audio interference - Ground Loop - Power Supply - Issues

Sun May 25, 2014 10:24 am

Do you have noise issues when using headphones with your CM108 adapter??

Does your noise consist of low frequency humming, rumbling, buzzing (@ 50 - 60Hz), continuous high pitch wining or something else??

Does adding force_pwm_open=0 to your boot configuration file /boot/config.txt (and reboot) stop the audio interference??

Richard S.

ant_thomas
Posts: 115
Joined: Fri May 04, 2012 4:33 pm

Re: Audio interference - Ground Loop - Power Supply - Issues

Sun May 25, 2014 10:43 am

I can confirm there's no interference/noises using headphones or connecting the CM108 to a totally different amplifier (my mains powered Onkyo surround amp).

I'll add that line to config.txt next.

The noises are various pitched squeaks rather than a constant hum. The squeaks seem to relate to USB/CPU/Ethernet activity. For example, when I update the Volumio database (over ethernet) it gets much worse.

The noise could be described similar to a dial-up modem connecting to the internet - or an Amstrad/Spectrum loading from cassette!

I'll try and get a video of it at some point.

ant_thomas
Posts: 115
Joined: Fri May 04, 2012 4:33 pm

Re: Audio interference - Ground Loop - Power Supply - Issues

Sun May 25, 2014 10:51 am

No change with force_pwm_open=0 added to config.txt

When the amp is connected to the RPi 5V/GND pins there is interference even without the 3.5mm cable connected.

When the 3.5mm cable is connected the interference gets louder.

User avatar
Burngate
Posts: 6327
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: Audio interference - Ground Loop - Power Supply - Issues

Sun May 25, 2014 10:56 am

In scenarios 1, 2 & 3, the 3.5mm jack is providing the ground for the power supply to the amp, so it isn't surprising that it stays powered.
The extra noise is probably because removing the ground wire increases the resistance of that part of the circuit; any current through that will produce a voltage which is added to the audio signal.

Scenarios 4 & 5 confirm this - in both cases, the amp's power is not running through the ground connection, there's no added noise.
But also, since the separate supply doesn't have noise from the Pi's power rail added to the amp's power rail, that might be why there's no noise.

You need to do two things.
1) Prevent the power and audio from going through the same ground wire - be that the 3.5mm jack cable or a separate wire.
The easiest way is to use a pair of transformers, usually sold as "ground-loop isolators" or similar description. Audio goes through the transformers, but DC power can't. Also, the audio signal is referenced to the amp's ground pin right at the amp.

2) Make sure the amp's power is clean - add extra capacitors, maybe feed it through inductors, etc.

drgeoff
Posts: 10916
Joined: Wed Jan 25, 2012 6:39 pm

Re: Audio interference - Ground Loop - Power Supply - Issues

Sun May 25, 2014 2:12 pm

In the absence of transformers, making the ground wire between RPi and amplifier as short as possible will help. It should also be a decent thickness.
Quis custodiet ipsos custodes?

ant_thomas
Posts: 115
Joined: Fri May 04, 2012 4:33 pm

Re: Audio interference - Ground Loop - Power Supply - Issues

Mon May 26, 2014 9:19 am

Thanks for the ideas.

I've now got a ground loop isolator on order.

Just trying to figure out what I need to do to clean up the power going into the amp.

Also read that the ethernet cable can cause a bad ground loop and that going to Wifi can help matters.

ant_thomas
Posts: 115
Joined: Fri May 04, 2012 4:33 pm

Re: Audio interference - Ground Loop - Power Supply - Issues

Mon May 26, 2014 11:02 pm

In case it's of any interest I've made some changes and got rid of one of the issues.

First of all: WiFi makes no difference at all.

I now have the RPi being powered by the original 5V converter and the amp powered by an LM2596S based converter. Both from the same 12V supply. When the audio cable isn't connected there is no noise/interference at all, so that's a definite improvement.

Once the audio cable is connected the noise returns. Hopefully the ground loop isolator will fix this.

ant_thomas
Posts: 115
Joined: Fri May 04, 2012 4:33 pm

Re: Audio interference - Ground Loop - Power Supply - Issues

Thu Jun 05, 2014 10:03 pm

Ground loop isolator has arrived and has as good as solved the noise problems.

This is the one I bought

Now to construct the boombox.

User avatar
Burngate
Posts: 6327
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: Audio interference - Ground Loop - Power Supply - Issues

Fri Jun 06, 2014 9:28 am

Glad it worked!

I have to say that Ebay listing is one of the more interesting ones I've seen
It says
3.5mm Car RCA Amplifier Audio Noise Filter Ground Loop Isolator Suppressor
Works with any portable device that has two 3.5mm audio jacks.
but the picture shows RCA (phono) plugs & sockets

What's interesting is
Package includes::
10-50V DC 30A Max 40A 50V 1000W Motor Speed Control PWM HHO RC Controller x 1
I assume they didn't actually send one of those

ant_thomas
Posts: 115
Joined: Fri May 04, 2012 4:33 pm

Re: Audio interference - Ground Loop - Power Supply - Issues

Fri Jun 06, 2014 9:33 am

Burngate wrote:Glad it worked!

I have to say that Ebay listing is one of the more interesting ones I've seen
It says
3.5mm Car RCA Amplifier Audio Noise Filter Ground Loop Isolator Suppressor
Works with any portable device that has two 3.5mm audio jacks.
but the picture shows RCA (phono) plugs & sockets

What's interesting is
Package includes::
10-50V DC 30A Max 40A 50V 1000W Motor Speed Control PWM HHO RC Controller x 1
I assume they didn't actually send one of those
Exactly what I thought when buying, but at £2.77 I thought I'd take the risk. Though I must admit one set of the RCA connectors were dirty, though it didn't look used otherwise.

Arrived fairly quickly as well compared to other far east ebay purchases I've made.

Return to “Troubleshooting”