Tool/software:
Hello,
Back with another question on the PCMD3180. I've previously had some issues with implementing the multiplexer in my circuit, described in the previous post. Since then, I've managed to get the I2S output to work. However, it only works with one or two microphones at a time. When I am trying to use 4 microphones, the I2S output reflects only the input from PDM channel 1.
Circuit brief description:
- ESP32-S2 acts as I2S master sending PCMD initialisation registers, FSYNC and BCLK (48 kHz and 1.536 MHz). Signals are clean and stable.
- I2S is set to right/left mode (stereo).
- PCMD3180 is set so slave mode. Drives SDO directly to ESP32. Can provide PDM clocks to microphones (0.768 or 1.536 MHz).
- 4x PDM microphones set as L/R pairs on PDM_IN1 and PDM_IN2. They both return stable SDA.
- All PCMD registers initialise as instructed and all voltages (AVDD, IOVDD, etc.) are clean and stable.
When initialising the PCMD registers for 1 microphone, left slot 0, and the ESP for I2S mono, the received I2S signal is clean. This works on any PDM_IN channel on the PCMD, regardless of left or right mic select.
When initialising the PCMD registers for 2 microphones, left slot 0 and right slot 0, and the ESP for I2S stereo, the received signal is clean, with clear L/R differences, albeit quieter compared to the mono version. Same here, this works for any PDM_IN channel, as long as they are set to occupy slots 0.
However, when initialising the PCMD registers for 4 microphones, slots left 0, right 0, left 1, right 1, the received output is only from PDM_IN channel 1, left slot 0, regardless of which PDM_IN channels were used. All the data on the right channel is the same as the data on the left channel. This was confirmed by tapping or speaking into the 4 mic capsules in order and then plotting the audio waveform. The plot shows the taps only on PDM_IN1, left slot 0. In the speech case, it can be clearly heard that the speaker is close only to the PDM_IN1 mic and the other 3 microphones are not proximity sensitive (contrary to the 2 microphone L/R case, where proximity was well represented). There seem to be no issues with the PDM microphones or channels themselves, as PDM_CLK is driven from the PCMD and the mics return stable PDM_SDA.
I tried a different slot allocation, slots left 0, 1, 2, and 3, and tried placing 1 microphone per PDM_IN channel and also in pairs in 2 PDM_IN channels. In both cases, I only received data from left slot 0 in the left channel and only 0 in the right channel (which is expected).
I tried changing the DSP_CFG registers to sum the outputs of the PDM channels (CH1+CH2)/s and (CH3+CH4)/2, but that seems to only have halved the amplitude of the signal on CH1, left slot 0.
I tried using the ADC140 EVM I previously used to test the system while I was using a breadboard. However, since transferring the circuit to a custom made PCb, the EVM can not return a clean output anymore. I noticed that regardless of the register settings in the PPC3 GUI, the PCMD connected to the EVM could not start the PDM_CLK divider and send it out on the PDM_OUT channels. The FSYNC and BCLK signals were noisy, and the BCLK would not drop below 3.1 MHz, regardless of GUI settings.
Are there any other registers I have to change besides enabling each channel or is there anything else I have to do to get the I2S output to work with 4 or more microphones? If my understanding of I2S and the information about in the PCMD user manual are correct, then the I2S can return a stereo output with more than 2 microphones' inputs by interleaving the left/right slots. If so, why am I only seeing the output from left slot 0?
Thank you in advance.