July 24, 2013

Play .wav files with Arduino and minimal hardware

 It's no secret that you can play various digital audio files with an Arduino, however most solutions require either a decoder IC and various circuitry which generally fills a protoshield and can cost more than thirty dollars. However if you just need to blurt out .wav files without too much ceremony there's a much simpler and cheaper method of doing so, demonstrated by Maksim Surguy:


In his method one simply needs an inexpensive SD card socket, an NPN transistor and speaker for output, as well as the Arduino of course. From a software perspective you make use of the TMRpcm library which allows for direct playback of PCM-encoded .wav files from an SD card. And that's it - you can gather the required hardware for less than $10.

You can find the sketch, library and other Yoda-based projects on Maksim's website. And for more, we're on twitter and Google+, so follow us for news and product updates as well. 


When adding external circuitry such as the wav file player described above to your project, and need to make it more permanent than using a solderless breadboard - consider our range of ProtoShields. From the tiny LeoStick to the Mega range, we offer a complete range for you to work with.


Leave a comment

Comments have to be approved before showing up.