Home Forums Sparkfun MP3 Shield Library Support Forum Seeed Music Shield 2.0 + Ethernet Arduino, strange behavoiur

Viewing 1 post (of 1 total)
  • Author
  • #3057

    Hi, first of all, thank you for writing this library!

    I’m using:

    1. Seeed Studio Music Shield 2.0 http://www.seeedstudio.com/wiki/Music_Shield_V2.0
    2. Arduino Ethernet (with POE module, but the eth part is not in use)
    3. PIR motion sensor
    4. SD 4Gb formatted using the FatSd utility


    if someone is sensed it’ll start playing, if no one, after 20 sec, the play will be stop.

    The shield is wired in this way:
    Seeed Shield A0 -> arduino 8
    Seeed Shield A1 -> arduino 2
    Seeed Shield A2 -> arduino 7
    Seeed Shield A3 -> arduino 6

    Seeed Shield ISP interface -> arduino ISP interface

    and obv. ground and 5V

    My idea is to use the interrupt driven setup

    so I left the line
    #define SEEEDUINO 0 // uncomment if using the Seeeduino Music Shield

    and I modified the pins define (

    // if SEEDUINO use the following pin outs

    SD_SEL  from 9 to 4
    MP3_DREQINT from 2 to 0, according to the ethernet arduino datasheet

    #if ( SEEEDUINO == 1 )
    #define MP3_XCS             A3 //Control Chip Select Pin (for accessing SPI Control/Status registers)
    #define MP3_XDCS            A2 //Data Chip Select / BSYNC Pin
    #define MP3_DREQ            A1 //Data Request Pin: Player asks for more data
    //#define MP3_DREQINT        0 // There is no IRQ used on Seeduino
    #define MP3_RESET           A0 //Reset is active low
    #define SD_SEL              10 //select pin for SD card
    #else // otherwise use pinout of typical Sparkfun MP3 Player Shield.
    #define MP3_XCS              6 //Control Chip Select Pin (for accessing SPI Control/Status registers)
    #define MP3_XDCS             7 //Data Chip Select / BSYNC Pin
    #define MP3_DREQ             2 //Data Request Pin: Player asks for more data
    #if defined(__AVR_ATmega32U4__)
    #define MP3_DREQINT          1 //Corresponding INTx for DREQ pin
    #else // swapped between Uno and Leonardo.
    #define MP3_DREQINT          0//2 //Corresponding INTx for DREQ pin
    #define MP3_RESET            8 //Reset is active low
    #if ( GRAVITECH == 1 )
    #define SD_SEL               4 //select pin for SD card
    #define SD_SEL               4//9 //select pin for SD card
    #endif // GRAVITECH
    #endif // none SEEEDUINO
    What’s going on:
    The basic idea is working, so if the sensor senses, the player plays, if nothing for more than x sec, the player stops. But:

    • I’m always getting error 6 or error 5
    • after few songs, seems “randomly” the arduino hangs
    • if I setup a .memorytest() right before playing, everything seems fine, so it never hangs
    • using memorytest(), i can hear a strange sound, similar to a double click
    • memorytest() gives as result sometime a zero, some other times the values 33791 or 33279 (or at least I “only” noticed these)
    • I had to setup the volume in the setup part because, if not, everytime the mp3 volume changes

    so, looking at the memorytest() maybe the double clik sound is given by the vs_init call.

    Free RAM = 1042 Should be a base line of 1040, on ATmega328 when using INTx
    Error code: 5 when trying to start MP3 player

    this is the result for the “i” command [retrieve current audio information (partial list) MP3Shield_Library_Demo]


    The MP3 files are 192kbps but the same is happening also with lower and higher bitrate

    Any idea? If so please enlight me! 😀
    Best Regards




Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.