SD cards won't initialize

I am using an Arduino Nano (although I get the same issue with an Uno) with an SD card module that I'm intending to incorporate with another project, but for now they are just on their own.
I keep getting "Initialization Failed" with the example sketches from the SD library with the exception of the "CardInfo" sketch. When I run CardInfo on my 8Gb SD card it returns:

Initializing SD card...Wiring is correct and a card is present.

Card type: SDHC

Volume type is FAT32

Volume size (bytes): 3472883712
Volume size (Kbytes): 3391488
Volume size (Mbytes): 3312

Files found on the card (name, date and size in bytes):

Notice it says the card only has 3.3Gb. I don't know why this sketch works while the rest won't. At least I know my wiring is correct.
So I tried it with my 16Gb Card which returns this:

Initializing SD card...Wiring is correct and a card is present.

Card type: SDHC

Volume type is FAT32

Volume size (bytes): 2755657728
Volume size (Kbytes): 2691072
Volume size (Mbytes): 2628

Files found on the card (name, date and size in bytes):

This one only shows 2.6Gb!? Both cards are formatted as FAT32.
I found several sites and forums which recommend writing digital pin 10 HIGH but this doesn't seem to work either.
Any help will be much appreciated.

I am also pretty new to the SD stuff and still struggling with it.
There are so many potential failure zones ...

Although I still have trouble that my Nano recognizes the SD card I found a thread (actually it's the very first in this forum's subsection:
http://forum.arduino.cc/index.php?topic=228201.0
which might explain why you get so different information about your card and could help you.

I followed the instructions and even installed the 3 year old SDFat library, but in my case still no success.
Now waiting for some more cards to come as you never know what's inside and will continue testing after they have arrived.

BTW: my SD card module is the one from Adafruit with the logic level shifter, so 3.3V shouldn't be the problem.

LukasSeum:
Any help will be much appreciated.

Maybe you could try something like MiniTool Partition Wizard Free (for windows) and check out your SD card with it. Eg, format the 16 GB card to FAT32 format, and choose an allocation unit size of 16 kB.

Or, if you got a bunch of these same SDcard reader modules, see what happens if you use a different one (of the same kind, same model - in case there's an issue with the particular reader module being used).

I recently used up some time trying to figure out why I got "initialization issues" with an SDcard reader for my arduino. Eventually decided to replace the reader with a spare one (out of my collection of spares). Discovered that the first reader module was faulty. Tested repeatedly with my other spares (and with various SD cards too). All ok. Tested the first reader module repeatedly, to make sure it was the problem. It really was the problem. Spare parts can sure help in narrowing things down. This isn't saying your reader is the problem though.

Eventually I got my SD card reader in the Ethernet shield recognize my SD cards.
Did not have the time to test them in the standalone reader, but tests will follow.
I am pretty sure that the cards now will be detected and accepted in the standalone reader as I first had the same "initialization fail" error in the UNO's ethernet card reader (the pinMode 10 OUTPUT trick didn't work either).

  • I upgraded IDE from 1.6.13 to 1.8 -> still no initialization
  • Then downgraded to library 1.09 (I am using IDE 1.8 now on a Mac Yosemite OSX) -> still error

What finally worked (for 3 MicroSD cards: 1GB, 4GB, 8GB all from different manufacturers):

  1. Formatted the cards with SDFormatter as recommended in the very first thread of this subsection of the forum
  2. Used the option "Interoperability = YES" (see my lengthy post with a picture of the setting here.) <- this is setup for Mac SDFormatter
    (for Windows users the option reads something like "Format size .." and should be set to ON or YES")

Maybe it worked in combination with the 1.09 library downgrade, but this is a guess.
My suspicion is that the "interoperability" format with the SDFormatter did the whole trick.

Let's see if it still works when I use the standalones with a Nano.

I also got my SD card reader working again.

I got problems since the end of december.

After updating to version 1.8.1 of the IDE and version 1.1.1 of SD library.
I was unable to open my SD card using the CardInfo example.

I can read my SD card with my PC.
I was able to do a backup of my files.

Using SDFormatter with:
Format type Quick
Format size adjustment ON
SDFormatter was unable to format my card.

So I tried with:
Format type Full
Format size adjustment ON

I returned my SD card to my Arduino Ethernet sheild, and test it again with CardInfo.
Now it works.

I hope this will help others

Alain

So I tried with:
Format type Full
Format size adjustment ON

This is the right process.
If your card was not formatted before with "size adjustment ON" quick format can't help as the size adjustment is apparently only done on FULL formatting.

Imho the developers of the SDFormatter should have to make sure that meaningless format options are blocked within the software.

I am also pretty new to Arduino projects, but came across the same SD card issue over the past two weeks. Thanks for posting something to this forum, because I would not have been able to solve my problem without this information.

I am using an Arduino Uno R3 with an SD Shield from Contempo. I purchased a new 16 Gig SD card, and immediately formatted it using the Quick option in SD Formatter (recommended by the project webiste). After finding this post, I reformatted using Full Format and Size Adjustment On. Unfortunately, this did not fully solve my problem.

In order to get it working, I also needed to update my SD.h library to version 1.1.1 (it had been carrying version 1.1.0). Thanks Alain & RPT for mentioning the library idea in your post.

SD card is now successfully being accessed and playing audio files.

Hope this feedback helps others.