Best Way to Play Audio on Arduino! DFPlayer mini / MP3-TF-16p Tutorial

  Переглядів 7,760

Just Baselmans

Just Baselmans

День тому

Thank you for watching, I hope this DFPlayer mini / MP3-TF-16P tutorial is useful.
Timestamps:
0:00 Intro
0:26 Prepare micro-SD
1:18 Add songs to micro-SD
2:02 Building physical circuit
2:39 Install Arduino library.
3:15 What to do with SD card error
3:47 Testing, no external power supply
4:19 Testing with external power supply
5:26 Play music with the press of a button
Download the Arduino sketch:
drive.google.com/drive/folder...
Music:
Blue Dream by Cheel
Book the rental by Wit It
Know myself by Patrick Patrikios

КОМЕНТАРІ: 54
@TheBustyOnion
@TheBustyOnion 2 місяці тому
Great video plus code is super helpful, appreciate!
@johnmendeleevb1740
@johnmendeleevb1740 2 місяці тому
ive seen the other video and this is module is good
@AvrahamSosa
@AvrahamSosa Місяць тому
Hi, What capacitor do you add to the circuit? Do you have the electric diagram file? Thank you!
@rkjayakrishnan3997
@rkjayakrishnan3997 2 місяці тому
I need to play the RAW sound by the Arduino mic and play with it's speaker?
@RobbertDIYprojects
@RobbertDIYprojects 2 місяці тому
awesome this video helped me out in a recent project :D
@JustBaselmansYT
@JustBaselmansYT 2 місяці тому
That's so nice to hear! Good luck with your project ;)
@waltergrootenboer6735
@waltergrootenboer6735 2 місяці тому
Great video! I’m trying to do led effects and sounds effects working together. I’ve got it working. But the df player is so slow. I press the button and my led strip fades color instantly and is almost done before the df player plays my file… is this normal behavior for the player?
@yakacm
@yakacm Місяць тому
You realise you can format the thing from Windows? Like you don't need an app. TBH I'm not even too sure why those formatting apps even exist?
@animeforever694
@animeforever694 29 днів тому
what capacitor did you use for the circuit?
@satireguy12511
@satireguy12511 Місяць тому
What happens if i dont use a resistor?
@person_83049
@person_83049 Місяць тому
i cant find the library u used?
@0nkar
@0nkar 2 місяці тому
Hey i want to make a pokemon ball vibrate and make the pokemon captured sound. Which power speaker shoild i buy? Which microcontroller as it needs to be small and which type and how many batteries would i need?
@JustBaselmansYT
@JustBaselmansYT 2 місяці тому
I happen to be working on a few videos about a 3D-printed realistic PokeBall. I will also be working on electronics for sound and the signature shake so more on this topic soon😄
@0nkar
@0nkar 2 місяці тому
@JustBaselmansYT so you're my competition 😏 I actually have all the components and I tried your code for the pokemon ball but the code you gave didn't work for the dfplayer to play the pokemone sound
@markvv596
@markvv596 2 місяці тому
Is there any way to output the signal to a 3.5mm jack? so you can control a external speaker?
@JustBaselmansYT
@JustBaselmansYT 2 місяці тому
The DAC_R and DAC_L on the DFPlayer can be used for this purpose!
@cadillacescalade5428
@cadillacescalade5428 Місяць тому
Hi, I am wanting to use DF mini player with a sketch I have already how would I incorporate the DF-Mini into my sketch ? Also I have a IR sensor as well that activates my sketch I'm wanting sound and for it to stop playing when ir sensor is uncovered.
@JustBaselmansYT
@JustBaselmansYT Місяць тому
circuitdigest.com/microcontroller-projects/interfacing-ir-sensor-module-with-arduino You can use this code but instead of turning an LED on and off you can use mp3_stop() and mp3_play()
@cadillacescalade5428
@cadillacescalade5428 Місяць тому
@JustBaselmansYT ok Kool thank You
@ZF0317
@ZF0317 Місяць тому
Anyone have the error where arduino is stuck building a sketch and unreadable symbols are printed in the serial monitor? Figured out it was the Baud rate. Also, the TX and RX are reversed in the code. Where it says the value for RX is actually TX and TX is really RX.
@plantor0728
@plantor0728 29 днів тому
ya I have that same error how do I fix it
@ZF0317
@ZF0317 29 днів тому
@plantor0728 make sure the number in Serial.begin() matches your serial monitor. Default in serial.begin is 115200. While your arduino is plugged in, go to serial monitor and look to the right side of the screen. You'll see a drop down that says some number, probably 9600, and baud. Adjust that to match 115200.
@plantor0728
@plantor0728 29 днів тому
@@ZF0317 thanks man, it’s not spitting out mystery symbols now
@ZF0317
@ZF0317 29 днів тому
No problem @plantor0728! Let me know if other questions come up.
@vijakarina
@vijakarina 2 місяці тому
Hi! I set my arduino up exactly the same way you did (with the exception of using an Arduino R4 WiFi) and the readout in my serial output is the following over and over: Not initialized: 1. Check the DFPlayer Mini connections 2. Insert an SD card I tried swapping out my R4 for my R3 and I got the same result. I've also isolated all of my components and have tried three different DFPlayer Minis. I'm using a 3-watt, 8-ohm speaker, and I'm using a Mac. Any ideas? I'm at a complete loss at this point.
@JustBaselmansYT
@JustBaselmansYT 2 місяці тому
Hi Vijakarina can you try uploading the "GetStarted" sketch that comes with the DFRobotDFPlayerMini library? Please let me know if it does work with that sketch, good luck!
@vijakarina
@vijakarina 2 місяці тому
@@JustBaselmansYT This is what I'm getting when I run their GetStarted sketch: 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!
@JustBaselmansYT
@JustBaselmansYT 2 місяці тому
​@@vijakarina and you are using an external 5V power supply? Because if this is the case and you did check all your connections and check if there are indeed songs on the SD card (which is smaller or equal to 32GB) than in my experience pushing the reset button a few times should be enough to get it working.
@vijakarina
@vijakarina 2 місяці тому
@@JustBaselmansYT yeah, unfortunately I've done all of that. I've also gone through and removed the hidden files from the SD card that the macOS loads onto it. I've tried different 32GB microSD cards, I've reformatted them all to FAT32. And I've pressed the reset button a bunch of times, all with the same result. Thanks for your quick responses!
@JustBaselmansYT
@JustBaselmansYT 2 місяці тому
@vijakarina I am sorry that it does not work for you :/ but I also do not know what to try expect for a different tutorial with s different circuit and different library
@jaykay6290
@jaykay6290 2 місяці тому
it is a pity that you skipped over the last part of button installation so quickly. i had to playback several times to try and see what you were typing to add the button command. code now gives error 'pinmode' was not declared in this scope.
@JustBaselmansYT
@JustBaselmansYT 2 місяці тому
Put the following 4 lines of code at the top of you void loop, good luck!: if (digitalRead(2) == LOW) { Serial.println("now playing track 1"); myDFPlayer.play(1); }
@jaykay6290
@jaykay6290 2 місяці тому
Okay thank you, your video & instruction is very helpful. I was struggling a lot to get buttons to play tracks. I am making a customer queue manager with 6 pay points, each with a button to press and play sound 'next customer to till 1,2,3..." etc. I have added this to your code and the 6 buttons ( d2 - d7 on arduino uno) are all executing perfectly. void loop() { //instruction for button on Digital input 2 if (digitalRead(2) == LOW) { //reading of digital 2 Serial.println("now playing track 1"); // serial monitor line display myDFPlayer.play(1); // track number/name to play delay(1000); //debounce delay } if (digitalRead(3) == LOW) { Serial.println("now playing track 2"); myDFPlayer.play(2); delay(1000); } if (digitalRead(4) == LOW) { Serial.println("now playing track 3"); myDFPlayer.play(3); delay(1000); } if (digitalRead(5) == LOW) { Serial.println("now playing track 4"); myDFPlayer.play(4); delay(1000); } if (digitalRead(6) == LOW) { Serial.println("now playing track 5"); myDFPlayer.play(5); delay(1000); } if (digitalRead(7) == LOW) { Serial.println("now playing track 6"); myDFPlayer.play(6); delay(1000); } I would however like to tweak the code more to have the button presses form a digital queue so that if for example: Till 1 presses button 1 and track 1 plays. If then button 2 is pressed while track 1 is still playing it must not interrupt or stop track 1 from playing. Track 2 must queue and play as soon as track 1 is finished and so on. Do you have any advice please? Thank you
@BINBONIUM
@BINBONIUM Місяць тому
this may sound dumb buuut what is that green thing.
@totallyistimmy
@totallyistimmy Місяць тому
capacitor, it’s not necessary it’s just there to maintain a smooth signal
@BINBONIUM
@BINBONIUM Місяць тому
@@totallyistimmy thanks!
@person_83049
@person_83049 2 місяці тому
What was the external power supplies voltage
@JustBaselmansYT
@JustBaselmansYT 2 місяці тому
5V direct current
@person_83049
@person_83049 2 дні тому
Is it ok with 9v
@JustBaselmansYT
@JustBaselmansYT 2 дні тому
3.2 ~ 5V is stated in the datasheet of the dfplayer mini so 9V is not recommended. Not sure what will happen but if you are worried about damaging it, then I would not try it.
@DatFunnyPerson
@DatFunnyPerson 2 місяці тому
i need a shuffle song code
@JustBaselmansYT
@JustBaselmansYT 2 місяці тому
www.reddit.com/r/arduino/comments/5uweoz/how_can_i_generate_random_numbers_without/
@DatFunnyPerson
@DatFunnyPerson 2 місяці тому
that doesnt help me because i cant code anything. im a noob. all i can do is copy and paste@@JustBaselmansYT
Mastering MP3 Player Busy Pin with Arduino & Audio-Visual Synchronization
13:26
The Last Outpost Workshop
Переглядів 3,9 тис.
Audio modules for electronics project
37:54
Playful Technology
Переглядів 32 тис.
How to get a FREE HYPERCHARGE SKIN!
02:07
Brawl Stars
Переглядів 14 млн
Level 1 to 100 Mystery Buttons
00:46
A4
Переглядів 5 млн
I tried the Cheapest Arduino Alternative (that Nobody heard of)
13:31
GreatScott!
Переглядів 459 тис.
DIY - Tiny MP3 Player with DFR0299
1:41
Embedded Club
Переглядів 811
inventor aw - This Device is very helpful ,, you can make at home
6:47
El Reproductor de música más fácil de hacer
12:23
Androbot TECH
Переглядів 12 тис.
mp3 tf 16p Dfplayer not working
3:23
Free Web & Mobile Apps
Переглядів 3 тис.
Arduino-Based MP3 Player via DFPlayer Mini Module
4:39
Anas Kuzechie
Переглядів 50 тис.
Уроки Ардуино. ПИД регулятор
28:57
Заметки Ардуинщика
Переглядів 446 тис.
#MP3AudioModule
0:54
HackMakeMod
Переглядів 13 тис.
Photo Changing Replace And Edit Backgrounds 65mn With These 10 Tips
0:53
Irfan AN Tech
Переглядів 260 тис.
Первый рабочий день HappyPC Старый Оскол! 🔥
9:51
Герасимов Live
Переглядів 14 тис.
Phone charger explosion
0:43
_vector_
Переглядів 28 млн
Что если бы Apple делала зубные щётки?
0:59
Компьютерная мышь за 50 рублей
0:28
dizzi
Переглядів 1,5 млн