Electronic – Designing audio player – low-pass filter, DAC

audiodacfiltermicrocontrollerwave

I'm building audio (wave) player on some microcontroller.

I will have external 16-bit DAC and I wonder if that's enough?
I mean, is low-pass filter really needed? (I know what it does and why you use it after DAC, but will it be hearable if there is no LPF?)

So my question is: do I need anything more then just DAC? If I set DAC value and put its output (without any additional buffer/oamp) to speakers (from my PC, with built-in amp), will it work? (I'm planning to use DAC8531E as DAC).

Best Answer

If you want decent quality then you'll need a reconstruction filter and a low pass filter. Clearly the low pass filter is to prevent unwanted HF quantization noise being forwarded to whatever is connected to the output but, the DAC reconstruction filter does something that all decent quality DAC systems need to consider. It corrects for the fundamental amplitude error produced in all DACs. Consider this: -

enter image description here

The digital input signal to the DAC is totally flat in the pass-band and then after the DAC and low pass filter (flat to Fs/2) there is a loss of signal level at the top end of the spectrum. This is natural for all zero-order-hold DACs (this includes the DAC8531).

That attenuation starts happening as the desired frequency starts getting a little close to the sampling frequency. This is the formula that describes the attenuation: -

enter image description here

Where f is the desired frequency and fs is the sampling frequency. A couple of solutions might be: -

enter image description here

Here's a very good article from Maxim where I stole the pictures. If you aren't too bothered about a 3 dB loss at the high end of your spectrum then I wouldn't worry about all of this. The DAC8531 is barely hi-fi quality so it probably doesn't matter.