Can't Detect/Initialize MicroSD Card with Adafruit Music Maker MP3 Shield on MEGA

Edit: Seems to be a faulty shield... I received my new shield today and it works. No modifications needed whatsoever.

I have spent the past day troubleshooting why the music maker shield doesn't recognize my microSD card. I would greatly appreciate any help! Thanks in advance!


  1. Adafruit Music Maker MP3 Shield Adafruit Music Maker MP3 Shield for Arduino w/3W Stereo Amp [v1.0] : ID 1788 : $34.95 : Adafruit Industries, Unique & fun DIY electronics and kits
  2. Arduino MEGA R3

I followed the Adafruit guide initially: ... r/assembly

The message I got from this was:
"The message I got:
"Adafruit VS1053 Simple Test
VS1053 found
SD failed, or not present"

Here are a few things I tried:

  1. Tried with three different microSD cards, formatted with SDFormatter. No success.

I thought it might be an issue with SD card reader and Mega boards in general so I wanted to see if I could get the default "Cardinfo" or the SdFat library "SdInfo" sketches to work.

As expected, I got messages along these lines:

"Initializing SD card...initialization failed. Things to check:

  • is a card inserted?
  • is your wiring correct?
  • did you change the chipSelect pin to match your shield or module?"
  1. Tried following setting different chipSelect pins and adding "pinMode(10, OUTPUT); digitalWrite(10, HIGH)" as this articles shows ... on-failed/ (I tried both 53 and 10 for the pinMode

  2. In this post (, a user was able to modify "if (!card.init(SPI_HALF_SPEED, chipSelect))" into "if (!card.init(SPI_QUARTER_SPEED, chipSelect))" to get their SD card initialization code working. I copied their code but that didn't work either.

  3. I downloaded an older version of the SD library (v. 1.0.8). That also didn't lead to any difference.

I really don't know what else to try. I am now waiting for a new music maker shield, a UNO and another MEGA to see if it might be the boards themselves. If anyone could offer help that would be great!

Code I used from the Adafruit library:

  This is an example for the Adafruit VS1053 Codec Breakout

  Designed specifically to work with the Adafruit VS1053 Codec Breakout 

  Adafruit invests time and resources providing this open source code, 
  please support Adafruit and open-source hardware by purchasing 
  products from Adafruit!

  Written by Limor Fried/Ladyada for Adafruit Industries.  
  BSD license, all text above must be included in any redistribution

// include SPI, MP3 and SD libraries
#include <SPI.h>
#include <Adafruit_VS1053.h>
#include <SD.h>

// define the pins used
//#define CLK 13       // SPI Clock, shared with SD card
//#define MISO 12      // Input data, from VS1053/SD card
//#define MOSI 11      // Output data, to VS1053/SD card
// Connect CLK, MISO and MOSI to hardware SPI pins. 
// See "Connections"

// These are the pins used for the breakout example
#define BREAKOUT_RESET  9      // VS1053 reset pin (output)
#define BREAKOUT_CS     10     // VS1053 chip select pin (output)
#define BREAKOUT_DCS    8      // VS1053 Data/command select pin (output)
// These are the pins used for the music maker shield
#define SHIELD_RESET  -1      // VS1053 reset pin (unused!)
#define SHIELD_CS     7      // VS1053 chip select pin (output)
#define SHIELD_DCS    6      // VS1053 Data/command select pin (output)

// These are common pins between breakout and shield
#define CARDCS 4     // Card chip select pin
// DREQ should be an Int pin, see
#define DREQ 3       // VS1053 Data request, ideally an Interrupt pin

Adafruit_VS1053_FilePlayer musicPlayer = 
  // create breakout-example object!
  // create shield-example object!
void setup() {
  Serial.println("Adafruit VS1053 Simple Test");

  if (! musicPlayer.begin()) { // initialise the music player
     Serial.println(F("Couldn't find VS1053, do you have the right pins defined?"));
     while (1);
  Serial.println(F("VS1053 found"));
   if (!SD.begin(CARDCS)) {
    Serial.println(F("SD failed, or not present"));
    while (1);  // don't do anything more

  // list files
  printDirectory("/"), 0);
  // Set volume for left, right channels. lower numbers == louder volume!

  // Timer interrupts are not suggested, better to use DREQ interrupt!
  //musicPlayer.useInterrupt(VS1053_FILEPLAYER_TIMER0_INT); // timer int

  // If DREQ is on an interrupt pin (on uno, #2 or #3) we can do background
  // audio playing
  musicPlayer.useInterrupt(VS1053_FILEPLAYER_PIN_INT);  // DREQ int
  // Play one file, don't return until complete
  Serial.println(F("Playing track 001"));
  // Play another file in the background, REQUIRES interrupts!
  Serial.println(F("Playing track 002"));

void loop() {
  // File is playing in the background
  if (musicPlayer.stopped()) {
    Serial.println("Done playing music");
    while (1) {
      delay(10);  // we're done! do nothing...
  if (Serial.available()) {
    char c =;
    // if we get an 's' on the serial console, stop!
    if (c == 's') {
    // if we get an 'p' on the serial console, pause/unpause!
    if (c == 'p') {
      if (! musicPlayer.paused()) {
      } else { 


/// File listing helper
void printDirectory(File dir, int numTabs) {
   while(true) {
     File entry =  dir.openNextFile();
     if (! entry) {
       // no more files
     for (uint8_t i=0; i<numTabs; i++) {
     if (entry.isDirectory()) {
       printDirectory(entry, numTabs+1);
     } else {
       // files have sizes, directories do not
       Serial.println(entry.size(), DEC);

Code I used for Cardinfo (I also tried SdInfo from the SdFat library; and I tried different card select pins (it's 7 according to the Adafruit example sketch), as well as pinMode and digitalWrite the SS pins (tried both 10 and 53) to high.

  SD card test

  This example shows how use the utility libraries on which the'
  SD library is based in order to get info about your SD card.
  Very useful for testing a card when you're not sure whether its working or not.

  The circuit:
    SD card attached to SPI bus as follows:
 ** MOSI - pin 11 on Arduino Uno/Duemilanove/Diecimila
 ** MISO - pin 12 on Arduino Uno/Duemilanove/Diecimila
 ** CLK - pin 13 on Arduino Uno/Duemilanove/Diecimila
 ** CS - depends on your SD card shield or module.
       Pin 4 used here for consistency with other Arduino examples

  created  28 Mar 2011
  by Limor Fried
  modified 9 Apr 2012
  by Tom Igoe
// include the SD library:
#include <SPI.h>
#include <SD.h>

// set up variables using the SD utility library functions:
Sd2Card card;
SdVolume volume;
SdFile root;

// change this to match your SD shield or module;
// Arduino Ethernet shield: pin 4
// Adafruit SD shields and modules: pin 10
// Sparkfun SD shield: pin 8
const int chipSelect = 10;

void setup() {
  // Open serial communications and wait for port to open:
  while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB port only

  Serial.print("\nInitializing SD card...");

  // we'll use the initialization code from the utility libraries
  // since we're just testing if the card is working!
  if (!card.init(SPI_HALF_SPEED, chipSelect)) {
    Serial.println("initialization failed. Things to check:");
    Serial.println("* is a card inserted?");
    Serial.println("* is your wiring correct?");
    Serial.println("* did you change the chipSelect pin to match your shield or module?");
    while (1);
  } else {
    Serial.println("Wiring is correct and a card is present.");

  // print the type of card
  Serial.print("Card type:         ");
  switch (card.type()) {
    case SD_CARD_TYPE_SD1:
    case SD_CARD_TYPE_SD2:

  // Now we will try to open the 'volume'/'partition' - it should be FAT16 or FAT32
  if (!volume.init(card)) {
    Serial.println("Could not find FAT16/FAT32 partition.\nMake sure you've formatted the card");
    while (1);

  Serial.print("Clusters:          ");
  Serial.print("Blocks x Cluster:  ");

  Serial.print("Total Blocks:      ");
  Serial.println(volume.blocksPerCluster() * volume.clusterCount());

  // print the type and size of the first FAT-type volume
  uint32_t volumesize;
  Serial.print("Volume type is:    FAT");
  Serial.println(volume.fatType(), DEC);

  volumesize = volume.blocksPerCluster();    // clusters are collections of blocks
  volumesize *= volume.clusterCount();       // we'll have a lot of clusters
  volumesize /= 2;                           // SD card blocks are always 512 bytes (2 blocks are 1KB)
  Serial.print("Volume size (Kb):  ");
  Serial.print("Volume size (Mb):  ");
  volumesize /= 1024;
  Serial.print("Volume size (Gb):  ");
  Serial.println((float)volumesize / 1024.0);

  Serial.println("\nFiles found on the card (name, date and size in bytes): ");

  // list all files in the card with date and size | LS_DATE | LS_SIZE);

void loop(void) {

I do not see how you resolve the difference in the locations of the SPI pins between the Uno that the shield was meant for and the Mega. The Uno has the SPI pins on pins 11, 12 and 13. The SPI pins on the Mega are 50, 51 and 52.

Hi thanks for the reply. The Adafruit tutorial is using the ICSP 2x3 header for that. It says to solder the ICSP jumpers on the shield if you were using a Mega (the ones saying MISO, SCK, MOSI on the shield)

Sorry I forgot to post pictures of my setup. Here's the shield.

OK, I see.

It shouldn't cause a problem in this case because you are not using Pins 11-13 but when you soldered the jumpers to connect MOSI, MISO, and SCK to the ICSP header you should probably cut the traces that jumper them to Pins 11, 12, and 13.

Thanks for the heads up :smiley: