/esp32-audio-dock

Audio docks for ESP32 mini (ESP32, ESP32C3, ESP32S2 and ESP8266 mini modules from Wemos)

Primary LanguageC++Apache License 2.0Apache-2.0

ESP32 Audio Docks and Louder ESP

Open Source Hardware Open Source Software

ESP32 Audio Docks is a range of extension boards (i.e. docks) that allow you to develop Audio solutions based on ESP32 chips. These were created to make Audio development entry as easy and inexpensive as possible.

image

Motivation

I spent the last few years developing different solutions based on ESP devices. It all started with ESP8266, where CPU power is not really sufficient to do real-time decoding, so you're limited to a rather simple ding-dong business. Then ESP32 came, bringing two much more capable cores, so you have a powerhouse to handle communication and decoding at the same time. Perhaps most importantly it also came with SPIRAM, so you can do decent buffering (essential for streamed content).

Now new ESP32 C-Series and S-Series chips are entering the market, and their potential is mostly unrealized as of today.

I created those docks, to be able to quickly prototype for the whole range of ESP8266 and ESP32 chips, starting with the simplest finger-sized toys and going all the way up to full-sized speakers.

Features

ESP Audio Solo ESP Audio Duo Hifi ESP Louder ESP
Image image image image image
Docks with ESP8266, ESP32C3, ESP32S2 Mini modules ESP32 Mini Module ESP32 Mini Module ESP32 Mini Module
DAC Single I2S DAC (MAX98357) with built in D-Class amp Dual I2S DAC (MAX98357) with built in D-Class amp PCM5100A 32bit Stereo DAC
-100 dB typical noise level
Stereo I2S DAC (TAS5805M) with built in D-Class amp
Output (4Ω) 3W 2x 3W Non-amplified stereo output 2x 15W at 12V Vin
Output (8Ω) 1.5W 2x 1.5W Non-amplified stereo output 2x 23W at 22V Vin
Adds 8MB PSRAM (4MB usable) 8MB PSRAM (4MB usable) 8MB PSRAM (4MB usable)
Connectivity WiFi (ESP8266, ESP32S2)
WiFi + BT5.0 (ESP32C3)
WiFi + BT4.2 + BLE WiFi + BT4.2 + BLE WiFi + BT4.2 + BLE
Ethernet

Onboard PSRAM

Audio streaming requires proper buffering to work, even with ESP32 500K of RAM it is a challenging task. For that reason, most of the projects will require WROVER modules that have onboard PSRAM chips.

All ESP32 Docks have an 8MB PSRAM chip onboard, connected via a high-speed SDIO interface. This effectively turns your regular WROOM module into WROVER module with no effort required. Any code using PSRAM with just work out-of-the box.

Boards Pinout

ESP Audio Solo

I2S CLK I2S DATA I2S WS
ESP8266 15 3 2
ESP32C3 5 20 6
ESP32S2 12 37 16

ESP Audio Duo

I2S CLK I2S DATA I2S WS PSRAM CE PSRAM CLK
ESP32 26 22 25 16 17

HiFi-ESP

I2S CLK I2S DATA I2S WS PSRAM CE PSRAM CLK
ESP32 26 22 25 16 17

Louder ESP

I2S CLK I2S DATA I2S WS PSRAM CE PSRAM CLK TAS5805 SDA TAS5805 SCL TAS5805 PWDN TAS5805 FAULT
ESP32 26 22 25 16 17 21 27 33 34

Starting from revision E, Louder ESP exposes an Ethernet header, compatible with the popular W5500 module

SPI CLK SPI MOSI SPI MISO SPI CS SPI HOST/SPEED ETH INT ETH RST
ESP32 18 23 19 05 2/20MHz 35 14

Software samples

In the software section two firmware examples are provided.

Platformio IDE

All samples are provided as Plarformio IDE projects. After installing it, open the sample project. Select the proper environment based on your dock. Run the Build and Upload commands to install necessary tools and libraries, and build and upload the project to the board. Communication and proper upload method selection will be handled by IDE automatically.

Arduino IDE

Follow the ESP8266Audio library guide. Default settings will work out of the box with ESP8266 and ESP32 boards. For ESP32C3 and ESP32S2 board please adjust the pinout according to the above section

Squeezelite-ESP32

Squeezelite-ESP32 is a multimedia software suite, that started as a renderer (or player) of LMS (Logitech Media Server). Now it is extended with

  • Spotify over-the-air player using SpotifyConnect (thanks to cspot)
  • AirPlay controller (iPhone, iTunes ...) and enjoy synchronization multiroom as well (although it's AirPlay 1 only)
  • Traditional Bluetooth device (iPhone, Android)

And LMS itself

  • Streams your local music and connects to all major online music providers (Spotify, Deezer, Tidal, Qobuz) using Logitech Media Server - a.k.a LMS with multi-room audio synchronization.
  • LMS can be extended by numerous plugins and can be controlled using a Web browser or dedicated applications (iPhone, Android).
  • It can also send audio to UPnP, Sonos, Chromecast, and AirPlay speakers/devices.

All ESP32-based boards are tested with Squeezelite-ESP32 software, which can be flashed using nothing but a web browser. You can use Squeezelite-ESP32 installer for that purpose.

How to flash and configure ("ESP Audio Duo", "HiFi-ESP" and "Louder ESP")

Use Installer for ESP Audio Dock to flash firmware first. It has been preconfigured to work with ESP Audio boards and will configure all hardware automatically.

Select the correct device first image
Connect the device to USB port and select it from the list image
Press Flash and wait around 2 minutes image
(Optional) You may enter the serial console to get more information image
Device is in recovery mode. Connect to squeezelite-299fac wifi network with squeezelite password (your network name suffix will be different) image
When redirected to captive portal let device scan wifi network and provide valid credentials
You can use provided IP address (http://192.168.1.99/ on the screenshot) to access settings page image
(Optional) You may change device names to something close to you heart image
Exit recovery image

You can use it now

Bluetooth Spotify Connect AirPlay LMS Renderer
image image image image

Hardware

image

Please visit hardware section for board schematics and PCB designs. Note that PCBs are shared as multi-layer PDFs.

ESP Audio Solo

Image Legend
image image MAX98357 DAC
image Speaker Terminal

ESP Audio Duo

Image Legend
image image MAX98357 DAC
image Speaker Terminals
image 8MB PSRAM IC

HiFi-ESP

Image Legend
image image PCM5100A DAC
image Speaker Terminals
image 8MB PSRAM IC
image Ultra-Low noise LDO 3V3 Voltage regulator

Louder ESP

Image Legend
image image TAS5805M DAC
image Speaker Terminals
image 8MB PSRAM IC
image 3V3 Drop-Down voltage regulator (powers ESP32)
image Input Voltage terminal
image (REV B, C, D) image TAS5805M DAC
image Speaker Terminals
- 8MB PSRAM IC (Hidden under ESP32 module)
- 3V3 Drop-Down voltage regulator (powers ESP32, hidden under ESP32 module)
image Input Voltage terminal

Louder Optional SPI Ethernet module

Image Legend
Optional Ethernet header is exposed on the bottom side of the PCB image
Use popular W5500 based module as displayed on the picture image

BTL and PBTL mode

TAS5805M DAC Allows 2 modes of operation.

BTL PBTL
Descriotion Bridge Tied Load, Stereo Parallel Bridge Tied Load, Stereo
Rated Power 2×23W (8-Ω, 21 V, THD+N=1%) 45W (4-Ω, 21 V, THD+N=1%)
Schematics image image
Speaker Connection image image

Starting from Rev E, additonal header is exposed to allow datasheet-speced connectivity

Image Legend
Stereo Mode - leave open image
Mono (PBTL) Mode, close horisontally image

Louder ESP power considerations

Barrel jack used is speced at 6mm hole/2mm pin, which is typically 5.5/2.5mm jack on the male side.

image

Screw-terminal is connected parallel to the barrel-jack, you can use either interchangeably.

The power adapter specs depend on the speaker you're planning to use. DAC efficiency is close to 100%, so just take the power rating of your speaker (say 2x10w), impedance (say 8 ohm) and you'd need at least 9 volts rated at 1.2 amps per channel, round up to 3 total amps.

It is not recommended to go beyond voltage your speakers can take, otherwise amp will blow you speakers in no time.

Where to buy

You may support my work by ordering these product at Tindie