Rev B of the raspberry Pi ships with a 26 pin GPIO port and my first dilemma after bringing up my Pi was, how was I going to break out the PI’s GPIO pins so that I could easily access them for design work? I searched on-line and found several solutions but all of them already did too much. I did not want someone else’s interface to their set of hardware and I did not want to use someone else’s buffer design. Then while searching through a drawer of parts, I had in my hand a solution – an old unused 40 pin IDE hard drive cable. I could plug one of the existing cable headers onto my Pi GPIO port and plug a custom header into my powered breadboard.

For more info. please visit http://www.raspberryproject.com/a-gpio-expansion-cable-from-a-used-hd-cable/.

Notes: There is some bad information floating around about the Raspberry Pi GPIO and a IDE cable.

1. Some people are claiming that using this cable will damage the GPIO port because per the IDE standard, some of the pins are shorted together. It's true that some of the pins are shorted together but this is at the IDE hardware & not in the cable. The cable is just wired straight through.

2. Some people are claiming that using this cable will damage the GPIO port because every second conductor is grounded. This is only true with the newer IDE standard that uses a 80 pin ribbon cable. A cable built under the older IDE standard is perfectly safe and it's easy to tell which one you have - just count the wires (ridges) in the cable. The cable you want to use will have only 40 wires, not 80 wires.

Step 1:

First you need to find a used IDE 40 pin hard drive cable. And it’s important that you use a 40 & not a 80 pin cable.
<p>people, take it from an engineer who has worked extensively with ribbon cables, every other line in the cable SHOULD be grounded. when signals go between one end and the other at higher frequencies, the ribbon cable takes on the characteristics of a transmission cable. If a ground DOES NOT exist between signal lines, what happens is undesirable capacitive coupling can and does occur at certain frequencies. in order to ensure that the signaling is correct, it is best to follow the practice of making every other line grounded in the IDE cable. When you look at the header that means use lines 1,3,5,... for signaling and lines 2,4,6,... for ground. </p><p>so this is just a big FYI to those who are trying to talk to their raspberry pi, beaglebone black, seeeduino arch, ect. </p><p>If people need further assistance to do it right the first time, i do consult. </p><p>contact me for assistance. </p><p>Cheers</p>
I belive the 40pin/80wire cables are the ones that have the internally connected grounds that you mention.
<p>All depends on how fast you are driving the cable. The speed you will be driving the Pi's GPIO ports will not cause an issue!</p>
<p>Same idea, but I cut down black plastic, wonder if will work? Other <br>thing , I left red first ribbon cable and cut from the other end??</p>
<p>It should work as long as he wiring is still the same - pin for pin.</p>
<p>Other end is cut end wires goes to screw terminals relay board.</p>
<p>OK, so instead of going to a prototyping board you are using the ribbon cable to wire directly to a relay board? Should work as long as what you are driving is rated for 3.3 volts.</p>
Thanks for the idea. God instructable. I have a B+ with 40 pins. I made my breakout cable from an old 40 pin IDE cable. I dug out the blanked pin socket. I preferred not to use a breakout board, instead I just use dupont wires at the outer end. I will label the pins by sticking a printed label on either side of the connector end. Haven't done that yet. Here's some pics of the cable.
<p>I have Pi 3. there also 40 pins, but actual IDE cable has 39, thanks for idea to drill another one hole, just was going to cut it off the pin.</p>
<p>I spend a lot of time and energy on searching for a gpio cable for my pi. So i feel i should share some info so others don't have to do it as well. I'll provide some info on IDE cables and </p><p>Using an old IDE cable is definitely the cheapest way(my observation. Most rPi gpio cables were more expensive than an ide cable).</p><p><em>IDE cable is best for B+/A+ model while it can be used for earlier versions as well, Only problem being lots of unused pins which WILL hang off your board.</em> </p><p><strong>IDE background info</strong></p><p>Some info on IDE cables. They have 40 pins in total but some have 40 pin 40 conductor ribbon and some have 40 pin 80 conductor ribbon. The difference is just there to improve on I/O speeds (Every second conductor is grounded, hence space b/w each conductor is increased, thus increasing speed).</p><p>Check the pin outs here <a href="https://en.wikipedia.org/wiki/Parallel_ATA" rel="nofollow">https://en.wikipedia.org/wiki/Parallel_ATA</a></p><p>You'll see that some pins are ground. Now the thing here to note is that some cables have all the grounds shorted and some do not. </p><p>Sometimes the cables will have one pin closed. This is done to make sure you insert it the right way(i think, though there's a groove on one side too)</p><p><strong>What you need to buy?</strong></p><p>What you want for the pi is a 40 pin 40 conductor with grounds not connected in the cable itself. You should also make sure the cable you buy doesn't have the grounds shorted. Make sure all the pins are open. You don't want any pin closed.</p><p>40 conductors can be identified easily by just counting the numbers of wires in the ribbon. If they're 40, it's 40 conductor, if 80, then 80 conductor. Buy only the 40 conductor one.</p><p>Checking for shorted grounds can only be done by inserting into the pins and checking for shorts. </p><p>In all, 40 pin, 40 conductor, all pins open, and grounds not shorted.</p><p><strong>That's awfully specific, what if i can't find one like it or already have a cable but it's a different one?</strong></p><p>Fret not, i bought a cable with 80 conductors, one hole closed, and grounds shorted. Still managed to turn it into a usable one. Here's how.</p><p><strong>1. Closed hole: </strong>You can just drill into it. I didn't had a drill so i just used a pointed screw driver and a nail to make the hole. Turned out it was only covered with plastic, there was actually a pin connected through the ribbon cable. </p><p><strong>2. Shorted grounds:</strong> You can open the connectors and remove the plate that connects the grounds. Ask me to write an instructable for that if you want me to, because i couldn't find any info on it and ended up ruining one of the 3 connectors that are on the cable(wasn't gonna need three connectors anyway :P ).</p><p><strong>3. 80 connectors: </strong>Not really a problem. I just have 40 unused connectors in my ribbon cable. The rest are connected in a regular fashion.</p><p>Note: I did NOT test it out on the rPi, but all the logic in me tells me this should work. If it does not, i'll update it here.</p>
<p>Just be careful, some IDE cables do have internal shorts, even 40pin ones. You can often split the header off each end and remove the center plate that does the pin shorting leaving a standard header that's then fine to use.</p>
Thanks for posting this. It was the first result on Google for &quot;Raspberry Pi IDE cable on GPIO&quot;. The first step was the answer to my problem! Hey, don't use the 80 pin cable. Mine hung on the rainbow boot screen. Swapping it out for a 40 pin cable works fine.<br> <br> Unfortunately, all the cables I have at the house are keyed (pin 19 is filled). Now to carve them out so they're usable.
Thanks for the feedback. The reason you can't use the 80 pin cable is every other wire is connected together in the connector headers. In their original use the wires are shorted to ground to reduce cross talk - this is one of the tricks used to speed up hard drive access before drive technology switched to SATA.
Ya, as soon as I saw the 80 pin reference I realized what my dumb mistake was. I found a 40 pin cable in a junk computer to cannibalize. A little bit of time cutting out the stupid key pin (on the cable, not on the RPi), and I'm golden.<br> <br> I have an audio jack based oscilloscope tied to the IDE cable, and a little script showing me pwm waveforms right now. It's wonderful.
I know how to dish the cable, to cut the end so that the outer wires are longer. But my goal was to break out the GPIO port so I could do some work on my breadboard &amp; the cable won't be moving around. I saw some other work where someone soldered up a header that kept the same double row order &amp; then plugged the header into his breadboard, but that did not make since to me because every other pin is on the left side &amp; covered by the incoming cable. <br> <br>This instructable and the post to my new www.raspberryprojects.com web site were actually an after thought - I decided to share the idea because it was easy to build from parts laying around &amp; I was up and running in less than an hour. <br> <br>Thanks, Tom
That PVC insulation is terrible to work with isn't it? I know it is! You haven't discovered the trick to working with ribbon cable yet. When you cut it you have to dish the cable concave fashion. Because the outer wires need to be longer than the inner ones need to be. It took me a long time to fully develop the technique myself. When done right there is less strain on the wires though. It looks a lot neater too. <br> <br>I also usually hot glue the wires down, that doesn't always look too neat, but it stops wires from breaking a lot.

About This Instructable




More by Tom Hargrave:Sturdy Bench Seat without cutting a Single Board Build Rustic Planter Boxes from Recycled Fencing Make Keurig Ramen Noodles 
Add instructable to: