Black Lives Matter - Action and Equality. ... Adafruit is open and shipping.
0

Noisy PWMAudioOut vs PAM8301 on CPB
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Noisy PWMAudioOut vs PAM8301 on CPB

by kevinjwalters on Thu Jun 11, 2020 10:11 am

The Circuit Playground Bluefruit (CPB) seems a bit noisy on its audio output. I just tried playing silence as I was curious about some minor rising-in-pitch noise. The more noticeable issue is just how noisy a silent wav file is. The PWM signal on the AUDIO pad looks super-stable so it seems more like the PAM8301 is involved here. Has there been any experimentation with PWM rates to minimise the noise generated by the PWM + class-d amplifier combination?

I did a quick test with the transistor-amped CLUE with the speaker right up against my ear. It's not noise free with silent wav but it's better than the CPB, I think.

There's a lot of pops/clicks with wav files too presumably relating to PWMAudioOut. Is there any way to tame those? On the CPB I can control them to some extent by disabling/enabling the speaker...

kevinjwalters
 
Posts: 634
Joined: Sun Oct 01, 2017 3:15 pm

Re: Noisy PWMAudioOut vs PAM8301 on CPB

by siddacious on Tue Jun 16, 2020 7:58 pm

I'll get this to someone who can help. Please stand by.

siddacious
 
Posts: 271
Joined: Fri Apr 21, 2017 3:09 pm

Re: Noisy PWMAudioOut vs PAM8301 on CPB

by kevinjwalters on Wed Jun 17, 2020 7:56 am

Thanks.

One more piece of information, I am using 8bit wavs to keep the size down and the quality seems appropriate for the onboard speakers. Wavs use unsigned 8bit data but 16bit data is signed. Would be interesting to hear if either one of those is more efficient for playback. Sample rate is 16kHz in this case. A similar discussion for the SAMD21 and in-memory samples can be found on What is the best array type for audioio.RawSample()?.

kevinjwalters
 
Posts: 634
Joined: Sun Oct 01, 2017 3:15 pm

Please be positive and constructive with your questions and comments.