The problem was solved with help from the Teensy forum (https://forum.pjrc.com/threads/69237-Ne … rom-teensy)
The I2S mic is best, since it doesn’t need CPU time to low pass filter the bitstream.
This should be the required connection.
SCK → BCLK1 → Arduino 21 → M.2 pin 50
WS → LRCLK1 → Arduino 20 → M.2 pin 52
SD → IN1 → Arduino 8 → M.2 pin 54
Looks like Sparkfun did connect the pins correctly on the ML Carrier.
But they have 2 little locations on the board called EN1 and EN2 which connect the power to the 2 mics.
Click image for larger version.
Name: mics.png
Views: 8
Size: 26.0 KB
ID: 27207
By default, the PDM mic is powered and the I2S mic is unpowered. So you probably need to but the EN1 pads apart, and then solder the EN2 pads together.
Quick reply to this messageReply Reply With QuoteReply With Quote Multi-Quote This Message Today, 03:32 PM#5
David Tcheng David Tcheng is online now
Junior Member
Join Date
Jan 2022
Posts
3
Quote Originally Posted by PaulStoffregen View Post
The I2S mic is best, since it doesn’t need CPU time to low pass filter the bitstream.
This should be the required connection.
SCK → BCLK1 → Arduino 21 → M.2 pin 50
WS → LRCLK1 → Arduino 20 → M.2 pin 52
SD → IN1 → Arduino 8 → M.2 pin 54
Looks like Sparkfun did connect the pins correctly on the ML Carrier.
But they have 2 little locations on the board called EN1 and EN2 which connect the power to the 2 mics.
Click image for larger version.
Name: mics.png
Views: 8
Size: 26.0 KB
ID: 27207
By default, the PDM mic is powered and the I2S mic is unpowered. So you probably need to but the EN1 pads apart, and then solder the EN2 pads together.
I modified my ML carrier board as you described, and now I can read audio input from the 2nd mic using AudioInputI2S. I tested the system using the FFT example, and at first I thought it was not working because of low signal strength, but after multiplying the fft results by 1000, the results we reasonable and tracked the sound nicely. Thanks. Here’s the test code i used:
// Teensy FFT Test (modified by David Tcheng 1/17/22)
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>
const int myInput = AUDIO_INPUT_MIC;
AudioInputI2S audioInput; // audio shield: mic or line-in
AudioAnalyzeFFT1024 myFFT;
AudioConnection patchCord1(audioInput, 0, myFFT, 0);
void setup() {
AudioMemory(12);
myFFT.windowFunction(AudioWindowHanning1024);
}
void loop() {
float n;
int i;
if (myFFT.available()) {
// each time new FFT data is available
// print it all to the Arduino Serial Monitor
Serial.print("FFT: ");
for (i=0; i<256; i++) {
n = myFFT.read(i);
if (n >= 0.001) {
Serial.print(“#”);
} else {
Serial.print(" "); // don’t print “0.00”
}
}
Serial.println();
}
}