Best way to connect a microprocessor's DAC to a PAM8304 amp

Thread Starter

tagada47

Joined Nov 13, 2017
14
Dear all,

I'd like to get some advice on the best way to connect the DAC of a micropython pyboard [1] to a THD0188N breakout [2] based on the PAM8304 class-D amp [3], connected to a single 8 ohm, 1.5 W speaker. Attached is a schematic of my current circuit. I tested it with an 8-bit, 16 kHz wav file of "Lilac Wine", by Nina Simone [4], which provides many samples of voice, piano and silence. My results so far are:

- Sound quality is acceptable for my purposes but far from hi-fi.
- There is a low level of white(ish) noise in the background. Right now that's my #1 complaint.
- The white noise disappears when I deactivate the DAC pin of my pyboard, and reappears as soon as I start using the DAC pin (e.g., when repeatedly outputting 3.3 V at 16 kHz).
- Connecting the GND and A- pins of the amp has no audible effect. I suspect these pins are connected internally.
- Removing the 10 nF capacitor increases both the white noise and the music itself.
- The noise is not affected by adding capacitors from 1 nF to 10 uF between the battery pins, or between the VIN and GND pins of the pyboard or the amp.
- My earlier circuit had a 1K resistor on the A+ branch, between the 10 nF cap and the 5K resistor, with the intent of creating a low-pass filter, but I found that removing it has no audible effect, which I did not expect.

As you can probably tell, I'm no expert. Any explanation/advice/suggestions regarding how my current design could be improved would be very welcome.

Thanks!

- Mathieu

[1] https://store.micropython.org/product/PYBv1.1
[2] https://www.petervis.com/Electronics_Kits/pam8403-audio-amplifier/pam8403-audio-amplifier.html
[3] https://www.diodes.com/assets/Datasheets/PAM8304.pdf
[4]
 

Attachments

sghioto

Joined Dec 31, 2017
5,380
Assuming you have connected the PAM8403 as suggested with the required bypass and input capacitors I would imagine the problem is more likely the low level of resolution and sampling frequency of the source file, 8bit 16Khz.
SG
 

Thread Starter

tagada47

Joined Nov 13, 2017
14
Yes. Click edit- go to more options- delete link, I believe.
SG
Feeling stupider and stupider... I can't find any "edit" button. All I have at the bottom of my posts is "Like", "Reply", "+Quote", and "Reply". And my browser finds no relevant occurrences of "edit" in the page.

- Mathieu
 

sghioto

Joined Dec 31, 2017
5,380
Feeling stupider and stupider... I can't find any "edit" button. All I have at the bottom of my posts is "Like", "Reply", "+Quote", and "Reply". And my browser finds no relevant occurrences of "edit" in the page.

- Mathieu
Look over to the left next to you're avatar, the words are gray colored.
SG
 

Thread Starter

tagada47

Joined Nov 13, 2017
14
Assuming you have connected the PAM8403 as suggested with the required bypass and input capacitors I would imagine the problem is more likely the low level of resolution and sampling frequency of the source file, 8bit 16Khz.
SG
I originally thought so as well, but the same noise can be heard if I "play" a silent waveform (a constant series of uniform values such as 1.65 V) at a frequency of 48 kHz.

To follow up of your earlier comment, I also tried connecting the amp as per the PAM8403 data sheet, and this yields a louder version of what I hear now.

Thanks for taking the time to help,

- Mathieu
 
Top