Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 8 of 8

Thread: Audio array processing with multiple MEMS microphones

  1. #1
    Junior Member
    Join Date
    Dec 2019
    Posts
    3

    Audio array processing with multiple MEMS microphones

    Hi all,

    I'd like to simultaneously record audio data from four plus MEMS microphones. For the moment, my understanding is that the Teensy4.0 supports a single I2S channel (thus supporting to mics). It would certainly seem that the 600MHz clock should be able to handle quite a few I2S mics... I'd appreciate any advice on how to record more audio channels. For info, I'm currently using INMP441 mics which have built in I2S outputs.

    Best,

    CB

  2. #2
    Junior Member
    Join Date
    Dec 2019
    Posts
    5
    Hi cblondon,
    Sorry for not saying answers, but asking the questions - I am totally new to teensy 4 (as well as to any microprocessors) - can you please share how did you managed INMP441 joined to I2S of Teensy 4? (both wiring and pins declarations)
    I am going to use 3-4 mems and stuck rirh in the beginning...

    Thank you in advance!

  3. #3
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    21,359
    Quote Originally Posted by cblondon View Post
    I'd appreciate any advice on how to record more audio channels.
    Today you can use up to 4 of those mics with Teensy 4.0. In the future more will become possible, but right now with the latest Audio library code (in 1.49-beta4), the limit is 4 mics.

    To use 4, you would connect 2 of them to the main I2S port, which is pins 8 (DATA IN), 20 (LRCLK) and 21 (BCLK). You would connect the other 2 to the second I2S port, which is pins 5 (DATA IN), 3 (LRCLK) and 4 (BCLK).

    I2S mics have a select pin, which causes the mic to transmit as the right or left channel. On each pair of mics, you connect the 3 I2S signals, and 3.3V power and GND in common. Then you connect that select signal to 3.3V on one of the mics and to GND on the other.


    The audio library has quad I2S, but it's not yet ported to Teensy 4.0. Even on Teensy 3.2 to 3.6, quad I2S doesn't work with most I2S mics because it has the wrong BCLK to LRCLK ratio of 32. Most I2S chips are flexible on this ratio, but these mics require a specific ratio of 64. Eventually I will implement quad, hex and octo channel on Teensy 4.0, with the required BCLK/LRCLK ratio of 64, but only for the main I2S port. The secondary port is only capable of stereo. So in that glorious but distant future, you'll be able to connect up to 10 of these I2S mics. Today each port supports only stereo, so the most you can use right now is 4 mics.

    The other way to connect more devices is with TDM protocol. Teensy 4.0 supports TDM with 16 channels. But you would need mics designed for TDM, or rather complex digital logic to convert/merge many I2S into a single TDM stream.

  4. #4
    Junior Member
    Join Date
    Dec 2019
    Posts
    5
    Hi, PaulStoffregen,
    Appreciate you so much! Finally I got mems mic working!!!
    Click image for larger version. 

Name:	82dfd5a72c7e2f5a2832965e7bf43c25.png 
Views:	11 
Size:	46.3 KB 
ID:	18588

    PS sorry to topic starter for intrusion!

  5. #5
    Member
    Join Date
    Aug 2016
    Location
    Australia
    Posts
    65
    FYI,

    TDK has a daisy-chainable MEMS TDM microphone the ICS-52000 ($5 ea at Mouser).

    https://www.invensense.com/download-...00-data-sheet/

    Up to 16 of them can be daisy-chained into a single TDM input.

  6. #6
    Junior Member
    Join Date
    Dec 2019
    Posts
    3
    Quote Originally Posted by PaulStoffregen View Post
    Today you can use up to 4 of those mics with Teensy 4.0. In the future more will become possible, but right now with the latest Audio library code (in 1.49-beta4), the limit is 4 mics.

    To use 4, you would connect 2 of them to the main I2S port, which is pins 8 (DATA IN), 20 (LRCLK) and 21 (BCLK). You would connect the other 2 to the second I2S port, which is pins 5 (DATA IN), 3 (LRCLK) and 4 (BCLK).

    I2S mics have a select pin, which causes the mic to transmit as the right or left channel. On each pair of mics, you connect the 3 I2S signals, and 3.3V power and GND in common. Then you connect that select signal to 3.3V on one of the mics and to GND on the other.


    The audio library has quad I2S, but it's not yet ported to Teensy 4.0. Even on Teensy 3.2 to 3.6, quad I2S doesn't work with most I2S mics because it has the wrong BCLK to LRCLK ratio of 32. Most I2S chips are flexible on this ratio, but these mics require a specific ratio of 64. Eventually I will implement quad, hex and octo channel on Teensy 4.0, with the required BCLK/LRCLK ratio of 64, but only for the main I2S port. The secondary port is only capable of stereo. So in that glorious but distant future, you'll be able to connect up to 10 of these I2S mics. Today each port supports only stereo, so the most you can use right now is 4 mics.

    The other way to connect more devices is with TDM protocol. Teensy 4.0 supports TDM with 16 channels. But you would need mics designed for TDM, or rather complex digital logic to convert/merge many I2S into a single TDM stream.
    Thanks for your reply, Paul, much appreciated.

    I currently have four INMP441 MEMS mics working with an ESP32, but am excited to hear that the Teensy 4.0 will get more capability sometime in the future!

  7. #7
    Junior Member
    Join Date
    Dec 2019
    Posts
    3
    Quote Originally Posted by palmerr View Post
    FYI,

    TDK has a daisy-chainable MEMS TDM microphone the ICS-52000 ($5 ea at Mouser).

    https://www.invensense.com/download-...00-data-sheet/

    Up to 16 of them can be daisy-chained into a single TDM input.
    Thanks for the link to the TDM mic. I was aware of this, but have lazily stuck to the INMP441 as it can be purchased on a small PCB already conveniently assembled with the requisite resistor and capacitor for less than $2 (see https://www.aliexpress.com/item/32960945048.html). Truth be told, I'm a little intimidated by the prospect of soldering SMD components , but as I spent quite a bit of time learning KiCad this summer, I might just bite the bullet, and try making my own PCBs with a TDM mic.

  8. #8
    Member
    Join Date
    Aug 2016
    Location
    Australia
    Posts
    65
    Yes, SMD can be a bit daunting.

    I'm currently working on a T4 rework of the CS42448 board, with better I/O filtering and I'm already up to 80 tiny little components and a 64pin LQFP to contend with. Oh for a way to make DIY solder paste stencils (and a pick and place machine)!

    I try to keep with TSSOP style packages, avoid anything with contacts under (BGA, QFP).

    I don't have much problem with discrete components, but keep to 0805 or bigger - as I find tweezering (and reading) 0603 components frustrating.

    I keep to wider component spacing than commercial boards - enough for tweezers to fit between the components and easy soldering iron access.

    One must-have is hot air rework gun and some solder paste. I bought an 858D off eBay for $A60 and never looked back. I also made a SMD oven, but it gets limited use as I haven't conquered DIY paste stencil making.

    I hope this helps.

    Richard

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •