connect pdm microphone

OmerT

New member
Hello
Im trying to connect PDM microphone to my teensy 4.1 and not working.
The microphone is KAS-700-0148:

The adapter is KCA2733:

and the connection looks as in the image.
The code that I upload to the board is:
C:
/*
  Teensy 4.1 + single PDM mic
  CLK  -> pin 21
  DAT  -> pin 8
  Open Serial Monitor at 115200 baud
  You should see a value 0.00–1.00 that rises when you clap
*/
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SerialFlash.h>
// ── Audio objects ───────────────────────────────────────────────
AudioInputPDM        pdm;        // PDM mic on pins 8 / 21
AudioAnalyzePeak     peak;       // simple peak detector
AudioConnection      patchCord(pdm, 0, peak, 0);
void setup() {
  Serial.begin(115200);
  AudioMemory(8);         
  Serial.println("started");
}
void loop() {
  if (peak.available()) {   
    float level = peak.read();  // 0.0 (silence) … 1.0 (full-scale)
    Serial.println(level, 3);
    delay(100);
  }
}

And the output is:
15:36:16.337 -> 1.000
15:36:16.436 -> 1.000
15:36:16.534 -> 1.000
15:36:16.632 -> 1.000
15:36:16.731 -> 1.000
15:36:16.830 -> 1.000
15:36:16.926 -> 1.000
15:36:17.023 -> 1.000
15:36:17.121 -> 1.000
15:36:17.220 -> 1.000

Please help me to figure out what is wrong.
 

Attachments

  • IMG_9672-2.jpg
    IMG_9672-2.jpg
    85.7 KB · Views: 28
Back
Top