Electrical – Feedback sought on audio output circuit for Teensy 3.2

audiopassive-filterteensy

I'm stepping up my Teensy carrier board game, and adding a header to output the DAC0/DAC1 signals. I haven't done analog anything for about 25 years, but here goes 🙂 This circuit goes on a carrier board for the Teensy that also interfaces with the rest of my system (robot.) I'd love some feedback from anyone who does audio/analog more regularly than me.

Teensy Stereo Output Circuit

The header conveniently also pulls 5V and 12V from the board for powering a small amplifier.

The areas of consideration I have are:

1) Teensy DAC is 12 bit, and there's no anti-aliasing filter internally, so there will be some stair-stepping crunchiness. I need a bit of anti-aliasing filtering; it's more important to get somewhat smooth output up to 5 kHz than to get the highest sample rate entirely un-attenuated. That being said, this is for piping to two-inch speakers for robot speech and effect music, not for a Hi-Fi sound system, so an expensive (and big) brick wall filter isn't warranted. The 47 Ohm / 1 uF RC filter has a corner frequency of 3.4 kHz, which gives me about 18 dB attenuation at 20 kHz, which seems reasonable. I know that DC blocking is a high-pass filter, and I'm prepared to accept a high-pass filter with a corner frequency at 340 Hz from the 47 Ohm / 10 uF series pair. But how do these two filters interact?

2) The 5V rail is driven by a MuRata OKI-78SR05, which has some ripple at 400 kHz. Other than that, it's a great, reliable part. The 12V rail is driven by batteries or DC in, but also drives a number of motors, so there will be switching/EMI noise on that rail. In order to be nice to the amplifiers (who are cost-optimized, not quality-optimized,) I'm adding a bit of filtering on the power rails. I expect to draw 1A or less from either rail. Is this overkill, not enough, or about right? I'm using 6.3mm electrolytics for the 47 uF capacitors, and my main concern there is size — anything significantly bigger would be a problem. The inductor is rated for 1.2A. An online calculator puts the Q of a 400 mOhm, 10 uH inductor, and 47 uF capacitor, at 1.15 and the corner frequency at 7.3 kHz, and a resonant frequency of 6.6 kHz. How should I think about this, if at all?

3) The amp will be right next to this board, so I don't worry about shielded connectors or balanced/differential signals or anything like that. But, isolating ground might be valuable in routing. So, what's the best ground pin on the Teensy to return the signals to? AGND or one of the GND pins, and if so, which? (I need to separate the signal ground and the power ground on the connector.)

4) How do surface mount X5R capacitors perform, audio-wise? Are they noisy? Do they pick up vibrations as microphones? Do I need to worry about mylar film capacitors and so forth? (Both 1 uF and 10 uF caps are X5R MLCC)

5) What else am I missing, or should think about? Any and all feedback happily accepted! (And thanks in advance)

Best Answer

Am guessing that Teensy 12-bit DAC output is from the processor directly. Spec sheet says that DAC output Z is 250 ohms, tested with a light load of 3K ohm. So your anti-alias filter has a flaw - those 47 ohm resistors are in series with 250 ohm DAC output Z (I'm assuming that processor's DAC outputs are not externally buffered).

The anti-alias response of your low-pass filter rolls off audio above 536 Hz., not the 5000 Hz that you expect. I would suggest increasing R901 & R902, and decreasing C901 & C902.
The 10 uF coupling capacitor is likely large enough to drive an audio power amplifier input, which is usually many kilo-ohms. Since you're driving little speakers, the high-pass corner frequency should be adequate. Ensure that your power amp does have relatively high (>10K) input Z. Power-amp input resistance is in parallel with C901 & C902. Power amp input resistance combines with (ADC output Z + R901) to form a voltage-divider, attenuating audio in the pass-band, so don't make R901 too large.

Related Topic