Codey OnlineArduino- & ESP32-Komponentenbibliothek › WCMCU-5102 module
WCMCU-5102 module
Ausgabe

WCMCU-5102 module

Stereo-I2S-DAC-Modul (PCM5102A). Wandelt digitale I2S-Audio in analoge Line-Level-Ausgabe um. Hat eine 3,5-mm-Kopfhörerbuchse und Lötpads für Line-out LEFT, RIGHT, GND.

Protokolle: I2S Breite: 31.1 mm

Pinbelegung — WCMCU-5102 module

Pin Signal Beschreibung
XMT enable PCM5102A mute control input; hold high for normal output, low to mute.
FMT digital Audio data format select input for the DAC's I2S-compatible interface.
LRCK clock I2S left/right word clock input selecting the active stereo channel.
DIN data I2S serial audio data input from the MCU or audio source.
BCK clock I2S bit clock input used to clock serial audio data into the DAC.
SCL clock DAC system clock input if used; many PCM5102A modules can derive clock from BCK.
DMP digital De-emphasis control input for PCM5102A audio filtering.
FLT digital Digital filter select input for PCM5102A DAC response mode.
GND ground Ground reference for power and I2S logic signals.
3.3V power 3.3 V supply rail for DAC logic; use with compatible 3.3 V systems.
VCC power Main power input for the DAC module, typically from 3.3 V or 5 V.
L analog Left analog line-level audio output; feed an amplifier input, not a speaker directly.
GND.1 ground Analog audio ground for the line-out L/R outputs and amplifier input reference.
R analog Right analog line-level audio output; feed an amplifier input, not a speaker directly.

Hinweise zur Verdrahtung

Das ist ein LINE-LEVEL-DAC — der Ausgang (Line-out-Pads und 3,5-mm-Buchse) ist NICHT verstärkt. Er kann Kopfhörer oder einen externen Verstärker ansteuern, aber KEINEN Lautsprecher direkt. Um einen Lautsprecher anzuschließen, MUSST du einen Audioverstärker zwischen dieses Modul und den Lautsprecher schalten (z. B. PAM8403 für Stereo, MAX98357A für I2S-Mono oder LM386). Verbinde die Line-out LEFT/RIGHT/GND-Pads mit dem Eingang des Verstärkers und verbinde dann den Ausgang des Verstärkers mit dem Lautsprecher.

Beispielschaltplan — WCMCU-5102 module

Von Nach Kabel
board:5V x1:VCC red
board:GND x1:GND black
board:D9 x1:XMT green
board:D8 x1:FMT blue
board:D13 x1:LRCK yellow
board:D11 x1:DIN purple
board:D12 x1:BCK cyan
board:D7 x1:SCL magenta
board:D6 x1:DMP brown
board:D5 x1:FLT pink
x1:L board:A0 teal
x1:GND.1 board:GND.1 black
x1:R board:A1 lime

Arduino-Beispielcode — WCMCU-5102 module

Dieses Beispiel wurde für das arduino-uno geschrieben und kompiliergeprüft. Codey Online passt es für jedes andere unterstützte Board an.

// Canonical beginner example for the WCMCU-5102 module on Arduino Uno
// This sketch does not use an I2S library so it compiles on the default AVR core.
// It demonstrates basic control of the module's mode pins and confirms the board is running.
// IMPORTANT: The module output is line-level only. Do NOT connect a speaker directly.

#include <Arduino.h>

// Wiring used in this example:
// VCC  -> 5V
// GND  -> GND
// XMT  -> D9
// FMT  -> D8
// SCL  -> D7
// DMP  -> D6
// FLT  -> D5
// L    -> A0 (monitoring only; optional, not read in this sketch)
// R    -> A1 (monitoring only; optional, not read in this sketch)

const int ENABLE_PIN = 9;
const int FMT_PIN = 8;
const int SCL_PIN = 7;
const int DMP_PIN = 6;
const int FLT_PIN = 5;

void setup() {
  Serial.begin(115200);

  pinMode(ENABLE_PIN, OUTPUT);
  pinMode(FMT_PIN, OUTPUT);
  pinMode(SCL_PIN, OUTPUT);
  pinMode(DMP_PIN, OUTPUT);
  pinMode(FLT_PIN, OUTPUT);

  // Enable normal audio output.
  digitalWrite(ENABLE_PIN, HIGH);

  // Typical PCM5102A-friendly control settings.
  digitalWrite(FMT_PIN, LOW);
  digitalWrite(SCL_PIN, LOW);
  digitalWrite(DMP_PIN, LOW);
  digitalWrite(FLT_PIN, LOW);

  Serial.println("WCMCU-5102 module example");
  Serial.println("Control pins set: XMT=HIGH, FMT=LOW, SCL=LOW, DMP=LOW, FLT=LOW");
  Serial.println("This example demonstrates wiring and power-up only.");
  Serial.println("Connect L/R to an external amplifier or headphones, not a speaker directly.");
}

void loop() {
  // Blink the enable pin very briefly once per second as a simple visible test.
  // The DAC stays enabled most of the time.
  digitalWrite(ENABLE_PIN, LOW);
  delay(10);
  digitalWrite(ENABLE_PIN, HIGH);

  Serial.println("Module control pins are active.");
  delay(990);
}

Ähnliche Komponenten

3W amplifier MAX98357A I2S DAC

3W amplifier MAX98357A I2S DAC

Active Buzzer Module

Active Buzzer Module

⚙️

LED

LED Matrix Module MAX7219

LED Matrix Module MAX7219

Bau dein Arduino- oder ESP32-Projekt mit AI

Beschreib einfach, was du bauen willst. Codey Online schreibt den Code, zeichnet den Schaltplan, kompiliert alles und flasht dein Board direkt aus dem Browser.

Kostenlos starten