miky94
Posts: 149
Joined: Sun Jun 03, 2018 9:17 pm

quality sound card and speaker for Pi 3/Pi Zero

Wed Nov 20, 2019 11:01 pm

Hi,

I'm making a musical instrument using a Pi 3 and I'm looking for a better quality sound card and a speaker

requirements:
1 ) 70dB output that according to Wikipedia is EPA-identified maximum to protect against hearing loss and other disruptive effects from noise, enough to hear it outdoor from nearby people like a smartphone speaker
2 ) 3.5mm jack for headphones
3 ) portability, shouldn't be a problem I'll build a case around it, better if the speaker has circular shape
4 ) low battery consumption
5 ) I2S, better than USB
6 ) Pi Zero compatible, if resources won't be a problem it would be more suitable for portability
7 ) price, I won't spend $50 on a $35 computer

do you know anyone that meets the requirements?

an idea would be to output it from a smartphone via bluetooth, not sure about delay but I've seen other instruments using it, what do you think about?

thanks
Last edited by miky94 on Wed Nov 20, 2019 11:52 pm, edited 1 time in total.

W. H. Heydt
Posts: 11675
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: quality sound card and speaker for Pi 3/Pi Zero

Wed Nov 20, 2019 11:04 pm

Some of your ideas are in conflict with each other. Notably, low power vs. high volume and sound quality vs. low cost. You might consider looking at the products from HiFiBerry.

miky94
Posts: 149
Joined: Sun Jun 03, 2018 9:17 pm

Re: quality sound card and speaker for Pi 3/Pi Zero

Wed Nov 20, 2019 11:52 pm

I'm looking for a good compromise, I don't need too high volume and too good sound quality, I described the key points

from HiFiBerry do you mean a particular product? I didn't find something with integrated speaker

what about using a smartphone as bluetooth speaker?

dustnbone
Posts: 201
Joined: Tue Nov 05, 2019 2:49 am

Re: quality sound card and speaker for Pi 3/Pi Zero

Thu Nov 21, 2019 12:28 am

The most economical is going to be just finding a bluetooth speaker that meets your needs/budget. You're not going to get anything hifi for your budget, if you want that it's going to cost a bit more.

There's nothing Pi specific about this really, unless you're talking about using dedicated addon DAC boards but those are all going to be far above your budget, and a bit of a waste if all you're going to be feeding the signal to is a cheap loud mono speaker.

There are also integrated USB Speakers that appear to the computer as a USB sound card, any of those should also work as they all just use the USB Audio standard which is supported by Raspbian.

I can't really help recommend any of the above as I'm pretty picky when it comes to audio. I broke your "not spending $50 on a $35 computer" rule quite badly and have a $150 USB DAC plugged into my Pi for audio purposes, and to that I have connected a set of powered studio monitors. It sounds pretty fantastic, the DAC doesn't seem to care how much the computer it's plugged into cost.

miky94
Posts: 149
Joined: Sun Jun 03, 2018 9:17 pm

Re: quality sound card and speaker for Pi 3/Pi Zero

Thu Nov 21, 2019 1:02 am

for the prototype I'm not looking to a really hifi solution in fact I was thinkinh about using a smartphone
the instrument will only play .wav samples using pygame, I'm just looking for something better than the unportable computer USB speaker I have, for sure in the future I'll look to something more hifi oriented

User avatar
bertlea
Posts: 303
Joined: Wed Dec 07, 2016 6:33 am
Location: Hong Kong

Re: quality sound card and speaker for Pi 3/Pi Zero

Thu Nov 21, 2019 2:50 am

@miky94, Pimoroni got some new audio stuff you may be interested in (see the link below). One of them have a 3W (per channel) audio output but I am not sure if it can output 70dB as I am not familiar with audio stuff.

https://shop.pimoroni.com/collections/pirate-audio

User avatar
HawaiianPi
Posts: 5255
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: quality sound card and speaker for Pi 3/Pi Zero

Thu Nov 21, 2019 2:55 am

If you want to drive speakers to any kind of reasonable volume you'll need amplification. Computer speakers are usually amplified. Home audio speakers usually are not (there are exceptions, of course, like google or amazon smart speakers).

Adding audio_pwm_mode=2 to config.txt will enable higher quality analog audio out of the Pi3's 3.5mm jack.

The Pi Zero has no analog audio out (digital audio outputs through the HDMI port), but it can be added with a few inexpensive components on the GPIO (you'll still need amplification for speakers).

Computer speakers are usually amplified, and are available in a wide variety of sizes, configurations and price points.

However, the suggestion from dustnbone of using a Bluetooth speaker would be the simplest. A portable Bluetooth speaker should work with any wireless Pi model (such as the Pi Zero W). It would already include a battery for power in a nice, portable enclosure. You could build your instrument however you wanted and just set the speaker down wherever it's convenient to use (doesn't need to be integrated).

Oh, and since a Bluetooth speaker would be useful with your phone and other devices, the "I won't spend $50 on a $35 computer" budget doesn't necessarily apply (justification, in case you find a more expensive one you really want).
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

miky94
Posts: 149
Joined: Sun Jun 03, 2018 9:17 pm

Re: quality sound card and speaker for Pi 3/Pi Zero

Thu Nov 21, 2019 3:30 am

@bertlea I don't know hot to calculate output dB, maybe someone can help
@HawaiianPi what does audio_pwm_mode=2 does and why is it not default?
Thanks for all your answers, I'd go for a bluetooth speaker hoping there is not too much delay, but before I want to try to use the smartphone as speaker, I don't know if anyone has already done it, a first search gave me only the opposite (Pi as bluetooth receiver for a speaker)
after some tests I'll ask you again for a hifi upgrade

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

Re: quality sound card and speaker for Pi 3/Pi Zero

Thu Nov 21, 2019 10:41 am

miky94 wrote:
Thu Nov 21, 2019 3:30 am
@bertlea I don't know hot to calculate output dB, maybe someone can help
You're getting into a highly complex area.
As a starter, have a look at https://en.wikipedia.org/wiki/A-weighting

How loud sound from a speaker sounds will depend on how far away your speaker is and your environment, as well as how efficient the speaker is.
So converting amplifier power output to dB(A) is never going to be straightforward

LTolledo
Posts: 2829
Joined: Sat Mar 17, 2018 7:29 am
Location: Anime Heartland

Re: quality sound card and speaker for Pi 3/Pi Zero

Thu Nov 21, 2019 11:04 am

For RPiZero class board, the JustBoom AmpZero, or the Pimoroni Pirate Audio , however these have no headphone jacks, just speaker outs.

For the RPi3B/3B+/4B class boards, the nearest to your requirements are the Suptronics X400 v2.0 or X400 v3.0, and needs to be powered 12v minimum.
RPi1B-X400v2 GPIO not covered.jpg
RPi1B-X400v2 GPIO not covered.jpg (226.83 KiB) Viewed 548 times
RPiDesktopSetups.jpg
RPiDesktopSetups.jpg (195.4 KiB) Viewed 548 times
or you can DIY yourself with:
a PCM5122 I2S DAC module and PAM8403 amp module on a RPi3 (or RPiZero) protoboard....
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

miky94
Posts: 149
Joined: Sun Jun 03, 2018 9:17 pm

Re: quality sound card and speaker for Pi 3/Pi Zero

Thu Nov 21, 2019 9:55 pm

I take this opportunity of your experience on Raspberry and audio to ask you if you know what this error means:

Code: Select all

ALSA lib pcm.c:8306:(snd_pcm_recover) underrun occurred
it occurs sometimes and the program continues its execution but without audio, sometimes is followed by:

Code: Select all

ALSA write failed (unrecoverable): Input/output error
I'm just using pygame to initialize a mixer with a channel, even if not playing anything

miky94
Posts: 149
Joined: Sun Jun 03, 2018 9:17 pm

Re: quality sound card and speaker for Pi 3/Pi Zero

Fri Nov 22, 2019 12:30 am

I tried SoundWire http://georgielabs.net/ to output audio from the smartphone, but the quality was bad both from the smartphone and from the headphones, so I had to remove pulseaudio to return to the original, don't know if it is a configuration problem

melaniestaines
Posts: 4
Joined: Wed Oct 09, 2019 7:01 am
Location: Dallas, TX

Re: quality sound card and speaker for Pi 3/Pi Zero

Fri Nov 22, 2019 12:08 pm

bertlea wrote:
Thu Nov 21, 2019 2:50 am
@miky94, Pimoroni got some new audio stuff you may be interested in (see the link below). One of them have a 3W (per channel) audio output but I am not sure if it can output 70dB as I am not familiar with audio stuff.

https://shop.pimoroni.com/collections/pirate-audio
Thanks, i m also looking into this link to find something good.

Return to “General discussion”