VS1053 not found on Arduino Micro

For other supported Arduino products from Adafruit: Shields, accessories, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
gozaro
 
Posts: 28
Joined: Mon Feb 24, 2014 11:02 am

VS1053 not found on Arduino Micro

Post by gozaro »

Hi,

I’m following this wiring diagram, found in the Adafruit learning system, to make work VS1053B with Arduino Micro:
https://learn.adafruit.com/adafruit-vs1 ... yer-wiring

And the following code found here:
http://votsh.files.BANNED.com/2014/0 ... ctions.pdf

When running the program I get in monitor: “VS1053 not found”

Has anyone go through the same problem?

Salutations,
Gonzalo

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: VS1053 not found on Arduino Micro

Post by adafruit_support_rick »

Please post clear, detailed pictures of the vs1053, showing your soldering.
Also post pictures showing your connections to the Micro

User avatar
gozaro
 
Posts: 28
Joined: Mon Feb 24, 2014 11:02 am

Re: VS1053 not found on Arduino Micro

Post by gozaro »

Hi,

I have been looking at the wire and soldering and I think that I found the problem, Anyway a post images:

Image
Image

I found that the code mentioned didn’t work well at the Arduino 1.0.5. Seems that init() can not be use as a function, and the code to work needs to have the loop() function.

So I try to fix it, here is my version:

Code: Select all

#include <SPI.h>
#include <SD.h>
#include <Adafruit_VS1053.h>

#define CLK 9 // SPI Clock, shared with SD card
#define MISO 11 // Input data, from VS1053/SD card
#define MOSI 10 // Output data, to VS1053/SD card
#define RESET 13 // VS1053 reset pin (output)
#define CS 10 // VS1053 chip select pin (output)
#define DCS 8 // VS1053 Data/command select pin (output)
#define DREQ 4 // VS1053 Data request pin (into Arduino)
#define CARDCS 6 // Card chip select pin

Adafruit_VS1053_FilePlayer musicPlayer = Adafruit_VS1053_FilePlayer(RESET, CS, DCS, DREQ, CARDCS);


void setup() {

  Serial.begin(9600);
  
  
  while (!Serial) {
  
   ; // wait for serial port to connect. Needed for Leonardo only
  
   }
  
   iniciar();
}


void iniciar() {

   // initialise the music player

   if (!musicPlayer.begin()) {
     Serial.println("VS1053 not found");
   }
  
   SD.begin(CARDCS); // initialise the SD card
  
   musicPlayer.setVolume(20,20);
   musicPlayer.useInterrupt(VS1053_FILEPLAYER_PIN_INT); // DREQ int
  
   musicPlayer.sineTest(0x44, 500); // Make a tone to indicate VS1053 is working 
   musicPlayer.playFullFile("SetUp.mp3");

}

void loop() {


}
The problem comes when running the code. Seems that the mp3 files are not playing but the tone test works (musicPlayer.sineTest(0x44, 500)) so it makes me think that the problem is not because the wiring.

Any idea why mp3 files are not playing?

And also: why I need to open the monitor serial to get the tone test?

Sorry for my English.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: VS1053 not found on Arduino Micro

Post by adafruit_support_rick »

Gozaro wrote:Any idea why mp3 files are not playing?
You haven't initialized the SD card:

Code: Select all

  SD.begin(CARDCS);    // initialise the SD card
Gozaro wrote: And also: why I need to open the monitor serial to get the tone test?
Because you are doing a wait for the Serial port to open in setup(). You can't get past this while loop until you open the Serial Monitor (the Micro and the Leonardo have the same processor):

Code: Select all

  while (!Serial) {
  
   ; // wait for serial port to connect. Needed for Leonardo only
  
   }

User avatar
gozaro
 
Posts: 28
Joined: Mon Feb 24, 2014 11:02 am

Re: VS1053 not found on Arduino Micro

Post by gozaro »

Thank you very much for your reply.

I already had SD.begin(CARDCS); in the iniciar() function.

I have put SD.begin(CARDCS); in the setup function and take out “while (!Serial)”
But it didn’t work. The new Code that uploaded is here:

Code: Select all

#include <SPI.h>
#include <SD.h>
#include <Adafruit_VS1053.h>

#define CLK 9 // SPI Clock, shared with SD card
#define MISO 11 // Input data, from VS1053/SD card
#define MOSI 10 // Output data, to VS1053/SD card
#define RESET 13 // VS1053 reset pin (output)
#define CS 10 // VS1053 chip select pin (output)
#define DCS 8 // VS1053 Data/command select pin (output)
#define DREQ 4 // VS1053 Data request pin (into Arduino)
#define CARDCS 6 // Card chip select pin

Adafruit_VS1053_FilePlayer musicPlayer = Adafruit_VS1053_FilePlayer(RESET, CS, DCS, DREQ, CARDCS);


void setup() {

  Serial.begin(9600);
  SD.begin(CARDCS);
  
  /*
  while (!Serial) {
  
   ; // wait for serial port to connect. Needed for Leonardo only
  
   }
  */
  
   iniciar();
}


void iniciar() {

   // initialise the music player
  
   if (!musicPlayer.begin()) {
     Serial.println("VS1053 not found");
   }
  
   SD.begin(CARDCS); // initialise the SD card
  
   musicPlayer.setVolume(20,20);
   musicPlayer.useInterrupt(VS1053_FILEPLAYER_PIN_INT); // DREQ int
  
   musicPlayer.sineTest(0x44, 500); // Make a tone to indicate VS1053 is working 
   musicPlayer.playFullFile("SetUp.mp3");

}

void loop() {

}

When running the code in Arduino it makes a strange click but nothing else happens.

Any suggestion?

I had every thing working in the Arduino Uno before, I thinking dropping out Arduino Micro way and came back to Uno.

Do you think it will be easier to use Arduino Pro Micro?

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: VS1053 not found on Arduino Micro

Post by adafruit_support_rick »

You are setting the player to use the DREQ interrupt. But you have DREQ defined as pin 4. The Micro does not have an external interrupt on pin 4. You must use pin 2 or 3 for DREQ.

User avatar
gozaro
 
Posts: 28
Joined: Mon Feb 24, 2014 11:02 am

Re: VS1053 not found on Arduino Micro

Post by gozaro »

Ok I have set up DREQ on pin 3 and I can hear the sineTest but the Mp3 is not playing...

musicPlayer.playFullFile("SetUp.mp3");

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: VS1053 not found on Arduino Micro

Post by adafruit_support_rick »

OK, I tried duplicating your problem. Connecting reset to Pin 13 seems to confuse it. I had your code working like this:

Code: Select all

#define RESET 9 // VS1053 reset pin (output)
#define CS 10 // VS1053 chip select pin (output)
#define DCS 8 // VS1053 Data/command select pin (output)
#define DREQ 3 // VS1053 Data request pin (into Arduino)
#define CARDCS 4 // Card chip select pin

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Arduino products from Adafruit”