This configuration uses an analog electret microphone (like a standard headset mic) connected through the ESP32-S3 using the MAX 9814 microphone amplifier module.
| MAX9814 Pin | ESP32-S3 |
|---|---|
| VDD | 3.3V |
| GND | GND |
| OUT | GPIO1 (ADC) |
| AR | Leave floating (default attack/release) |
| GAIN | VDD (40dB), GND (50dB) or floating (60dB) |
3.5mm TRS JACK CONNECTIONS:
| TRRS | MAX9814 |
|---|---|
| TIP | MIC+ |
| RING1 | (NC) |
| RING2 | (NC) |
| SLEEVE | GND |
Ring 1, Ring 2 or Tip can be used for MIC+ depending on the TRRS implementation.
ADC Configuration:
- Channel: ADC1_CHANNEL_0 (GPIO1)
- Sample rate: 16 kHz
- Bit width: 12-bit (ESP32-S3 native)
- Attenuation: 2.5dB
The original design planned for an INMP441 I2S digital microphone. If switching to I2S digital:
| INMP441 Pin | ESP32-S3 Pin | Function |
|---|---|---|
| SCK | GPIO 4 | BCLK (Bit Clock) |
| WS | GPIO 5 | WS (Word Select) |
| SD | GPIO 6 | DIN (Data In) |
| L/R | GND | Left channel select |
| VDD | 3.3V | Power |
| GND | GND | Ground |
Note: Code changes required to switch from ADC to I2S RX mode.
The MAX98357A is a mono I2S Class-D amplifier. It connects to the ESP32-S3 via the I2S interface.
| MAX98357A Pin | ESP32-S3 Pin | Function | Notes |
|---|---|---|---|
| LRC | GPIO 5 | WS (Word Select) | Left/Right Clock |
| BCLK | GPIO 4 | SCK (Bit Clock) | Serial Clock |
| DIN | GPIO 7 | DOUT (Data Out) | Audio Data |
| GAIN | GND | Gain Setting | Sets +9dB gain (adjust as needed) |
| SD | Floating | Shutdown / Channel | Left + Right / 2 (Mono Mix) |
| GND | GND | Ground | Common Ground |
| VIN | 5V or 3.3V | Power | 5V recommended for full 3W power |
Notes:
- If your board has a "5V" pin, use it for VIN to get louder audio.
- If using 3.3V, audio power will be limited to ~0.5W.
- The SD pin can be connected to VCC or GND to change channel selection, but leaving it floating selects "Left/2 + Right/2" which is perfect for mono mix.
Connect SPK+ and SPK- to your speaker. Speaker impedance should be 4-8 Ohms, and the speaker should be 0.5W to 3W for best results.
| PCM5102A | ESP32-S3 |
|---|---|
| BCK | GPIO4 |
| LCK (LRCK / WS) | GPIO5 |
| DIN | GPIO7 |
| VIN | 3.3V |
| GND | GND |
Note: Code changes required to switch from MAX98357A to PCM5102A.
The Seeed XIAO nRF52840 handles mesh networking via ESB (Enhanced ShockBurst). Audio packets received from the mesh are sent to ESP32-S3 via SPI for mixing.
The nRF52840 is the SPI master and the ESP32-S3 is the SPI slave. The master polls the slave every 5 ms with a full-duplex 256-byte transaction.
| XIAO nRF52840 | ESP32-S3 | Function |
|---|---|---|
| Pin 6 (P1.11 / MOSI) | GPIO10 | nRF MOSI -> ESP MOSI |
| Pin 7 (P1.12 / MISO) | GPIO9 | ESP MISO -> nRF MISO |
| Pin 8 (P1.13 / SCK) | GPIO11 | SPI Clock |
| Pin 9 (P1.14 / CS) | GPIO12 | Chip Select (active low) |
| GND | GND | Common ground |
The ESP32's I2S Word Select (WS) output is tapped and fed to the nRF52840 to discipline the TDMA frame timer. This eliminates clock drift between boards.
| ESP32-S3 | XIAO nRF52840 | Function |
|---|---|---|
| GPIO 5 (I2S WS/LCK) | Pin D0 (P0.02) | Sync clock (16 kHz) |
Note: GPIO5 is already wired to the speaker amplifier (MAX98357A/PCM5102A LCK). Simply add a second wire from the same GPIO5 pad to XIAO D0. The nRF input is high-impedance and will not affect the amplifier signal.
ESP32-S3 XIAO nRF52840
┌──────────┐ ┌──────────┐
│ │ │ │
│ GPIO10 ├────────────────┤ Pin 6 │ (MOSI)
│ GPIO9 ├────────────────┤ Pin 7 │ (MISO)
│ GPIO11 ├────────────────┤ Pin 8 │ (SCK)
│ GPIO12 ├────────────────┤ Pin 9 │ (CS)
│ GPIO5 ├────────────────┤ Pin D0 │ (I2S WS Sync)
│ │ │ │
│ GND ├────────────────┤ GND │
│ │ │ │
└──────────┘ └──────────┘
Note: Both boards run at 3.3V logic, no level shifter needed.