D

DIY Electronics

— Building circuits, programming microcontrollers, and making things blink
49 members Created Jun 2026

Audio amplifier basics — class A, B, AB, and D compared

Measuring Sound Level with a MEMS Microphone

The INMP441 I2S MEMS microphone gives digital audio samples directly over I2S without needing an ADC. For a sound level meter, this simplifies the analog front end to nothing.

Reading INMP441 on ESP32: configure I2S in PDM or standard I2S mode (the INMP441 is standard I2S), read 1024 samples, compute the RMS value. The RMS correlates to dB SPL with a calibration factor derived from the microphone's sensitivity spec (-26 dBFS at 94 dB SPL).

Frequency weighting: a simple dB(A) approximation uses a digital FIR filter with weights derived from the A-weighting curve. Implementing a full 100-tap FIR in software at 44.1kHz on an ESP32 is feasible but uses significant CPU. A 20-tap approximation adequate for ±2dB accuracy above 100Hz can run at 1kHz block rate with minimal load.

0

No comments yet

Be the first to share your thoughts.

Report thread

Why are you reporting this thread?

Restore the redacted content?

This will make it visible to everyone again. The clear action is logged in the mod log.