The way to enable SPH0645LM4H with Teensy 3.2

Status
Not open for further replies.

Zoologist

Member
I have brought SPH0645LM4H from TAOBAO with 48Yuan(~$7). And I have tried to enable it with Teensy 3.2. Below is the way to test and enable it.
Hardware part:
1. You should know the hole is on the back of the component and module. When you test your hardware, please shout to the back.

1.png
This picture comes from the datasheet.

2.jpg
This picture comes from this link https://learn.adafruit.com/adafruit-i2s-mems-microphone-breakout/pinouts

2. Hardware connection
Teensy 3.2 SPH0645LM4H
GND SEL
D23 LRCL
D13 DOUT
D9 BCLK
GND GND
3.3V 3V

3. You can test with Try File > Examples > Audio > Recorder. After download it to your Teensy. You should see the waveform of LRCL/BCLK which is output from Teensy. And waveform in DOUT which is send by mems. This is a suggestion from PaulStoffregen. And I have confirm this with my oscilloscope. You can find this suggestion from this link. https://forum.pjrc.com/threads/40858-Teensy-3-6-I2S-input-without-board/page2

After hardware checking, you can be sure the module you buy is OK. And below code can send you voice from MEMS to your PC.

Software Part:

Code:
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>

// GUItool: begin automatically generated code
AudioInputI2S            i2s1;           //xy=223,84
AudioOutputUSB           usb1;           //xy=435,172
AudioConnection          patchCord1(i2s1, 0, usb1, 0);
// GUItool: end automatically generated code

void setup() {
  // put your setup code here, to run once:
   AudioMemory(80);
}

void loop() {
}

After plug Teensy to you PC via USB, you can hear the sound from mic.

3.jpg
 
Status
Not open for further replies.
Back
Top