Using Teensy for multiple inputs

aherjim

Member
Hey all

For my Bachelor Thesis, I have to create my own "microphone". More specifically, to know where the sound is coming from using TOA (time of arrival). The main goal of the project is to be able to recognize from left and right while listening to it. If 2 microphones actually work, then the model will be expanded to 4 microphones.

My first idea is to connect two microphones that record simultaneously. It is also important to be able to have an output that runs simultaneously.

I know for sure, Teensy 4.1 can handle 2 microphones on I2SI. Could it be able to handle the 2 inputs and 1 output at the same time? I was planning on using the PT8211 DAC. or the Audio Shield, but not completely sure about it.

Thanks for all the guidance provided.
 
".....at the same time?" can mean a multiple of things. Do you mean down to a quectosecon (10 ^−30 s) or less?

It would be better if you quantified "at the same time".

It's doubtful if you do mean at EXACTLY the same time as if for no other reason than the microphones are unlikely to have exactly the same response time.
 
Last edited:
".....at the same time?" can mean a multiple of things. Do you mean down to a quectosecon (10 ^−30 s) or less?

It would be better if you quantified "at the same time".


So our point of reference are hearing aids which range from 3 - 8 ms of delay.
 
Check out this answer to a similar question a few days ago.

https://forum.pjrc.com/threads/73469-Number-of-simultaneous-mics-possible

Teensy 4.1 has 2 digital audio ports (not including MQS and PWM) which can implement a variety of protocols. If the protocol supports both input and output, each both can stream both in and out simultaneously, if using the same protocol. The first port has 5 data pins (currently I2S protocol only), 3 of which can be either input or output. The second port has just 1 input pin and 1 output pin, so it's limited to only stereo.

So you could connect up to 8 I2S mics to the first port. To also connect a PT8211 DAC, you would need to connect it to the second port. Even though the first port can output while receiving 8 channels on 4 data pins, it can only do output as I2S protocol. Connecting PT8211 which uses its own protocol to port 1 would not be possible when port 1 is running in I2S protocol for those mic inputs.

If this is confusing, try using the audio design tool. Just drag the inputs and outputs you want to use onto the canvas. Check the info for each in the right-side documentation, so you understand their capability. These details about protocol config and other sharing details are baked into the design tool. If you put 2 things on the canvas which can't actually work together, you'll see yellow error icons appear.
 
So our point of reference are hearing aids which range from 3 - 8 ms of delay.

Ok, if you are doing a Batchelors Thesis you need to be more precise in your wording. Speak in "Engineers Speak" not in "Conversational Speak".
3 - 8 mS is hardly simultaneous.
 
you need to be more precise in your wording. Speak in "Engineers Speak" not in "Conversational Speak"

I don't see what's so difficult to parse or understand here?

Several people have wanted to make these sorts of projects to infer the position of an audio source by listening with multiple microphones. I recall there were a lengthy thread just a week or two ago about the calculation for timing versus distance between the mics.
 
I don't see what's so difficult to parse or understand here?

Several people have wanted to make these sorts of projects to infer the position of an audio source by listening with multiple microphones. I recall there were a lengthy thread just a week or two ago about the calculation for timing versus distance between the mics.

I agree as a generalisation, but he is doing a Batchelors degree and I therefore think he should be more precise in his wording.

A thesis that can have holes picked in it is not going to have a good reception when it comes to marking.
 
I do agree it's important to be specific about some things. Maybe "delay" means the latency from analog input to analog output? Or maybe delay means the worst case mismatch in timing between audio channels, either captured by ADCs on the same chip or on different chips, or inside I2C mics?

But as for thesis wording, I would imagine you'd probably worry about that much later, rather than at such an early stage where you're still trying to figure out which hardware to use to even begin the project.
 
I agree as a generalisation, but he is doing a Batchelors degree and I therefore think he should be more precise in his wording.

A thesis that can have holes picked in it is not going to have a good reception when it comes to marking.

@BriComp, Com'on. The OP was clear, He wanted to do TOA, which defines the sampling requirement.

@aherjim: what you need to do is quite easy: You need all sensors sampled with the same sampling line. this is best done with digital microphones, where sampling is provided by Teensy. Searching this forum for TOA beamforming will give you a lot of discussion on this.
 
Back
Top