MP3 module

MP3 module introduction
The MP3 module also known as Audio module, it is a high-performance audio codec module used to control and play MP3 files.

MP3 module function:
The MP3 module kit uses VS1053B as the main chip, supports MP3/WMA/OGG/WAV/FLAC/MIDIAAC and other audio formats decoding, and supports OGG/WAV audio format recording, supports high and low bass adjustment and Ear Speaker space effect settings.
The MP3 module kit has rich interfaces and complete functions. It only needs to provide power (3.3V/5V), and the module can be controlled by a microcontroller to realize functions such as music playback and recording.

MP3 module hardware features
1. Onboard VS1053B high-performance codec chip, supports decoding of many audio formats, supports OGG/WAV encoding.
2. On-board voltage regulator circuit, only need to provide a 3.3V or 5V power supply externally to work normally.
3. Onboard 3.5mm headphone jack, you can directly insert headphones to enjoy high-quality music.
4. On-board microphone (MIC), it is mp3 module with mic, recording can be realized without external microphone
5. Onboard lIS output, can be connected to an external DAC for higher sound quality
6. On-board power indicator, the power-on status is clear at a glance
7. Using Class A PCB material, immersion gold process, stable and reliable
8. Using new component processing, pure copper gold-plated pin headers
9. Each interface is marked with silk screen, the interface position is designed and arranged reasonably, and it is easy to use.
10. The size of the PCB is 34mm*52.6mm, with mounting holes, small and delicate


MP3 module datasheet
The MP3 module communicates with the external single-chip microcomputer through the SPI interface. The MP3 module can be directly connected to the 3.3V single-chip microcomputer system, and can also be conveniently connected to the 5V single-chip microcomputer system by means of a series resistance (see the following for details). The module comes with a voltage regulator chip, and only needs to provide 5V/3.3V voltage externally, which is very convenient to use. The parameters of the module are shown in the table:
Project | Description |
Interface features | 3.3V (After series resistance, it can be connected with 5V system) |
Decoding format | MP3, OGG, WMA, WAV, MIDI, AAC, FLAC (need to load patch) |
Encoding format | WAV (PCM/IMA ADPCM), OGG (patch needs to be loaded) |
External Interface | 1 channel 3.5mm earphone interface, 1 channel 3.5mm LINE IN interface, IIS interface, power supply and control interface |
Onboard recording | support |
Other features | Volume control, treble and bass control, EarSpeaker spatial effect, decoding time output |
MP3 Module size | 34mm*52.6mm |
MP3 module function | Play song, record input, display lyrics, display song list, volume adjustment, fast forward and rewind, pause/play |
DAC resolution | 18 bit |
Total Harmonic Distortion (THD) | 0.07% (Max) |
Dynamic range (A-weighted) | 100dB |
SNR (S/N, SIGNAL-NOISE RATIO) | 94dB |
Channel isolation (crosstalk) | 80dB@600Ω+GBUF 53dB@30Ω+GBUF |
Microphone (MIC) amplification gain | 26dB |
Microphone (MIC) Total Harmonic Distortion | 0.07% (Max) |
Microphone (MIC) SNR | 70dB |
LINE IN signal amplitude | 2800mVpp (Max) |
LINE IN Total Harmonic Distortion | 0.014% (Max) |
LINE IN SNR | 90dB |
LINE IN impedance | 8OKΩ |

How MP3 Module Realizes Audio Playback
The general audio file formats are MP3/WMA/OGG/WAV/MIDI/AAC and so on. Using the MP3 module to play audio files only requires a simple 3-step operation to achieve audio playback:
1) Reset the MP3 module.
Including hard reset (pulling down RST) and soft reset (setting the SM_RESET bit of the MODE register to 1), is to return the state of the MP3 module to the original state, ready to decode the next song.
Here we recommend that you perform a hardware reset and a software reset before each song is played, so that the music can be played better.
2) Configure the relevant registers of the MP3 module.
The registers we configure here include VS1053’s mode register (MODE), clock register (CLOCKF), tone register (BASS), volume register (VOL) and so on.
3) Send audio data.
After the above two-step configuration, you need to input audio data into the MP3 module. As long as it is an audio format supported by the MP3 module, you can directly input it, and the MP3 module will automatically recognize it and play it.
However, it is necessary to send data in an orderly manner under the control of the DREQ signal, and cannot send data indiscriminately. The rule is simple: as soon as DREQ goes high, send 32 bytes to the VS1053 chip, then continue to wait for DREQ to go high until the audio data has been sent. After the above three steps, we can use the module to play music.

How the MP3 module realizes recording
The MP3 module supports WAV recording in two formats: PCM format or IMAADPCM format. Among them, PCM (Pulse Code Modulation) is the most basic WAVE file format, which directly stores the sampled sound data without any compression. IAM ADPCM uses a compression algorithm with a compression ratio of 4:1. Here are the steps required for WAV recording:
1) Set the MP3 module PCM sampling parameters
We need to set important parameters such as PCM format (linear PCM), sampling rate (8K), number of bits (16 bits), number of channels (mono), and also select the sampling channel (microphone), including AGC settings etc. It can be said that the settings here directly determine the nature of our wav file.
2) Activate the PCM mode of the MP3 module and load the patch
By activating the PCM format of the MP3 module kit, let it start PCM data collection, at the same time, due to the BUG of the audio module, we need to load the patch to achieve normal PCM data reception.
3) Create a WAV file and save the wav header
After the first two steps are successfully set, we can normally read the PCM data we need from SCI_HDATO, but before that, we need to create a new file and write the wav header before we can start writing Our PCM data.
4) Read PCM data
After the processing of the previous steps, this step is relatively simple, you only need to keep reading data from SCI_HDATO, and then save it into the wav file, but here we also need to do file size statistics, and write to wav at the end inside the head.
5) Calculate the entire file size, re-save the wav header and close the file
When ending the recording, we must know the size of the recording (data size and the entire file size), then update the wav header, rewrite the file, and finally because of FATFS, after the file is created, f_close must be called, and the file will be real It is reflected in the file system, otherwise it will not be written! So finally you need to call f_close to save the file.

MP3 module experimentation

Play songs, support MP3/WMA/OGG/WAV/FLAC/MIDIAAC file formats, display lyrics, adjust volume, fast forward and backward, pause/play.
The MP3 module accepts the input audio data stream through the SPI interface. It can be a system slave or an independent host. Here it is used as a slave. We continuously input audio data to the MP3 module through the SPI port, it will automatically decode, and then output music from the output channel to realize the audio playback function.

The MP3 module activates the PCM recording by setting the register, and then uses the software to load the patch to realize the recording function.

MP3 module experimentation

If you want to know more about types of mp3 module, or mp3 module function, and mp3 module price, welcome to contact us by click WHATSAPP.

MP3 module pinout
MP3 module pinout generally use DuPont wire. We need to use a total of 9 DuPont lines to connect the ATK-VS1053 MP3 module and the STM32 development board, and the power supply is directly powered by 5V (VOUT2 of the development board). as the picture shows:


MP3 module connection and circuit diagram
The MP3 module board has a total of 3 sets of pin headers: P1, P2 and P3, all of which are made of pure copper gold-plated pin headers with a pitch of 2.54mm for easy connection with external devices.
The P1 header is the power supply of the mini MP3 module and the SPI communication interface, using 1*10P pin header, the detailed description of each pin is shown in the table:
No. | Name | Description |
l | GND | Land |
2 | 5V | 5V power supply port, can only supply power |
3 | 3.3V | 3.3V power supply port, when using 5V power supply, it can output 3.3V voltage for external use |
4 | XCS | Chip select input (active low) |
5 | XDCS | Data Chip Select/Byte Sync |
6 | SCK | SPI bus clock line |
7 | Sl | SPI bus data input line |
8 | SO | SPI bus data output line |
9 | DREQ | data request |
10 | RST | reset pin (hard reset, active low) |

The P2 pin header is the IIS output interface of the module, using 1*5P pin header, the detailed description of each pin is shown in the table
No. | Name | Description |
l | MCLK | master clock |
2 | DIN | data output |
3 | SCLK | bit clock |
4 | LRCK | frame clock |
5 | GND | land |

P3 pin header is the LINE IN/MIC selection interface, using 1*2P pin header, the detailed description of each pin is shown in the table:
No. | Name | Description |
1 | MIc | Microphone positive signal |
2 | MICP/LINEI | Mic Positive Input/Line Input I |
The P3 interface is not connected externally. When the jumper cap is used to short-circuit P3 pin 1 and pin 2 (default setting), the microphone is directly connected to the VS1053 chip. When recording, we can directly realize the sound through the microphone. collection. When the external line input is used instead of the microphone pickup, in order to prevent the MIC pickup from affecting the line input, we just pull out the jumper cap of P3 at this time.


Types of MP3 module
The MP3 module integrates the MP3 voice chip into the PCB board, and it can be used directly after power supply. It is easy to operate, small and powerful.
There are many types of MP3 module, and the selection of a suitable MP3 voice module is mainly based on the plug-in method. The plug-in methods mainly include SPI FLASH, TF card, SD card, and U disk. Our company has a variety of MP3 modules, such as USB MP3 module, MP3 module SD card, MP3 module with Bluetooth, MP3 module with amplifier,Bluetooth MP3 module with amplifier, MP3 module with display(MP3 module with LCD display), micro SD MP3 module, etc. If you are interested in MP3 module and want to know more information such as MP3 module datasheet, MP3 module connection, MP3 module wiring, MP3 module pinout, MP3 module kit price, welcome to contact us to DO MP3 module buy.

DIY MP3 module
If you want to make a micro MP3 module yourself, it’s actually very simple. Prepare an MP3 module, a display screen, a TF card, and a keyboard. Connect them together, it is an MP3 module kit.


Contact us for MP3 module price
The chip used by the MP3 module kit can support single/double decoding methods such as MP3 and wav formats due to different models; different MP3 chip manufacturers have different external performances, and generally can be connected with a USB board, TF card, MP3 module SD card, etc. for convenient service In addition to adapt to different electronic products. Many big-brand MP3 chip products support one-step serial port control, and have functions such as play, pause, previous song and next song, volume addition and subtraction, and song selection playback, which ensures its functionality. It can adapt to the application needs of various places. Higher specification MP3 chip, the market feedback is very good. And we have variety types of mp3 module, such as USB MP3 module with Bluetooth,MP3 module with amplifier、 MP3 module SD card,MP3 module remote etc.
Our MP3 modules are very popular, if you want to know MP3 module price, for example, MP3 module price in Sri Lanka, MP3 module price in Pakistan,MP3 module price in Nepal, please contact us.
