Best way to get multiple audio inputs for processing?

Status
Not open for further replies.

Gav

Member
Hi All,

I’m working on a (about to be open source) project right now involving a teensy 3.6 as lock-in amplifier:
https://en.wikipedia.org/wiki/Lock-in_amplifier
At the moment I’ve got it working quite nicely with the Teensy 3.6 and audio shield, and I can see the detected response as a complex number (i.e. I can see the amplitude of the detected signal, and the phase showing any delay of the system under test). The amount of maths involved is fairly trivial, and the Teensy is spending most of its time doing nothing.

Oh, as a side note, the teensy audio web tool & libraries are awesome, and it’s made most of my development work extremely easy! Thank you to Paul and all the developers!

Anyway, my next step is to expand the system to have as many input channels as I can (8 would be good, but 16 or 32 would be awesome).

I see that I can use two audio shields on a Teensy, to get four input channels at full sample rate.
I also see that I can do without the audio shield and just use the ADCs directly. However it seems that the teensy ADC only supports two channels at the same time? (In the forums there’s some comments saying the AudioInputAnalog object needs an internal ADC to itself, of which there’s only two in hardware. However there’s some other comments I saw saying the ADC code was changing or had changed? So I’m not sure if that’s still a limitation?)
In my system I am dealing with audio stuff, but only signals around 1,000Hz range, so if I have to sample at a much smaller rate than the audio shield currently gives me, I expect I won’t be affected much.

So, to get lots of extra channels, my options seem to be:
1) Use multiple Teensys, each with two audio shields, to get four channels per teensy. This will definitely work, but cost me a lot more than I was hoping.
2) Use one Teensy, use hardware ADC for each signal, and multiple AudioInputAnalog objects & the audio library to process data. I suspect this won’t work because of AudioInputAnalog breaking somehow when more than two are used? But I’d love to be wrong about this.
3) Use one Teensy, use hardware ADC for each signal, skip the audio library and re-write all my signal processing. Pretty sure this will work, but is a lot of extra effort, and I do love the ease of the audio libraries.

Are there any other options I’ve missed, or is there a better way to approach this?

Cheers,
Gavin
 
Are you using microphones?
in that case you could use digital mems microphones and daisy chain them into a 8-chan TDM system. Teensy 3.(2,5,6) have 2 I2S data ports, so you could use up to 16 microphones with one Teensy.

If no microphones, you would need a multichannel ADC, but the TDM interface to teensy would be the same.
 
Hi WMXZ,
I am using microphones as the input. For this project I was hoping to keep the hardware simple and off the shelf (I’m mostly operating in a hot-glue everything together mode right now), but that’s certainly an option.

OK, I think I’m understanding about the TDM idea. Here’s my attempt at a summary:
The Teensy’s I2S bus allows TDM multiplexed data as an input. In order to get the signals combined into a TDM format I’d need to either:
  1. Use ordinary analog microphones and something like Paul’s CS42448 breakout: https://oshpark.com/shared_projects/2Yj6rFaW, which will do the synchronised ADC on 6 input channels, transmit the time multiplexed data to the Teensy via I2C, which the AudioInputTDM block will separate back into individual channels for me to use.
  2. Use digital TDM microphones, such as on the ICS-52000 breakout board here: https://www.notwired.co/PortalProductDetail.aspx?ProdId=605574&
    The microphones can be daisy chained, and up to 8 of them would come in on a single I2S link, (and I could use 16 in total in the teensy). And the AudioInputTDM block will separate it back into individual channels for me to use.

Is that about right?

Cheers,
Gavin
 
Hi WMXZ,
I am using microphones as the input. For this project I was hoping to keep the hardware simple and off the shelf (I’m mostly operating in a hot-glue everything together mode right now), but that’s certainly an option.

OK, I think I’m understanding about the TDM idea. Here’s my attempt at a summary:
The Teensy’s I2S bus allows TDM multiplexed data as an input. In order to get the signals combined into a TDM format I’d need to either:
  1. Use ordinary analog microphones and something like Paul’s CS42448 breakout: https://oshpark.com/shared_projects/2Yj6rFaW, which will do the synchronised ADC on 6 input channels, transmit the time multiplexed data to the Teensy via I2C, which the AudioInputTDM block will separate back into individual channels for me to use.
  2. Use digital TDM microphones, such as on the ICS-52000 breakout board here: https://www.notwired.co/PortalProductDetail.aspx?ProdId=605574&
    The microphones can be daisy chained, and up to 8 of them would come in on a single I2S link, (and I could use 16 in total in the teensy). And the AudioInputTDM block will separate it back into individual channels for me to use.

Is that about right?

Cheers,
Gavin
Yes, that I was thinking about
 
Hi Gavin, were you able to get your project working with the single teensy linking the channels? I think I have a similar goal on a project I'm working on but I will be sampling 6 50-60Hz sine wave inputs on adc0 chaining the channels together.

Thanks,
Chris
 
Hi Gavin, were you able to get your project working with the single teensy linking the channels? I think I have a similar goal on a project I'm working on but I will be sampling 6 50-60Hz sine wave inputs on adc0 chaining the channels together.

Thanks,
Chris

Hi Phi,

I never got around to it, sorry. I'd be interested to hear how it goes if you implement it.

Cheers,
Gavin
 
Status
Not open for further replies.
Back
Top