Embedded MP3 module

By on October 15, 2011
Pin It

This embedded MP3 module is an universal and compact circuit (37 mm x 27 mm) for playing MP3 audio files. The MP3 module can be used in embedded systems.
The MP3 files (up 65,536) are stored in a micro SDcard.
Controlling the module could be done either by buttons and digital inputs or via TTL serial interfaces.

The MP3 module (developed by Luca Pascarella info at lpsystems dot eu) is based on MP3 converter VS1011 and a PIC24 and can play up to 65,536 songs or voice messages stored in a microSD. Each track can be selected via serial lines or by using 9 buttons or switches (64 mp3 files with dip switch). If you choose the serial communication you have to use a microcontroller, using the 9 digital lines you can control the player with logic signals from stations of various kinds, such as tension-indicator lamps, relays, etc.. The module can be used to play voice messages in vending machines, telephone systems, in the car to inform the driver of the vehicle’s condition and environmental ones, in alarm systems, to assist configuration and inform about events that occurred, and in many other areas yet. The device supports micro SD with capacity up to 16 GB and can be powered with a voltage of 3.3 Vdc or 5 Vdc selectable. The module has a single in-line single-connector positioned on one side of the PCB, so you can better manage the space and mount it also in upright position.

In “Pin-to-Pin” mode is provided the use of three buttons (PLAY / STOP, VOL UP and VOL DOWN) and a 6-way DIP switch connected to the module, while “Serial” mode the serial communication is with TTL signal level. The device can also be used in “Mixed” mode that allows you to issue orders both with serial port and pin-to-pin input.
In the mode Pin-to-Pin (mode 1) to perform a song you have to select the track number using binary inputs IN1, IN2, IN3, IN4, IN5 and IN6 and then run the selected file simply giving a ground pulse on the PLAY line. Applying logical zero on the lines VOL_UP and VOL_DOWN, you can respectively increase or decrease the volume.
In serial mode (mode 0) commands are very similar to the Pin-to-Pin, except for the choice of the MP3 file, which must take place in several stages within a time limit fixed in the configuration file. The special command # allow to insert the name of the track and the second special command * and the input.
For example, to play the file 65.mp3 you must perform the following steps:
• Step 1 (mode track name) = #;
• Step 2 (first byte of the track name) = 6;
• Step 3 (second byte of the track name) = 5;
• Step 4 (mode locking of track name, optional if you wait timeout) *;
• Step 5 (Play) = P;
• Step 6 (Stop) = S.

Mixed mode (Mode 2) allows to give orders both serial and pin-to-digital input pin. In this case the number of inputs usable is 4, for a total of 16 tracks addressable with Pin-to-Pin mode.
The names of MP3 files must be a number from 0 to 65535 followed by the extension .mp3 (for example, 0.mp3, 1.mp3, 2.mp3, 3.mp3 16.mp3 … … 65535.mp3).

The configuration of the module is made with a file (config.txt) saved on the memory card. The firmware of the MP3 player is able to recognize a new memory card and create the configuration file with default parameters, this is accomplished even when the configuration file has been damaged in some part. The generated file will be written to the root of the micro SD. The file consists of two parts: the first introductory to the project and useful to recall the description of the pins and some important notes, a second corresponding to the configuration section. In particular, all lines marked with the symbol “#” correspond to comments, the other concerning the configuration parameters. The configuration parameters are as follows:
Mode: lets you choose the mode of operation.
The possible values are:
0 for the serial mode;
1 (default) mode for the Pin-to-Pin
2 for the Mixed mode.

Parameters for Serial Mode or Mixed:
Baud rate: indicates the communication speed of serial port (allowed values are: 1,200, 2,400, 9,600 (default), 19,200 and 115,200 bps).
Echo Command: The parameter that enables the echo command sent and whose possible values are 0 (off) and 1(on, default).
Extended echo Com: Similar to the previous command. When enabled, the serial port returns a description of the requested action (enabled by default).
Play: allows you to associate two distinct functions to control play, and if the associated value is 0 before sending the command “P” or “p” is not a trace was selected, the command is ignored. If you have room for 1 (default), the play command will perform the last song played previously in memory.
Timeout defines the duration in milliseconds of time for entering the track number, the value can vary from 1 to 10,000 ms (default is 3000, ie 3 s).

Parameters for Pin-to-Pin and Mixed mode:
Time Wait Play e Time Wait Vol: are similar and the value assigned corresponds to the time that elapses before the next state change is detected, and their value can vary between 1 and 5,000 ms (the default is 100).
Play: If set to 0 the change of state of the input pins Play (with a running track) is the pause function as long as the track number with the selected input pin (IN1, IN2, IN3, IN4 , IN5 and IN6) is not changed, if the value of the track changes, play action corresponds to the stop function. If the parameter is set to 1, the associated action at play when it is running a song is always and only stop.

Mixed mode-specific parameters (for enabling and disabling the action of the input pin):
0: Ignore the action
1: (default) enables state changes.

Schematics and BOM




Download ZIP File Firmware
 Download ZIP File Diagram


About Boris Landoni

Boris Landoni is the technical manager of Open-Electronics.org. Skilled in the GSM field, embraces the Open Source philosophy and its projects are available to the community.


  1. Pingback: Tiny MP3 module is perfect for your next project - Hack a Day

  2. Steve M

    October 18, 2011 at 4:33 PM

    This looks very promising. Any idea what a retail cost would be for an assembled unit?

  3. Pingback: Tiny MP3 module is perfect for your next project | ro-Stire

  4. Boris Landoni

    October 18, 2011 at 6:00 PM

    Hi steve, you can buy it from our store http://www.open-electronics.org/products-page/

  5. Sibosop

    October 18, 2011 at 10:32 PM


    The store link shows the mp3 player as not in stock. Any idea when it will be?

  6. Pingback: Tiny MP3 module is perfect for your next project | CisforComputers

  7. Pingback: Tiny MP3 module is perfect for your next project | You've been blogged!

  8. anu ratha

    October 19, 2011 at 12:19 PM

    This mp3 module is fine.Kindly let me know the supplier details for the board.

  9. Boris Landoni

    October 19, 2011 at 2:03 PM

    You can find this product in the products page

  10. Pingback: electronics mp3 projects | electronics projects

  11. David

    April 10, 2012 at 12:42 AM

    I purchased Embedded MP3 module from you recently and it works great!!! I do have a couple of requests/ideas for you for possible future upgrades. In my setup I am using the serial interface which is very cool but would like to be able to pause or stop a track from playing and then play another track and later return to the previous track where it was paused or start it from the beginning based on the serial commend sent. Kinda like a bookmark. This track stop location would not have to be remembered if the player was powered off. The use for this capability is because I listen to audio books but would like to be able to pause or stop them and listen to music for a while and then return to the audio book either from where it was stopped or from the beginning. The other feature I would like to see is a discrete output that goes true from the PIC processor while a track is playing for an indicator. I would be willing to pay to have these features added.

  12. NETeagle

    November 27, 2012 at 1:19 PM

    Very nice projet ! I love the elektor style schematic. Which software are you using to edit and produce the board ? Thanks

    • BorisLandoni

      December 10, 2012 at 3:31 PM

      For the schematics we use Circad, for the PCB we use Easy PC

  13. Mike_A

    March 19, 2013 at 8:19 PM

    Is there a manual for using the MP3 Board? Such as setting the volume level in the config file for the pin to pin mode? I am working on sound effects for a Blaster and I need to select the sound file to play and have the sound level preset! In the Pin to pin mode when you push the play button do you push it again to stop the file playing? What is the response time of pushing the play button and the file starting and then stopping it?
    Thanks Mike

  14. Simon

    June 7, 2013 at 10:50 AM

    Can the volume be set via serial? And does it offer a loop function?

    • BorisLandoni

      June 13, 2013 at 2:35 PM

      Hi, you can set the volume from the serial, also from serial you can do a repeat function (but non in auto mode)

  15. Rüdiger

    July 9, 2013 at 2:37 PM

    1) Is it possible to generate a Play indicator while a track is playing?
    2) The module start´s with Maximum volume. Is it possible to set a Initial volume in the config.txt or is it possible that the module save the last volume Level and start with this Level when powering up?

  16. Pingback: styczen

  17. Pingback: styczen

  18. Pingback: styczen

  19. Pingback: gtownrestorationscdc.org

  20. Pingback: countydrugcard.org

  21. Martin

    May 17, 2014 at 3:47 AM

    Nice piece of electronics. I got it to work in mode in pin-2-pin mode but failled to operate it using a PIC microcontroller programmed in C. Do you have example code that shows how to do this?

    • Meyers

      October 31, 2014 at 5:00 PM

      Any response ? I’m interested !

      • BorisLandoni

        November 4, 2014 at 4:52 PM

        No code, but is a simple serial connection

  22. Martin

    May 19, 2014 at 3:07 AM

    … okay, I found the bug: In order to play song ‘1.mp3’ the file name must not be the number ‘1’ but the ASCII character ‘1’. Now it works well.

  23. hyedenny

    August 3, 2014 at 6:59 AM

    Along with the poor, contradictory, incorrect, and incomplete documentation, the schematic pinouts are incorrect, and the software is incorrect! Also, according to the vs1011 datasheet, some of the values shown here are incorrect.

    BEWARE if you try to build this yourself — you will waste a lot of time and probably some money! The schematic is INCORRECT, and the firmware download does not work as provided!!! And good luck with any technical support.

    It’s odd that this webpage has been posted for at least 3 years, and no one has noticed or corrected it yet.

    Other than that, once you figure it out — hopefully without hooking it up incorrectly as this webpage AND the documentation direct you to do — it’s an OK device.

    • BorisLandoni

      August 4, 2014 at 9:49 AM

      Hi, please report the error you found, probably could be useful for other people. We sell the MP3 without problem for a long time.


      The firmware is the same we are using, but if the schematic has some problem, please report so we’ll check it. Thank you.

      • hyedenny

        August 7, 2014 at 3:37 AM

        I appreciate your concern, but…

        What do I get for my 40+ hours of layout, construction, debugging, and reconstruction — AFTER I paid good money for your module?!! Isn’t that YOUR job?!

        I challenge you to build this project AS SHOWN and with the provided firmware, and then tell me I’m wrong! I will humbly apologize if you can prove me wrong.

        Meanwhile, I stand by my assertion that there is not only “the error,” but SEVERAL errors in the documentation, the schematic, this webpage, and the firmware! I find it hard to believe that I’m the only one who ever attempted to build this project, and/or noted these errors.

        • BorisLandoni

          August 21, 2014 at 5:55 PM

          I understand, please report for example the schematics errors, I’d like fix them. We are usign two different sfw for schematics and PCB so could be possible some errors.

          • hyedenny

            August 21, 2014 at 11:49 PM

            Apparently you did not understand, but I will indulge you anyway.

            For starters:

            1) On the schematic, pin #35 on the VS1011 is shown going to ground. That pin should remain UNCONNECTED!
            2) r10 should be 10ohm, not 20ohm. c9 should be 47nF, not 10nF.
            3) Pin #3 of SD1 goes to 29 of the vs1011 and 11 of the pic. NOT 30 and 14 as shown!
            4) Pin #7 of SD1 goes to 30 of the vs1011 and 14 of the pic. NOT 29 and 11 as shown!
            5) Pin #4 (NOT PIN #3!!!) of the SD1 goes to Vdd.

            Items #3 and #4 could be adjusted for in software, but the others will cause damage, or simply won’t function.

            These are by no means all the errors – there are SEVERAL more! You’re the engineer, can’t you see them??!!

          • BorisLandoni

            August 22, 2014 at 11:51 AM

            Thank you. I update the schematics to fix some discrepancies. Not all you write are wrong, thank you really.

          • hyedenny

            August 22, 2014 at 4:25 PM

            “Not all you write are wrong” I assure you, I’m right. Like I said, I challenge you to build it AS SHOWN!! It will not work.

          • BorisLandoni

            August 29, 2014 at 3:30 PM

            I can send you our PCB for free if it’s ok for you

          • hyedenny

            September 1, 2014 at 12:10 AM

            Thank you, but I don’t need it — I am very happy with the PCBs and the the layout I made. It is much much more DIY friendly, and, unlike the “Top & Bottom_Copper.jpg’s” you provide, they work! I might be willing to share it.

            You MAY answer a few questions for me though…

            I tried briefly and unsuccessfully to get the module to work in “serial mode.” Nowhere in the documentation does it say what serial operating parameters to use. It refers only to baud rate.

            Is the data transfer inverted, or not-inverted? Is it 8 bits? Is there odd, even, or no parity? Is there a stop bit? Is it simply 8N1? Why no information?

            Also, what is the purpose of the transmit pin? Why no information on its purpose or its use?!?

            And regarding the transmit pin, your documentation (this webpage, the text, the graphics, the config.txt diagram) all gives conflicting information of which pin is Tx and which pin is Rx!!! These conflicts should be corrected!

          • hyedenny

            December 14, 2014 at 7:27 AM

            I got the blank stare I expected…

            So much for gratitude and “customer service!”

      • rohit kumar

        July 21, 2016 at 11:01 AM

        Hi Boris….thanks for sharing this project…schematic and component mentioned by i assembled and they are working fine…i am able to play the songs…but i am facing issue with firmware…i am unable to change the songs, problem seems to be in this statement “(f_open(&file,nameTrack, FA_OPEN_EXISTING | FA_READ) == FR_OK)”…e.g there are two songs 1.mp3 and 2.mp3, if nameTrack=1.mp3 it play the song 1.mp3 but next time when nameTrack=2.mp3 then it donot work as it is not able to open the file 2.mp3…..please guide me on this…

  24. Pingback: mp3 embed - Search Yours

  25. Ciprian

    January 17, 2017 at 9:25 AM

    The links from the product are not working, they say “The page you requested cannot be found!”

    • BorisLandoni

      January 17, 2017 at 10:09 AM

      Thank you. I fixed the problem

Leave a Reply