SparkFun Forums 

Where electronics enthusiasts find answers.

Discussions about carrier boards have here!
#230724
After exhaustive research, I can't for the life of me find out how to access the mic inputs from Teensy. The ML board has 2 mics, but I can not find any documentation of how to access them. Using the Artemis processor on the same board, I had no problem processing data from one of the mics.

Do the mics on the ML board work at all with Teensy? If so, how can you access them? I've tried many times using both Arduino and PlatformIO with no luck. Help!!! :(
User avatar
By dtcheng
#230812
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();
}
}
 Topic permissions

You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]