In this tutorial will see how to build our own easy and simple music player using Arduino boards.There are various formats of music like MP3, WAV, AAC, OPUS, AIFF, AU, WMA, etc. Here, I will show how to play a WAV file using Arduino.
Skill Required :
Basic Circuit Wiring and/or Soldering
Get the components listed in hardware components Things and let's get started!
Preparing SD CardFormat your SD card with either FAT16 or FAT32 because some controller does not support NTFS formating.Before copying any song you need to convert file it into.wav file
So, visit the link: https://audio.online-convert.com/convert-to-wavto convert some.mp3 file to.wav file with below setting
- bit resolution: 8 Bit
- sampling rate: 32000 Hz
- audio channel: stereo
Once done, now you can copy your song to the SD card and insert it into the microSD card module. I have provided a sample song that is used for the project which you can download from below.
Sample Song Files Used:
1. music1.wav2. music2.wav3. music3.wav
Circuit Connection and WiringMake a connection as shown in the above circuit diagram. You can try the circuit on a breadboard or if know soldering then makes the permanent connection by soldering shown in the below packaging section.
Arduino Installation and SetupSkip this step if you already have Arduino Installed in your PC/laptop.
Follow the Arduino official link below to install Arduino IDE on your respective OS:
Windows -> https://www.arduino.cc/en/Guide/Windows
Linux -> https://www.arduino.cc/en/Guide/Windows
Mac -> https://www.arduino.cc/en/Guide/Windows
Linux user can follow my video tutorial:
CodingClick Here to Download library file SimpleSDAudio
After the download, to install go to Arduino IDE —> Sketch —> Include Library —> Add.ZIP Library … and browse for the.zip file (previously downloaded). There are various ways to install library to Arduino if interested checkout on link
Download Code file provided below and upload to Arduino Uno by selecting proper Board(Tools->Board->Arduino Uno/Genuino) and COM port (for Windows)
Package your project into a suitable box. Here I have just used some waste CD as platform support to everything.
Working DemoThanks!!
Comments