User avatar
Imperf3kt
Posts: 2409
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Noise isolation via Ferrite Beads

Mon Nov 13, 2017 12:41 am

I've been seriously unimpressed with the audio quality coming from the analogue TRRS jack. After numerous tests with literally dozens of combinations of speaker/amp/power source, I cannot get rid of this seriously aggravating static hissing. At low volumes, it is especially present, such to the extent that as I turn the volume down I can hear the hiss grow more prominent linearly.

I wanted to use bluetooth audio, which doesn't suffer this static, but the bluetooth audio on a Pi3b is... Problematic. If it works for you, congrats, it doesn't for me.

Anyway, after buying some 2.4GHz wireless peripherals and a lot more testing / research, I finally discovered the source of my static issue was caused by the bluetooth.
The main indicator that tipped me off was every time I typed or moved my mouse, the static instantly got worse until I stopped moving the mouse or typing.

What seems to be happening is my wiring is acting like an antenna and I believe adding a few ferrite beads to the power wires on my amp (PAM8403, soon to be PAM8406) and the speaker wires should help reduce this issue.

My problem though is I don't know what kind of bead, there seem to be many rated for different frequencies. Which would I need? I also have a few available on 0.6M USB-A to mini USB-B cables with 24AWG wires, is there a way to tell what kind is on these cables? They don't seem to have any effect.

I searched ahead of posting but I only get 11 results, most of them duplicates.
The closest topic I found was this one:
viewtopic.php?f=91&t=14575&p=150513#p150305
But it wasn't any help.
Google is ubiquitous - Try it today, it's free!
https://opensource.com/life/16/10/how-ask-technical-questions

FM81
Posts: 518
Joined: Wed Apr 17, 2013 4:33 pm

Re: Noise isolation via Ferrite Beads

Mon Nov 13, 2017 6:06 am

I assume you're speaking about analog audio?
You seem to have a ground loop: a part of raspberrys supply-current (which is full of noise) is taking the way over your audio-ground lines. There are several ways to solve this:
- a ground-loop-isolator (Puts a transformator in the audio way, gives a little loss of quality.)
- a powersupply for the RPi, full isolated from the rest of your circuit (Raspberrys current can only flow to the isolated part.)

Digital audio signals didn't have this issue; if electrical signal, you can put transformators in the signal-way where ever you want without quality-loss (many devices have included such already) and if optical the problem doesn't exist at all

Greetings, FM_81
A: What does the command 'cat /dev/urandom', can you tell me please?
B: Yeah, that's very simple: It feeds your cat with radioactive material!

User avatar
Imperf3kt
Posts: 2409
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: Noise isolation via Ferrite Beads

Mon Nov 13, 2017 8:31 am

I already tested for ground loops. While I am able to lessen the effect by powering the amp directly from the Pi, it does not eliminate it nor does it explain how moving my mouse turns a dull skkkkrtttskrt into SKRRTTTT SKRRRRTTTTT!!!

I also tested on other devices and the only devices that have this problem are my Raspberry Pi and another SBC. No other device I tested - which incidentally do not use bluetooth, have the issue.

I also noticed when I disconnect all bluetooth devices the noise goes away almost completely. Its barely noticeable once I remove all 2.4GHz devices.

There's also the odd mystery of why turning the volume down increases the noise (and in some applications, it causes horrible distortion)
Google is ubiquitous - Try it today, it's free!
https://opensource.com/life/16/10/how-ask-technical-questions

boyoh
Posts: 1284
Joined: Fri Nov 23, 2012 3:30 pm
Location: Selby. North Yorkshire .UK

Re: Noise isolation via Ferrite Beads

Mon Nov 13, 2017 9:50 am

Imperf3kt wrote:
Mon Nov 13, 2017 12:41 am
I've been seriously unimpressed with the audio quality coming from the analogue TRRS jack. After numerous tests with literally dozens of combinations of speaker/amp/power source, I cannot get rid of this seriously aggravating static hissing. At low volumes, it is especially present, such to the extent that as I turn the volume down I can hear the hiss grow more prominent linearly.

I wanted to use bluetooth audio, which doesn't suffer this static, but the bluetooth audio on a Pi3b is... Problematic. If it works for you, congrats, it doesn't for me.

Anyway, after buying some 2.4GHz wireless peripherals and a lot more testing / research, I finally discovered the source of my static issue was caused by the bluetooth.
The main indicator that tipped me off was every time I typed or moved my mouse, the static instantly got worse until I stopped moving the mouse or typing.

What seems to be happening is my wiring is acting like an antenna and I believe adding a few ferrite beads to the power wires on my amp (PAM8403, soon to be PAM8406) and the speaker wires should help reduce this issue.

My problem though is I don't know what kind of bead, there seem to be many rated for different frequencies. Which would I need? I also have a few available on 0.6M USB-A to mini USB-B cables with 24AWG wires, is there a way to tell what kind is on these cables? They don't seem to have any effect.

I searched ahead of posting but I only get 11 results, most of them duplicates.
The closest topic I found was this one:
viewtopic.php?f=91&t=14575&p=150513#p150305
But it wasn't any help.
Your best port of call is a forum dealing with audio signals , the Pi will not give the quality of sound that you want
Audio sound filtering is a very demanding subject, may be not for this forum. Audio impedance signal matching
Is every tight subject , to stop noise transfer in the signal. I'm not a audio engineer , just using common sense
.
BoyOh ( Selby, North Yorkshire.UK)
Some Times Right Some Times Wrong

jdb
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2007
Joined: Thu Jul 11, 2013 2:37 pm

Re: Noise isolation via Ferrite Beads

Mon Nov 13, 2017 10:57 am

Rockets are loud.
https://astro-pi.org

hippy
Posts: 5368
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Noise isolation via Ferrite Beads

Mon Nov 13, 2017 3:44 pm

Imperf3kt wrote:
Mon Nov 13, 2017 12:41 am
I've been seriously unimpressed with the audio quality coming from the analogue TRRS jack.
I cannot comment on the Pi 3B but when I tested analogue audio from a Pi B+ into my Hi-Fi it was absolutely fine for me, far better than I had expected it to be given the numerous comments about being poor quality on the forum. Certainly no hiss, background noise, clicking or distortion I could perceive, even with the volume cranked up full.

Maybe it's because I'm not an audiophile or I got lucky but I'd have no hesitation in using that Pi as a music player for my Hi-Fi via analogue audio.

For your own situation It does appear as you describe, pick-up from 2.4GHz peripherals or somewhere, injected onto something. It is hard to say what the solution would be without knowing exactly what is being induced, where and how, knowing exactly how you have everything wired.

Do you get the same problem when the amp is driven from some other audio source ? Does it appear when only the 0V of the amp input socket is connected to 0V on the Pi ?

I am not familiar with the PAM8403/PAM8406; do you get the same issue when audio is fed to a set of self-powered PC speakers or a proper Hi-Fi ?

User avatar
Imperf3kt
Posts: 2409
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: Noise isolation via Ferrite Beads

Tue Nov 14, 2017 9:16 am

jdb wrote:
Mon Nov 13, 2017 10:57 am
viewtopic.php?f=29&t=195178

Does that help?
Yes it helps a lot.
The static isn't completely gone, but its gone enough to not be noticeable unless you're actively listening for it.

It also fixed the issue where by turning the volume down I'd get terrible distortion.


An interesting side note is that while I was testing some different configurations, I got lazy and just hot plugged the power wires for the amp.
Usually when I do this, I would pull the positive first and negative second, but this time I pulled the negative off first.
The interesting thing that I found, is that even without the ground connected, the amp still functioned, but when I had the ground connected there was a tiny bit less hiss at low volumes.

Anyway, I'm satisfied enough with the result, thank you very much for the link, it was very helpful.

There does seem to be one weird issue now though. If I turn the volume above 50%, OpenGL fails and my Raspberry Pi falls back to using the legacy driver. Dropping the volume below 50% allows OpenGL to work again.
Google is ubiquitous - Try it today, it's free!
https://opensource.com/life/16/10/how-ask-technical-questions

Return to “Beginners”