Skip to content

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

License

Notifications You must be signed in to change notification settings

shawn-phy/esp32-audio-dock

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 last few years developing different solutions based on ESP delices. It all started with ESP8266, where CPU power is not really sufficient to do real-time decoding, so you're limited to rather simple ding-dong business. Then ESP32 came, bringing two much more capable cores, so you have 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 for today.

I created those docks, to be able quick prototype for 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 require 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 chip.

All ESP32 Docks has 8MB PSRAM chip onboard, connected via 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 Ethernet header, compatible with 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 provided.

Platformio IDE

All samples are provided as Plarformio IDE projects. After installing it, open sample project. Select proper environment based on your dock. Run Build and Upload commands to install necessary tools and libraries, build and upload prject 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 pinout according to the above section

Squeezelite-ESP32

Squeezelite-ESP32 is a multimedia software suite, that started as 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 connect to all major on-line 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, that can be flashed using nothing but 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 Squeezelite-ESP32 installer to flash firmware first.

Use Generic/I2S profile image
Connect device to USB port and select if from the list image image
Press Flash and wait around 2 minutes image
(Optional) You may enter 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
ESP Audio Duo, HiFi-ESP

Navigate to Hardware section and provide following updates in the DAC Options

DAC model: I2S
Clock GPIO: 26
Word Select GPIO: 25
Data GPIO: 22

Press Save button
image
Louder ESP

Navigate to NVS Editor section and provide following updates

dac_config: model=I2S,bck=26,ws=25,do=22,sda=21,scl=27,i2c=45
(STEREO, BTL mode) dac_controlset: {"init":[{"reg":3,"val":2},{"reg":3,"val":3}],"poweron":[{"reg":3,"val":3}],"poweroff":[{"reg":3,"val":0}]}
(MONO, PBTL mode) dac_controlset: {"init":[{"reg":3,"val":2},{"reg":3,"val":3},{"reg":2,"val":4}],"poweron":[{"reg":3,"val":3}],"poweroff":[{"reg":3,"val":0}]}
i2c_config: scl=27,sda=21,speed=400000,port=1
set_GPIO: 33=vcc

Press Commit button
image
Louder ESP, Rev E

Update Ethernet configuration, if you're planning to use Ethernet module
eth_config: model=w5500,cs=5,speed=20000000,intr=35,rst=14
spi_config: mosi=23,clk=18,host=2,miso=19

Press Commit button
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 PCB 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

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • C++ 95.2%
  • PLSQL 4.8%