Teensy Based Car CD Player with USB Digital Audio Output

milesdrake

New member
Hi Everyone,

I recently got a new car that does not have a CD player (which is a problem for me). I tried to buy a "USB CD Player for cars" from Amazon but it didn't work. The problem was that this CD player presents to the car as a USB Storage device holding wav files for all of the songs on the CD. Normally this would be fine, but my car doesn't have the ability to play wav files over ~10 megabytes for some reason.

I was looking into getting a Portable CD player that has USB Digital Audio Output, but I only found 1 and it was almost 400 dollars. Then I started wondering if I could build my own CD player with USB Digital Audio Output using a teensy microcontroller. Basically, the teensy would be plugged into the car's USB port for power and audio streaming and the USB disc drive would be wired up to the USB host pins on the Teensy.

I have used a teensy once or twice before, but I am not too familiar with it, so I have a few questions:
- Is this feasible?
- Does anyone know of a teensy library for controlling a USB disc drive?
- When streaming audio, does the teensy have the ability to receive pause/play/skip commands from the car?
- Can the teensy send metadata for the car to display like song name or artist?
- Should I use a raspberry pi instead?

Thanks,
Miles
 
It's possible, but you'd have to learn a lot of stuff about both USB and SCSI (used to send commands/control the CD drive) to be able to do it.
I wrote my own USB Host library for Teensy 4.x and included some sample code to handle CDs like controlling the drive tray, reading the table of contents and performing analog audio playback: https://github.com/A-Dunstan/teensy4_usbhost/blob/master/examples/storage/cd_audio/cd_audio.ino
What you actually want to do is audio extraction, so the digital data can be directly accessed and handled by the Teensy... that's a slightly different SCSI command (command 0xBE, which I used in the speedtest example).

So it's definitely possible, but just requires learning how since there's no pre-rolled solution.
 
Back
Top