0

Adafruit "Music Maker" MP3 Shield Doesn't Make Play Anything
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Adafruit "Music Maker" MP3 Shield Doesn't Make Play Anything

by Dog1111111 on Sat Nov 18, 2017 5:01 pm

I just purchased a Music Maker shield and it does not work at all. I can read from the SD card and I can load the shield but no noise comes out.

I tried using this line of code to see if the shield could output any audio and it doesn't do anything.
musicPlayer.sineTest(0x44, 500);

Here is the program I am testing with:
Code: Select all | TOGGLE FULL SIZE
#include <SPI.h>
#include <Adafruit_VS1053.h>
#include <SD.h>

#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)


#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 http://arduino.cc/en/Reference/attachInterrupt
#define DREQ 3       // VS1053 Data request, ideally an Interrupt pin

Adafruit_VS1053_FilePlayer musicPlayer = Adafruit_VS1053_FilePlayer(SHIELD_RESET, SHIELD_CS, SHIELD_DCS, DREQ, CARDCS);



int n_files;
int led = 9;


void setup()

  Serial.begin(9600);
  Serial.println("Ready, Start!");
 
  pinMode(led, OUTPUT);
  pinMode(2,INPUT_PULLUP);
 
  // initialise the music player
  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 chip found..."));

  Serial.println("Playing note");
  musicPlayer.setVolume(1,1);
 
  musicPlayer.sineTest(0x44, 500);

  musicPlayer.sineTest(0x44, 500);

  musicPlayer.sineTest(0x44, 500);

  delay(6000);
 
  musicPlayer.sineTest(0x44, 500);    // Make a tone to indicate VS1053 is working

  if (!SD.begin(CARDCS)) {
    Serial.println(F("SD failed, or not present"));
    while (1);  // don't do anything more
  }
 
  Serial.println("SD Card Loaded...");
  Serial.println();

  n_files = countMP3File(SD.open("/"));

  Serial.print("Number of MP3 files: ");
  Serial.println(n_files);
  Serial.println();
}

int countMP3File(File dir)
{
  int counter = 0;
 
  Serial.println("Listing files:");

  while(true)
  {
    File entry = dir.openNextFile();
    if (! entry)
    {
      dir.rewindDirectory();
      break;
    }

    Serial.println(entry.name());

    counter++;

    entry.close();
  }

  dir.close();

  Serial.println();
  return counter;
}


void loop()
{
  int i, rand_song;

  Serial.print("Motion Sensor Val: ");
  Serial.println(digitalRead(2));

  if (true)//digitalRead(2) == 0)
  {
    File folder = SD.open("/");
    File random_file;
   
    rand_song = random(0, n_files)+1;

    folder.rewindDirectory(); 

    random_file = selectFileN(rand_song, folder);

    folder.close();
   
    Serial.print("Playing: ");
    Serial.println(random_file.name());
   
    // smoke machine
    //digitalWrite(led, LOW);
   
    if(!musicPlayer.playFullFile(random_file.name()))
    {
      Serial.println("Could not open mp3 file");
    }
    random_file.close();
   
    // stop smoke machine
    //digitalWrite(led, HIGH);   
   
    Serial.println("Waiting 6 sec...");
    delay(6000);
  }
 
 
  Serial.println();
  delay(100);
}

File selectFileN(int number, File dir)
{
  int counter = 0;
  File return_entry;

  while(true)
  {
    File entry = dir.openNextFile();
    if (! entry)
    {
      //Serial.println("Last file reached");
      dir.rewindDirectory();
      break;
    }

    //Serial.println(entry.name());

    counter++;

    if(counter==number)
    {
      return_entry = entry;
      dir.rewindDirectory();
      break;
    }

    entry.close();
  }
  return return_entry;
}


Most of the code does not work. I do not insert an micro SD.
I am just trying to get a noise from the sine test to work and I get nothing.
I am using an arduino uno and 4ohm 3 watt speakers.
Attachments
IMG_4529.JPG
IMG_4529.JPG (129.73 KiB) Viewed 135 times
IMG_4527.JPG
IMG_4527.JPG (109.86 KiB) Viewed 135 times
IMG_4526.JPG
IMG_4526.JPG (121.33 KiB) Viewed 135 times

Dog1111111
 
Posts: 3
Joined: Sat Nov 18, 2017 4:44 pm

Re: Adafruit "Music Maker" MP3 Shield Doesn't Make Play Anyt

by adafruit_support_mike on Sat Nov 18, 2017 5:39 pm

I see some exposed gold on some of the PCB pads for the pin header, which often means the pin isn’t making a good electrical connection.

Take a look at our soldering tutorial:

https://learn.adafruit.com/adafruit-gui ... ring/tools

and give the joints another pass with a bit ot flux.

adafruit_support_mike
 
Posts: 45751
Joined: Thu Feb 11, 2010 2:51 pm

Re: Adafruit "Music Maker" MP3 Shield Doesn't Make Play Anyt

by Dog1111111 on Sat Nov 18, 2017 8:10 pm

So I went over all the pins and got rid of all the gold. But there is still no noise playing when I run the program. I cannot figure out what is wrong.
Here are two pictures of the new sodder:
Attachments
b.JPG
b.JPG (120.21 KiB) Viewed 117 times
a.JPG
a.JPG (123.22 KiB) Viewed 117 times

Dog1111111
 
Posts: 3
Joined: Sat Nov 18, 2017 4:44 pm

Re: Adafruit "Music Maker" MP3 Shield Doesn't Make Play Anyt

by adafruit_support_mike on Wed Nov 22, 2017 4:21 am

Those joints look good.

What kind of Arduino are you using under the Music Maker?

adafruit_support_mike
 
Posts: 45751
Joined: Thu Feb 11, 2010 2:51 pm

Re: Adafruit "Music Maker" MP3 Shield Doesn't Make Play Anyt

by Dog1111111 on Wed Nov 22, 2017 4:01 pm

A Arduino UNO

Dog1111111
 
Posts: 3
Joined: Sat Nov 18, 2017 4:44 pm

Re: Adafruit "Music Maker" MP3 Shield Doesn't Make Play Anyt

by adafruit_support_mike on Thu Nov 23, 2017 12:58 am

That should work with the default SPI connections.

Looking back at the photos, I see what might be a bit of solder shorting one of the control signals:

b.JPG
b.JPG (64.58 KiB) Viewed 57 times
Check to see if the resistor in the center is shorted, and if it is, remove the short.

adafruit_support_mike
 
Posts: 45751
Joined: Thu Feb 11, 2010 2:51 pm

Please be positive and constructive with your questions and comments.