0
\$\begingroup\$

I hear about this technology, I read about it, I even see a bunch of MEMS microphones with PDM output. I can perfectly understand how it works (I have worked with DSP). However, I can't seem to make heads or tails regarding how do I deal with it in practice.

I expect that there would be Digital Signal Processors that have built-in (hardware-based) PDM inputs; I would even expect microcontrollers to have that (since MEMS microphones typically used for mobile devices seem to use PDM interface quite often).

However, I do a search in Digikey, and not a single one lists PDM among the included features or interfaces (not a single DSP, not a single MCU). I did find a PDM-to-I²S chip (in 8-pin BGA --- *ugh*) , but it doesn't make sens that that would be the only option --- in that case, I might as well get a microphone with I²S output!

I think I understand enough of the math that I would be able to implement in software a bit-banged PDM decoder --- however, I also understand enough to know that that is unthinkable in practice.

I guess my concrete question for the audience is: what's up with that?

\$\endgroup\$
  • \$\begingroup\$ Pulse-density modulation, wouldn't you just need a lowpass filter to convert that to an analog signal? I'd say just sample it at a sufficiently high frequency and then do your processing on that. \$\endgroup\$ – Hearth Oct 31 '18 at 23:18
  • \$\begingroup\$ I think in theory, yes --- but I don't think in practice it would work well, since you don't necessarily have precise/guaranteed values (actual analog voltage) for the 1's and 0's. Maybe if you buffer it first, and even then I expect that it would be hard. But either way, if I'm going to an MCU or DSP and I ultimately want the signal in digitized form, it seems gratuitous and inefficient to have to convert it back to analog, right? \$\endgroup\$ – Cal-linux Oct 31 '18 at 23:22
  • \$\begingroup\$ I'm not suggesting you convert it back to analog, though I did word that a bit confusingly. What I'm saying is just sample the PDM output into memory and then post-process it. As long as you sample frequently enough that you don't miss (too many) transitions you should be fine. \$\endgroup\$ – Hearth Oct 31 '18 at 23:25
  • \$\begingroup\$ I think what is being suggested is to oversample by a huge margin, like audio sigma-delta ADC's do. Sample at 1 MHZ then do a running average of 'n' samples. At some point it will be analog again even if you store it as digital files. A LPF is mandatory at some point. I do not know that you can get 130dB dynamic range out of this setup though, even if the mic is rated for it. \$\endgroup\$ – Sparky256 Oct 31 '18 at 23:38
  • \$\begingroup\$ Ok, but that is precisely what I was referring to by "a bit-banged PDM decoder" in software. However, the sampling rates I've seen are in the order of MHz, so doing that by software seems unthinkable. You mention sampling at 1MHz, in which case I'll be missing lots of samples and yes, the SNR will suffer (I think it will be far worse than "you won't get 130dB dynamic range", though). But even then, having to do operations every microsecond seems heavy, no? (I know it's just one IO read, one addition, one subtraction, and one pointer adjustment for a running average --- still) \$\endgroup\$ – Cal-linux Nov 1 '18 at 11:47
0
\$\begingroup\$

To avoid bit-banging, I think you can use SPI input to capture PDM data, but that would only work for one channel (mono input). This Texas Instruments app note describes something along these lines.

After some brief search I've found these off-the-shelf products which support PDM:

Codecs: Cirrus CS53L30, Maxim MAX9888, TI's programmable TLV320AIC3253

Micros with integrated PDM inputs: Silabs Giant Gecko range, Maxim MAX32666

Analog Devcies PDM to I2C converter

That's just a few examples, there are plenty other products I'm sure.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.