SD card and Arduino

Feb 5, 2009
Category:Electronics Arduino 

So, I have not long had my Arduino development board, my first project was to try and get it to log data to an SD card. This will be essential for a few future projects I have in mind. The internal EEPROM is only 512bytes, so not particularly useful for logging large amounts of data.

I found the pin outs to the SD card here, and a good schematic, along with the required libraries on this thread.

I could not get the raw read and write library to work, along with many others on the above thread. It looked like it was working, but after a reset there was no sign of the data on the card, So I tried the other library that was posted on that thread, uFat, which actually sounded much better as it allowed reading and writing to a file on the fat file system, which then could be read in my laptop or any computer with a card reader. This worked straight away, so I was happy to get my soldering iron out and wire it up permanently...


There is not much to it, the pins practically wire straight from the SD card into the Arduino, however the SD card runs on 3.3v and the outputs from the Arduino are 5v, not a problem with a few resisters 5v can be dropped down to 3.3v. I got the card slot out of an old card reader, attached pins to it from the headers of an old motherboard, and the strip board I just had laying around with junk soldered to it which I just removed.

Another quick test and something didn't seem quite right, it would only work once between reset, so I got my multimeter and checked all my connections, everything seemed fine, I gave a bit of a scrape between the strips of the strip board and tried again, this time it worked perfectly. I guess there must have been a strand of wire or solder where there shouldn't have!

Time to hide that ugly strip board, and soldering...


And there it is, a nice little module that I can plug in whenever I need it :D