PDM low-pass filter design

BuddyCasino
Posts: 263
Joined: Sun Jun 19, 2016 12:00 am

PDM low-pass filter design

Postby BuddyCasino » Wed Aug 02, 2017 1:16 pm

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?

0xPIT#
Posts: 5
Joined: Tue Aug 01, 2017 9:20 pm

Re: PDM low-pass filter design

Postby 0xPIT# » Sat Aug 12, 2017 7:27 am

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.

BuddyCasino
Posts: 263
Joined: Sun Jun 19, 2016 12:00 am

Re: PDM low-pass filter design

Postby BuddyCasino » Tue Aug 22, 2017 8:10 pm

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.

Janost
Posts: 1
Joined: Wed Aug 23, 2017 8:01 pm

Re: PDM low-pass filter design

Postby Janost » Wed Aug 23, 2017 8:12 pm

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.

BuddyCasino
Posts: 263
Joined: Sun Jun 19, 2016 12:00 am

Re: PDM low-pass filter design

Postby BuddyCasino » Thu Aug 24, 2017 9:32 am

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.

ealdwulf
Posts: 2
Joined: Tue Dec 15, 2015 2:02 pm

Re: PDM low-pass filter design

Postby ealdwulf » Wed Sep 20, 2017 10:20 am

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...

Who is online

Users browsing this forum: No registered users and 119 guests