SD Card Support... many questions...

I have one Seeedstudio SD Card Shield v2.1, SD card 8GB formatted with FAT32 and with a file "data.log" at the root, Arduino IDE v.0021, and 6 different Arduino boards: Freeduino Seeeduino, ATmega1280, etc.

Also, I tried many different power supply solutions, and one of them energizes the PCB with 3.3V and is not connected to the computer. However, I could not find a way to make the basic code at File / Examples / FileLogger / FileLoggerDemo work. After making some researches, I removed the SD card and discovered that a simple Blink program stops working after inserting JUST this line:

include "FileLogger.h"

Therefore, there is some issue with this library, at least at my environment. Any hints?

By the way, I would like to know:

1) The SD card was supposed to be connected at pins 9,10,11,12,13,GND and GND,GND,5V,3V3. Is this guideline also valid for Arduino Mega. I saw a comment about suing different pins for Arduino ATmega...

2) Is 3.3V really necessary for the SD card (not 5V) operation? In this case, I cannot believe the guys sell a shield card without he very basic functionality.. Is there any SIMPLE tutorial of how to make the SD card work with, say, Arduino Uno?

Thanks in advance.

On the product description page it says: "Note: SDHC is not supported. "

8GB cards are SDHC. The largest SD cards are 2GB.


thanks for mentioning this detail. I was not aware of this nomenclature. But, why the logger code is freezing the application. I just "include" the library and I did not use it at my code (thus eliminating hardware issues) and the basic Blink does not work. Why?

Sorry, I don't know why the inclusion of the FileLogger.h file causes your Blink to stop working. Did you take the SD shield off? SPI uses pin 13 which has the LED on it.

Yes, trying to figure out what is going on, I started removing all the stuff (simple Duemilanove board wihout SD shield plugged on it). I realized that the Blink code stops working with the mere addition of the FileLogger.h...

johnwasser, thanks for the hints. It worked with Duemilanove board, not Mega board.
So, let’s summarize what I have so far as conclusions for the SD Shield hardware and the FileLogger library included at IDE v0021:

a) FAT32 is not supported - you need to format using FAT(16).

b) Some SD cards with already FAT16 do not work. However, after re-formatting them again (I used Windows XP and FAT option at the format program), they work!!

c) The SD card must be <= 2GB.

d) Not all the SD cards work…

  • Kingston 2GB micro SD SD-C02G with adapter does not work.
  • Apacer 2GB, 60X (not a micro SD) works fine.
  • Kodak 512MB works fine.
  • Speedy Adata 1GB SD card works fine.

e) The file data.log MUST exist.

f) The file data.log MUST HAVE content (at least one character or a line feed)!!!

g) In the case of my shield board, the activation is done by I/O 9, but the software states 8. I changed the software to 9 and it worked fine (assuming switch 3.3V vs. D9 in the D9 position).

h) I isolated the 3.3V pin… and it worked… Contrary to what I read at Internet, this card works fine without 3.3V. Please, note that it was true for my mentioned configuration. Naturally, if the mentioned switch is at “3.3V”, the 3.3V is necessary.

i) REMOVE any hardware or software which is related to Arduino I/O pins 9, 10, 11, 12, and 13.

**** Now, I need the help of you guys: What I need to do to make Arduino Mega 1280 work with this SD shield card ? ****


ionito: **** Now, I need the help of you guys: What I need to do to make Arduino Mega 1280 work with this SD shield card ? ****

The hardware SPI pins on the Mega are 50-53 instead of 10-13. You'll need to change the code to set the Mega's SS pin as an output, instead of setting 10 as an output. You can move the select line, too, or leave it on 9.


I made the connections as follows:

Name Pin at SD Shield Arduino Mega Pin

MOSI_PIN 11 50 MISO_PIN 12 51 SCK_PIN 13 52 SS_PIN 10 53 Activation(PWR) 9 9

Also, I made the following modification at the ...\arduino-0021\libraries\FileLogger\Spi.h file:

define SCK_PIN 52

define MISO_PIN 51

define MOSI_PIN 50

define SS_PIN 53

It did not work... Any idea?


see the solution at,55443.0.html

Thanks for all suggestions!!