Page 1 of 1

PDM low-pass filter design

Posted: Wed Aug 02, 2017 1:16 pm
by BuddyCasino
I tried this one: https://github.com/MrBuddyCasino/ESP32_ ... matics.png
But it doesn't sound particularly good. Lots of noise when connecting line_out to aux_in on my amp.

There is also quite some noise on my headphone (thus skipping filter stage 3).

I don't have much clue about analog stuff, anyone got an idea whats wrong? This is a rev0 Wroom module, is it because of the missing audio pll?

Re: PDM low-pass filter design

Posted: Sat Aug 12, 2017 7:27 am
by 0xPIT#
I'm also interested in this.

I guess one needs a higher order filter, RLC or so. I've tried with some 220µH inductor in series and its a little better.
I'd be interested how such a filter is calculated.

A proper approach for Class-D amps seems to be something like this: http://www.ti.com/lit/an/sloa119b/sloa119b.pdf
I'm unsure how that translates to a line out w/o speaker load, etc.

Re: PDM low-pass filter design

Posted: Tue Aug 22, 2017 8:10 pm
by BuddyCasino
Found this: https://janostman.wordpress.com/audio-h ... e-esp8266/

Note the way he is writing the sample, I'm not quite sure what he is doing there. Haven't tested it yet.

Re: PDM low-pass filter design

Posted: Wed Aug 23, 2017 8:12 pm
by Janost
It is quite simple.
The i2s stream is used as a 1bit PDM DAC.
Same as used in PDM microphones.

It uses the entire 32bit left/right DMA sample word to generate the modulating bit pattern.
But it has a running accumulator preventing it from using a simple lookup table for the bit pattern.

Very simple but very effective.

Re: PDM low-pass filter design

Posted: Thu Aug 24, 2017 9:32 am
by BuddyCasino
Thanks! Since the ESP-IDF has a PDM setting for the I2S peripheral, we shouldn't have to Delta-Sigma encode the samples ourselves, right? Just asking because PDM quality seems lacking.

Re: PDM low-pass filter design

Posted: Wed Sep 20, 2017 10:20 am
by ealdwulf
We are also interesting in this - tried it and got LOTS of noise, whch makes me think I've got something wrong (although I can actually hear the audio under it). It even sounds the same if I sample the bitstream and do the low pass filter in csound, so I don't think it is an analog issue.

Is this actually supported yet? We noticed that there are some PDM releated constants in the header file which you dont' seem to be able to use with anything yet...