Home Forums Sparkfun MP3 Shield Library Support Forum Issues with SparkFun MP3 Shield and Arduino UNO R3

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2087
    Anonymous
    Inactive

    Apologies in advance if I’m missing something obvious or doing something dumb, but I haven’t been able to get my SparkFun MP3 Player Shield to play MP3 tracks yet.  I have tried to carefully follow the threads on this site and on the SparkFun site, but no luck so far.

    Here’s my system configuration:

    • Arduino UNO R3
    • SparkFun MP3 Player Shield (is there only one rev of the board?)
    • iMac running MacOS 10.6.8
    • Arduino IDE 1.0.3 (for Mac)
    • 2Gbyte SanDisk microSD card
    • 16Gbyte SanDisk microSD card

    Here’s what I have done so far:
    • I exported a few MP3 tracks at 192kbps from my Mac and transferred the resulting MP3 files to a flash drive.
    • I renamed the MP3 tracks to “track001.mp3”, “track002.mp3”, etc.
    • I copied the MP3 tracks to the root of a FAT32 formatted 2Gbyte SanDisk microSD card
    • Per Bill Porter’s site, I also copied the contents of the “plugins” folder to the root of the 2Gbyte SanDisk microSD card.
    • I opened the “MP3Shield_Library_Demo” example sketch in the Arduino IDE.
    • I compiled and uploaded the sketch (successfully) to the Arduino UNO R3 board from my Mac.
    • I removed the USB cable to power down the Arduino UNO R3 board, then plugged in the SparkFun MP3 Player Shield.
    • I powered both boards (UNO R3 and SpF MP3) by plugging the USB cable back in.
    • I opened the Serial Monitor on the Mac, and saw the following (I pressed the “Reset” button on the Arduino board a few times):

    CFree RAM = 1070 Should be a base line of 1095, on ATmega328 when using INTx
    Can’t access SD card. Do not reformat.
    No card, wrong chip select pin, or SPI problem?
    SD errorCode: 0X1,0X0
    Free RAM = 1070 Should be a base line of 1095, on ATmega328 when using INTx
    Can’t access SD card. Do not reformat.
    SD errorCode: 0XF,0X0
    Free RAM = 1070 Should be a base line of 1095, on ATmega328 when using INTx
    Can’t access SD card. Do not reformat.
    No card, wrong chip select pin, or SPI problem?
    SD errorCode: 0X1,0X0
    Free RAM = 1070 Should be a base line of 1095, on ATmega328 when using INTx
    Can’t access SD card. Do not reformat.
    No card, wrong chip select pin, or SPI problem?
    SD errorCode: 0X1,0X0
    Free RAM = 1070 Should be a base line of 1095, on ATmega328 when using INTx
    Can’t access SD card. Do not reformat.
    No card, wrong chip select pin, or SPI problem?
    SD errorCode: 0X1,0X0

    I tried reseating the microSD card several times.  The microSD card is working fine in the adapter I’m using to copy the MP3 files and the contents of the “plugins” folder.

    Do the errors above possibly indicate a hardware issue with the SpF MP3 board?  Perhaps an issue with the microSD connector itself?

    Any assistance you can provide would be appreciated — I’m stumped!

    Thanks,

    Miles Brown

    #2088

    Not enough to blame the shield. All you can say is the SdCard is not initializing.

    I often get the same errors and strangely I find a solution is to swap cards between my laptop and exercise them and then swap them back. There must be some form of latch up, that is drained. Where I do think my MP3 shield is getting old and its connector is severely past its cycle life, several times a day for the past six months. May want to inspect the inside and ensure there is no debris.

    I will put on my ToDo list an Example to test the MP3 aside from the SdCard. But won’t get to that shortly. but an alternative is to change the following lines to the below. Commenting out the ErrorHalt.

    //Initialize the SdCard.

    if(!sd.begin(SD_SEL, SPI_HALF_SPEED)); //sd.initErrorHalt();

    if(!sd.chdir(“/”));// sd.errorHalt(“sd.chdir”);

    Allowing the script to continue. There will be some warnings. but you should be able then run the “t” command to test the sinewave output. Indicating the MP3 chip itself is good.

    Also you do not want any other cards or things using the SPI bus that are not disabled. Using an Ethernet Shield connected but not having its CS pin disabled will cause this symptom.

    #2090
    Anonymous
    Inactive

    I tried your suggestion of exercising the microSD card.  It seemed to work initially — after doing the following I was able to successfully use the MP3 Shield for the first time:

    • Plugged the microSD card into a USB adapter and then into a PC.

    • Copied all the files (.mp3, patches, etc.) to a folder on my computer’s desktop.

    • Deleted the files from the microSD card, then reformatted the card (FAT32).

    • After formatting, copied the files back onto the microSD card and ejected the card.

    • Reinserted the microSD card into the MP3 Shield and everything worked — until I unplugged the Arduino UNO R3 / MP3 Shield and plugged it back in a few minutes later.  Then it was back to the same behavior as before.

    I then tried the same process again (using a different WinXP machine), but it didn’t seem to help.  Still seeing:

    Free RAM = 1070 Should be a base line of 1095, on ATmega328 when using INTx

    Can’t access SD card. Do not reformat.

    No card, wrong chip select pin, or SPI problem?

    SD errorCode: 0X1,0X0

    I tried reformatting the 2Gbyte microSD card as FAT(16) instead of FAT32, but that didn’t seem to help either.

    There are no other shields involved — just the Arduino UNO R3 and the MP3 Shield, so there shouldn’t be any pin contention issues.  I’ll try commenting out the ErrorHalt and see if that helps clarify what is going on.

    Any other suggestions appreciated — seems odd that it would work once and then stop.

    Thanks!

    #2096

    The most recent release of the MP3 library included and update of SdFatLib to sdfatlib20121219. Previous to this, it included sdfatlib20120719. http://code.google.com/p/sdfatlib/downloads/list . It is a long shot, but perhaps reverting back, may provide more stable operation.

    Where as it sounds like some connector issue on the SdCard. perhaps cleaning it out with alcohol. or firmly pressing on it from boot through use to see if it is a cold solder joint. or even Re-flowing the board. Which may not be a possibility.

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