MP3, WMA, WAV, MIDI
MP3, WMA, WAV, MIDI
44.1 kHz, 48 kHz, 96 kHz
16-bit, 24-bit
80 dB
5V (from Arduino board or external source)
30 mA (typical)
69.5 mm x 53.3 mm (2.73 in x 2.10 in)
Conclusion
The Arduino VS1053 MP3 Shield is a powerful and versatile audio module that provides a wide range of audio capabilities for Arduino-based projects. Its high-quality audio decoding and encoding capabilities, combined with its compatibility with most Arduino boards, make it an ideal solution for a variety of applications.
Arduino VS1053 MP3 Shield DocumentationOverviewThe Arduino VS1053 MP3 Shield is a versatile audio module that allows Arduino boards to play MP3 files from SD cards or flash memory. The shield is based on the VLSI Solution VS1053 audio codec, which supports decoding of various audio formats, including MP3, AAC, Ogg Vorbis, and WMA. This documentation provides an overview of the shield's features, pinouts, and code examples to get you started with using the Arduino VS1053 MP3 Shield.FeaturesSupports playback of MP3, AAC, Ogg Vorbis, and WMA audio files
SD card slot for storing audio files
Onboard 3.5mm audio jack for headphone or speaker connection
Line-out connector for connecting to external amplifiers or audio equipment
5V tolerant inputs for easy connection to Arduino boards
Can be powered from the Arduino board or external power sourcePinoutsThe VS1053 MP3 Shield has the following pinouts:Vin: 5V power input
GND: Ground pin
SD-CS: SD card chip select pin
SD-CLK: SD card clock pin
SD-DI: SD card data input pin
SD-DO: SD card data output pin
DREQ: Data request pin
XCS: Chip select pin for VS1053
XDCS: Data clock pin for VS1053
DOUT: Data output pin for VS1053
DIN: Data input pin for VS1053
RST: Reset pin for VS1053
GPIO: General-purpose I/O pins for VS1053Code Examples### Example 1: Playing an MP3 File from an SD CardThis example demonstrates how to play an MP3 file from an SD card using the Arduino VS1053 MP3 Shield.```c
#include <VS1053.h>// Define the pin connections
#define VS1053_CS 5 // Chip select pin
#define VS1053_DCS 6 // Data clock pin
#define VS1053_DREQ 7 // Data request pinVS1053 player;void setup() {
Serial.begin(9600);
player.begin(VS1053_CS, VS1053_DCS, VS1053_DREQ);
// Initialize the SD card
SD.begin(4); // Use pin 4 for SD card CS
// Play an MP3 file from the SD card
player.setVolume(50); // Set the volume to 50%
player.playSD("song.mp3"); // Play the "song.mp3" file
}void loop() {
// Wait for the song to finish playing
while (player.playingMusic) {
delay(100);
}
}
```### Example 2: Streaming Audio from a Serial ConnectionThis example demonstrates how to stream audio data from a serial connection using the Arduino VS1053 MP3 Shield.```c
#include <VS1053.h>// Define the pin connections
#define VS1053_CS 5 // Chip select pin
#define VS1053_DCS 6 // Data clock pin
#define VS1053_DREQ 7 // Data request pinVS1053 player;void setup() {
Serial.begin(9600);
player.begin(VS1053_CS, VS1053_DCS, VS1053_DREQ);
// Set the volume to 50%
player.setVolume(50);
// Start the serial stream
Serial.println("Ready to stream audio...");
}void loop() {
// Read audio data from the serial connection
if (Serial.available() > 0) {
byte data = Serial.read();
player.write(data);
}
}
```In this example, the Arduino board is connected to a computer or another device that streams audio data through the serial connection. The VS1053 MP3 Shield receives the audio data and plays it in real-time.Additional ResourcesFor more information on using the Arduino VS1053 MP3 Shield, please refer to the official datasheet and documentation provided by the manufacturer.