L&R Microphones on I2S using ESP32 S3 DevKitC-1
Posted: Thu Jun 29, 2023 11:25 pm
I am evaluating a ESP32-S3-DevKitC-1 with INMP441 [or other MEMS microphone] for a stethoscope application. The microphone is using the left channel. That is working. I now want to add a second microphone of same type and lot to monitor ambient background using the right channel. I am not sure of the configuration changes and hardware lines. Can I use the same I2S port for second mike? Do I wire one microphone L/R to ground and the other to 3.3V and let all other lines connect to same pins on each microphone in parallel? I have looked for a i2s example with a stereo left and right channel but haven't found one. Can somebody point me to something more complex than a single channel input. Ideally could use some example that actually does a noise cancel or amplitude and phase adjustment of the ambient channel to optimize background reduction. I know none of this is really new but where in open source? Saw a similar query in this forum for a SPK0838HT mems microphone but no one has answered so posting this. I wonder if anybody can recommend the microphone that I should use for heart sound. I saw a video that said the INMP441 is out of date and should consider a ICS43434. Hoping you guys can help me sort the options. Most of the stereo settings should go here I think.
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
};
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
};