I'm trying to play sound on Arduino Uno with a VS1003 module, using schematics and most of the code from this project and I have almost succeeded, but I've got (I think) a performance problem and I don't know what could be wrong. Midi files and low bitrate WAV files are played perfectly (so I think the code and wiring is OK) but when I play MP3 file I hear the song but the sound is slowed down (interrupted) with lots of little breaks (per second). I think it's not getting the data fast enough, but the original project is the same and it works! What can be wrong? Could it be the SD card reader module or SD card?

I have to note that the original wiring from that project was not working in my case because of SD initialization error. It started to work after I've replaced the 2.2K and 3.3K resistors for SPI lines with 100K and 200K. (I didn't have to replace those on the DCS, CS and RST lines of the VS1003 module). Also I don't have the LCD and buttons so my main loop() is just empty. I use the Serial for debugging (but not during the playback).

enter image description here


I have tested the SD card performance and the result is 107kbps - no wonder the 192kbps mp3 is sliced! So it is clearly the SD card performance problem. Does anyone know why it could be so slow? Can the wiring or voltage affect the speed? I'm using LC STUDIO card reader and TOSHIBA SD-M512 card (512MB). Just tested the card in PC and it's fast, so it's either the reader or wiring.

Any ideas?

  • Try replacing the voltage dividers with real level shifters. Slew rate may be killing the performance. – Ignacio Vazquez-Abrams Apr 4 '16 at 15:03
  • @IgnacioVazquez-Abrams: You might be right, but when I just used a 3.3V<->5V level converter for MOSI and SCK lines only, it stopped working at all. I have tested the converter and it gives 2.5V at the 3.3V side when 5V signal is given at the high side. It might be enough, but it also just contains a voltage divider in this direction and I think the resistors are just too big (like in the original, non-working schematic). – P.W. Apr 4 '16 at 19:34
  • Also when I used it on the MISO line (only) to level up the signal from 3.3 to 5V, it works but the reading speed is the same. – P.W. Apr 4 '16 at 19:43
  • How did you test the card's performance? I assume the card's using FAT16? Does a different card give better performance? – SoreDakeNoKoto Apr 4 '16 at 21:27
  • @TisteAndii: Card's properties say "FAT" (so I assume it's FAT16). I'm measuring duration (in milliseconds) of this loop: while (file.available()) file.read(); – P.W. Apr 4 '16 at 23:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.