ESP32-C3 WiFi Speaker

1. Reference - About ESP32

All well documented by Espressif.

Cited from I2S,

1
2
3
I2S (Inter-IC Sound) is a synchronous serial communication protocol usually used for transmitting audio data between two digital audio devices.

ESP32-C3 contains one I2S peripheral(s). These peripherals can be configured to input and output sample data via the I2S driver.

In sum:

Although a single I2S controller is nominally full-duplex -- supporting both input (recording) and output (playback), in practice, operations must be time-multiplexed. In other words, it is not truly capable of simultaneous input and output. To achieve real-time interaction -- such as detecting user input and instantly interrupting playback -- two independent I2S controllers are required: one dedicated to continuously handling microphone input, and the other to audio output to the speaker.

So, today, let's make a bluetooth speaker based on ESP32-C3, which ONLY requires I2S to serve as output (playback).

2. Hardware Components

Any ESP32-C3 board MAX98357A I2S amplifier Any speaker
ESP32-C3 MAX98357A Any Speaker

3. Curcuit Connection

3.1 KiCad Schematic

KiCad Schematic

3.2 Real Connection

Real Connection

4. ESP32 Code

Please refer to Github LongerVisionRobot ESP32-C3-WiFi-audio-speaker.

5. Demonstration

ESP32-C3 Playing a Tone ESP32-C3 Playing an Audio File