Use a digital microphone (INMP441 MEMS) with a Pixelblaze Pico?

Hello hello !

I have received the brand new Pico + 6 Axis Pixelblaze ! This model is a game changer because it has some digital and analogue GPIO, which might allow me to use Pixelblaze superior technology on super wearable applications (like my handfan).

So I bought a INMP441 MEMS digital microphone that has a perfect size, and i want to use it with Pixelblaze.
But how does it even work ? I had a look at Arduino code and it seems it includes drivers including themselves a LOT of other librairies. Am I looking at something “very hard” like translating a bunch of C++ librairies to Javascript ? (i can code but i’m far from being a pro, and this seems way above my skill).

Or should I use an analogue microphone like a MAX4466 ? And if I go with it, what should I expect on the GPIO ? I don’t really find clear documentation on it…

I understand using a sensor board is much easier (and that’s what i’m doing every time I can fit it), but for super wearable applications I have to use a Pico, and the sensor board is way too big… Currently I use WLED with another board, but I’d really like to keep Pixelblaze on it because it’s so much better.

I hope this is not innapropriate to ask for help on this, I let the admin delete my post if needed.

Thank you !

My understanding of how it works with the Sensor Board is that the SB includes a DSP which reduces the audio signal to the numbers you get in frequencyData, energyAverage, maxFrequency and maxFrequencyMagnitude.

If you only have a PB (or Pico Pro), then the ESP32 would have to do the DSP work. In PBscript I doubt you can capture enough samples (analog or digital) in a pattern to be able to do such frequency analysis.

It would most likely have to be done via GitHub - espressif/esp-dsp: DSP library for ESP-IDF . I seem to recall that the ESP32 used in PB has multiple cores. Perhaps the 2nd core could be roped into acting as a DSP?

Right, not quite that easy since Pb doesn’t expose all the low level APIs and drivers that would be needed to fully implement sound reactivity on par with the SB.

There’s a lot of math that goes into doing all the frequency detection stuff, impractical to do in script code. And analog sample rate is limited by animation frame rate since that is as fast as Pb code can run. Digital mics need to use underlying peripherals and the driver APIs are not exposed.

However there is a lot of interest in a mic flavor pico. There’s enough headroom on the esp32 to do the processing. It’s something we looked at doing seriously.

4 Likes

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.