DIY MP3 Player Using Arduino Uno and DFPlayer Mini
by ROBO HUB in Circuits > Arduino
1628 Views, 11 Favorites, 0 Comments
DIY MP3 Player Using Arduino Uno and DFPlayer Mini
Hello friends in this Instructables i will show you how i made this MP3 Player Using Arduino Uno and DFPlayer Mini that can play your favorite music on the go.
It has a large battery backup so that you can enjoy your music for longer hours.
Controlled by a single module, where you can change the music, play or pause and even change the volume, How cool is this!
Most importantly it is powered by Arduino uno and the frame is 3d printed, This was made keeping in mind that most enthusiasts want to build something useful but doesn't know what to build, This answers their questions.
Now many of you might ask me why have you used Arduino uno instead of smaller other boards, The answer is simple
Uno is widely available and easy to work with compared to newer boards, and most importantly it is affordable and you can make infinite number of projects with just a single board.
My main motto was to make this project accessible to everyone so we can learn together.
Unlike other mp3 players this also has a display that shows the play/pause status, next/previous track and volume level statuses
Powered by a 18650 battery this gives a great backup time.
Don't be surprised by looking at the size of the speaker, it as a great sound output and have some bass also!
This will fit your pocket and you can carry this with you on your camping where the world is offline but you still have all the favorite music of yours stored offline!
Well this was about the project that we are going to make, i have given all the materials along with step by step explanations to build this.
Also there is a working video in the later steps that shows the quality of sound you can expect from this build.
Program for this and the circuit diagram is also well explained so that you should not feel struck anywhere.
Supplies
These are the materials that you will need to build this mp3 player make sure to keep them handy to have a quick build
Arduino Uno from amazon
SD Card
TP4056 Charging Board
DC DC Boost Converter
18650 Battery
Jumper Cables
PLA Filament
Cura Slicer
3D Printer
Programming Cable
Arduino IDE
Note that these are afiliate links and upon qualifying sales i will receive a small percent of commission at no extra cost to you
Tinkercad Design and 3d Printing
I first calculated the estimated amount of space that this project components will require and designed this frame using the Tinkercad
I Didn't want the design to be super complex but the simple design yet classy.
I came up with this design that fits all the components easily and gives the look of a retro style mp3 players.
There are total of 4 parts here and most of them that i printed are of different colors, the choice of colors is left to you.
The base part holds most of the electronics and for this reason i made the base to be 3mm thick.
Walls of the base has 3 slots one for the uno port, other one for the DF player SD card removing and inserting and last one is for the on/off switch.
Sides of the walls are 1.5mm thick and are more than enough for this project.
I have attached the design phase from my Tinkercad dashboard so that you will know how this design thing is actually made.
The Lid part holds the speaker, encoder and the display.
I have added a knob to the potentiometer and a small cornering frame for the display module. well these are just for finishing the upper part.
You don't need to worry about all these, Just use the STL files that is in this step.
I will use cura to slice the design model and you can see the settings that i used, No need of using any rafts or supports at the time of printing.
Use your choice of color of PLA filament, or if you are lost just use the colors that i used here.
It will take some time to print the base while the other parts can be 3d printed quickly.
Circuit Diagram and Sketch
This circuit has 2 parts of the circuit merged into one so the circuit diagram looks a little too complex but don't worry im here to simplify that.
I will divide the circuit into 2 parts the battery supply part and rest is the Arduino and its components part
Arduino connects to df player, rotary encoder and the OLED module
DF player connections
Vcc and Gnd from Df player is connected to 5v and the gnd on the Uno
Tx is connected to D10 whereas the Rx is connected to D11 pins of the Uno
Speaker one goes to the gnd and the other to S1 (you can choose S2) also, here S1 and S2 are the speakers
OLED Connections
Even here Vcc and Gnd are connected to 5v and the ground of uno
Sda is connect to A4 and the Scl is connected to A5 pin of the Uno board
Rotary encoder connections
Vcc and Ground as usual the 5v and the ground of uno pins
Clk is connected to D2, Dt is connected to D3
Since we are using center button we are using the SW pin and it is connected to D4 on the Uno.
Adding music
Download your favorite tracks and create a folder by the name mp3 inside your sd card and name the music files as 0001.mp3, 0002.mp3 and so on.
The sketch reads the music files as in the above given name format.
This completes the first half of the circuit, Since we are depending on the external power supply to power the Uno board we need another circuit.
All the connection pins on the board are marked with names so that connection becomes easy, use color coded wires.
I will explain the second half of circuit in the next step, Meanwhile you can upload this program to your uno board and check if the sketch is working fine.
If you see texts on display and when you click on encoder button if the screen is responding the circuit is fine.
You also can replace this open circuit with a Simple small PCB, Complete your electronic projects in the best way from PCBWay
Why them? They have provided me with the best PCB and The quality is just amazing compared to other providers in the market, They also have advanced Color PCB printing
If you don't have a 3dprinter check for their Multicolor 3D printing service with this your project becomes more interesting
A revolutionary solution that combines the best of both rigid and flexible circuitry to elevate your electronic projects to new heights.
Don't miss to check their 12th anniversary offers here , the offers are valid from July 1st to 31st and dont miss it
There are many coupons and lucky draw that you can win and redeem and avail greatest of the offers across their platform
You can participate in their 12th anniversary contest by posting your pcb related projects or cnc/3d printing project and win exciting prizes.
You can start your pcb order for just $5, also upto 50% off for ed printing and CNC machining, there is also a special sales in pcbway store where you get special discounts
During this time if your PCB order use the same solder mask color as your color there is no extra color fee.
i Unboxed the blind box and won an OLED display module which i use in many of my projects
On the occasion of their anniversary there is a color debug challenge where you can participate and win coupons that you can redeem on your next order.
If you participate in badge design contest the winner gets $200 usd coupon, how cool is this!
Downloads
Voltage Booster Circuit
To adjust the voltage first connect the battery directly to the boost converter input side and the other end to the multimeter to check for voltage.
Adjust the potentiometer in the boost converter board to 5v and now follow these steps
The battery gives an output of 3.7v and the modules on our project consumes 5v and there is a shortage of 1.3v and we will fill this using a voltage booster.
Start by soldering the battery to the wires and the end of wires from here will go to the charging module and the booster module.
Tip: Make a scratch on the battery to have a solid solder joint.
The voltage booster board which I'm using is a 6v to 12v type and that means it can give you voltages from 6 to 12v and the voltage range can be varied using the potentiometer on the booster board.
Seal the ends of the soldered joints on battery using the hot glue, Repeat the same step on the other side of battery also.
Make sure that's the soldered joints are sealed with hot glue or some other insulation material so that we have good circuit with no leakages.
Connect the switch between the output end from booster module, i prefer to use the negative end to add the switch.
Casing the Components
This is my favorite part of the project where you can see the project coming to life like the commercial products outside.
Start by sealing the base of Arduino uno the base of the 3d printed base frame, you can use double sided adhesive here or the second option is hot glue.
Don't worry about the melting of part since the base itself is 3mm thick so that it can hold the uno properly.
After this using super glue add the df player mini to the side walls, and later the voltage booster circuit.
You can use either the double sided adhesive or the super glue for these modules, In the end add the switch to the slot provided on the base frame body.
Now at this phase the working on base part is finally complete, Now moving over to the top part.
Here start by adding the rotary encoder first and then the OLED module.
Add the speaker too, there is a hole provided that helps to hide the wires of speaker, Here you may have to remove the wires from board and connect it again.
Use generous amount of hot glue to connect the OLED module with the top lid and after it is dry completely use super glue to seal the top and base part.
For the final touch i will add a small rectangular frame on the sides of OLED display, and this completes the build part.
How to Use and a Working Video
Using this is very exciting, Congrats to myself and those who built this now you have your very own mp3 player that you can carry wherever you go and proudly show it off!
This has an inbuilt battery that plays music for hours together!
Just turn on the switch and you should be able to browse the songs from your SD card instantly, You can change the tracks with the help of encoder knob by just giving a spin.
Clockwise will take you to the next track where as the counter clockwise to the previous track, One rotation is one switch and one change.
Press ok to pause the music and again press to play.
If you want to change the volume level keep pressing ok and now rotate the knob to adjust the volume, all this actions you can see on the OLED display.
This display makes life soo much easier now and you can see why I'm telling this, well if you run out of battery just charge the battery with the inbuilt type c charging board.
Use power bank or any other USB power source to charge this mp3 player and it charges quickly and the red light turns blue/green after the charge is complete.
This was all about this project, you can check my whole video documentation of this project.
If you still have any questions for me, ask in the comments here and i will be happy to answer all of it, Thank you for your time and hoping to see your projects on the i made it section.