Help : Teensy 4.X with TDM 16 channel audio.


New member
Hello !
For my Master's Thesis in Electrical Engineering, I'm building a modular 16-analog microphone array with a RPi. And I need a little help.

The goal is to build a HAT with all the digital components, and connect microphone with flexible cables. This would allow to create any array shape easily.
Regarding the ADC's, I'm using 4 TLV320ADC6140 from TI that shares a I2C control bus and a TDM data bus.

I would like to go up to 16 channel, 48Khz, 32bit which seems to be the maximum feasible on a TDM line.( BLCK would be 24.576 MHz)
I can always drop the resolution to 16 bits and/or the sample rate to 24kHz if it's to ambitious.

As TDM is not compatible with a RPI, I will need additional hardware to convert the TDM data into SPI.
For that task, a teensy 4.X seems like a great candidate.
I have however no experience with them and have about 3 months of time.
Do you think it's feasible ?

Thank you so much !
Feasible? Possibly. Challenging for someone with "no experience" and "about 3 months of time". Definitely!
  • Don't try to do it all in one go - test each element separately
  • Can you get SPI communication from Teensy to RPi? You need significantly over the 24.576Mbps, which is in theory OK for SPI but in practice subject to many pitfalls
  • Do you have a fallback option for the SPI link? Don't dismiss USB serial - it's nominally 480Mbps...
  • Familiarise yourself with the Audio library as early and thoroughly as possible
  • Build test sketches, e.g. 16 channels of known-good audio, using AudioSynthWaveform or similar as the sources
  • Maybe try with I²S microphones to begin with - you can get up to 10 channels @ 44.1k/16bit with no complex audio setup
  • Changing to 48kHz is fairly easy - Google is your friend (the forum search is pretty poor)
  • You will need to write a control object for the TLV320ADC6140, at the very minimum - there are a few examples already in the Audio library
  • Test a single TLV320ADC6140 to begin with, using the existing 16-channel 16-bit AudioInputTDM
  • 32-bit is definitely a "stretch goal": the library natively uses 16-bit and you'll have to go deep into very low-level code to get the full 32 bits