Home Forums Sparkfun MP3 Shield Library Support Forum Sound isn't working :(

Tagged: 

Viewing 15 posts - 1 through 15 (of 26 total)
  • Author
    Posts
  • #1718
    Anonymous
    Inactive

    Hey guys, I can’t figure out why I can’t hear the music being played after I load the program onto the Arduino. I am using Sparkfun’s Mp3 player shield, and the library from your site. When I upload the program, I don’t get any errors, but the sound simply isn’t heard. I am using headphones and the headphone jack. I cleared everything off of the micro SD card except one file called “track001.mp3” just as is recommended and it’s bitrate 192 kbps also (like its supposed to be). I figured if I had messed up something, the program wouldn’t have compiled correctly, but it does, and it loads to the Arduino. Yet, no sound. I am using Arduino BT with Atmega 328
    Any ideas here?

    #1719

    Note to reset it after the Serial Port is already established. Some error prints may be missed just after boot. but before you may have enabled the serial port.

    Is the Serial input/output unresponsive, after you execute the play? Assuming your are entering “1” to play track001.mp3. If unresponsive then its locked up on an interrupt. Not sure what then.

    Otherwise; Does the “d” command verify that it can read the SdCard and show the correct filenames expected?

    Try the test files as provided by SFE. They are bells and symbols crashes. quick to test. These are nice as they are Immediately LOUD. I wonder if your track001 ramps up the volume. And you are not hearing the initial 1 second of the first refill() being a quite lead in. And subsequent refill()’s are not happening. if you enter 1 repeatidly the repeaded refill() will increament play 1s at a time. confirming this.

    The latest version has a SineWave Test. “t” will toggle a clear sinewave tone on or off. Not needing a file. You should hear that. Also try “t” after you have started a file to play. If it is actually trying to play it, it will print an error message. If not then its not playing, then the file is over.

    Are the files really mp3. Their may be an issue where it does not play files that are not mp3 but have the extension of filename.mp3. The code may not play it if it reads bad ID3 Tag info of mp3 files, if falsely finds it. (doubt this).

    Assuming it is Italian Arduino BlueTooth. I do SEE D7 is a conflict between MP3-DCS and BT_RESET. Both you it as an output, so it should compile. And likely work. Where I would expect any actual playing of sound would cause the BT chip to reset. and you loose your serial data. but I would suspect it still actually play. Regardless of the BT.

    I would bend D7 out when stacking, as not to seat in the header, then jumper D7 on the SFEMP3Shield to D5 and change the SFEMP3ShieldConfig.h #define MP3_XDCS from 7 to 5. This removes the BT_RESET issue.

    Hope one of the above solves it.

    Let me know which one. (if)

    #1752
    Anonymous
    Inactive

    This is the file that I am using:

    #include <SPI.h>
    #include <SdFat.h>
    #include <SdFatUtil.h>
    #include <SFEMP3Shield.h>

    SFEMP3Shield MP3player;

    void setup() {

    Serial.begin(115200);

    //start the shield
    MP3player.begin();

    //start playing track 1
    MP3player.playTrack(1);
    }

    //do something else now
    void loop() {

    Serial.println(“I’m bored!”);
    delay(2000);

    }

     

    I’m not sure what you mean about hitting the 1 key or D, do you mean on the Serial monitor? Because for whatever reason, my serial monitor gives me a COM3 port error yet it still is loading programs to the board using COM3 as Arduino.  I thought that the set up function took care of hitting play because …”MP3player.playTrack(1);” so i figured once the program loaded to the Arduino the file would automatically play because of the set up function.
    Also, I’m not sure what you mean by resetting the serial port. I always hit the reset button just before I upoad any file (I have to do this for the Arduino BT).
    The files are really mp3, I checked under properties when I right click the file and it is 192 kbps as it is supposed to be.
    The last part you said… “Assuming it is Italian Arduino BlueTooth. I do SEE D7 is a conflict between MP3-DCS and BT_RESET. Both you it as an output, so it should compile. And likely work. Where I would expect any actual playing of sound would cause the BT chip to reset. and you loose your serial data. but I would suspect it still actually play. Regardless of the BT.. I would bend D7 out when stacking, as not to seat in the header, then jumper D7 on the SFEMP3Shield to D5 and change the SFEMP3ShieldConfig.h #define MP3_XDCS from 7 to 5. This removes the BT_RESET issue.” is basically a different language to me.
    I am very new at Arduino, this is my first project and I need explicit instructions like if I was a chimpanzee you are teaching Japanese to.. lol. I wonder if I just set up the library wrong? But in this case, why aren’t I getting any sort of error message? I put the library that i got from this site in the libraries folder of Arduino IDE (seems simple enough). Do I need to put anything on the SD card other than the mp3?

    Thank you so much for helping me. and if all goes well, I will make a decent monitary contribution to this website for all of the help.

    #1753

    Yes, I do mean the Serial Monitor.

    I can tell you your sketch works just fine on a normal Arduino using version 01.00.02 of this driver . I have just ran it. (note the most recent version on my mpflaga’s github has some difference’s stick to 1.0.2 for now, as on Bill’s github).

    In your code above the music automatically plays, with out Serial Monitor interaction. In the MP3Shield_Library_Demo.ino it does not, requiring user input via the Serial Monitor. Hence from the Serial Monitor user input is needed from its menu. 1 and d are such menu commands.

    There are many Arduino’s and clones out there. So it is hard to know what the problem is. Hence, my statements “Italian” referring to the original design versus some clone (which may have differences). Where most all Arduino’s are similar, but there some subtle differences. Such as: a Seeeduino Arduino may have different pin uses then a Original (Italian) Arduino. I don’t have a ArduinoBT to test it out on and not sure if it would be the same as yours. Where I dosee a difference between normal USB/Serial and the original “Arduino BlueTooth” . In that D7 is not open for general use. Rather it is tied to the BT’s reset.

    Using an Arduino BlueTooth add’s extra challenges, likely the problem here. In a Normal Arduino the USB to Serial Port chip (aka FTDI) will automatically reset the Arduino’s CPU when the Serial Port’s DTR is toggled at connection of the Serial Monitor or other Serial Device. And out of boot the Arduino’s kernel looks for a special message as to upload. And if it does not get it and times out it runs the code already loaded. Where your ArduinoBT does not have this USB to Serial chip, but rather has a BlueTooth to Serial chip and it does not reset the CPU when the Serial Port is connected. Hence you need to manually hit the reset button, when loading. Also you can hit the reset after reloading, and it should time out and just run on. Allowing you to see all the prints, from the just out of reset. Normally these can happen before the Serial Monitor is fully displayed and be missed.

    Additionally you need to match the Baud Rates. If I recall with the BT chip you need to be exactly at its baudrate. It may not be initially 115200, but likely either 57600 (aka 56K) or possibly 9600.

    You likely have TWO problems.

    First the COM3 error. This nothing to do with this Library. Have you been able to run other Arduino Code with Serial Ports. Such as …\examples4.Communication\ASCIITable\ASCIITable.ino It will stream out the ASCII table over the Serial Monitor. Likely your COM3 is used by something else, in addition to the Virtual Serial Port created by the BT driver. Try changing COM port to a different value.

    Normally the IO pin D7 on most Arduino’s are free to use for anything. And the SparkFun MP3 Player Shield uses D7 as the XDCS signal. However, the ArduinoBT (likely yours) has D7 hard wired to the Reset of the BT chip. Hence when ever the MP3 driver sends data(music) to the MP3 chip the BT chip will get its reset pin toggled. Not good. Hence we need to re-route the XDCS function away from D7 and to the next unused pin, D5. This is a hard-mode and can be done with out cutting or soldering. Rather bending and jump wires. Bend the MP3 SHields D7 pin so that it wont mate to the Arduino’s header. This will separate the the MP3’s XDCS from base Arduino’s D7. Then changing the SFEMP3ShieldConfig.h MP3_XDCS from 7 to 5:

      #define MP3_XDCS             7 //Data Chip Select / BSYNC Pin
    to
      #define MP3_XDCS             5 //Data Chip Select / BSYNC Pin

    routes the XDCS signal to the unused D5 pin of the Arduino base board. Then on the MP3 Player Shield using a jump wire, jump D5 to D7 on the Shield. This then routes the XDCS signal from the base Arduino’s D5 back into the MP3 Player Shield’s XDCS input.

    I believe 1.00.02 to be stable and best at the moment. With its example opening messages and error responses. But you need to get the opening messages first before moving on with the playback. Otherwise it is just guessing, what is wrong.  I always take things step by step.

    Note there are more then one difference here, and that makes it more complicated for debugging. Hence the step by step. However, these extra complexities may make it worth getting a regular UNO for initial learning. Until you become more confident of typical Arduino’s and the hassles added by BT. I have several. Always good to have others for references, in case one breaks or gets weird.

    P.S. Feel free to donate to Bill’s causes. However, I am separate from his causes. Just helping out.

    #1755
    Anonymous
    Inactive

    Okay, I used the test files you sent me and the first track is the only thing on the entire SD card. Also, I didn’t bend the headers’ PIN 7, instead I just shifted everything to the left by one. Now, the header has one pin just shooting down the outside of the MP3 player shield to the left of PIN 0. As a result, the 8 pin header is only matching with 7 pins: PIN 0-6.  That way PIN 7 is left alone. Will this achieve the same result? (yes, I have the Italian Arduino BT)

    Also, I am not sure what you mean about “Then on the MP3 Player Shield using a jump wire, jump D5 to D7 on the Shield. This then routes the XDCS signal from the base Arduino’s D5 back into the MP3 Player Shield’s XDCS input.” It seems like the problem lies not in the software, as I think that is all set up correctly. Perhaps I just didn’t set up the hardware correctly. All I have done as far as hardware is connect the MP3 Player Shield to the Arduino BT using two 6 Pin headers and two 8 Pin headers. And like I said above, due to your advice, I shifted the header 1 to the left so that it no longer correponds to Pins 0-7, but only to include Pins 0-6, leaving 7 alone and 1 header pin pole outside of the MP3 Player Shield hanging to the left of PIN 0. Aside from that, I just have the 5 volts and GND coming from the breadboard into the spots on the Mp3 Player shield into the headers. So literally, the only wires I’ve connected are the ground and Vin, nothing else. Alth0ugh later I am going to use a few Pins for LEDs but I dont think that matters.

    Oh, and I also changed that file like you said, it is now corresponding to pin 5.

    #1756
    Anonymous
    Inactive

    Also, I am hearing a little clicking in my headphones now. It seems like its trying to play the file but it can’t and as a result, I hear a little “play button” kind of clicking whenever I hit the reset button and the program restarts

    #1757
    Anonymous
    Inactive

    Whoa, okay I feel like an idiot… In this video:  http://www.youtube.com/watch?v=K0uH6B3T5rc

    I can clearly see a red power light. But that is not the case for me. Could it really be that somehow the shield isn’t getting power. I dont understand why it wouldn’t as I have 5 volts going into Vin and I have ground connected too

     

    #1758
    Anonymous
    Inactive

    Whats weird is that I am giving the power through the headers on top of the MP3 Player Shield and the Arduino is beneath it. The Arduino has its power and light on, but the MP3 Player Shield has yet to show me a red power light… could it be a defective shield?

    #1759
    Anonymous
    Inactive

    Do i actually need to solder the headers onto the chip itself? I figured since the header polls are touching the circular metal rims of the mp3 player shield, the shield would still get electricity.

    #1760

    Un-power, disconnect shield.
    Your description of mis-alignment can damage
    I will try to get a picture , later
    When i am back at computer

    Have you cleared up the com port problem? to get serial fata back and forth

    #1761
    Anonymous
    Inactive

    Okay I disconnected everything. Yes, the com port problem is fixed. I think the shield might just be broken, it doesn’t make sense that my power light doesnt even turn on. it is definitely getting a voltage. Not sure what you mean by misalignment

    #1763

    here is a youtube video of the recommend modifications SFE MP3 Player D7 to D5 adaption. if a picture is worth a thousand words then a video is more.

    Yes, The LED should be on. it is direct feed from Shields 3V regulator that is feed from the base Arduino 5V pin. It likely may be off due to the pins being shifted (miss-aligned). Have you seen the Red LED on the Shield on? (ever?).

    The clicking could be many things, causing the output to pulse. There is no play button like sounds that it creates on its own. Likely a capacitive build up that is oscillating. The Shield will/should only play the file sent to it, as by the Arduino. So such sounds are not desired.

    You should not need to solder anything to the VS1053 chip itself. But you will need header pins on the shields as to connect to the base Arduino. And it too will need header receptacles on the base ArduinoBT, if they are not there. It is possible to buy versions of the Arduino’s with or with out these header receptacles. And the SFE MP3 Player Shield comes with out them. Hence they need to be bought. A local RadioShack may have them.

    Units are supplied without the headers as some customers don’t use the mechanics of shield structure but want to directly solder wires in there cases, or what ever.

    Note the header pins on the shield are actually header receptacles, with very long pins that protrude through the bottom of the Shield as pins. Making them stackable headers. You can see this during the video. Note: the ICSP connectors male to female relationship is opposite of connection between shields.

    Your description “the header polls are touching the circular metal rims of the mp3 player shield” is a likely source of the power not, illuminating the LED. Normally the Base Arduino has Female/Receptacles soldered to it, as to receive the male header pins from the attaching shield. As show in this picture, of two shields stacked, with out the bottom base Arduino.

    Pins touching the annular rings of the solder pads are not sufficient. Either a solder connections of wires or solder connections to a good header/connector that applies the appropriate contact pressure, is required.

    Note: there are various embedded web links are in this document, linking to referenced pictures and such.

     

    #1764
    Anonymous
    Inactive

    You’re right, this is a lot better. This is my video response:  http://www.youtube.com/watch?v=x0hfraa9sk8&feature=youtu.be

    What you said about the clicking being an electrical pulse makes sense.

    I tried using the +5 v pin and the +3.3v pins with different GND pins and every possible combination to power this thing. including directly on the Arduino BT board that has a place with no pins or headers. Nothing has made that LED come on, and I’ve never seen it come on either

    #1765
    Anonymous
    Inactive

    Wrong URL. Here it is : http://www.youtube.com/watch?v=tHFhCajoiCg

     

    #1766

    Your YouTube’s are marked private.

    I did notice the ArduinoBT’s power header is short 2 pins. the 3.3V and CPU reset. These are not needed by the MP3 Shield. So direct connection and proper power should result in the Red LED being on.

    Have you measured some voltages locally to the shield using a voltmeter?

Viewing 15 posts - 1 through 15 (of 26 total)
  • You must be logged in to reply to this topic.