Using an SD Card on an Arduino.

image image

These inexpensive SDCard boards are easy to use and there is plenty of information on the Arduino Playground and other places. From the circuit diagram it would seem that level conversion is needed to convert the 5volt signals from the Arduino to the 3volts needed by the SD card. The card itself can be powered from 5 volts. If you do Power from 5 volts, then do not connect the Arduino 3volt pin to the 3volt pin on the SD board.

The standard Arduino SD library works well although there are one or two others available. File name lengths are limited to eight characters plus a three character extension. In addition the library does not support the use of string variables in the commands, so for example

File file;
String filename = "test.txt";
file =;

will not work, and the following must be used

File file;
file ="test.txt");

must be used.

If you use your card in a data logging application and you remove the card while the sketch is running, the card may not be recognised when it is returned and data will not be read from or saved to the card. Pressing the Reset button will restart the sketch and re mount the SD Card.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: