Playing MP3/WAV/audio files from an Arduino

Hi,

A little help. I want to be able to play audio files using an Arduino.

  1. Can this be done?
  2. Would I need to use a DAC?
  3. Would it then be possible to amplify the analogue signal to output into speakers?

Tarrrrr.... :slight_smile:

  1. Can this be done?
    Yes
  2. Would I need to use a DAC?
    No, The arduino is not powerful enough to decode wav or MP3
  3. Would it then be possible to amplify the analogue signal to output into speakers?
    Yes you can use any amplifier.

There are some shields you can use with the hardware to decode audio.
Adafruit Wave Shield for Arduino Kit [v1.1] : ID 94 : $22.00 : Adafruit Industries, Unique & fun DIY electronics and kits (kit needs some soldering skills).
https://www.sparkfun.com/products/10628 mp3 shield

I had this in mind for the amplifier stage,

http://rkeducation.co.uk/RKAmp4.php

I am planning on building a mini speaker, should sound awesome!

Thanks!

If you're prepared to convert files first then you can use Tuttut's SimpleSDAudio library to play files from an SD carr and output audio using PWM pins.

You have the option of:-

8 bit mono - 1 Pin
8 bit stereo - 2 Pins + a couple of resistors
8 bit bridged mono - 2 Pins
16 bit mono - 2 Pins + a couple of resistors
16 bit stereo - 4 Pins + four resistors

You can use resistors or RC network to take it into speakers or amplifiers.

I use it for sound effects and I have a 1284P on my desk playing tracks at 8 bit mono through a 2.1 hacked PC speaker system and it sounds fine for me.

You just need to convert WAV files using the supplied converter and batch files. It's all drag 'n' drop.

Cool, thanks! 8)