how to use the ics52000 microphone with teensy 4.1

I made another attempt to test ICS-52000 with the notwired.co board with Teensy 3.6.

In every test I tried, all 4 microphones appear to be transmitting only a worthless static. It seems to never respond to actual sound, even directly touching the PCB right at the bottom side holes where the microphones supposedly "hear".

I even tried an experiment to extract the 32 bits and apply digital gain to hear some the low bits which are received by TDM channel 1.

Code:
#include <Audio.h>

class micgain : public AudioStream {
  public:
    micgain() : AudioStream(2, inputQueueArray) { }
    virtual void update(void);
    audio_block_t *inputQueueArray[2];
};

void micgain::update() {
  audio_block_t *a = receiveWritable(0);
  audio_block_t *b = receiveReadOnly(1);
  if (a && b) {
    for (int i = 0; i < AUDIO_BLOCK_SAMPLES; i++) {
      int32_t n = (a->data[i] << 16) | (b->data[i] & 0xFFFF);
      a->data[i] = n / 1000;  // gain is 65536 / 1000
    }
    transmit(a);
    release(a);
    release(b);
  } else {
    if (a == nullptr) release(a);
    if (b == nullptr) release(b);
  }
}

AudioInputTDM     tdm1;
AudioOutputTDM    tdm2;
micgain           test1;
AudioOutputAnalogStereo out1;
AudioConnection   p1(tdm1, 0, test1, 0);
AudioConnection   p2(tdm1, 1, test1, 1);
AudioConnection   p3(test1, 0, out1, 0);
AudioConnection   p4(test1, 0, out1, 1);
AudioConnection   p5(test1, 0, tdm2, 0);

void setup() {
  AudioMemory(40);
}

void loop() {
}

sc.jpg

I don't know why the ICS-52000 mics are transmitting worthless noise and don't seem to hear any real sound. :(
 
In a final attempt, I tried removing the 3 chips from the notwired.co board. I replaced 2 of them with just wires.

sc1.jpg

sc2.jpg

With this change, I can get the mics to respond. But the quality is terrible. A *lot* of noise and poping sounds. But if I blow directly on the back side of the notwired.co PCB, I can hear it on the headphones I have connected (via the DACs going to a M-Audio AV40 monitor speaker with headphone output). I was running the code from msg #26.

While the InvanSense datasheet says ICS-52000 is supposed to work up to 48 kHz sample rate and BCLK speeds up to 27.034 MHz, I'm starting to suspect this mic was meant for much lower sample rates. The specs on page 4 and elsewhere in the ICS-52000 were all measured with BCLK at 3.072 MHz.

The notwired.co board doesn't say what clock speeds it supports, but I'm getting a pretty strong feeling they only ever used it at much slower than 44 kHz sample rate and 11.29 MHz BCLK.
 
I have closed many of the redundant ICS-52000 threads. This thread and the oldest one on this forum remain open.

https://forum.pjrc.com/threads/48563-Cheap-ICS-52000-Microphone-Array-Board-for-TDM-evaluation/page2

Some success using a single ICS-52000 was previously reported on this thread, which may be useful...

https://forum.pjrc.com/threads/4289...rom-invensense?p=141742&viewfull=1#post141742

Please, do not create more ICS-52000 threads on this forum. We already have far too much, which only makes info harder for everyone to find.
 
Been following these threads for a while, somewhat bemused ... but a couple of (possibly dumb) questions occur to me ...
  • Does the notwired.co PCBA follow their schematic or the InvenSense datasheet one? Theirs has a 10k pull-down on SD, where the datasheet calls for 100k
  • Does / can the audio library impose the 10ms delay required at startup before WS is asserted?
I also note the datasheet says "The part is in normal operation mode when SCK and WS are active. Clocks should not be supplied to the microphones until they are settled and stable." No clues (that I can see) telling you how long it takes the device to get "settled and stable". But hey, it's only revision 1.3 of the data sheet from 2017, I'm sure they'll get it right one day :p

Cheers

Jonathan
 
In a final attempt, I tried removing the 3 chips from the notwired.co board. I replaced 2 of them with just wires.

View attachment 25297

View attachment 25298

With this change, I can get the mics to respond. But the quality is terrible. A *lot* of noise and poping sounds. But if I blow directly on the back side of the notwired.co PCB, I can hear it on the headphones I have connected (via the DACs going to a M-Audio AV40 monitor speaker with headphone output). I was running the code from msg #26.

While the InvanSense datasheet says ICS-52000 is supposed to work up to 48 kHz sample rate and BCLK speeds up to 27.034 MHz, I'm starting to suspect this mic was meant for much lower sample rates. The specs on page 4 and elsewhere in the ICS-52000 were all measured with BCLK at 3.072 MHz.

The notwired.co board doesn't say what clock speeds it supports, but I'm getting a pretty strong feeling they only ever used it at much slower than 44 kHz sample rate and 11.29 MHz BCLK.

That is interesting. As far as I know, Doggy is the only one who has succesfully made the TDM microphones working with Teensy.
Doggy is not using the norwired.com board, but connecting the ICS52000 with teensy direcly, and he set the sampling frequency
to be 10 Khz. Maybe this is the reason.


I have contacted one engineer from Notwired. com and they are trying to use the notwired board with the teensy 3.6.
I will inform the forum when I get their response.
 
Quick answers....

Does the notwired.co PCBA follow their schematic or the InvenSense datasheet one? Theirs has a 10k pull-down on SD, where the datasheet calls for 100k

I do not believe the pulldown resistor really matters.

I did spend quite a lot of time last night looking at the signals with my oscilloscope. It's easy to see the SD signal ramping slowly down after the 24th bit, when that last bit was a 1 (the lowest 10 bits are pretty much always random).


Does / can the audio library impose the 10ms delay required at startup before WS is asserted?

Yes. Technically, the startup code does this, using a 300 ms delay before C++ constructors are executed. This was added years ago because many chips, particularly MEMS motion sensors, requires a delay to start up and virtually all Arduino libraries don't implement a delay or check & retry because all of Arduino's boards have a lengthy delay at startup from their bootloaders.


But hey, it's only revision 1.3 of the data sheet from 2017, I'm sure they'll get it right one day :p

After everything that's happened, I believe it's pretty safe to conclude ICS-52000 doesn't really work at the higher speeds the datasheet claims. Then again, the datasheet only gives performance metrics with 3 MHz clock, so if microphone works even in the slightest way utterly unusable noise, the datasheet it technically true even though any rational person would call that pretty dishonest.

I'm considering adding an admin edit to the 1st message of every ICS-52000 thread (how did we ever get so many...) to warn people that this mic doesn't really work well with Teensy.
 
But AFAIK, a delay before start and a delay between start of FS and start of SCK aren't the same thing. Manually connecting FS late is an easy test.


This delay can be implemented either by enabling the WS output (FS) on the clock master at least 10 ms after the SCK_I is enabled, or by externally controlling the signals given to the ICS-52000s.
 
But AFAIK, a delay before start and a delay between start of FS and start of SCK aren't the same thing. Manually connecting FS late is an easy test.


This delay can be implemented either by enabling the WS output (FS) on the clock master at least 10 ms after the SCK_I is enabled, or by externally controlling the signals given to the ICS-52000s.

If one wants to try that, just insert the delay(10) here : https://github.com/PaulStoffregen/Audio/blob/master/output_tdm.cpp#L338
 
I've added a warning at the top of the many ICS-52000 threads. Hopefully it will help others in the future who find these many threads.
 
@paul,

I have connected one engineer from invensense, inc. the producer of ICS52000.
The ICS52000 works with the ADAU1452 well.
He told me that there maybe some issue with the Teensy board.

Screenshot from 2021-08-20 09-37-04.png

There are several standard for the TDM interface, such as TDM2, TDM8 TDM16.

can you check the TDM standard of ICS52000 and the Teensy?
 
Teensy absolutely does indeed support the proper TDM protocol. I personally confirmed the waveforms on my oscilloscope. In fact, I posted those waveforms for you, but I can not easily find them now because you started so many redundant threads. It was indeed transmitting data in the proper way, but the content of that data was not responsive to any sounds.

Ask the engineer at Invensense if he/she as personally witnessed ICS52000 working at 44100 Hz sample rate?

I know the specs claim it works up to 48 kHz. But I personally spent quite a lot of time working with this part (on the notwired.co boards) and every appearance it it just barely functions with essentially zero sound sensitivity when used at 44100 Hz.
 
@paul Here is th reply from invensense.
Code:
The ICS-52000 complies to the TDM standard. The microphone datasheet pages 10-13 outline the requirements for successful microphone operation 
i.e. for 16 microphones running at fs=48kHz, then SCK should be 512xfs = 24.576MHz, WS will be generated by host and subsequently passed through 
each microphones WSO after they have broadcast in their TDM slot. If you are running at a lower sample rate you should scale the clk appropriately i.e. 
44.1kHz would call for 22.579MHz for the same number of mics. The generic requirement of the host is that it can generate the appropriate SCK and WS 
and interpret each individual TDM slot correctly. The data consists of a data word length of 24 bits/channel and the data word format is 2’s complement, 
MSB-first. You should ensure that this has been appropriately configured on the host side.

 

I did see the overall feature on the Teensy development board that it claimed to have TDM capability, however it should provide some kind of SDK or API 
for configuring the TDM appropriately. Has the Teensy TDM input been validated on another TDM audio source? You could for example use an Audio Precision 
for example to generate a TDM stream and then see if the Teensy can capture it. If you don’t have access to that you could also try creating a TDM2 or TDM4 
or TDM8 using 2/4/8 ICS-52000 mics and scale the CLK down accordingly to see if that makes a difference – operation at higher CLK rates >10MHz can be 
hampered by non-ideal routing.

It seem like that the problem is the the SCK signal, which should be decided based on both the number of microphones, and the sampling frequency.

is this the problem?
 
@feima0011
IMO, invensense is the wrong addressee. I understand it was demonstrated in other thread that multiple ICS52000 do work. It is the NotWired board that is not working properly.
this board has additional logic added that may not be adequate.
 
I have emailed NotWired, and their engineer worked the problem for over one month without any reply yet.
Discard the NotWired board from now on.

I tried to connect the ICS52000 directly to the teensy 4.1, with some basic circuit recommended by the ICS52000 data sheet,
IMG_20210702_090906_3.jpg

but it is still not working?

So :(, my boss is not happy.
 
I understand it was demonstrated in other thread that multiple ICS52000 do work.

Can you give a direct link to the exact message?

We have too many ICS52000 threads! Sadly, @feima0011 is responsible for creating such a huge mess of threads. So many threads makes finding info and helping much harder than it should be if we had only 1 thread where we could refer to every comment by its message number (as we do on so many other threads of this forum).
 
As you can see in msg #27, I removed the other chips from the notwired.co board, so it was only the ICS52000 chips.

The chips do transmit data within their TDM time slots. But every attempt I've made has resulted in mostly noise and little or no usable signal in that data stream.

I do not have any other ICS52000 chips, only 2 of the notwired boards, neither of which gives usable data.
 
:cool:, delete all other posts, and only keep this one.

That is what are sure about now.


The teensy does work with four ICS52000 at 10Hz sampling
frequency, but not with the notwired board. :cool:
 
Does everyone agree with this summary?

1) dreggory has reported the ICS-52000 working fine at 44.1Khz
2) others have had problems with some hand wiring and the notwired.co PCB
3) the clock frequency is high (22.579MHz) - well into the range where layout/wiring can be a problem
 
Does everyone agree with this summary?

1) dreggory has reported the ICS-52000 working fine at 44.1Khz
2) others have had problems with some hand wiring and the notwired.co PCB
3) the clock frequency is high (22.579MHz) - well into the range where layout/wiring can be a problem

that is my understanding
 
Looks to be a different layout. But not hard to make a small breakout board for testing.
 
Back
Top