Audio Output from microcontroller to active speaker

Hello!
I’m trying to make a compact system to run audio to powered speakers and to run led tape.

Here’s the premise of the show!
Audience members are invited to stay the night in 1 of 30 hotels rooms. Within the room audio will be played back through an active speaker. The audio track will be a 9 hour long fully composed sound track designed to envoke lucid dreaming. The audio needs to be automated to start at a specific time. Along with the audio there will be LED tape in the room which will turn off when the audio starts to play and will then switch of upon the audios conclusion.

I have a general idea on how to do this, but I need some help!

Currently I’m thinking of using an arduino uno as the base controller. Attached to this a micro SD card module (because the soundtrack is so long) and an audio jack breakout board with a 3.5mm audio jack. Aux will run to the speaker from the jack for playback. LED tape I’ve done before so i’m not too worried about that.

I’ve attached a schematic, if anyone can tell me if this would work it would be great!

Cheers,
McLane

1 Like

Hi McLane,

Welcome to the forum!!

Unfortunately, the Uno doesn’t feature a digital to analog converter (DAC) to output audio. Playing back audio for a long time has a few challenges that consumer electronics hide, and there are some crafty ways around it.

To play the audio it has to be loaded into RAM then another part of the controller has to be able to send signals to the DAC to play the audio.
As I understand dedicated MP3 IC’s circumvent this by handling all of the decoding and playback on the chip, I’d check out the Qwiic MP3 Player, though it can only handle a 32GB FAT uSD, and I haven’t got one myself to test multiple hours of playback.

Back on implementing it with a controller Core have some insights in their Factory episode: The Factory | Playing Audio with a Handmade DAC - YouTube