← Back to downloads
Project UNION MP3 Player U3.21

Purpose
-------
Compact ESP32-S3 Zero based MP3 player using DFPlayer Mini, with DCC and MQTT control and a multilingual web interface (DK/EN/DE).
Ordinary Mode plays MP3 files from the SD card root; Expert Mode uses numbered files in /mp3 and supports four playlists.
Default web address: http://mp3-player.local
WiFi setup SSID: MP3-Player-Setup

IMPORTANT
---------
The supplied project source code has NOT been modified.
This README and the accompanying hardware workbook are documentation only.

=========================================================
Arduino IDE Settings
=========================================================

Board package:
esp32 by Espressif Systems

Board:
ESP32S3 Dev Module (ESP32-S3 Zero hardware)

Flash Size:
4MB (32Mb)

CPU Frequency:
240 MHz (WiFi)

USB CDC On Boot:
Enabled

USB DFU On Boot:
Disabled

USB Mode:
Hardware CDC and JTAG

Flash Mode:
QIO

Flash Frequency:
80 MHz

PSRAM:
Disabled

Partition Scheme:
Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS)

Upload Speed:
921600 (try 460800 if upload fails)

Core Debug Level:
None

Erase All Flash Before Sketch Upload:
Disabled

IMPORTANT
---------
The board settings above are recommended values, NOT a verified export of the developer's Arduino IDE Tools menu.
In particular, confirm the Partition Scheme against the known working U3.21 build before flashing.
Changing partitions or erasing flash can affect stored configuration and OTA compatibility.
Make a JSON configuration backup first; audio files on the DFPlayer microSD are not included in that backup.

=========================================================
Hardware / Connections
=========================================================

ESP32-S3 Zero (4MB flash)
DFPlayer Mini with microSD card
6N137 DCC optocoupler
8-ohm speaker
5V supply for DFPlayer and optocoupler; suitable ESP32 power supply

GPIO11: DCC input from 6N137 pin 6 (open-collector output)
GPIO12: ESP RX <- DFPlayer TX (use voltage divider to 3.3V logic)
GPIO13: ESP TX -> DFPlayer RX
6N137 pin 5: GND; pins 7 and 8: +5V
6N137 pin 6: optional external 2.2k pull-up to ESP 3.3V (internal pull-up enabled by ProjectUNION_DCC; test noise immunity)
6N137 DCC LED input: pins 2 and 3; use the approved DCC input circuit with current limiting.
Connect the ESP32 and DFPlayer grounds together. Never apply 5V directly to an ESP32 GPIO.

Developer checklist
-------------------
- Install the ESP32 board package and required Project UNION libraries
- Install DFRobotDFPlayerMini library and other dependencies required by the sketch
- Open the U3.21 sketch in Arduino IDE
- Verify board, partition scheme and COM port
- Verify DCC isolation and all hardware connections against the PCB schematic
- Insert a microSD card containing MP3 files for the chosen mode
- Compile and upload without modifying the source
- Connect to WiFi and open http://mp3-player.local
- Test MP3 playback, DCC, MQTT and backup/restore