Connecting microcontroller DAC to speakers. - Page 1
Forum section: electronics / beginners

author: Hugondon
author_rank: Newbie
timestamp: November 30, 2020, 06:29:55 pm
content: Hey!I have a doubt regarding the DAC connection of a NUCLEO-F767ZI boardI'm currently connecting the system as follows: DAC channel -> Jack input of PAM8610 board -> Speakers (I had both DAC channels connected, but in the image I'm using only one).I've read that when you're working with speakers, you usually need to "isolate" its impedance using a capacitor.Can anybody give me some advice on whether you have to include some isolating circuit for the DAC when you're using an amplifier like the one of the photograph?This is the amplifier boardhttps://www.amazon.com/-/es/HiLetgo-PAM8610-amplificador-amplificadora-DC8V-12V/dp/B01DK29KYG/ref=sr_1_1?__mk_es_US=%C3%85M%C3%85%C5%BD%C3%95%C3%91&dchild=1&keywords=pam8610&qid=1606760757&s=electronics&sr=1-1

author: Lomax
author_rank: Frequent Contributor
timestamp: November 30, 2020, 07:49:35 pm
content: You will likely need some form ofreconstruction filter(i.e. anti-aliasing filter) on the DAC output to produce high-quality audio.This looks like a reasonable example. At the minimum add an R/C low-pass filter with a 20kHz roll off point to dampen the quantisation noise. Ti offerthis paperon the subject. As far as the impedance matching is concerned, the amplifier should already take care of this, so if you can put up with the sound quality you don'treallyneed to do anything; nothing should break with your set-up, it just might not sound all that great...Edit:I see that you're using a Class D amplifier - have you considered using one that has a digital (i2s) input instead? Would save you the extra DAC/ADC conversion steps... I assume your MCU has i2s output capability?

author: mikerj
author_rank: Super Contributor
timestamp: November 30, 2020, 08:49:52 pm
content: An amplifier output needs a capacitor in series when it has as a DC offset, e.g. a single push-pull output stage with single power rail. Blocking this DC voltage is important as it can burn out speakers, and even if it doesn't it will degrade sound output.The PAM8610 is a filterless class D audio amplifier, since both speaker outputs are driven in antiphase there is no DC offset on the output and no series capacitor is required.

author: james_s
author_rank: Super Contributor
timestamp: November 30, 2020, 08:54:41 pm
content: Isn't he talking about a capacitor between the DAC and the *input* side of the amplifier?Generally speaking the output of a DAC will be from 0 to whatever positive value, many output a current, some output a voltage, converting from one to another is easy. Anyway audio is AC and goes above and below 0 so you need a capacitor to remove the DC offset you get inherently from a DAC output that can only go positive.

author: Hugondon
author_rank: Newbie
timestamp: November 30, 2020, 09:17:32 pm
content: Quote from: Lomax on November 30, 2020, 07:49:35 pma) I'll try the filter at the output, thanks! I'm not worried about a nice super high-quality sound, since the system will only generate some different waveforms with different envelopes (the idea is doing some source of emulation of a synthesizer).b) That was exactly the initial idea! It does have a I2S output! The only problem is that it is part of an academic project and its due next week... so I don't have a lot of time to implement extra things. Probably I'll take a look at that when the semester is over, tho!

author: Zero999
author_rank: Super Contributor
timestamp: November 30, 2020, 10:01:11 pm
content: Quote from: Hugondon on November 30, 2020, 06:29:55 pmYes, the amplifier should be AC coupled to the DAC, via a capacitor, but assuming your module is built, as per the PAM8610 data sheet, it will already have the capacitors built-in. All you need to do is connect it to the DAC output. No other components are required.https://cdn.datasheetspdf.com/pdf-down/P/A/M/PAM8610-Diodes.pdf