A few weeks ago I needed an Arduino compatible Micro SD adapter but didn’t want to wait for one to arrive in the post so inspired by the breadboard ghetto Micro SD socket I knocked up a mini shield using a bit of left over stripboard and a SD to Micro SD adapter.

Interfacing with an SD or Micro SD using an Arduino is very simple as it can be controlled directly over SPI so it’s just a case of connecting to the Arduino’s SPI pins (11-13) and a pin for select. I used the hardware SS pin (10) for select as keeping all the pins together made for a small shield, you can use a different pin if 10 is already used but note that pin 10 must still be set as an output regardless or the library won’t function. Some resistors are required to drop the Arduino’s 5V to 3.3V for the SD card but other than the Micro SD adapter, some headers, a bit of stripboard, and a few pieces of wire that’s it.

The Arduino SD library is very easy to use with easy to follow examples and it supports FAT16 and FAT32 file systems but note that it only supports one open file at a time and can only use short 8.3 file names.

Here is the stripboard layout, to mount the SD adapter I’ve just soldered a right angle header to the contacts on it. There is also a badly drawn schematic here.

Hi. Great tutorial!
Can I use a voltage divider of 4.7K & 10K for VDD too? I use my own pcb board with atmega328 but dont use any 3.3V until now. Can a voltage divider do the job at the VDD pin?
I want to connect my pcb’s 5V to 4.7K which then will connect to a 10K resistor & SD VDD pin.the 10K resistor will end up connected to ground.
Will the sd cards work even with 3.4Volts? (5v with 4.7K & 10K = 3.4V)
Is it safe to do that?

I did this project one year ago and it was working good with Arduino UNO. But now with Arduino Mega 2560 things are different. Just can’t pass through this annoying error “initialization failed”. Someone?

Very useful instructions. Thank you. I have used your guidance to connect an SD card housing de-soldered from an old camera. Some initial problems reading the card because I first used an old 16mb SD1 FAT12 – no problem with 8GB SDHC.