AED 44.10
Description
The INMP441 is an I2S microphone module that is widely used. it consists of an omnidirectional MEMS microphone with a bottom port, high performance, low power, and digital output. It includes a MEMS sensor, signal conditioning, an analog-to-digital converter, an anti-aliasing filter, power management, and a 24-bit I2S interface.
Package Includes:
- 1x INMP441 I2S microphone module
Features:
- Low noise
- Low power consumption
- Suitable for a wide variety of Electronic products
- Stereo Input Capabilities (L/R Channels)
- Omnidirectional response.
- 24-bit I2S Interface.
Description:
The INMP441 is a low-power, high-performance omnidirectional MEMS microphone with a bottom port. The INMP441 solution includes a MEMS sensor, signal conditioning, an analog-to-digital converter, an anti-aliasing filter, power management, and a 24-bit I2S interface. The I2S interface enables the INMP441 to be directly connected to digital processors such as DSPs and microcontrollers, eliminating the requirement for a system audio codec. With a good signal-to-noise ratio, the INMP441 is an ideal choice for near field applications. The INMP441 has a flat wideband frequency response, which results in natural sound with high resolution.
Principle of Work:
For low-frequency and one-time sampling, using the ADC directly is acceptable. But to sample high-quality audio data, you must sample at 16-40KHz. This can be accomplished with a timer, but it is not the most efficient use of the ESP32's CPU resources. A better way is to read samples from the ADC directly into memory using the built-in I2S interface. After you've read the samples, you can conduct whatever processing you need to do, and the I2S peripheral will continue reading samples from the ADC into the DMA buffers in the background.
Pinout of the Module:
It has the following connections:
- SCK: Serial data clock for I2S interface
- WS: Serial data word selection for I2S interface
- L/R: Left/Right channel selection.
When set to low, the microphone outputs a signal on the left channel of the I2S frame.
When set to a high level, the microphone outputs signals on the right channel - SD: Serial data output of the I2S interface.
- VCC: Input power, 1.8V to 3.3V.
- GND: power ground
The Channel Selection (L/R pin) works as follows:
- LEFT – L/R connected to GND.
- RIGHT – L/R connected to VDD.
Applications:
- Noise detectors
- Voice control modules
- Sound recorders
- Activity monitors
Circuit:
This is how our microphone module and ESP32 will be connected. Please be aware that your ESP32's pinout may differ from the one shown here; to connect your module, use the GPIO numbers rather than the physical pins.
The electrical schematic is simple. We power the module by connecting GND and 5V to the corresponding pins of the Arduino. On the other hand, we connect the analog output of the sensor to an Arduino analog input.
Library:
When you install the ESP32 Boards Manager files, the I2S Library is also installed in your Arduino IDE, which is what we will be using.
Code:
// Include I2S driver #include "driver/i2s.h" // Connections to INMP441 I2S microphone #define I2S_WS 25 #define I2S_SD 33 #define I2S_SCK 32 // Use I2S Processor 0 #define I2S_PORT I2S_NUM_0 // Define input buffer length #define bufferLen 64 int16_t sBuffer[bufferLen]; void i2s_install() { // Set up I2S Processor configuration const i2s_config_t i2s_config = { .mode = i2s_mode_t(I2S_MODE_MASTER | I2S_MODE_RX), .sample_rate = 44100, .bits_per_sample = i2s_bits_per_sample_t(16), .channel_format = I2S_CHANNEL_FMT_ONLY_LEFT, .communication_format = i2s_comm_format_t(I2S_COMM_FORMAT_STAND_I2S), .intr_alloc_flags = 0, .dma_buf_count = 8, .dma_buf_len = bufferLen, .use_apll = false }; i2s_driver_install(I2S_PORT, &i2s_config, 0, NULL); } void i2s_setpin() { // Set I2S pin configuration const i2s_pin_config_t pin_config = { .bck_io_num = I2S_SCK, .ws_io_num = I2S_WS, .data_out_num = -1, .data_in_num = I2S_SD }; i2s_set_pin(I2S_PORT, &pin_config); } void setup() { // Set up Serial Monitor Serial.begin(115200); Serial.println(" "); delay(1000); // Set up I2S i2s_install(); i2s_setpin(); i2s_start(I2S_PORT); delay(500); } void loop() { // False print statements to "lock range" on serial plotter display // Change rangelimit value to adjust "sensitivity" int rangelimit = 3000; Serial.print(rangelimit * -1); Serial.print(" "); Serial.print(rangelimit); Serial.print(" "); // Get I2S data and place in data buffer size_t bytesIn = 0; esp_err_t result = i2s_read(I2S_PORT, &sBuffer, bufferLen, &bytesIn, portMAX_DELAY); if (result == ESP_OK) { // Read I2S data buffer int16_t samples_read = bytesIn / 8; if (samples_read > 0) { float mean = 0; for (int16_t i = 0; i < samples_read; ++i) { mean += (sBuffer[i]); } // Average the data reading mean /= samples_read; // Print to serial plotter Serial.println(mean); } } }
We then read data from the module and place it in our data buffer. If the data is good, we read it out and display it on the Serial Plotter
Technical Details:
- Signal Noise Ratio of 61 dBA.
- Frequency response of 60 Hz – 15 kHz.
- 14mm Board Diameter, Low Profile
- 60Hz - 15kHz Frequency Response within -3dB Roll-Off
- -26dBFS Sensitivity at 1kHz, 94dB Input
- 61dBA Signal-to-Noise Ratio (SNR)
- -87dBFS Noise Floor
- 44.1kHz - 48kHz Sample Rates
Resources:
Comparisons:
The overall pickup radius of an omnidirectional microphone is considerably large—one, two, three, or even five meters—compared to ten centimeters. This level is very different because it is picking up the voices of multiple persons, including five, six, seven, eight, or even 10. Omnidirectional microphones are very sensitive, but because of their excessively wide pickup angles and increased susceptibility to background noise, their sound quality falls short of that of single-point microphones unless effective noise reduction is used. Collective use and single-person service are definitely distinct from one another. The wiring is straightforward and not one by one with omnidirectional wheat, though. suitable for informal meetings, brief distance conversations, and remote activities.