eBay PAM8403, matching speaker and beginner questions

Status
Not open for further replies.
Hello everyone,
first of all, I'm a 5th year ICT high school student and I'm setting up my final project. I'd need some help with the audio part of my project as I'm a newbie in this field, even thought I do know basic electronics (but I wasn't taught AC and frequency-domain things so well). I registered here because I have already used this forum as a reputable source of enlightenment and I feel I'll get real help out of you.

So what I have planned is putting a Raspberry Pi B+ inside an old radio alarm case and have it perform some advanced clock functions. The old alarm had an 8Ohm 0.5W "PC" speaker which it used also to play radio stations (I don't actually remember how much HiFi it was 😛), so I thought about reusing it to play Internet radio stations from the RPi's audio out.
Now, the RPi out should be line-level (pardon my ignorance, but does this "line level" also contain volume information?) so I'd need an amplifier. On the Bay I found a cheap china-sourced Class-D one-chip PAM8403 3Wx2 amplifier board and I have some questions about it:
- After reading countless forums and articles online which talk about amp-loudspeaker matching and not having got anything out of it, can I use this 3W amp with a 0.5W speaker without blowing either? Do I actually need to only look at matching their impedances? Is putting a series resistor a viable solution?
- The IC's datasheet specifies different output powers tested at 4-8Ohms and 1-10%THD+N at 1kHz. What is this varying THD+N? I read that it is practically the noise on the output, but why do they specify two values? (1-10%) What does it depend on?
- Would I do better by using a simple (but not simpler than the above board) LM386 chip, also as regards output power?
- Does that 8Ohm 0.5W speaker play music at a decent quality? Or is it only suited to beeps and bloops?
- I read that at volumes over 95% the RPi starts clipping: is it a problem for my amp and speaker?

Please shed some light on these subjects, as I have yet to wrap my head around this all.

Thank you very much from
Antonio
 
A quick google search reveals that maximum output for the B+ Pi is 1.25 Vpp = 440 mVrms for a sine.

The PAM8403 can output 1.4 W into 8 Ohms at 1% THD when used with a 5V supply. (It's already noticeably clipping at this point, i.e. dominated by THD, not N. 10% THD specs are a holdover from the portable audio specs of yesteryear and can be safely ignored.) That's 3.35 Vrms.

The chip has a gain of 24 dB = 16. You'd thus send the output into clipping with about 200 mVrms in, or about 7 dB below maximum. Shouldn't be too bad noise wise yet, but since it uses an inverting amplifier input, you could add some extra input series resistance (see note "Maximum Gain" on p.7 of the datasheet), maybe 18-22k. Then the clipping limits of output and amp should approximately coincide.

I would also suggest following the advice re: EMI supression components on p.9 if they are not already present on the board.

An amplifier more powerful than the speaker can handle is not much of a problem as long as you aren't deaf (or drunk) and there's a volume control. Actually it is even recommended, at least when speaker power input is not limited by mechanical excursion but rather thermal dissipation, which are the two factors to consider here. Music has a crest factor (i.e. peak/average ratio) of 6-10 dB or higher, that's 4-10 in terms of power, so average power may be quite a bit lower than peak power. Premature clipping may cause a lot of high-frequiency harmonics which can wreck tweeters (not a concern here).

Before the speaker is damaged, I would normally expect it to complain quite audibly. That's because music has about a pink noise power distribution, which means most power is concentrated at lower frequencies where most speaker concepts tend to be excursion limited first.

You are probably in a better position of judging the loudspeaker than we are. How large is it? Does it have a decent-size magnet at least? 8 ohms 0.5 W sounds like a typical cheap alarm clock, more "bleep and bloop" class. Might be a 6 cm affair with that kind of rating? A bit of bass boost and non-random audio engineering (airtight baffle? what's that?) may actually give half-decent sound, if only for personal listening.
The typical alarm clock case tends to be a tad small. Portable radios with that kind of problem often used an open baffle concept in order to achieve any decent bass at all, i.e. an open back for dipole radiation at low frequencies. It does work pretty well on axis, but poses the usual limitations of dipoles, i.e. more and more cancellation in the low frequencies which requires a fait bit of power down there and limits maximum levels. This was often combined with loudness coupled to the main volume control, so that you'd get nice and full sound at low volume and still some decent maximum output at reduced sound quality.

If you want to get fancy, build an external speaker for it. (Speaker cable should then be twisted to minimize RF radiation.) Since 3W/4 ohms is about it for the PAM (not to mention the LM386), I'd suggest a nice wideband speaker of at least 10 cm (4") diameter. With something twice the size you could already make quite the racket - I'm not sure what you have available locally, but the Visaton BG-20 (8", 8 ohms, 92 dB/W/m) is popular around here and should do quite well in a bass reflex speaker (along these lines). Just look around a bit in speaker DIY circles.

You may run into ground loop issues when powering both the Pi and the amplifier from the same supply. Use two different ones if need be. Make sure that the board does not erroneously connect input ground and power ground.
 
Thank you very much sgrossklass!

So, to sum up what I understood:
- The PAM8403 will be already clipping at nearly half the Pi's output volume because of the 5V supply (so having the Pi's output clipping is not an issue)
- Then, if I add a 20kOhm resistor between the Pi's output and the amp's input I will move the clipping portion of the Pi near that of the amp (and/or vice versa)
- I noticed the reference to EMI suppression, will probably add the caps (not sure about ferrites)
- It is ok to have an amp more powerful than the speaker being careful not to turn the volume up to the max; I read that the Pi's default volume is at max and I can only set it in software, must be careful
- The speaker I have is indeed from an old radio alarm, at 6cm of diameter and "paper" cone. BUT I have scavenged two small, 5cm, probably fullrange 4Ohm 2W speakers from a chinese portable boombox: I'm not trying to get a real high fidelity and quality output, I just need a speaker that won't output telephone-like sound, so would one of them work ok? I hope so.
- I'll watch (or better, listen) out for ground loops

P.S.: I hope you didn't feel offended by my need of "simply audio" instead of a decent quality sound... After all, this forum is for audiophiles 😛

Thanks,
Antonio
 
Status
Not open for further replies.