Skip to content

ESP32 Audio Sink and TAS5754 Amp

July 1 2022

Hardware ​

Most of the power management ICs are sourced from Monolithic Power. Their web interface was extremely easy to navigate and find the correct components we needed for our use case. Their Documentation was extremely detailed, concise, and consistent.

Schematic ​

PCB ​

The PCB was ordered from JLCPCB. With the cheapest shipping option, it came out to about $20 and took 1 week.

Software ​

The ESP32 firmware is running an open source firmware called squeezelite-esp32. squeezelite-esp32 project is targeted at porting squeezelite to the ESP32 and adding a LOT of functionality. squeezelite is also an open source project with the intention is to be a software client for Logitech Media Center (LMS for short).

Install ​

Download the latest 32 bit build from the github

python3 -m pip install esptool
python3 -m esptool -p /dev/tty.usbserial-0001 -p COM3 -b 230400 erase_flash
python3 -m esptool -p /dev/tty.usbserial-0001 -p COM3 -b 230400 --before default_reset --after hard_reset --chip esp32 write_flash --flash_mode dio --flash_size detect --flash_freq 40m 0xd000 .\build\ota_data_initial.bin 0x1000 .\build\bootloader\bootloader.bin 0x10000 .\build\recovery.bin 0x8000 .\build\partition_table\partition-table.bin

Note The -p parameter can be COM3, or /dev/tty.usbserial-####. You may need to change the COM port. Four Linux, use the /dev/ttyUSB# nomenclature

Upon Installation, give the ESP a reset and then log into the web console. (You may need to connect to serial to read the IP address of the device or use a network discovery method to look for a device named squeezelit-esp32).

In the web browser, you will be greeted with the recovery web interface, here you can download the latest firmware and flash it to itself.

Features ​

Audio Modes ​

mermaid
flowchart LR
	b["ESP32 & TAS5754 Board"]
	
	i1>Bluetooth] --> b
	i2>"LMS (Logitech Media Server)"] --> b
	i3>"AirPlay"] --> b
	i4>"Spotify"] --> b
	
	b --> o1>"Bluetooth"]
	b --> o2>"Speakers"]
	b --> o3>"Headphone"]
	b --> o4>"SPDIF (Optical)"]
	b --> o5>"DAC (I2S)"]

IO ​

The board has a relatively large expansion header for various peripherals. It also includes an I2C header opening up lots of possibilities for buttons, knobs, displays, lights, etc.

Performance ​

Yet to be tested.

Lessons Learned ​

  • [x] Swap FB and BOOT pins on Buck 3.3v. We had to schematic wiring wrong.
  • [x] Make USB_PSR_OVRD pull up to VCC_PRE. This allows the 3.3v buck to be turned on without a battery present.
  • [x] Fix all momentary switch wiring. (facepalm)
  • [x] Add DOWNLOAD momentary switch (grounding DWI). This allow the ESP32 to go into download mode
  • [x] Remove 1S battery option.
    • A single cell battery does not have enough potential for the audio Amp or the 3.3V buck converter to output properly.
  • [x] Fix C29 (duplicate component, different part number), we already have a 100nF cap.
  • [x] Change R9 to somewhere between: 58 kΩ (14V) - 69 kΩ (12V). R9 drives the feedback voltage divider for the USB power boost and is currently at a value for the MP3431 to output 10V. Well, 10V is not enough to to allow the charge circuit to charge 2S battery packs.
    • A quick fix was to all 3x 750 kΩ resistors in parallel to bring the total resistance down.
  • [ ] R13 and R10 are the same resistance of 750 kΩ and don’t need 2 different part numbers
  • [x] The battery charger output resistance was way too high. We originally has 100 kΩ but it needs 50 mΩ

v1.1 Update (7/xx/2022) ​

v2.1 Update (9/6/2022) ​

We are going to scrap the 5-12v boost entirely and run off of DC barrel connector.

I have tried everything in my power (pun intended) to get it design to work, but for some reason the Li-Ion Charger does not like what I am doing. I can get it to output 12v but as soon as I hook up a battery, the ACOK indicator goes off.

  • The MP3431 has a Input current limit setting (ILIM). I don’t know if it is better enabled or disabled, but the current design has it enabled.
  • There is also a MODE selection that we completely glossed over. By default, the MODE is ultrasonic mode (USM). If MODE is high, the MP3431 works in forced continuous conduction mode (FCCM). If MODE is low, the MP3431 works in pulse-skip mode (PSM). I think what we want is FCCM but there is no way to test this without buying a new PCB designed to pull that pin down or ordering an EVM.

We might try out a USB 12v Cable or USB C PB board. We looked at a USB C PD IC but the most popular one (IP2721) is sold out everywhere (chip shortage hurts man). A couple alternative include FUSB302B, STUSB4500, and CYPD3177, but all of those were wither sold out or non-ideal.

Some notes (11/13/2026) ​

Notes for V2 esp32 squeezelite board:

  • Add 4.7kOhm pull-up resistors to I2C SDA and SCL. Took me a really long time to diagnose, but occasionally on idle, the I2C commands to un-mute the amp will fall out because the internal 45k pull-up resistors are not good for reliable communication (comes at the loss of some power draw)

alt text

  • Add audio transformers to 3.5mm jack output as grounding loop isolation. Having it straight wired allows for grounding loops causing pretty bad 50/60 hz buzz on idle when I have it plugged into my mixer and amp (I know because it goes away when I ground the board to some other amp aux ground); for now Im just gonna buy an external isolator