Today audio players can commonly be found across many electronic products. Almost every mobile has an audio player. Audio technology gets a drastic improvement with rapid development in silicon technology. Previously audio data was stored on tape devices and CDs. But now, Flash memories are cheaper, store huge amounts of data, consume less power, and are much faster than CDs and tapes.
In this tutorial, we will see how to play audio using the SD card Module and Arduino. We have to save the audio in .wav file and specifically command the Arduino to play the audio at the specific digital pin. The volume of the audio can also be adjusted in the coding as per the requirement, We will need an lm386 amplifier module to amplify the signal coming from the Arduino to power the speaker .
Before you begin wiring the sd card module and the LM386 Audio Power Amplifier module with your Arduino, let’s get some background on how does circut works.
Simply the Arduino loads the .wav files from the micro-SD card. It then generates a signal and outputs it through the speaker connected to digital pin 9. This makes the speaker create sounds and play music. It can play many different songs saved on the micro-SD card. In this tutorial, we programmed the Arduino Audio Player to play )Muse – Butterflies and Hurricanes) you will find it in Resources section.
In order for the sound to be clear without any interference or confusion, we must convert the dimensions of the song to these dimensions :
You don’t need to install any software in order to convert the songs to .wav files. There’s an online music converter to do the work.
Follow the steps given below to make songs compatible with your Arduino audio player:
Formatting Your Micro-SD Card:
Wiring with Arduino:
Connections from the Arduino to the breadboard:
• Arduino GND pin → Breadboard ground line
• Arduino 5V pin → Breadboard 5V line
Connections from the LM368 to the breadboard:
Connections from the LM368 module to the Arduino:
• IN→ Arduino pin 9
Connections from the speaker to the LM386 module:
Connections from the SD card module:
*/
Plug in the power, and your Arduino audio player will successfully play a song.