Introduction: Tutorial of MP3-TF-16P
Description:
The MP3-TF-16P Player For Arduino is a small and low price MP3 module with an simplified output directly to the speaker. The module can be used as a stand alone module with attached battery, speaker and push buttons or used in combination with an Arduino UNO or any other with RX/TX capabilities.
Specification:
- Supported sampling rates (kHz): 8/11.025/12/16/22.05/24/32/44.1/48
- 24 -bit DAC output, support for dynamic range 90dB , SNR support 85dB
- Fully supports FAT16 , FAT32 file system, maximum support 32G of the TF card, support 32G of U disk, 64M bytes NORFLASH
- A variety of control modes, I/O control mode, serial mode, AD button control mode
- Advertising sound waiting function, the music can be suspended. when advertising is over in the music continue to play
- Audio data sorted by folder, supports up to 100 folders, every folder can hold up to 255 songs
- 30 level adjustable volume, 6 -level EQ adjustable
Step 1: Material Planning
For this tutorial, the items needed to run this project are:
- Arduino Uno
- USB Cable type A to B
- SD Card
- Male to male jumper wire
- Resistor 1k ohm
- Speaker
Step 2: Hardware Installation
After complete your circuit, connect your Arduino Uno Board to your computer via USB Cable. You can see the LED on the MP3 will on. Make sure that the SD card had been installed in the mini MP3. The format of the song must be in MP3 file.
Step 3: Insert Source Code
- Download the test code and open it by using Arduino software or IDE.
- Make sure that you have choose the right board and the corresponding port. (In this tutorial, Arduino Uno is used)
- Then, upload the test code into your Arduino Uno.
Attachments
Step 4: Video
Enjoy watch the tutorial!
17 Comments
Question 2 days ago
Please 🥺 upload code
Question 1 year ago
I am trying to make this project and apply it application for modern project
but currently, I am getting problems and issue
please solve this?
I have currently make proper connections and uploaded my program that was working but getting an error
on serial monitor
DFRobot DFPlayer Mini Demo
Initializing DFPlayer ... (May take 3~5 seconds)
Unable to begin:
1. Please recheck the connection!
2. Please insert the SD card!
solve and give me
a solution...
Answer 9 months ago
Had the same problem when I began to build this. I have made these in the past and just decided to put another together. What I did this time was fail to observe the u notch at the top of the board so I wired it all upside down. Thankfully it didn't harm the device and when I rewired her she now works good again!
11 months ago
Is there a way to add a button to rotate through the mp3's on the SD card?
Question 1 year ago on Step 4
will it work if we connect RX and tx pin to 0 and 1 of Arduino Uno board
or on Arduino nano
I have tried but getting some error just solve my issues.
problem come in type
" introducing force sensor music system
unable begin
recheck connection
insert sd card again"
my code which works to 10 and 11 rather not in 0 and 1
`#include <DFRobotDFPlayerMini.h>
#include <SoftwareSerial.h>
//#define RX 0;
//#define TX 1;
SoftwareSerial mySoftwareSerial( 0 , 1 ); // RX, TX
DFRobotDFPlayerMini myDFPlayer;
void setup() {
pinMode (8 , OUTPUT);
//pinMode (3 , OUTPUT);
digitalWrite(8 , LOW);
mySoftwareSerial.begin(9600);
Serial.begin(115200);
Serial.println();
Serial.println(F(" introducing force sensor music system "));
// Serial.println(F("initializing music player"));
//check SD card connection
if (!myDFPlayer.begin(mySoftwareSerial))
{Serial.println("unable begin");
Serial.println("recheck connecton");
Serial.println("insert sd card again");
while(true);
}
Serial.println("success to established connection");
millis();
//volume control
myDFPlayer.volume(30); // volume ranges 10 to 30
myDFPlayer.volumeUp();
myDFPlayer.volumeDown();
myDFPlayer.outputDevice(DFPLAYER_DEVICE_SD);
// put your setup code here, to run once:
}
void loop() { // put your main code here, to run repeatedly:
int fs_reading = 1023 - analogRead(A0);
Serial.print(" force reading = > ");
Serial.println(fs_reading); // print the raw analog sensor reading
delay(1000);
if (fs_reading < 100) //
Serial.println(" - trigger ");
else if (fs_reading < 300)
Serial.println(" - low pressure ");
else if (fs_reading < 500)
Serial.println("- medium squeeze ");
else if (fs_reading < 700)
Serial.println("- medium pressure ");
else if (fs_reading < 900)
Serial.println("- heavy pressure ");
else
Serial.println(" - fool on ");
delay(1000);
if (fs_reading > 600)
{ digitalWrite(8 , HIGH);
myDFPlayer.play(1);
Serial.println(" music on ");
delay (1000);
}
}
`
3 years ago
guys i tried the exact code with the exact steps, the moment i upload the code everything start getting hot (definitely something causing high damaging current through the circuit), anyone has any idea what's happening exactly?
Question 3 years ago
I want to operate MP3-TF-16P mp3 module with ultrasonic sensor. Please send me code for it because my code is inappropriate.
Please do it.
Tip 3 years ago
If anyone want's a fast and easy to understand library to use with this module, I suggest using this one: https://github.com/PowerBroker2/DFPlayerMini_Fast. You can also download and install through the Arduino IDE's Libraries Manager (search "DFPlayerMini Fast").
Question 4 years ago
Hello,
I have connected the dfplayer with nodemcu and inserted the sd card(16gb),But when i power up esp8266,led of drplayer does not turn on.Though i have not connected speakers yet.
I have tried it with arduino uno but no help.
Answer 3 years ago
Same here. As soon as I connect the dfplayer chip to arduino 5V the arduino dies.
4 years ago on Step 3
i tried the codes that i downloaded from this site but i got some trouble , error message"DFRobotDFPlayerMini.h:No files or directory".
can someone help me? Thanks
Reply 3 years ago
Did you get this answered? You have to install the DFRobot library and make sure the files are in the arduino's search path. #include <file name here.h> looks in main arduino library directory #include "file name here.h" looks in the local directory
4 years ago
Why do we need the 1k ohm resistor?
Reply 3 years ago
Because of the level conversion i.e. the UART on the module only supports the 3.3V-logic, whereas all GPIOs on the Arduino UNO are 5.5V. Actually you only need it for RX of the MP3 module as only the level coming from the Arduino is too high. The signal going out from TX of the MP3 module is anyway 3.3V. So you don't need to lower that one. If you do it's even worse as at some point the Arduino might not get the proper signal.
Question 3 years ago on Step 2
Should the LED go really on after simple power on?
Somehow, I doubt that because I read in Arduino forum that it only goes on when a song is playing. It would be really good to know this as I have to modules and none of them is working.
4 years ago
Sample source code will not compile. I have correct board and port chosen.
Question 5 years ago
Mp3-tf-16p modul isnt working sometimes, the blue led is off. Sd card has two 192 kbps songs. Where is the wrong?