-1
\$\begingroup\$

I have been playing around with some digital microphones, which have an I2S interface. I managed to get it working (Arduino board with small I2S mems board). At least, I think I did.

When reading the I2S specification, or the microphone datasheet, I can not seem to find the answer to the following simple questions; 1. What do the digital values represent? 2. How do you convert the digital values to dbFS (and then later an dbSPL)?

The SPH0645LM4H-B (Knowles) microphone seems to output all negative values (?). I read somewhere you have to "subtract the midpoint" to eliminate the large DC offset etc. (See here: Convert Digital and Analog values to dB SPL ) On the other hand, a support engineer at Invensense explained to me that the ICS-43434 outputs positive and negative values which "represent the amplitude of the signal relative to +/-full scale".

I expected I2S to be a standard; isn't that the case ... ?

\$\endgroup\$
  • \$\begingroup\$ I2S is a standard, yes. The digital values simply represent digitised audio in the form of a PCM stream. Are you actually getting real data from the microphone or just a constant string of 1s? \$\endgroup\$ – Finbarr Nov 7 '17 at 10:48
  • \$\begingroup\$ I configured the I2S bus to sample at 16kHz, and I do read out values; however, they are always negative; they do represent actual audio values because they fluctuate based on the sound I create. Using the calculation suggested in the link I mentioned, I can perfectly calculate dbFS (and thus dbSPL), and they do change based on sound I create next to microphone. Perhaps, I did not ask my question clearly; I would like to know what do the values really represent? (I know audio, but in which type of units? pressure values?) \$\endgroup\$ – Salvatore Castellano Nov 8 '17 at 17:36
  • \$\begingroup\$ Also, why are ALL the output values negative values? As I mentioned, a support engineer at Invensense told me that the digital microphone outputs positive and negative values relative to +/- full scale (around zero); which honestly I was expecting. However, I see clearly different behaviour with the SPH0645LM4H-B. ( I get similar results as shown in learn.adafruit.com/adafruit-i2s-mems-microphone-breakout/… ) => this example also outputs only negative values... \$\endgroup\$ – Salvatore Castellano Nov 8 '17 at 17:36
  • \$\begingroup\$ In the Adafruit example they are normalizing the received data to center it around 0. Maybe this is something to look into. \$\endgroup\$ – Catsunami Jan 31 '18 at 17:13
  • 1
    \$\begingroup\$ Just because you don't know the answer, doesn't mean the question is unanswerable, is it? FYI, I have used a breakout board with a SPH0645LM4H mounted on, as well as an evaluation board with an ICS-43434 on it. I have used them on an Arduino board and on the CC3220S evaluation board. The results were the same; the values I read were negative numbers. Similar results were described in the link I mentioned. I thought my questions were clear, which they apparently are not. 1. What do the digital values represent? 2. How do you convert the digital values to dbFS (and then later an dbSPL)? \$\endgroup\$ – Salvatore Castellano Mar 5 '18 at 21:23
1
\$\begingroup\$

I would bet that your I2S receiver is incorrectly configured, I2S has a rather weird one clock offset compared to the other common formats, and if you get this wrong you will always see a 1 in the MSB of the recovered sample which causes everything to appear negative if interpreted as a signed value.

Check your programming of the port against the timing diagrams for I2S, my bet is you are set up for right justified not I2S.

Getting the sign extension right for this can also be 'interesting'.

The units are either pressure or velocity (depending on which type of microphone element) relative to some slowly filtered baseline pressure. Scale depends on sensitivity.

\$\endgroup\$
  • \$\begingroup\$ I used a scope to verify the signals, and it still looks as if all the values are negative. On the other hand, the I2S receiver is a HW implemented one (inside a TI CC3220); timings should be implemented as specified in the standard. \$\endgroup\$ – Salvatore Castellano Nov 14 '17 at 8:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.