Getting Started with the LilyPad MP3 Player

Pages
Contributors: MikeGrusin
Favorited Favorite 12

Troubleshooting

If you don't hear anything, hopefully the following list will help you find the problem.

Serial debugging

A big troubleshooting tip for almost any issue, is that both the "Trigger" and "Player" sketches have an option in the code to send debugging output to the serial port. When this is turned on ("true"), text messages will be output to the serial port describing what the board is doing at any given time, as well as any problems it finds. Serial debugging is turned on by default in the "Player" sketch. To turn on serial debugging in the "Trigger" sketch, follow these steps:

* Open the "Trigger" sketch in the Arduino IDE (see the programming page for more information)
* There will be a line near the top that says "debugging = false"
* Change "false" to "true"
* Upload the modified sketch
* In the IDE, turn on the Serial Monitor window
* Set the baud rate to 9600
* The board will reset and status messages should appear in the Serial Monitor window

The information printed to the window will give you a lot of visibility into what's going on within the board. NOTE that when using serial debugging in the "Trigger" sketch, triggers 4 and 5 are deactivated (since those pins are used for serial input and output).

Problems with the SD card:

  • Did you remember to plug your micro-SD card into the LilyPad MP3 Player? (We do it too.)

  • If the LilyPad MP3 Player has a problem starting up, it will output blink codes through the rotary encoder LED. If you don't have the rotary encoder installed, you can temporarily stick a normal LED into the five-pin row of holes in the middle of the board (use the two end holes, and put the longer lead towards the SparkFun logo). One blink = SD card problem. More blinks = MP3 decoder problem. See the comments in the sketch for more information.

  • If you're using the default "Trigger" sketch, ensure that your filenames have a '1' to '5' as the first character.

  • If you're using the "Player" sketch, ensure that your filenames have one of the following extensions: "MP3", "WAV", "MID", "MP4", "WMA", "FLA", "OGG", "AAC". Note that the VS1053 itself does not care what the filename is (you can use any of those on any file); the sketch just checks the extension to avoid sending non-audio data to the chip in case there are other files on the SD card.

  • Ensure that your files are supported audio formats and bitrates. See the supported audio formats page more information.

  • If your file format isn't supported, you can often load that file into an audio editor program, and re-save it as a supported file type.

Problems with the triggers:

  • Try using an alligator cable or jumper wire to manually bridge the ground-trigger connection. This will help you determine whether the problem is in the board or in your switch.

  • If you have serial debugging turned on in the sketch, triggers 4 and 5 will be disabled (these triggers are also used for the TX and RX lines).

Problems with the speakers:

  • Plug in headphones and see if you can hear any sound that way.

  • Note that when you plug in headphones, the speakers will be disabled. You can change this behavior if you wish.

  • Try using alligator cables to connect directly from the LilyPad MP3 Player to your speakers.

  • If you're writing your own code, ensure you don't have the amplifier disabled using the shutdown signal (EN_GPIO1, which is on A2). This signal should be HIGH to activate the amplifier.

  • Note that this amplifier chip has a feature that slowly ramps up the volume when it's first turned on.

Power problems:

  • Do you have a power source connected, and is the power switch turned on? (The red power LED should be on).

  • If playback starts but stops in the middle, ensure you're using a fully-charged battery.

  • Remember that the 5V FTDI will power the board enough to program it, but not enough to drive the speakers. You must use a Lipo battery or other external power source.

  • The battery charge chip (located between the 3.3V pin and the right speaker + pin) will get warm while charging a battery, especially if the battery is empty. This is normal. It will cool down as the battery is filled.

Pause before playing?

  • A customer called us with a strange problem: their LilyPad MP3 Player was playing audio files, but only after a long pause. The same files played normally on a PC. After looking at their files, we realized that the files contained an image of the album cover as part of the metadata. Since this data is at the beginning of the file, the VS1053 chip had to read through (and ignore) all the image data before getting to the actual audio data. Loading the audio files into Audacity and saving them back out without the metadata fixed the problem.

Still having problems?

If you still can't get it working, please contact our Technical Support Department, who will be happy to help you out.