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

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 kit

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:

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

MP3 module play songs 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.

MP3 module  recording experimentation

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

usb mp3 module circuit diagram

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 pinout

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:

25V5V power supply port, can only supply power
33.3V3.3V power supply port, when using 5V power supply, it can output 3.3V voltage for external use
4XCSChip select input (active low)
5XDCSData Chip Select/Byte Sync
6SCKSPI bus clock line
7SlSPI bus data input line
8SOSPI bus data output line
9DREQdata request
10RSTreset pin (hard reset, active low)
MP3 module wiring

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

lMCLKmaster clock
2DINdata output
3SCLKbit clock
4LRCKframe clock
USB MP3 module circuit diagram

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:

1MIcMicrophone positive signal
2MICP/LINEIMic 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.

MP3 module connection Schematic diagram with MCU system
MP3 module connection Schematic diagram with MCU system

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.

DIY MP3 module

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.

Common problems and maintenance of MP3 modules

Solution: The chip is just a digital-to-analog conversion module, and the CPU participates in the decoding of audio files. If the internal components of the CPU are broken, the machine can run normally, and there may be problems with sound playback. When the sound card has noise when playing files, it can be considered as a CPU problems, replace it ok.

1) Power failure

The fault phenomenon of the power supply generally appears in the transformer and rectifier circuit. The fault phenomena include short circuit of the transformer, open circuit of the fuse, breakdown of the rectifier tube, etc. The fault manifests as no sound from the audio or loud AC sound. Among these fault phenomena, the most serious The most important thing is the short circuit of the transformer, because this will directly affect the temperature of the transformer, causing its temperature to rise until it burns out or causes the box to catch fire.

Solution: In this case, turn off the power of the speaker immediately, check the quality of the transformer, if it is damaged, replace the transformer of the same type. If the rectifier is damaged, you can directly find the same model for replacement. It’s much easier to handle a blown fuse, just replace it.

2) MP3 module amplifier failure

The failure of the power amplifier of the MP3 module with amplifier is generally accompanied by hum, no sound, only one channel makes sound, and loud noise. The position of the MP3 module amplifier is on the metal back plate behind the speaker. You only need to confirm whether the MP3 module amplifier is faulty. If the MP3 module amplifier block fails, the temperature will rise rapidly after turning on the power, so the metal backplane will be very hot, even hot to the touch.

Solution: Usually, if the MP3 module amplifier is found to be damaged, you only need to replace the power amplifier to solve such a fault problem.

3) The playback sound is abnormal

There is no sound when the Bluetooth MP3 module board is playing, or the abnormal sound of “bubu” is the performance of the abnormal sound of the Bluetooth MP3 module board, so how should it be repaired?

Solution: First of all, you need to check whether each component of the best MP3 module is installed firmly. If there is no degumming and leakage, check whether the components are burnt out. If not, check if there is a problem with the chip. Replace the chip if there is a problem.