Page 1 of 1

ESP32-based HiFi CD Player

Posted: Mon Mar 10, 2025 2:42 pm
by akasaka_spk
Many of you may know the cheap IDE CD drive control boards sold on Taobao et al, as well as the countless projects accomplishing the same task — starting with the infamous ATAPIduino, and a handful of PIC-based projects just among those that I've seen.

Back in my childhood I had a crazy dream of building my own CD player, but a CD drive cost a fortune, and a microcontroller development environment a hundred times more. But in this day and age, after getting somewhat hooked on developing for ESP32 I decided to try my hand on a similar project, and crank it up to 11.

What can it do?
Video overview: https://youtu.be/To1woYCxPkw
  • Read the CD Audio TOC from the drive (I tried making an ISO9660 VFS driver too, but because I copied the I2C schematic from ATAPIDuino, the speed is too low, so it's useless)
  • Request the drive to play/pause/seek/etc — either in sequential or shuffle mode (no program playback yet). The audio is then fed to a Wolfson WM8805 and a PCM5102 DAC with a DC-coupled output. I don't believe in differences in digital audio gear sound, but it does sure sound fancier than my Sony CDP-790 :P
  • Fetch metadata for the track names and artists using CD TEXT (if the drive supports it), or MusicBrainz, or CDDB (yes, I used the real libcddb from 2005 lol)
  • Cache that metadata in flash with compression, so you can probably fit your whole collection (or remainder thereof) in the littlefs partition
  • Display karaoke lyrics from multiple different repositories in sync with the music playing and with auto font sizes (latin/cyrillic: 16 and 8 px tall, japanese: 16/12/8px tall)
  • Send now-playing status and scrobble the playing tracks to Last.FM (using login+password auth)
  • Receive internet radio stations in MP3 and AAC formats, with up to 6 presets
  • Receive music from a cellphone over Bluetooth (SBC only) and control it (play/pause/stop/volume)
  • All of this is controlled either from a 8-button front panel, or from a Playstation 2 DVD remote (chosen because I find a whole bin of them in every HardOff I go to, and they feel nicer than the "card remotes" you can buy cheaply online while being useless for 99% of people)
Demo of Karaoke playback: https://youtu.be/rg65IffZEiM

Code: https://github.com/vladkorotnev/cd-player