Responsive Ads Here
LightBlog

Tuesday, May 29, 2018

Arduino Audio Player with SD Card Module

Overview

In this Arduino tutorial, we will learn how to make an audio player using Arduino and SD card module. Any kind of micro-controller project will look cool and interesting when we adding sounds. We can easily interfacing SD card module and Arduino. Also, we have easily found some Arduino libraries. 

You can watch the following video below:-




Components Required

The required components list for this project given below:-

  • Arduino Uno
  • Micro SD card Adapter
  • Micro SD card
  • Card Reader
  • Speaker with 3.5mm jack output
  • Some Jumper wire

Convert Audio to .wav Format

If you want to play any audio file with Arduino you must need to convert the audio in wav format because Arduino can play through SD card module an audio file in a specific format. Now follow the below procedure to convert an audio file in wav format.
  1. Go to the link: https://audio.online-convert.com/convert-to-wav 
  2. Upload your audio you want to convert to WAV
  3. Set bit resolution: " 8bit ".
  4. Change sampling rate: " 16000Hz ".
  5. Fixed audio channels: " mono ".

Next click on "Convert file" and download the file.

Circuit Schematic

The circuit schematic of audio player given below:-

Circuit Diagram

Circuit Description

SD card module has six pins whose Vcc and GND pin will connect with arduino 5V and GND pin respectively. Next comes to MISO, MOSI and SCK pin which use for SPI communication with arduino. These pin will connect with arduino digital pin 12 , 11 and 13 respectively. Last one CS pin will connect to digital pin 10.
3.5mm Jack 
After that arduino digital pin 9 will connect to sleeve end of the speaker 3.5mm jack. Tip end of the speaker jack will go to the ground pin of the Arduino.

Source Code
The source code given below:-



You can download the library here: https://github.com/TMRh20/TMRpcm

No comments:

Post a Comment

Adbox