Introduction: 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
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. http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=A26513-40-ND
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 pinouts.ru has a good writeup on the pinout,