Introduction: An Audio Player With an Arduino

I wanted to make an audio player using an arduino but I didn't have an microsd card reader or an mp3 decoder chip.

I managed to make one, using an micro sd adapter and wav files (8bits/8000hz)

Of course, the audio quality is bad, and the arduino can only read the wav files, but this gives an nice retro charm to it.

Download documentation/code : wavplayer.madnerd.org

See/Modify this project on github : https://github.com/pigetArduino/wavPlayer

Please subscribe to my channel, if you don't want to miss my next projects!

Step 1: Components

You will needs the following components

  • Micro sd card 2go
  • Micro SD Adapter
  • Batteries holder 4AAA on/off
  • Arduino mini pro 3.3V
  • Audio jack dip

You will also need an FTDI 3V programmer. (SDcard works in 3V)

Step 2: Wiring

Here is the pins you need to wire on the Arduino

SD card

  • 1 --> X
  • 2 --> 12
  • 3 --> GND
  • 4 --> 13
  • 5 --> VCC
  • 6 --> GND
  • 7 --> 11
  • 8 --> 10 (Chip select)

Headphones / Speaker

  • Left/Right --> 6

Buttons

  • prev button --> 7
  • next button --> 8

Step 3: Create Wav Files

Our arduino can only read a specific type of wav files, here is how to make them.

The microsd card needs to be format as FAT32 (I managed to even use an Raspberry Pi micro sd card/ android sdcard)

We are going to use Audacity for this.

  • Open an mp3 files
  • At the bottom of the interface, there is a Project Rate, put it to 8000hz
  • Tracks --> Stereo Track to Mono
  • Tracks -> Resample : 8000hz
  • File --> Export Audio
  • Save as Type : Other uncompressed files
  • Header: Wav (Microsoft)
  • Encoding : Unsigend 8_bit PCM
  • Save the file as 0.wav on the root of the sdcard

Next track need to called : 1.wav, 2.wav ...

Step 4: Enjoy the Noise!

Turn on the Arduino and it will automatically play 0.wav.
You can use the buttons to go to the next/previous wav files.

Of course if you want to read MP3 files you should use an dedicated chip for this, i'm currently trying the DF Player mini , that can even works without an Arduino!

I hope you enjoy this small project! Please feel free to ask questions !

Comments

author
DIY Hacks and How Tos (author)2016-10-25

Cool Arduino would be a good platform for making a lot of sound based projects.

About This Instructable

1,788views

30favorites

License:

More by madnerd:Lipo-battery Powered ArduinoSimple MIDI BuzzerMake NES Music with LMMS
Add instructable to: