- 1 XMOS libraries etc,
- 2 Conclusion 25Apr2023 on headphone output
- 3 Update on the ICS-52000 mics
- 4 Conclusion 01Mar2023 on microphone
- 5 Background
- 6 XMOS X3 (XCORE®.AI)
- 7 Digital MEMS mics
- 7.1 SPH0645LM4H (I2S)
- 7.2 MP34DT01-M (PDM)
- 7.3 SPH0690LM4H-1 (PDM)
- 7.4 IM69D130 (PDM)
- 7.5 AKU441 (PDM)
- 7.6 ICS-52000 (TDM)
- 8 “Smart” MEMS mics
- 9 WM8904
- 10 Analogue MEMS mics
- 11 Units
- 12 PMDWay
- 13 Earphone amplifier
- 14 Forums
XMOS libraries etc,
- The ICS-52000 microphone board sent over data as
TDM(Time Division Multiplexed) 2’s complement data. This is supported in the XMOS
lib_i2s(GitHub). I have used 2.2.0 but have 3.0 installed as well. Both are written in xC. I still use xTIMEcomposer. But the newest at GitHub is 5.0.0, entirely written i assembler. However, the include of
<xclib.h>seems still to exist. I have it with xTIMEcomposer as well. 5.0.0 has
DEPENDENT_MODULES = lib_xassert(>=4.0.0) and lib_logging(>=3.0.0). May I use 5.0.0?
See XCore Exchange point 3. Yes, I may!
- For the Pimoroni PIM44 audio DAC also may also use
- Update 02Jul2023:
lib_i2s(when using TDM at least) seems to need an external clock. See XCore Exchange point 4. Update 27Jul2023: I have written a driver in xC that has a 1.024 MHz SCK and 16000 Hz sampling rate at 32 bits * 2. rather than using an external PLL which is needed for 1.024 MHz, I have I have tabulated SCK’s duty cycle to be within spec, but on the average still end up with 1.024 MHz
- Update 08Sep2023. With the
Conclusion 25Apr2023 on headphone output
Update on the ICS-52000 mics
Update 24Aug2023. I wrote the I2S driver myself. I tested the notWired NW-AUD-ICS52000 containing four ICS-52000 (here and here) mics. But I seem to have problems with them, reading only noise (the NW-AUD-ICS52000 have by 08Sep2023 been proven not to work). See here:
I then found the single-mic ICS-52000 development board SDK InvenSense AN-000001 (here and here) and bought them from Mouser (their number 410-EV_ICS-52000-FX) (and back order for 1.24? from Farnell (3861388)). With it comes a Molex 52610-1071 10 pos zif female connector. I didn’t have a board to solder this to, but..
..after half a day of searching and several mails I ended up with “Dual Row 1.00mm Pitch 20-Pin to Dual Row 2.54mm Pitch Adapter” from Chip Quik (chipquik, where I also bought them) as their part number DR100DR254P20 in the PROTO-ADVANTAGE series (here, where in the referenced AN0003.pdf I find DR100D254P20 but not DR100DR254P20). This board is 17.78 mm x 25.40 mm, if divide by 2.54 we get exactly 7 x 10. This means that if the 2×10 plug connector is positioned on the centre of the board (which it looks like on the photo, and it sounds logical) then the alignment to any bottom 1/10″ □ board would be 2,5 units on each side short side. See my illustration. This means that I need the least 5 holes between the DIP sockets on the board I connect to, see here. Update: since this board comes unassembled, with loose sockets, there are quite large margins as to where to solder the connectors). Digi-Key, Elfa Distrelec and others had them too, but with 4 weeks lead time and no photo. Since Chip Quik doesn’t seem to have a data sheet for it, a photo is a must. Update: thank you, Anders for soldering the 1 mm and the other contacts for me!
Conclusion 01Mar2023 on microphone
Update 08Sep2023: Observe that the NW-AUD-ICS52000 I have now proven that it does not work. It sends over noise only. See below.
I went for the NW-AUD-ICS52000 (not very smart, see above) board from notWired.co, which contains four MEMS mics ICS-52000 from TDK InvenSense. See more about these below
* Both the mics and the board are NR/ND not recommended for new designs, but I have no problem with that
* My xCore-200 Explorer board also has been obsoleted (My single-board boards and why notes) (But I’m going to port Beep-BRRR to it)
* As well as the xC programming language (xC is C plus x)
* By going for the ICS-52000 I will then not have to relate to the XMOS
* But in the future I may use the X3 processor (lib_mic_array) version with the
lib_xcore (C plus lib_xcore black-boxes xC), though
* Or even the RISC-V based X4 processor XMOS xcore RISC-V
* Maybe in the future I could use a complete chip that takes microphone input and has earphone output. Search for “WM8904” here. Maybe if MikroE updated their MIKROE-506? Or if Adafruit made one?
* I may even be rather obsoleted myself. But even if I am retired, I am not tired! Because I am really looking forwards to porting my Beep-BRRR (below) to the xCore-200 Explorer board and the ICS-52000 mics
I have an application that uses XCORE and a mic (*). See My Beep-BRRR notes and My Beep-BRRR notes (some log & movies). Since one of my two XMOS mic array boards went dead (here, and I haven’t tried heating it in the oven, which my friend the expert suggested as a last resort. I fear it, bottom parts may fall off..) then I am going to port my SW onto the xCORE-200 dev board (which I have some of, here), and I am in need of a mic. I only need one.
This note is just a scratchpad. If you should find it useful – good!
(*) Not the 1966 mic on the photo, from my beloved Standard SR-250 tape deck. I was 16 at that time. One of these days I’m going to repair it. I have an extra spare, but both are in pieces now. But I do have the service manual.
- Not sure if “electret” microphone is a MEMS component. Update: they are not.
- “Electret” is an electrostatic microphone (electrostatic and magnet) (Wikipedia) and is kind of the opposite of a speaker. The foil electret type was invented in 1961, so my mic on the photo could be one of that kind)
- A MEMS (Microelectromechanical systems) microphone has microscopic parts forming a micro-sensor. The term is rather new, but even this technology is from the sixties (Wikipedia)
- Not sure what the usage criteria for I2S and PDM might be. Is PDM faster? Update: should be
- I could of course use an analogue mic with an AD board
- There is something called a “Smart MEMS” microphone, which would contain some more stuff, perhaps. “Smart” isn’t that smart a term to give anything a precise contents. More below.
XMOS X3 (XCORE®.AI)
This board has a connector to up to two PDM microphones with
MIC_CLK (on port P1G, via 100R),
MIC_DATA (on port P1F, via 100R) and power (settable to 1V8 or 3V3) and ground. The HW description says that this is meant to connect to XMOS microphone boards. The connector has 6 pins and is not the same as the “TDK Analog or Digital MEMS Microphone on a flexible PCB” connection on the SmartSound One board (below) which has 8 pins. There also is an
MCLK and an
I2S_MCLK which comes from the processor pin L1 as
APLLOUT and goes to a TLV320AIC3254 Ultra Low Power Stereo Audio Codec with Embedded miniDSP (here). The main thing for me is that there is no external PLL. However, I see that that the XMOS AI processor has an app PLL HW, like several other microcontrollers these days, like the RP2040 used in Raspberry Pi Pico board (here). Of course the system clock PLL has always been there, since the transputer and maybe even earlier.
But would I need a low-jitter PLL? I assume not, since I am going to use one microphone only and don’t need to know accurate phase differences.
About my Mic-array board: To control the MEMS mics’ clocks a Cirrus Logic CS2100-CP (here) delivers a low-jitter 24.576 MHz clock, the
MIC_CLK. Configuring its Fractional-N phase lock loop PLL is done over I2C. Then there is a NC7NZ34 buffer (here). From the HW description: “The CS2100generates a low-jitter output signal that is distributed to the xCORE- 200 device (Tile1 & MCLK) and DAC
DAC-MCLK)“. However, there also is an alternative external input
EXT_MCLK, by moving by soldering a zero Ohm resistor.
MIC_CLK is buffered over a FXL4TD245 (here). The return data is buffered back into the processor over a SN74AVC8T245 (here).
See questions at Forums.
Digital MEMS mics
- The Knowles SPW2430HR5H-B mic datasheet is here.
Adafruit I2S MEMS Microphone Breakout: https://www.adafruit.com/product/3421
This board also at ElfaDistrelec here.
- The STMicroelectronics MP34DT01-MC mic datasheet is here
Adafruit PDM MEMS Microphone Breakout: https://www.adafruit.com/product/3492
Adafruit PDM Microphone Breakout with JST SH Connector: https://www.adafruit.com/product/4346
- The Knowles SPH0690LM4H-1 mic datasheet is here
This microphone may be used with the XMOS
In a thesis
- The Infineon IM69D130 mic datasheet is here
This microphone may be used with the XMOS
On the XMOS mic array board v2
I use(d) this in my prototype of my Beep-BRRR, see 219:[xCORE microphone array]. This is the second version of that board. This board is now obsoleted. The first version used the AKU441:
- The Akustica AKU441 mic datasheet is here. Obsoleted
This microphone may be used with the XMOS
- Sensitivity -26dBFS ±1dB
- 63dB SNR
- VDD 1.62V to 3.6V
On the XMOS mic array board v1
This was used on the first version of the XMOS mic array board. See “v2” chapter (above).
- The TDK ICS-52000 (from TDK InvenSense) mic system datasheet is from here. Status not recommended for new designs (NR/ND) (T5848 recommended)). (Update: in the SDK InvenSense AN-000001 data sheet (above) there are three boards, for these mics: INMP441, ICS-43432 and “my” ICS-52000. All obseleted I think. But according to this page, ICS-43434 is in production on Sep2023). This is very interesting:
“The complete ICS-52000 solution consists of a MEMS sensor, signal conditioning, an analog-to-digital converter, decimation and antialiasing filters, power management, and an industry standard 24- bit TDM interface. …connect directly to digital processors, such as DSPs and microcontrollers, without the need for an audio codec in the system.”
Excerpts from the datasheet: “TDM. The data word format is 2’s complement, MSB-first. The ICS-52000 has an internal digital bandpass filter. A high-pass filter to remove unwanted dc and very low frequency components. The analog-to-digital converter in the ICS-52000 is a single-bit, high order, sigma-delta (Σ-Δ). It does require a good quality low-pass decimation filter to eliminate the high frequency noise. The pass band of the filter extends to 0.417 × fS and, in that band, has only 0.04 dB of ripple. The high frequency cutoff of −3 dB occurs at 0.5 × fS.”
- Sensitivity: -26 ±1dB @ 94dB SPL
- S/N 65dB
- VDD 1.62 V ~ 3.63 V
SDK InvenSense AN-000001 (EV_ICS-52000-FX)
When I bought these I discovered that the software driver I had written for the NW-AUD-ICS52000 worked just out of the box. I can now hear myself in the headset with data coming from the ICS-52000. This means that the NW-AUD-ICS52000 I have proven not to work. It sends over noise only. See this discussed in Update on the ICS-52000 mics (above).
Update 08Sep2023: Observe that the NW-AUD-ICS52000 I have now proven that it does not work. It sends over noise only.
- Information is here (update 24Aug2023 dead url?)
Since ICS-52000 is not recommended for new designs (NR/ND), this probably isn’t either. But it certainly is available.
Also available from https://www.cdiweb.com Component Distributors Inc. (CDI). I bought 5 there. Postage == component
“Smart” MEMS mics
See Stack Exchange, Signal Processing question 1 for more depth on this one. Read it first! Most PDM-type mics would probably contain a Σ‑Δ modulator. However, an increased order sigma-delta ADC adds 6 more dB increase in SNR (Signal Noise Ratio) for each order; a 5th order will offer 33 dB/octave (doubling of frequency) of SNR improvement. I found a formula on Wikipedia, but it’s related to oversampling (Delta-sigma modulation (Oversampling)). “When the sampling frequency is doubled, the signal-to-quantization-noise ratio is improved by 6N + 3 dB for a N-order ΔΣ modulator.” So if we don’t increase the frequency but the order (I don’t know if this is a correct assumption), we’d get an improved SNR/octave of 6*5 + 3 = 33 dB. Order (1, 2, 3, 4, 5) then have (9, 15, 21, 27 and 33) dB/octave of SNR. So these mics will be much quieter. Thanks to Dan Boschen at DSPrelated.com, for inspiring me on the above. I hope I’ve got some of it right.
Even if using a 5th order sigma-delta is smart enough, it’s probably the fact that since audio sensing is combined with “cutting-edge motion detection” (TDK InvenSense) (etc.) it may make “smart” an ok term here.
The digital filter performs the filtering (averaging) of the 1-bit data stream generated from the sigma-delta modulator. The filter output is a data word with higher resolution (usually 12 – 24 bits) but reduced data rate (decimation). The digital filter function consists in removing out-off band frequency components (quantization noise, unwanted signals…) and reducing the data rate according to the useful bandwidth (decimation).
See questions at Forums.
- The TDK InvenSense T5828 Σ‑Δ modulator mic datasheet is here
- The TDK InvenSense T5837 Σ‑Δ modulator mic datasheet is here.
I think this one is the one that would be most interesting for me. The EVB description is here. There also is a larger evaluation platform board “SmartSound One”, here. But as mentioned above, that board’s mic interface has 8 pins, not 6 pins as does the XMOS interface.
- The TDK InvenSense T5838 Σ‑Δ modulator mic datasheet is here
- The TDK InvenSense T5848 mic datasheet is here
Recommended for TDK ICS-52000.
Search for “WM8904” in this document.
Analogue MEMS mics
- The Knowles SPW2430 mic datasheet is here.
Adafruit Silicon MEMS Microphone Breakout: https://www.adafruit.com/product/2716
- The Knowles SPQ1410HR5H-B mic datasheet is here. 94 dB. Obsoleted according to Mouser.
- The TDK InvenSense ICS-40180 mic datasheet is here
SparkFun Analog MEMS Microphone Breakout – ICS-40180: https://www.sparkfun.com/products/18011
- The Knowles SPH8878LR5H-1 mic datasheet is here
SparkFun Analog MEMS Microphone Breakout – SPH8878LR5H-1. With 60x amplification: https://www.sparkfun.com/products/19389
Microphone Unit (LM393)
- I found no datasheet of this mic
This is probably most meant to be a sound level detection unit. Nice, but not for me.
SNR 40 dB, 5V, max4466 preamp and LM393 analog comparator. The output from the latter is the so-called “DIGITAL” connection: ANALOG and “DIGITAL” connect. HY2.0-4P cable interface, 2X LEGO™ compatible holes. See diagram here
This Australian company has several microphone breakout boards, see https://pmdway.com/collections/microphone-breakout-board.
Searching around I find some breakout boards, but it looks like some of them miss any circuit diagram.
The headphone amplifier in the XMOS mic array board is a DAC from Cirrus Logic called CS43L21. It takes audio data over I2S and control over I2C. Its data sheet is here. It seems still to be available, but I cannot find any breakout board with it. There is a hugely expensive evaluation board CDB43L21. Not relevant now.
Pimoroni PIM544 audio DAC
I ended up buying this board. The Pimoroni Pico Audio Pack PIM544 (here) contains a PCM5100A stereo DAC (datasheet) and a PAM8908JER stereo headphone amp (PAM8901/8908) (datasheet). It has 3.5 mm stereo audio jack outputs for line and headphone. The circuit diagram is here. I don’t know why the DAC is named “PCM..” (since there is not any pulse coded modulation as such) when it uses I2S. It needs
1- Left-justified serial data SD or or DIN or I2S_DATA
2 – Word select WS, stereo left/right “clock” or I2S_LRCK
3 – Bit clock or BCK or I2S_BCK
4 – MUTE (optional – but used in the description for the Raspberry Pi Pico which it is “designed for”)
There also is the Adafruit 3006 board with MAX98357A D-class output, but am uncertain about using it for headphones, since it needs a specified coil inductance. Therefore I queried at Stack Exchange, Electrical Engineering point 1 (below). There also are answers there (should be ok!) I think I’ll go for the Adafruit board, since the chip also seems to be not EOL. The Analog Devices page for MAX98357A and B is here. A design note is here.
Analog Devices has a headphone amplifier page here → there. They list a myriad of headphone amplifiers: MAX97003, MAX97220C, MAX97220D, MAX97220E, MAX97220A, MAX97220B, MAX97200, MAX9820, MAX13330, MAX13331, MAX9792, MAX9791, MAX9728, MAX9724A, MAX9724B, MAX9724C, MAX9723 (I2C for gain), MAX9725, MAX9850 (I2S for DAC and I2C for control), MAX9722B, MAX4409, MAX9720, MAX4411, MAX4298, MAX9722A. Many of them have a class-H amplifier type for the headphone outputs, with a separate class-D for the speakers only.
The soon to reach EOL (end of life) WM8731 audio codec from Wolfson Microelectronics (here, now owned by Cirrus Logic) has microphone inputs and a charge pump based headset output. Data sheet here. It’s used in the obsoleted Sparkfun Arduino Codec Shield (here) and MikroElektronica Audio Codec Board – PROTO MIKROE-506 (here).
Cirrus Logic suggests (here) to replace WM8731 with WM8904 (here). Both do digital mics and have built-in sigma-delta converter plus decimation filters etc. But I have found no board with this. I could hope for an upgraded board from MikroE for this in the future? Or maybe Adafruit?
- https://www.minidsp.com/forum/mchstreamer/16370-mchstreamer-tdm-input-from-ics-52000-mems-mics#44371 – by alexmstahl in late 2019. Question about only hearing noise from ICS-52000 (as I do per 14Aug2023). See StackExchange, Signal Processing (below), point 2
- XMOS microphone boards or alternative? – started by me 13Feb2023 (no response)
- Using a PLL for mic clock(s) – started by me 23Feb2023. Response from fabriceo, with 141: as a very important input (I/O timings for xCORE200 by XMOS 2017)
- lib_i2s TDM – which version for xTIMEcomposer – started by me 19May2023
- lib_i2s I2S/TDM clocked from _internal_ source? – started by me 02Jul2023
Stack Exchange, Signal Processing
- Smart MEMS microphones – started by me 13Feb2023 (response!)
- Noise only from TDM input from ICS-52000 MEMS mics on board NotWired NW-AUD-ICS52000 – started by me 14Aug2023. See miniDSP forum (above) point 1 and TDK InvenSense Forum point 1 (below)
Stack Exchange, Electrical Engineering
- D-class audio amplifier like MAX98357A output for headset – started by me 10Apr2023 (also see point 1 diyAudio (below))
TDK InvenSense Forum
They also call this “Developers Corner”.
- Noise only from TDM input from ICS-52000mics on board NotWired NW-AUD-ICS5200 – started by me 14Aug2023. See miniDSP forum (above) point 1 and See StackExchange, Signal Processing (above), point 2
I am not certain about how serious this forum is, as observed from the kind of ads that turn up there. Ads that not at all reflect the kind of urls I ever visit. But I did find quite good technical discussions there. Maybe something for the admins to reconsider?
- D-class audio amplifier like MAX98357A output for headset – started by me 11Apr2023 (also see point 1 above)
In FORUMS | INDEX SUPPORTED | PRODUCTS & PROJECTS | OTHER PRODUCTS FROM ADAFRUIT