ICS-52000 24bit TDM and Teensy audio

Status
Not open for further replies.

Somnitec

Member
------------------------------------
Admin Edit: ICS-52000 microphones do not appear to work well with Teensy at 44100 Hz sample rate.
------------------------------------




I'm designing something that could best be described as a digital mixer with 8 microphones and a stereo output. I came across the TDM protocol and it's potential for reducing a lot of cost and complexity. I came upon the ICS-52000 microphone which allows daisy chaining as shown in the image.

A point of concern is that the microphone is 24 bit, while the teensy audio library (and TDM implementation afaik) is 16 bit. Would it be feasible to rewrite the TDM object to simply drop the insignificant 8 bits? Or are there other solutions?

drumkit setup.JPG
 
Last edited by a moderator:
Would it be feasible to rewrite the TDM object to simply drop the insignificant 8 bits?

No need to rewrite anything, since that's what it will do if you simply use it as-is. The TDM object gives you 16 channels, each 16 bits. Just use 8 of them.

Those mics align their 24 bit data to 32 bit slots, so half of the 16 bit channels will end up being the 8 low bits, and 8 more zeros. All you need to do is just not use those.

However, one thing I've considered (but pretty much waited for anyone to actually use these mics and give some real feedback) is whether digital gain might be needed on the 24 bit data *before* discarding the low 8 bits. Really, I have no idea if this is even necessary. I just recall getting the impression it might be desirable, from what I remember of reading that mic's datasheet (but not actually using any of them). So far, I have only personally tested TDM with that bit Cirrus chip.
 
If you actually build this, one electrical detail to consider is how that 11 MHz BCLK signal is going to get transmitted to 8 devices. Buffers would add delay.

I hope you'll share any practical learning of how to really use 8 of these mics. I recall at least one other old thread about using them, but I don't remember any followup. Would be really nice to know if they work and what really needs to be done to get 8 of them wired up successfully.
 
However, one thing I've considered (but pretty much waited for anyone to actually use these mics and give some real feedback) is whether digital gain might be needed on the 24 bit data *before* discarding the low 8 bits. Really, I have no idea if this is even necessary. I just recall getting the impression it might be desirable, from what I remember of reading that mic's datasheet (but not actually using any of them).

I suggest to have this option (digital gain)
The 24 bit Mems I2S Micro ICS434x are very 'silent' when using only the top 16 bits.
This may be fine for loud sound, but even close-by voices are hard to hear.
 
In my case I'll be close-micing drumheads and such, so I'm rather looking for ways to physically attenuate the sound not to reach the 117 dB SPL Acoustic Overload Point, but this I will have to do experimentally.

Thanks for the clarification Paul. I am still considering some other options with the cirrus chip or potentially a dsp chip with 4 i2s lines or 8 adcs, but I will report back once I have some results!
 
In my case I'll be close-micing drumheads and such, so I'm rather looking for ways to physically attenuate the sound not to reach the 117 dB SPL Acoustic Overload Point, but this I will have to do experimentally.

The top 16 bit is than all you need.
You can attenuate later further if needed.
 
Getting a step further in the process, I see that putting the microphones in series will not work as I need to be able to use any number of microphones.

I see two options now:
1. have one teensy receive 4 i2s microphones, process it, then transfer the sum to a second teensy over i2s, and have 3 extra i2s microphones connected
2. find a part that can encode 8 i2s or PDM streams into a TDM stream

Option 2 seems to be the ideal case, but I have trouble finding a part that can do this.
I see the ADAU1701 should be able to do it, but it seems to be quite an overkill. (although I could use it to do some pre-processing)
More elegantly, four ADAU7002's could work, but I'm a bit at a loss on how I can combine the streams. Do I simply set the config for the different TDM slots and tie the entire TDM bus together?

Anyone could shed some light on these options or any that I missed?
 
1. have one teensy receive 4 i2s microphones, process it, then transfer the sum to a second teensy over i2s, and have 3 extra i2s microphones connected

I2S has 2 modes, "master" which outputs BCLK, LRCLK (and optional MCLK), and "slave" mode which receives all the clock signals from the master. Both can transmit and receive, so don't confuse this with data direction. These modes are about who generates the clocks.

Normally Teensy is the master and the chips you connect are the slave devices.

Many I2S chips only work in 1 mode, and they don't explain this clearly. Remember, datasheets are written by marketing people with only 1 job, to sell you the product. When a part has some important limitation, they almost always downplay or gloss it over, hoping you won't notice.

In slave mode, Teensy can only receive one stereo stream. Slave mode also isn't compatible with many of the other input & output methods, because Teensy is no longer in control of the timing. These details are documented in the design tool, but if you missed them, at least this message can let you know those details exist...

If you're going to do something more complex, you need to carefully consider which I2S devices run in which modes. Obviously each I2S connection can't work unless 1 side creates the clocks and the other side receives them.
 
Last edited:
Paul,
I have been watching the development work that you have done on the audio library and it is fantastic! I asked a long time ago about TDM support and you have delivered! Thank you once again! I noticed that you mentioned the Teensy is normally configured as a master of I2S/TDM. I have an audio source that is already the TDM master and provides the Frame sync, BLCK and LRCLK. I was wondering if there was a way to configure the Teensy as the slave so I can analyze the audio of the first TDM channel out of the 16 channel being sent so I can process the peak value.
I have already tried the different examples but none of them work. I am assuming the reason is because the teensy is waiting on data to line up with Frame Sync which is generated externally. Let me know your thoughts.
Thanks
 
Hi, I'm working now on project with Teensy 3,5 and ADAU1701, and they works perfectly with quad_i2s output from Teensy. But like a normal human I want MORE!!! :))) So trying to connect them via the TDM 8 channel (TDM output from Teensy in master mode), but still no results.... I'm new in all audio electronics, so if someone could give me some clues, how to make them friends, it will be great...!
 
I have not personally used the ADAU1701 chip, but looking at its datasheet, at the very least it looks like you'll need to use I2C to write to the serial input control register in each chip (table 49 & 50 on page 41), to put the chips into TDM mode.

This chip looks like it has 2 different options for TDM, shows on page 47. You'll need to use the one in figure 36. I don't quite understand how you're supposed to configure between those 2.

The instructions about how to connect the signals are in the M[2:0] desription on that page. You'd run the same data wires to both chips. To get all 8 outputs, you'd connect 2 of these ADAU1701 chips and configure the ILP bit (page 41) to 0 on the chip you want to output the first 4 channels and set to 1 on the other chip, so it outputs the other 4 channels. Each chip should "hear" all the input bits, but ignore half of them.

There could be other issues, and I can't even say if this is 100% correct. That's all I got from a quick read of the datasheet.
 
Hi Paul, thanks for your response! I was so busy with my primary work that forgot to post that I've made things work but not sure that it works properly. First of all I need to connect only one ADAU1701 to the Teensy, so I need all 8 channels on the one board of ADAU. Till now I just checked that it works - I can hear sound from first two channels and from the 8th one. It sounds not so good like it was by quad i2s, and still have to check what with other channels, so first of all I'll solder all the stuff together to be sure that the test wires is not the problem of a bad sounding...
I'll check all the tips that you've gave me, thank you a lot for your attention!
 
Status
Not open for further replies.
Back
Top