Mp3 files from SD Card Module

can you help me with my project?
i want to output mp3 files from the SD card using the SD card module. what will be the appropriate arduino board for this?

please help me with my concern.
thank you!! :slight_smile:

Output how? Just read them? Or play them as music?
If music, I'd use an MP3 module like one of these:

Use a simple serial command to start a file playing:
Serial.write (0x01); // play file 001.mp3

Or this one : Adafruit Music Maker MP3 Shield for Arduino (MP3/Ogg/WAV...) : ID 1790 : $29.95 : Adafruit Industries, Unique & fun DIY electronics and kits

That ties things together nicely.

i'm using Arduino Uno R3 and SD card module. how i will output the sound from the SD to pin 11. should i connect directly the pin 11 to the speaker or amplifier?

The Arduino Uno R3 board contains the ATmega328P microcontroller. That is a chip which can be used for timing, to read digital and analog signals, and to output something. It is not a mini-computer and it can not read a mp3 file and output that to a speaker.
You need to add a module that is capable to read and decode mp3 files.

According to this link TMRh20/TMRpcm it has a function that will support any arduino boards for mp3 output from SD card.
Or i misunderstood this??

When using audio from SD card to Arduino output pin, the TMR20h/TMRpcm is the first choice. There is a lot of time and effort spent for that code.
However, it does not have a mp3 decoder.

Or is your question how to play audio files with an Arduino board ?
The Arduino Uno is the easiest board to start with, and it should work with TMR20h/TMRpcm.
You have to convert the mp3 files to PCM/WAV files.

Is your SD module compatible with 5V Arduino boards ?

Don't forget to to add a 100 ohm resistor to the speaker, as is shown here : https://www.arduino.cc/en/Tutorial/ToneKeyboard

thon95:
According to this link TMRh20/TMRpcm it has a function that will support any arduino boards for mp3 output from SD card.
Or i misunderstood this??

Yes you have misunderstood that. That page says:-

for asynchronous playback of PCM/WAV files direct from SD card

Nowhere on that page does it mention MP3.

Can we read/get information about size(Megabyte) or time (Second) of mp3 file ?
I use modul Mp3 Dfmini Player +SD Card and arduino uno.

What do the DFmini folks say? At least provide a link to it.

In case you were wondering decoding mp3 files is very compute intensive and you need a decent DSP
level of performance for it, or a chip that supports hardware decoding of mp3. Encoding them is much
more compute intensive still, use a laptop or computer for that.

Decoding straight PCM is no work at all, you just move the data to the DAC...

Encoding them is much more compute intensive still,

In fact there is no defined way to encode an MP3 file. All MP3 does is give you a number of compression strategies you can use. It does not tell you what ones to use under what circumstances.