ESP 32 S3 DEVKIT C - digital PDM microphone problem

itsoftwarehouse
Posts: 1
Joined: Thu Feb 15, 2024 7:04 pm

ESP 32 S3 DEVKIT C - digital PDM microphone problem

Postby itsoftwarehouse » Thu Feb 15, 2024 9:06 pm

I need help with a problem I'm experiencing with my ESP32 S3 DevKit C. When I try to record audio, sometimes the volume is very loud, and other times it is extremely low. I've tested with multiple microphones, but the issue persists. I'm using the Arduino IDE with an I2S configuration for audio input. Here's the configuration code I'm using:
  1. void i2s_install() {
  2.     const i2s_config_t i2s_config = {
  3.         .mode = i2s_mode_t(I2S_MODE_MASTER | I2S_MODE_RX | I2S_MODE_PDM),
  4.         .sample_rate = SAMPLE_RATE,
  5.         .bits_per_sample = i2s_bits_per_sample_t(BITS_PER_SAMPLE),
  6.         .channel_format = i2s_channel_fmt_t(I2S_CHANNEL_FMT_ONLY_LEFT),
  7.         .communication_format = i2s_comm_format_t(I2S_COMM_FORMAT_I2S),
  8.         .intr_alloc_flags = ESP_INTR_FLAG_LEVEL1,
  9.         .dma_buf_count = 32,
  10.         .dma_buf_len = BUFFER_LEN,
  11.         .use_apll = false,
  12.     };
  13.     i2s_driver_install(I2S_PORT, &i2s_config, 0, NULL);
  14.     esp_err_t status = i2s_set_clk(I2S_PORT, SAMPLE_RATE, BITS_PER_SAMPLE, I2S_CHANNEL_MONO);
  15. }
  16.  
What can I do to solve this problem?
Can you suggest some code to test my application, maybe I'm doing something wrong?

xenpac
Posts: 25
Joined: Sun Dec 08, 2019 1:20 am

Re: ESP 32 S3 DEVKIT C - digital PDM microphone problem

Postby xenpac » Mon Jun 03, 2024 2:29 pm

Make shure the mic is getting 3.3V supply.
too low volume happens if supply is just 1.8 or so.

Who is online

Users browsing this forum: Majestic-12 [Bot] and 34 guests