Introduction: Simple Audio Player

About: Tanmay Bhonsale a.k.a enceladus2000

The MediaTek LinkIt ONE board is truly jam-packed with goodies, with features like GPS, GSM, GPRS, WiFi and BLE, all of which are on a board with the form factor of an Arduino UNO. What really left me (and many others) so impressed was that this board costs only about $60, and one receives an Li-ion battery and some antennas along with it too! Yayy, we can't wait to start making stuff!

To be honest, what really made me excited about this board was that it has Audio out (a 4-pin AUX pin connector built-in). Why? You see, phones aren't allowed in my school, so I wanted to make a audio player from scratch which I could take to school. As the audio player would be bare circuit boards, I could easily pass it off as a physics project, say.

The Linkit ONE is the perfect board for this purpose; it already has a built-in SD card socket and an Audio Out, so very few external components are required. In addition to that, there are code examples which explain how to use this feature.

Features of Audio Player:

  • Can play .wav, .mp3, .aac, and .amr files
  • Can use SD card upto 32GB
  • Informative LCD screen
  • Minimal external components, so easy to use
  • 1050mAh battery (with built in charger)
  • Easy to make
  • Portable
  • Looks like any other electronics project (if you go to a school where devices aren't allowed, you can take this Audio player along and not get caught!)

Step 1: Project Details and Materials Required...

Prerequesites: You should have your Mediatek Linkit ONE set up and ready to upload sketches to.

Cost: ~$75 (including Linkit board, which is about $60)

Difficulty: Easy

Time Required: ~ 1 hour

Bill Of Materials:

  1. Linkit One board (Seeed)
  2. Li-ion battery (The linkit one box includes one)
  3. General purpose PCB
  4. Male headers
  5. 5 push buttons
  6. Grove I2C RGB LCD (Seeed)
  7. Earphones or headphones or an AUX speaker (buy one here)

Step 2: Solder the Buttons...

There are 5 buttons in all, each for Play/Pause, Next song, Previous song, Volume Up and Volume Down. The diagram above shows the arrangement of the buttons on the PCB along with the connections. Feel free to change the pin configurations (though remember to modify the code accordingly); here are my connections:

  • prevPin = 7;
  • playPin = 5;
  • nextPin = 3;
  • volumeUpPin = 4;
  • volumeDownPin = 6;
  • Step 3: Connect the LCD Screen...

    What's great about the Linkit board is that it already has a grove 4 pin connector built-in, to which we can directly connect the LCD. No shield required!

    Step 4: Connect the Button PCB...

    Here are the pin connections again:

  • prevPin = 7;
  • playPin = 5;
  • nextPin = 3;
  • volumeUpPin = 4;
  • volumeDownPin = 6;See the above picture and its tags for help.
  • Step 5: Add Songs to a MicroSD Card...

    Convert The Songs to .mp3, .wav, or .aac (if it isn't already)

    1. Download an audio converter (like Media Human converter)
    2. Select songs to convert
    3. Convert songs to .mp3 (constant bitrate), .wav (though this creates HUGE files), or .aac (recommended, best sound quality)

    Transfer songs to SD card:

    Make sure all the songs aren't in a folder.

    Step 6: Insert the SD Card...

    Step 7: Upload the Code!

    Below are two attachments: the main .ino file, and a .h header file. Download both of them, and then place them in a single folder names my_player. When you open this code, two tabs containing each file should be visible. Change the button pins if required.

    Select the Linkit ONE board and correct COM port, and upload!

    Note: The board sends debug messages on the serial COM port, which may be helpful if you are facing problems.

    Step 8: Connect Battery...

    Connect the battery as shown above. See the tags of the image to see how to switch on/off and charge the board.

    Step 9: Connect Earphones...

    Step 10: Play!

    I don't know if I should be surprised, but the audio quality delivered by the LinkIt is pretty damn good! The screen periodically shows the volume level and battery percentage (because the screen is too small to display everything at once).

    I hope you enjoy making stuff with your Linkit! Any comments, questions and suggestions are welcome!

    Tech Contest

    Participated in the
    Tech Contest