|The final project assembled on two breadboards.|
This project was a great learning experience for me. The first hurdle that I had to overcome was the difference in logic levels between the AVR series of microcontrollers and the SD card that I was interfacing with. I overcame this through the use of resistive voltage dividers. I didn't need extremely high speed access to the data so this worked out well.
Once I had access to mass storage, I had to prepare a DAC. I used an R/R2 network assembled on a breadboard. I buffered the output using an LM358 op-amp and fed that into a single-package audio amplifier (TDA2002).
The first iteration of firmware that I wrote was functional but had no constant sample rate and lots of glitches. I was not using a timer or any kind of audio buffer. I rewrote the firmware to include a circular buffer and modified the SD card read routines to insert into the buffer. I then used a timer configured for a sample rate of approximately 44100kHz. The results were impressive and the audio quality was quite good.
Here is some sample audio from this project.
Star Wars - Cantina Song
Dubmood and Zabutom - Supersquatting
La Caution - The a la menthe
|The complete setup, with some fancy waveforms. :]|