Using Arduino UNO, SD Card Reader, and MCP4725 DAC to play audio

Hey guys

I am working on a project right now where i use the arduino uno to play a .wav file. So far i have been successful at playing audio using a digital pin on the arduino and hearing it through a speaker. I am using the TMRpcm library to do so. I used a scope to see the output and saw that it is a digital signal coming from the arduino. I have been reading about digital to analog converters(DAC) and i think that is what i need to be able to play the audio, but also amplify it as well. Has anyone ever done this before? I have been reading about the MCP4725 and it uses the I2C bus, i have no idea what that is. I have seen that the SCL and SDA pin on the MCP4725 are supposed to be connected to the analog pins A4 and A5.

My question is, how do i get the arduino to output the sound through the DAC?

Thanks!

Has anyone ever done this before?

Yes it is a very common thing.
An I2C device is too slow you need to use an SPI interface device.
Basically where the TMRpcm takes a sample and sets the PWM duty cycle with it you just need to send the sample to a D/A converter.

Look at the AdaFruit wave shield for an example of how this is done.

Thank You for the reply. I will look at the wave shield. Thanks!!

Hey,

look at this tutorial on youtube. He makes his own DAC using resistors and sends audio through it.

lookup his other project called "Arduino audio sampling tutorial (part 1)" as well.

Good luck.

He makes his own DAC using resistors and sends audio through it.

Yes but because he doesn't know what he is doing it is a very poor DAC and so the results are much poorer than they otherwise could be.