NicoRaspi
Posts: 6
Joined: Wed Jan 28, 2015 12:35 pm

Noises from Pi b+ analog output

Mon Feb 09, 2015 4:11 pm

Hi,

I have a pi b+ powered by 1A wall switching adapter and I connect the A/V output of the PI (just Right , Left and Ground ) to an external amplifier (3W) which shares the same power supply (5Volt)

If I dont play anything via omxplayer command , I hear a lot of noises in my 4ohm speaker. If I surf on apache http web server of my PI from a PC browser , the noise incrases. It seems everithing I do in the pi is replicated in my speakers.

So I decided to switch off the amplifier and to connect the A/V output to the microphone input of the PC (the PC doesnt share the same ground since its powered from its battery) but the noise is still there .

The only way I can get all working is using 1 switching power source for the amplifier and one for the pi and connecting them with the audio cable.


I started to think about ground loop, ferrite baeds, EMI issues and so on but I still cant find the reason of this noise.
I wonder if anybody was able to power the pi and an external class D amplifier using the same power supply or mybe I'm losing some important aspects to consider.

Hope you can support .
Thanks in advance
Nico

forenbenutzer
Posts: 148
Joined: Thu Aug 02, 2012 7:08 pm

Re: Noises from Pi b+ analog output

Mon Feb 09, 2015 4:59 pm

I also get crazy noises if I connect any USB WLAN adaptors. The analogue output simply is not intended for high end audiophiles.
Either "read out" the audio via HDMI or use an additional USB sound card. It's sad but it's also an acceptable workaround.
Pitendo - Case And Emulator Project - http://edv-huber.com/index.php/problemloesungen/12-pitendo

User avatar
pluggy
Posts: 3635
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK
Contact: Website

Re: Noises from Pi b+ analog output

Mon Feb 09, 2015 5:04 pm

The Pi has no analogue capabilities, the 'analogue' audio is entirely generated in software. Its a fudge in other words, its not surprising that doing other stuff with the processor, USB or GPIO makes funny noises.
Don't judge Linux by the Pi.......
I must not tread on too many sacred cows......

Nightwing2012
Posts: 47
Joined: Sat Oct 29, 2011 9:19 pm

Re: Noises from Pi b+ analog output

Mon Feb 09, 2015 6:03 pm

Split the power supply. Shield the speaker wires. And there are a lot of great DAC out there for the PI if you want good sound.

PS: 4ohm? What is the impedance out of the amp?

NicoRaspi
Posts: 6
Joined: Wed Jan 28, 2015 12:35 pm

Re: Noises from Pi b+ analog output

Mon Feb 09, 2015 6:56 pm

Ok, Thanks to all .

I dont want to use hdmi or external USB sound card to make it working.
I just want to connect the analog output to an external amplifier using the some power source.

Nightwing2012, what do you mean with " split power supply" ? and shield speaker wires?

My amplifier is an amazon class d amplifier (http://www.amazon.it/PAM8403-Digital-Am ... plifier+5V).

Hope you can help

pksato
Posts: 295
Joined: Fri Aug 03, 2012 5:25 pm
Location: Brazil

Re: Noises from Pi b+ analog output

Mon Feb 09, 2015 6:58 pm

Hi,
You using a correct connector wiring?
B+ share Audio and Video on same jack, if use incorrect wiring, get no sound or noise.

Code: Select all

 1 2 3 4        cable
<=+=+=+=|___========

1 Audio
2 Audio
3 GND
4 Video
If swap GND(3) and Video(4) get no sound or noise.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 12021
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Noises from Pi b+ analog output

Mon Feb 09, 2015 7:06 pm

Analog audio is generated by two PWM enginse (hardware PWM) fed into two (digital) amplifiers powered by a separate micro power supply, so its output is NOT dependent on the noisy digital supplies, and the amplifiers digital input levels are also not affected by noise from the digital power, the cleaned up PWM signals then go into two analog filter and are converted to a stereo audio signal.

The PWM mode used isn't the same kind as used for say servomotors, but more resembles the output of the 1-bit ADC's of CD-players, in that it spreads out the ones and zeros evenly, and with as high a frequency as possible, so filtering works better.

The output has an impedance of several kilo-ohms , which explains why you cant drive headsets with it, you need an audio amplifier with a >10K input impedance.

Most noise problems result from the fact that the PI isn't a grounded audio device.
Noise from digital signal power were a problem with versions of the PI prior to the B+, but not any more.

pksato:
the contacts GND, and VIDEO in the A/V cable will be effectively shorted together when you plug in a stereo (TRS) plug so GND will be connected, (and no its designed so that it does no damage to the video output, even IF it has a signal on it, which shouldn't be the case) but in essence its best if composite video will be turned off, which is the default when using HDMI.

NicoRaspi
Posts: 6
Joined: Wed Jan 28, 2015 12:35 pm

Re: Noises from Pi b+ analog output

Mon Feb 09, 2015 7:44 pm

Thanks again,
I built my own audio cable correctly. Since I know that there is also video signal in the TRS jack so I paied attention in order to match all the audio signals correctly on both side (Left,Right and Ground) .

mahjongg :
I have also used an other class D amplifier(http://www.ebay.it/itm/Version-B-TDA729 ... 567070eb80) powered at 12V (then with a DC-DC I get 5V for raspi) and from the datasheet (IC TDA7297) I see that it has 25K input resistence (>10k) : I have the same result
Do I have to ground the pi?
I cant measure the noise frequencies since I have not the oscilloscope.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 12021
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Noises from Pi b+ analog output

Tue Feb 10, 2015 7:08 pm

Noise problems are always a big problem, because you do not know where the noise voltage that generates a differential input (noise) signal on the (pre-)amplifier comes from, (what the driving source of the noise signal is) it may be the noise is actually driven into the GND (or VCC) of the amplifier, in which case grounding the audio source (PI) makes the problem bigger, instead of smaller. Best you try, and also try to make the ground-connection between PI and amplifier as hefty as possible, (shorting any potential noise signal between the grounds of both), but avoid creating a loop, (dont make a loop from the two grounds) that can induce humm into the GND. Actually the best solution may be an audio isolation transformer between PI audio out and amplifier (I mean two transformers obviously for stereo).

One trick you can try is to actually ground the input of your amplifier to earth, to see what effect that has. If you get enourmous amounts of noise/hum, the noise/hum is coming in via the power supply of the amp.

In any case keep the sensitive (high impedance) connection as short as possible.

Do try if grounding the PI to earth makes a difference, it may well be, the noise is driven into the common (floating GND) of the PI.

I hope this is clear, its a difficult subject.

One thing that is suggested, is that the PWM output itself is noisy, which it is not! It may not be sufficient for a real audiophile, but it's audio signal should NOT drown in noise.
By the way, PWM audio is by nature sensitive for lowering the digital volume, this drastically reduces the signal to noise ratio, so try to always drive the PWM to a reasonable level, the loudest that works without too much clipping. Lower the digital level too much and you throw away the dynamic and sample range.

LandBarge
Posts: 2
Joined: Mon Feb 01, 2016 3:12 am

Re: Noises from Pi b+ analog output

Mon Feb 01, 2016 3:43 am

Sorry to dig up an old thread, but those posting here seem to have some knowledge I need to learn from... :)

I have a Pi 2 running Volumio and supplying anologue audio to an old Sansui AU-555A amp.

( http://stereonomono.blogspot.com.au/201 ... -555a.html )

The amp has a stated input sensitivity of 180mV on the Aux input (2mV on phono) and impedence of 50k Ohms on any input.

Now the issue... Audio volume is low - very low... It doesn't help that I'm running this setup outdoors, but the amp needs to be cranked way to far to produce a workable volume (as would be expected, on phono the volume is there for sure - too much maybe - with some distortion as well) - there's a little of the crackle and hiss described by others when using the analogue outputs, but bearable.

Does anyone know how the voltage output on the analogue audio compares to that of the amp I'm using? Would I be better off using the HDMI output and a HDMI to Analogue converter? (I was trying to avoid a separate DAC for simplicity - but I may not have a choice)

Thanks for any advice...

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

Re: Noises from Pi b+ analog output

Mon Feb 01, 2016 9:37 pm

For some reason the default volume applied by the Alsa driver ends up at -20dBFS. Use alsamixer in a terminal window to increase the PCM output volume to 0.0dB.
Rockets are loud.
https://astro-pi.org

LandBarge
Posts: 2
Joined: Mon Feb 01, 2016 3:12 am

Re: Noises from Pi b+ analog output

Tue Feb 02, 2016 2:21 pm

Thanks JDB, I'll remember that...

I ended up going with a HDMI cable to an 'audio signal extractor', then to RCA's into the amp... the sound signal is infinitely cleaner (seems a little louder, but hard to tell for sure), however, boosting the output to ~0 dB with alsamixer gives me the sort of volume I was expecting... and keeps the nice clean signal...

Return to “General discussion”