Cheap DIY SD Card Breadboard Socket




Do you have a project that needs an interface to mass storage, but don't have the resources to build a breakout board for a standard socket?

In this Instructable, you will learn how to make an SD card socket that plugs right into a breadboard for less than two dollars in parts (depending on how you get them of course). I show you how to use a simple straight pin header and modify it so you can plug in an SD card and attach it directly to a breadboard for data logging and prototyping. This is quick and easy so you don't have to wait for a socket in the mail, or build/buy the SMD breakout board for it either.

Basic soldering skills and common tools are required.

I will cover how to make vertical and right angle sockets. Either 7 or 8 pin should work. 9 pin may require some modifications, I only used 7.

Step 1: Gather Tools and Materials

You will need:

Soldering Iron, I use 45 watt but this is more than enough
Needlenose pliers
a vise is very useful to keep from burning yourself
and at least 21 pins of straight male breakaway header pins

I got the header pins from my local electronics parts shop. Radioshack doesn't carry them as far as I know, but they can be ordered from various places around the internet for very cheap. It was 2 dollars for 40 pins at my local shop.

Here is the digikey part, it's a bit more that 2 dollars.
Same thing from Sparkfun

These are straight male breakaway header pins.

You could theoretically use right angle as well, but I used straight pins.

Step 2: Cut the Pins You Will Need

I only needed access to 7 of the 9 pins, so I only made a 7 pin connector. 8 pin would be fairly easy to do as well, but 9 pin may require some modification as it is a little recessed from the other 8.

Cut the header to the number of pins you will be using. You will need 3 sets of that length, for me, 3x7 pins.

Optional: one of the rows is just as a backing for the card. It would be possible to use just a couple of pins on the edges instead of a full row, but I didn't follow this route. The process would begin to be different around step 4, when you attach the second row of header to the first.

If you are doing a right angle connector, right angle header pins may lead to a cleaner result. I used straight pins on mine however and it worked well enough.

Step 3: Bend Contact Pins

Now you have the contacts, they need to be bent to ensure perfect and reliable contact with the card.

Take one of the 3 header rows and place it in a vise, or a pair of pliers or vise grips. I held the short end of the pins to keep them from pulling out of the plastic.

Using the needle nose pliers, bend the pins just a bit at the base, so that the tip of the pin is about vertical with the edge of the plastic. See pictures for detail. Not all the pins need to be perfectly aligned. Bend them all against a table or flat surface to line them up better.

Now they need to be bent back on the tip so it is easy to insert the card. Again with the needle nose pliers, grip just a small amount and bend it back the other direction. Do this for all the pins. See picture for detail.

Step 4: Attach Second Row Temporarily

The second row of header is actually just a backing. We are going to line up the pins so this works better, and so it is a cleaner solder job. I used a small bead of hot glue on each end to hold them together, but any method that leaves the bottom of the pins exposed will work. Then I put them in the vise again because we need to bend them a little.

Be sure the pins are facing the right direction, the bend should be on the inside of the socket.

So the solder joint is stronger and cleaner, we need to bend the bottom pins a little. This way we aren't filling so much space with solder beads. Grab both pins and squeeze just a little, so the pins are closer together. This may vary a little bit and isn't incredibly crucial that it be exact.

Step 5: Prep for Soldering

If you have only two hands like me, you will want to make it easy to hold everything at the same time. I find that if I tin the leads, I can make a small solder joint to hold the pieces together the way I want without using one of my hands. I need to hold solder and an iron also. Tin the leads of the final row of header in addition to the double row that is the socket.

Step 6: Attach Final Header Row

Here we get to the final part. You may choose to do vertical or right angle at this point. The only difference in in how you solder the last row on. I guess you could do some odd angle as well if you wanted.

Hold the last row exactly where you want it. Using the soldering iron, touch the tinned leads and the small amount of solder already there should hold the 2 pieces together. Finish all the other joints using more solder, and then add some solder to the first joint. Add a little more solder than necessary to ensure a strong bond, but not so much as to make a ball. These are partially structural, but you probably shouldn't be using this for anything that endures much force either.

You can remove the hot glue or whatever you used. The solder is holding the parts together just fine. It was only temporary anyways.

Step 7: Prototype Your Circuit

And we're done. You now have an SD card socket that plugs directly onto a breadboard. What will you make now?

I made mine because I was building a data logger with my Arduino and a Memsic accelerometer, but the possibilities are endless.

Just be sure you don't short out pins 7 and 8, the socket can slide over to it, so be careful.

Step 8: Extras

After a little discussion in the comments and elsewhere, I have taken a more permanent approach to this idea. I have found that by bending the pins in the same fashion for a single row of right angle header and attaching that to the PCB or perfboard, you have a flat, robust SD socket. This is best suited for the final version of a circuit, a one off custom circuit, or a good prototype without waiting for th final socket. I recommend bending the pins a bit more in the first step so to ensure that all are making good contact. Bending them back a little more in the second step is better as well. I did each one individually with pliers and holding the pins in visegrips this time.

Plus there aren't any pins on the backplane that could short against something! Thats never a good thing.

Thanks to frollard for the idea!

I've also included a pinout of an SD card by request. Here's the deal with the pins. An SD card has two modes, SD and SPI. Specifics on these can easily be found on wikipedia's SD card page. For the Arduino, however, only the SPI mode can be used. The SPI mode only uses pins 1-7, leaving off the small one and the recessed one (8 and 9). SD mode rearranges some pins and uses all of them.

Here is the pinout for SPI mode:


1 - Chip Select*
2 - Data Input*
3 - Ground
4 - 3V3
5 - Clock*
6 - Ground
7 - Data Output*
8 - NC
9 - NC

*these are 3.3V logic lines. All but 7 are inputs to the card, and so must be brought down to 3.3V from 5V when using the Arduino Duemillenove. 7 is an output, and the Arduino can recognize 3.3V as high, so no voltage converter is necessary here.

Wikipedia has some great info on SD cards,
and has a good writeup on the pinout,



    • Tape Contest

      Tape Contest
    • Trash to Treasure

      Trash to Treasure
    • Arduino Contest 2019

      Arduino Contest 2019

    74 Discussions


    2 years ago

    can i also use this to play music? and also can i randomly select a file to be used?


    6 years ago on Introduction

    hey man I really like your tutorial and want to do make this for a project im doing.
    I have 2 questions tho.
    1. My project uses an arduino UNO and I need save data on a usb or sd card (I've got both). What library is the best library that will work with your configuration. I know there's an SD card library but will it work your configuration?

    2. In your tutorial you said the arduino uses SPI mode with 7 pins.
    I am using an Freetronics Ethernet shield and a Sparkfun SM5100B Cellular Shield & wifly RN-XV module.

    They use pins:
    Ethernet + wifly - (13,12,9,10) + (9,8)
    Sparkfun SM5100B Cellular Shield - either pair (1,2)OR(2,3): Might be able to change this with sofware serial, doubt it tho.
    +1 pin for keypad

    Is it possible I can connect the 3Vs to arduino 3V and all grounds to arduino ground (analog OR digital) and somehow change the other pins from 1&2 to 3&4 software serial?

    1 - Chip Select* ---SOFTWARE SERIAL TO --- 3
    2 - Data Input* ----- SOFTWARE SERIAL TO -- 4
    3 - Ground --- TO---- Arduino Grnd
    4 - 3V3 ----TO---- Arduino 3V
    5 - Clock* --- Leave this as it is ---
    6 - Ground ----- To --- Arduino Ground
    7 - Data Output* --- Leave this as it is ----------

    7 replies

    Reply 3 years ago

    you can use SPI whit many devices at once. Just use CS/chip select to select whit spi slave is active at the moment.


    Reply 6 years ago on Introduction

    The SD Card really needs all input signals to be level shifted. It is a 3V tolerant device. Use a hex buffer to do this. That can be powered by the 3V supply of the arduino, as can the card. The output (MISO) doesn't need to go through the buffer.

    As for the pinouts, the SPI pins must be the same as the arduino specifies, which I believe the ethernet shield uses too. BUT SPI is designed to work with multiple devices at the same time using the CS pin (Chip select). You can put this pin wherever you want, just be sure to specify the right one in the library you are using.

    As for the library, any Arduino SD Library should work. I have heard of problems with cards larger than about 2GB though. Double check with the library first.

    Good luck.


    Reply 4 years ago on Introduction


    I need to read an SD card connected to Arduino via USB, I have usb reader to do so, but whenever the card is connected to the arduino, the USB doesn't connect to the PC, can u help me with the pins i need to cheange and how please.



    Reply 6 years ago on Introduction

    Thank you. I've got a 16Gb and 512Mb i think. I'll check the library out.


    Reply 6 years ago on Introduction

    Hi I had a look this SD Card shield from cooking,

    I love how it can attached to the In circuit serial programmer. Is there anyway we can implement the SD CARD Breakboard socket to work with ICSP on my arduino UNO?

    I understand it's a big personally i've never used the in circuit serial programmer.


    Reply 6 years ago on Introduction

    The ICSP connector just uses the same pins for programming as the SPI bus, which we use to connect to the SD card here. They are connected in both places. You could connect this the same way just by looking at the pinout of the ICSP header.


    3 years ago

    Had this adapter around and decided to make this header. Turns out I don't need all 9 pins but it's possible.


    6 years ago on Introduction

    If you solder this to sd to micro sd adapter than you have micro sd socket


    6 years ago on Introduction

    Is it possible to use this to read pictures and video from my SD card. The casing for it snapped off and I can't get it to read when trying to insert the internal naked sd board into my pc adapter. I am wondering if this circuit would allow me to read all the contents off of it (pics and videos)?

    2 replies

    Reply 6 years ago on Introduction

    That sounds like it may be a delicate operation. Depending on the thickness of the raw chip and the condition of the contacts you may be able to connect it with this method.

    If you don't care about using it afterwards, you might be able to solder to the pins and connect those to a usb card reader. I can't think of any better options.


    Reply 6 years ago on Introduction

    I already have the chip out. i tried to put it into my card reader with no success. Either I toasted it :( or its not making good contact. Anyway, I could hook up to an Arduino and read off the contents even if slow?

    Emiliano Valencia

    7 years ago on Step 8

    Great! it was really useful to me, since I needed an SD socket and couldn't manage to find one!
    Also, its real cheap!


    8 years ago on Step 8

    great! Thanks for sharing

    Thanks! I am learning how to use SD cards and prior to finding this I was just holding the card to some headers in the breadboard but it was introducing a lot of connection problems. This was easy and works perfectly! It makes a surprisingly good fit too.


    9 years ago on Step 8

    Nice, now I just have to findout how to send commands and data in SPI mode and I can write data to a nice big storage.

    You would not hapend to know what the protocol to use?