YasarYY
Active member
Hi. On Teensy 4.1, when I acquire the audio from the ADC input, and save it to SD card, a periodic click occurs.
I perform high sampling, and click period changes by sampling rate. At sampling rate 176400 Hz period is ~1.86 seconds, at 352800 Hz ~0.93 seconds.
That's because click occurs at a constant sample count period, 327680 16-bit samples, being 655360 bytes or exactly 640 kb. Click may occur rarely sooner.
This relates to SD card writing, specifically to flush operation, which happens when write buffer reaches 640 kb, or rarely sooner.
Flush operation draws considerable amount of additional current ~100 mA for ~20 ms according to below post:
This current draw pulls ADC's 3.3v a bit down for an instant, and since ADC reference is also that 3.3v line, ADC measures all-ones for that instant. Zoomed in view of record (at 352800 Hz) of that instant is below.
When I searched for this, I found several posts, but cannot find a well-defined solution.
I tried manually calling flush(), at different periods, but it just changes the period of click accordingly.
Below post says "capacitors cross the 3.3V supply to uSD may minimize impact", but how?
Can someone please explain what can be done to mitigate this issue? Or I'll have to patch this spikes at software. I tried to be brief, if you need more details let me know.
Thanks,
Yasar
I perform high sampling, and click period changes by sampling rate. At sampling rate 176400 Hz period is ~1.86 seconds, at 352800 Hz ~0.93 seconds.
That's because click occurs at a constant sample count period, 327680 16-bit samples, being 655360 bytes or exactly 640 kb. Click may occur rarely sooner.
This relates to SD card writing, specifically to flush operation, which happens when write buffer reaches 640 kb, or rarely sooner.
Flush operation draws considerable amount of additional current ~100 mA for ~20 ms according to below post:
This current draw pulls ADC's 3.3v a bit down for an instant, and since ADC reference is also that 3.3v line, ADC measures all-ones for that instant. Zoomed in view of record (at 352800 Hz) of that instant is below.
When I searched for this, I found several posts, but cannot find a well-defined solution.
I tried manually calling flush(), at different periods, but it just changes the period of click accordingly.
Below post says "capacitors cross the 3.3V supply to uSD may minimize impact", but how?
Can someone please explain what can be done to mitigate this issue? Or I'll have to patch this spikes at software. I tried to be brief, if you need more details let me know.
Thanks,
Yasar


