Skip to main content
structure
DFPlayer Test Rig 20220119 123412321 1000w

Raspberry Pi - UNO
MP3 player project

DFPlayer RPi Controlled 20190603 161333 500w

 

Miniplayer Pin Map The DFPlayer module, shown in the image above right and with its pin definitions on the immediate right, is a small MP3 player that can output amplified stereo sound direct to two speakers and has a micro SD drive where the 'source' MP3 files can be stored. 

The DFPlayer module is widely promoted to be managed by an Arduino microcontroller and has a readily available Arduino Library that allows the DFPlayer to be controlled via a series of simple commands.

For this project however, as an Arduino microcontroller is not a very convenient or flexible controller for ad hoc developments, a Raspberry Pi is used to develop a 'user interface' for the MP3 player and which also interfaces to an Arduino UNO which controls the DFPlayer module.

As shown in the image above left, a development rig has been developed where the DFPlayer module is inserted in a breadboard and is first connected to an Arduino UNO which in turn can be connected to a Raspberry Pi using a I2C/smbus link. The whole assembly is then mounted in a custom 3D print that also houses a pair of small speakers for the MP3 player output.

For the software build the overall system approach is for the Raspberry Pi to be the primary controller with the Arduino UNO acting as a 'slave' carrying out various DFPlayer control functions from high level 'commands' sent from the Pi to the UNO.

This 'command' method, with an I2C interface between the Raspberry Pi and the Arduino UNO, uses a detailed 'protocol' that was developed for the 'command' syntax/structure, defining how the commands are sent from the Pi, being correctly interpreted and then acted upon by the UNO, with an associated response sent back to the Pi. This master/slave I2C/smbus link approach is similar to that used for the experimental 4WD robot project that used a PiZero and an Arduino UNO that controls a motor shield with four separate/independent motor connections - see this link for further details.

This project is only at a basic 'proof of concept' stage and much more development is possible to extend the command protocol and to further develop the user interface that is controlled by the Raspberry Pi, perhaps using a Flask web server to make the interface as user friendly as possible.

 

 

A cross-section of example maker project information:

 

 

 

 


Page last modified on Sunday 13 September 2026 10:16:26 BST