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

Thread: Best way to get multiple audio inputs for processing?

  1. #1
    Junior Member
    Join Date
    Jul 2019
    Location
    Sydney, Australia
    Posts
    6

    Best way to get multiple audio inputs for processing?

    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

  2. #2
    Senior Member
    Join Date
    Jul 2014
    Posts
    2,259
    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.

  3. #3
    Junior Member
    Join Date
    Jul 2019
    Location
    Sydney, Australia
    Posts
    6
    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/PortalProduc...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

  4. #4
    Senior Member
    Join Date
    Jul 2014
    Posts
    2,259
    Quote Originally Posted by Gav View Post
    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/PortalProduc...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

Posting Permissions

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