robwriter
Posts: 114
Joined: Sat Feb 25, 2012 6:26 pm

Pi driving speakers?

Mon Jul 30, 2012 10:09 pm

I'm one of the many hoping to create a Raspi Pi radio. I'm overcoming a few hurdles at a time, but haven't decided how to get sound out of it yet.

The obvious options are to :

- use a USB speaker, probably hacking them apart to make them fit in my case

- buy speakers and create an amp myself

I'm not electronics expert but have found some simple op amp circuits that run on 5V (see http://www.marktmarshall.com/projects/s ... _amplifier) . The questions I still have are:

- am I right that the current drawn is simply given by ohms law? I'd guess that the USB speakers should be fine with a powered hub, but I'm also assuming I could get away with powering them from the GPIO 5V rail if I built my own circuit?

- am I likely to run in to major issues trying to create my own amplificaiton circuit? Looks relatively easy but is sound quality going to be poor?

All in all I'm a little out of my depth, so if anyone has suggestions that'd be great. Otherwise I'll post back if/when I make progress.

jdbennet
Posts: 96
Joined: Sun Jul 22, 2012 2:25 pm

Re: Pi driving speakers?

Mon Jul 30, 2012 10:39 pm

Im having my pi input into my hi-fi amp and am getting a lot of problems. Basically, the pi's signal is quite clipped at anything nearing normal line level. I think im going to need to run it through a preamp first.

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

Re: Pi driving speakers?

Tue Jul 31, 2012 12:12 am

The 3.5mm jack stereo output is high impedance, so if you load it too much the signal collapses, however it does output a 1V peak/peak signal (line level).

Your conclusion is right in that you need a more sensitive amplifier (one with a higher input impedance).

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

Re: Pi driving speakers?

Tue Jul 31, 2012 12:26 am

If you plan on building an amp I would suggest the TDA2822M this is an 8 pin IC with 2 channel audio easy to build and good characteristics.

Richard S.

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

Re: Pi driving speakers?

Tue Jul 31, 2012 12:34 am

redhawk wrote:If you plan on building an amp I would suggest the TDA2822M this is an 8 pin IC with 2 channel audio easy to build and good characteristics.

Richard S.
Input resistance = 100K according to datasheet, should be okay, but why build your own?
The pi should be able to work with any well designed amplified set of speakerboxes, providing they have a suitable sensitivity on their input (>a few kilo ohm should be enough).

jdbennet
Posts: 96
Joined: Sun Jul 22, 2012 2:25 pm

Re: Pi driving speakers?

Tue Jul 31, 2012 7:39 am

mahjongg wrote:
redhawk wrote:If you plan on building an amp I would suggest the TDA2822M this is an 8 pin IC with 2 channel audio easy to build and good characteristics.

Richard S.
Input resistance = 100K according to datasheet, should be okay, but why build your own?
The pi should be able to work with any well designed amplified set of speakerboxes, providing they have a suitable sensitivity on their input (>a few kilo ohm should be enough).
Im running it off this amp and speakers, and its horribly distorted. The PI clips if its volume is over about 40% and at that figure, my amp needs to have its output volume at about 60%, leading to a lot of hiss.

http://www.cambridgeaudio.com/summary.php?PID=509
http://www.richersounds.com/showproduct ... Beech.html

User avatar
Gert van Loo
Posts: 2487
Joined: Tue Aug 02, 2011 7:27 am
Contact: Website

Re: Pi driving speakers?

Tue Jul 31, 2012 12:49 pm

The audio jack out of the Pi is not CD quality. It was just the best way of getting sound out without adding an expensive audio chip. The Pi has excellent audio capabilities but not through that port.

jdbennet
Posts: 96
Joined: Sun Jul 22, 2012 2:25 pm

Re: Pi driving speakers?

Tue Jul 31, 2012 7:03 pm

Gert van Loo wrote:The audio jack out of the Pi is not CD quality. It was just the best way of getting sound out without adding an expensive audio chip. The Pi has excellent audio capabilities but not through that port.
So im SOL unless I have a reciever with HDMI? That's pretty crappy....

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

Re: Pi driving speakers?

Tue Jul 31, 2012 7:07 pm

although Gert is right that it doesn't have "CD quality", its very unfair to say that the quality is "crap", its comparable to FM stereo sound. Other issues may be due to software.

If you want 16 bit 14.4KHz sound, without using HDMI, I suggest using a set of USB speakers, or USB sound stick.

For the purposed educational use, the sound-quality nevertheless is quite adequate.

jdbennet
Posts: 96
Joined: Sun Jul 22, 2012 2:25 pm

Re: Pi driving speakers?

Tue Jul 31, 2012 7:09 pm

mahjongg wrote:although Gert is right that it doesn't have "CD quality", its very unfair to say that the quality is "crap", its comparable to FM stereo sound. Other issues may be due to software.
You've clearly never listened to a quality FM tuner....

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

Re: Pi driving speakers?

Tue Jul 31, 2012 7:17 pm

jdbennet wrote:
mahjongg wrote:although Gert is right that it doesn't have "CD quality", its very unfair to say that the quality is "crap", its comparable to FM stereo sound. Other issues may be due to software.
You've clearly never listened to a quality FM tuner....
Obviously I have heard FM sound, to be true, I do not own a PI, so cannot compare from first hand experience, but I have it from several sources that the quality of sound indeed compares to FM sound. I also read a lot about problems with the ALSA driver, which may have a lot to do with distortion and "crackling", and I can see from the schematics that the hardware wasn't designed to drive headsets, but I also heard people say that when using certain software the stereo analog sound quality was satisfactory.
It all depends on what you expectations were, if they were that the PI would be an excellent media player, yes you may be disappointed, if you expected the sound to be good enough to accompany educational video's you should be quite happy with it.

User avatar
Grumpy Mike
Posts: 936
Joined: Sat Sep 10, 2011 7:49 pm
Location: Manchester (England England)
Contact: Website

Re: Pi driving speakers?

Tue Jul 31, 2012 8:17 pm

The quality of sound from an FM receiver is far superior to that from a CD.

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

Re: Pi driving speakers?

Tue Jul 31, 2012 11:33 pm

Okay Grumpy Mike... :mrgreen: grr...

To have a quantifyable "what should the quality be like" objective benchmark, here is a youtube video, showing (amongst other things) the PI actually playing music through the 3.5mm analog output (note the typical green plug from a typical amplified set of speakers in the video).

http://www.youtube.com/watch?v=sUZZAhVIvEU

Now, for what it's worth, and excluding the clicking noise at the start of each music fragment, I think it sounds quite good! :ugeek:

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

Re: Pi driving speakers?

Wed Aug 01, 2012 7:44 am

Grumpy Mike wrote:The quality of sound from an FM receiver is far superior to that from a CD.
Is that "far superior" quantifiable?
Or is that "far superior" as in "vinyl is far superior to a CD" or "valves are far superior to transistors"?
CD audio can (in theory) go down to 0Hz - FM radio can't.
CD audio can (in theory) reach the nyquist limit of 22.05kHz - FM radio is generally more limited.
From the adc at the recording studio to the dac in my player the signal is digital, and has error protection, and so is effectively perfect (though if errors do get through they are rather obvious). FM is inherently analogue, and so will suffer from all the problems of analogue - noise (which is the same as digital errors, but relies on the amplitude of the most significant bits for error protection, leaving the least significant bits unprotected), distortion (how accurate is the phase discriminator?) and crosstalk between L & R

robwriter
Posts: 114
Joined: Sat Feb 25, 2012 6:26 pm

Re: Pi driving speakers?

Wed Aug 01, 2012 10:24 am

I realize the Pis sound quality is an issue, but the speakers used are important to, and I doubt USB powered speakers win many prizes for sound quality either.

I've got a cheap USB soundcard as well, but I doubt that's much better. If sound quality becomes a problem then I'll opt for a better quality USB soundcard, as I don't there's a cheap way to use the HDMI output without a receiver?

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

Re: Pi driving speakers?

Wed Aug 01, 2012 2:08 pm

Some HDMI TV-s have optical outputs. :P

pbattino
Posts: 12
Joined: Wed Aug 15, 2012 11:35 am

Re: Pi driving speakers?

Thu Oct 18, 2012 4:46 pm

jdbennet wrote:
Gert van Loo wrote:The audio jack out of the Pi is not CD quality. It was just the best way of getting sound out without adding an expensive audio chip. The Pi has excellent audio capabilities but not through that port.
So im SOL unless I have a reciever with HDMI? That's pretty crappy....
I'm not sure the standard analog jack is that bad, perhaps there are other problems in your setup?
Have you tried the latest distros? Appartently some sound problems have been solved (don't ask me which problems...).
I'm using a Yamaha + good speakers and sound seems OK to me except when there are software "interferences" (end/start of a song, when the Pi is too busy doing other stuff etc.) I'm using Logitech Media Server (LMS) and Squeezplay on a soft-float distro.

Still not an OK setup for me but I can't say it's the fault of the analog audio port.
On a different forum I've heard of people having the same kind of hiccups I have, with BOTH analog and USB card.... but not with HDMI.

In conclusion, evidences seem to support HDMI as a superior (and easier) way of getting a better sound. I'm out of luck because my ampli is old (only coax/optical digital in, no HDMI) and you can't find a cheap HDMI-to-coax/optical converter. But having read of those problems with USB cards, I'm not tempted at all to go that way. I think I will change my ampli instead.

Return to “Interfacing (DSI, CSI, I2C, etc.)”