Hi guys,
I'm desperate. I need your help.
I'm trying for several days to determine why my sd reader isn't working 100%.
I bought an audio shield from http://www.elv.de/audio-shield-fuer-arduino-asa1-bausatz.html .
The problem that i encounter is that sd reader is not working 100% of the time.
When i try SD/CardInfo example i get:
#Normal test using SD/CardInfo
Initializing SD card...initialization failed. Things to check:
* is a card is inserted?
* Is your wiring correct?
* did you change the chipSelect pin to match your shield or module?
Initializing SD card...initialization failed. Things to check:
* is a card is inserted?
* Is your wiring correct?
* did you change the chipSelect pin to match your shield or module?
Initializing SD card...Wiring is correct and a card is present.
Card type: SD2
Volume type is FAT16
Volume size (bytes): 2032271360
Volume size (Kbytes): 1984640
Volume size (Mbytes): 1938
Files found on the card (name, date and size in bytes):
Initializing SD card...Wiring is correct and a card is present.
Card type: SD2
Volume type is FAT16
Volume size (bytes): 52307968
Volume size (Kbytes): 51082
Volume size (Mbytes): 49
Files found on the card (name, date and size in bytes):
001.MP3 2014-01-11 17:47:32 6758170
002.MP3 2014-01-11 17:47:32 7674064
003.MP3 2014-01-11 17:47:32 7381071
004.MP3 2014-01-11 17:47:32 6091202
Initializing SD card...Wiring is correct and a card is present.
Card type: SDHC
Volume type is FAT16
Volume size (bytes): 94169088
Volume size (Kbytes): 91962
Volume size (Mbytes): 89
Files found on the card (name, date and size in bytes):
START_CD.ELF 2014-01-09 13:21:26 480472
CMDLINE.TXT 2013-11-14 13:49:36 221
CMDLIN~1.TXT 2013-08-13 19:11:22 195
CONFIG.TXT 2014-01-11 06:28:46 1669
Initializing SD card...initialization failed. Things to check:
* is a card is inserted?
* Is your wiring correct?
* did you change the chipSelect pin to match your shield or module?
Initializing SD card...initialization failed. Things to check:
* is a card is inserted?
* Is your wiring correct?
* did you change the chipSelect pin to match your shield or module?
I tried 3 diferent SD Cards.
Sometimes it works and sometimes it doesnt.
I read that it has to do with SS pin and putting pinMode(SS, output); and digitalWrite(SS, HIGH); which is 10 on my UNO..
chipSelect is on pin 4.
I also tried changing the SPI speed (SPI_HALF_SPEED, SPI_FULL_SPEED, SPI_QUARTER_SPEED, SPI_SIXTEENTH_SPEED)....
I tried using external power..
I tried hardware hack and solderd pin 4 on pin 10 and using SS directly (on my shield pin 10 isn't connected to anything)..
Shield uses 74HC4050 for level shifters (The power of the SD card reader)..
I also tried SdFat library and Sdinfo responce with:
SdFat version: 20131225
type any character to start
card.init failed
SD errorCode: 0X1
SD errorData: 0X0
after pressing reset button:
SdFat version: 20131225
type any character to start
cardSize failed
SD errorCode: 0X10
SD errorData: 0X2
type any character to start
cardSize failed
SD errorCode: 0X10
SD errorData: 0X7F
type any character to start
init time: 14 ms
Card type: SDHC
readCID failed
SD errorCode: 0X10
SD errorData: 0X23
type any character to start
What i want to use the shield for is to play audio on a simple button press..
What is wierd is that when the SD card gets initialized it works like a charm for hours...
The problem is that in the begining it won't initialize. So if i play with it a little like take out the SD card and pressing the reset button..it suddenly work..and no problem with playing..but if i pres reset button again..i'm not sure if i will hear the music again..
Please give me some clues to squash the bug..