3
\$\begingroup\$

I want to play a small .mp3 file using AVR ? How I've been googling with no good result , Those are the result of m googling :
http://www.beyondlogic.org/pic/ringtones.htm
http://www.avrprojects.info/files/media/MMC-card-wave-player-circuit-diagram.gif
http://www.avrprojects.info/avr-projects/mmc-card-based-wav-player/

\$\endgroup\$
  • 1
    \$\begingroup\$ There is a grave difference between playing .mp3 files and .wav files. The former requires decompression that is beyond the power of an AVR. \$\endgroup\$ – avakar Oct 16 '11 at 17:49
  • \$\begingroup\$ @avakar I'm thinking of transforming .mp3 into a tone and then display it , can I do this ? \$\endgroup\$ – xsari3x Oct 16 '11 at 18:31
  • 1
    \$\begingroup\$ @xsari3x Do you want to display it or play it? \$\endgroup\$ – AndrejaKo Oct 16 '11 at 18:34
  • \$\begingroup\$ Play it on a speaker , sorry for bad English \$\endgroup\$ – xsari3x Oct 16 '11 at 19:16
  • 1
    \$\begingroup\$ @xsari3x: Yes, you can play WAV tone without problems on AVR without any additional decoder hardware. If you use a MP3 decoder chip like VS1011 you can also play MP3 with AVR. \$\endgroup\$ – avra Oct 17 '11 at 14:09
7
\$\begingroup\$

From what I can see, 8 bit AVRs aren't fast enough to play MP3. Instead projects mostly rely on decoder chips. The idea is that the decoder will decode the MP3 in hardware and produce output signal which can be later processed in an amplifier and sent to a speaker.

From what I can see, you'd either need to get a board which can do the decoding for you like this (this one has SD card reader, amplifier and a small speaker too) or this (both use VS1011E decoder) or make your own board which will house the decoder, amplifier, SD card reader and so on. Here you can find a project which explains how to do that and here is one which used AVR Butterfly platform. Both projects have screens and are battery powered from what I can see.

\$\endgroup\$
4
\$\begingroup\$

Another approach is to use an external DAC and stream PCM (wav) data from an SD card. This is used in the Wave Shield for Arduino.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.