Introduction: Cheap DIY SD Card Breadboard Socket

Picture of 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

Picture of 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

Picture of 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

Picture of 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

Picture of 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

Picture of 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

Picture of 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

Picture of 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

Picture of 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,


YangyangL (author)2017-01-30

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

varuninnz (author)2012-09-23

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 ----------

KlemenŠ1 (author)varuninnz2016-01-06

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

Kroden (author)varuninnz2012-09-24

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.

connected.lnas (author)Kroden2014-10-26


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.


varuninnz (author)Kroden2012-09-24

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

varuninnz (author)varuninnz2012-09-30

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.

Kroden (author)varuninnz2012-10-01

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.

varuninnz (author)Kroden2012-10-02

thanks for all your comments so far. you're a legend

Sabre00 (author)2015-07-03

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

cgrrty (author)2014-01-07

Great!Very Smart

tutdude98 (author)2012-09-01

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

salmansheikh (author)2012-07-13

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)?

Kroden (author)salmansheikh2012-07-14

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.

salmansheikh (author)Kroden2012-07-14

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 (author)2011-08-04

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

raque (author)2011-02-25

great! Thanks for sharing

CalcProgrammer1 (author)2010-11-21

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.

Jaapio (author)2010-04-14

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?

TheZuke! (author)2010-01-18


TheZuke! (author)2010-01-18

Nice idea!

Davedwin (author)2009-11-19

Thanks! I'm thinking about using this in a prototype that I'm making too (brainstorming right now). As a solution to the pin 7&8 possibly shorting out. you could paint over the unused one, OR since paint will eventually scrap off you could file off the pin altogether. It's just a prototype after all, and you can get new cards for <$10.

als_liahona (author)2009-11-17

Great idea, great Instructable!  I just added a comment to my own Instructable ( recommending this as an alternative to the expensive SD Card breakout board I used!

T-virus (author)2009-08-20

Great! Can I turn it into a USB SD card reader?

Kroden (author)T-virus2009-08-21

I suppose you could pick up a USB driver IC and build an interface around it. I think it would save some trouble to just buy one, but it is however possible. It would probably use the SD mode, and as such, you would need pins on all 9 contacts. Good luck to you if you try this, I'd like to hear how it goes if you do.

T-virus (author)Kroden2009-08-28

I'm not good at electronic anyway. I really like the vertical socket, it's look so COOL!!!

nevdull (author)2009-08-24

Brilliant and fantastic!

frollard (author)2009-08-18

Neat take on a simple project. Is there something more sturdy or ...suited for the backplate (non-data side) I wonder? The pins just seems like they want to be...not pins :D Looks great though!

frollard (author)frollard2009-08-18

**Good job on getting tagged on hackaday too!

Kroden (author)frollard2009-08-18

Thanks for pointing that out, I never expected that. I don't visit hackaday very often, so i might have never seen that. On the subject of the backplate, I've been thinking of a way to use a PCB as the backing, in a more permanent setting. I'll make an update if I ever get around to doing that.

frollard (author)Kroden2009-08-19

ooh, thats a wonderful idea - bend the header appropriate for a card laying flat against the pcb...then solder header on - I like it. It would take some custom drilling, but wouldn't need anything more than perf board.

Kroden (author)frollard2009-08-19

Hey, you should check out step 8, new!

frollard (author)Kroden2009-08-21


GhostWolf (author)2009-08-21

Nice one, I think that I am going to try to make a Parallel port to SD card adapter for my Atari ST and IBM PC.

KraZe_EyE (author)2009-08-19

Very nice dude; im gonna use this in my class

Kroden (author)KraZe_EyE2009-08-19

cool, what kind of class is it?

KraZe_EyE (author)Kroden2009-08-21

Advanced Digital; use of microcontrollers and and memory and stuff like that. I bet my teacher will flip when I whip this out.

charlieb000 (author)2009-08-21

use a microSD to SD adapter (comes with all/most micro SD cards) then you can swap cards with no soldering

brainmedley (author)2009-08-20

FWIW a dual-row header works great for this. A couple tricks: I built mine with a dual-row header with roughly equal length pins so one side can grip the card while the other side is still long enough to plug deeply into a breadboard, also I bent the tips of the pins up first, then used a nail that just fit between the rows to make the "lower" bend, finally I slid a metal ruler in between to pry back open the gap so I now have a good - but not too tight - grip on the card. I found 8 or even 9 (x2) pins makes it easier to ensure that pin 7 doesn't get out of alignment. Thanks for bringing to my attention how easy it can be to use SD cards - I finally have a use for the 16MB(!) SD card that came with my camera so many (4) years ago.

Kroden (author)brainmedley2009-08-21

Glad you had luck with a double row header. I thought it might be possible, I just didn't have any to try it out with. I might try that 8 and 9 pin adjustment too, sounds better than risking a short. Thanks for the suggestion! And glad you could use the 16MB, thats the same capacity I was using.

jewelzc4 (author)2009-08-20

Great Stuff, Very MacGyver. Also you got posted to MAKE blog

Kroden (author)jewelzc42009-08-21

Thanks! I hear those MacGyver comments a lot.

clone 452326 (author)2009-08-20

id just go out and get a cheap sd adapter then solder the pins to it so it would be more sturdy

fin saunders (author)2009-08-20

I'm more of a mechanical than ah, an electronical guy. So could you clarify that you are soldering both rows of two row pins to the single row. It looks that way to me, but I'm not sure. If that is the case, is it a concern that accidental contact with the backside holding/bracing pins could have a tragic influence on the CD card/arduino board? Just asking as a casual observer. Fin A bit of electrical tape folded over the pins or some other type of insulator to cover the backside holding pins could be cheap insurance against stray voltage, etc.

kintekobo (author)2009-08-20

A small tweak would be to solder to a Mini-SD card adapter then you would be able to use it with Mini-SD's without having to solder to them.

Khord (author)kintekobo2009-08-20

This Instructable is an adapter - not soldered. The cards are removable.

kintekobo (author)Khord2009-08-20

You were ahead of me! :-)

gerrit_hoekstra (author)2009-08-20

Brilliant in its simplicity!

You are right to hold the pins in a metal vice in step 5, so that the excess heat from the soldering operation can be dissipated, lest the plastic melts into a gloopy mess. (Past, failed experiences have taught me this!)

raykholo (author)gerrit_hoekstra2009-08-20

totally agree with u there just sucks when u try to desolder a header and then the heat makes the pins fall out...

Kryptonite (author)2009-08-19

Very nice I must say! Just curious, but what is this circuit you use it on? I'd love to do this but I don't know what I'd use it for, or how to make it.

About This Instructable




More by Kroden:Quick DIY XBOX 360 battery packCheap DIY SD card breadboard socket
Add instructable to: