Raspberry Pi GPIO Expansion Cable From a Used IDE Cable

by Tom Hargrave in Circuits > Raspberry Pi

92364 Views, 40 Favorites, 0 Comments

Raspberry Pi GPIO Expansion Cable From a Used IDE Cable

Completed GPIO Expansion Cable.JPG
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.

40 Pin IDE Hard Drive Cable.jpg
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.

Cut the cable.jpg
Cut the cable apart between the center connector & the connector on the shortest end & cut on the short cable side of the connector. I used an exacto knife but you can also use a good pair of scissors.

Cut Cable End.jpg
You should have a clean cut like this picture.

Separated Wires.jpg
When done you should be able to spread the end out like this picture. You can also see where I cut off the other 14 wires I won’t need after figuring out which end of the cable will plug onto the GPIO header.

Connector Pin Map.jpg
Because the connector is 40 pins and the Pi GPIO is 26 pins, you will have some overhang off the end of the board. You can’t cut the overhang off the end of the connector because if you do the connector will come apart.

Also, you should peel away & cut off the unused 14 ribbon conductors like I have shown above.

You can see here how the wires will map perfectly. GPIO pin 1 to the first wire, GPIO pin 2 to the second wire, etc.

Radio Shack Part Number 276-170.jpg
For the header end I started with a Radio Shack P/N 276-170 board.

Back of Board.jpg
Look at the bottom of the board and you’ll see rows of 0.10″ spaced pads joined together. When assembled right, this makes the ideal single row header.

Cut out section of board.jpg
I cut the start of my custom header out of a section of this board. The cut out piece is 26 pins wide, just like the header pin count on the Pi

Header Strip Front View.jpg
Then I inserted & soldered a header strip all the way down one side.

Header Strip Back View.jpg
Here is a view of the solder side of the header strip.

Stripped Ends.jpg
Next step is to strip the ends of the ribbon cable wires.

Solder Start Top View.jpg
And then insert each wire through holes in the header strip, paying special attention to the order. The first wire to pin one, second to pin 2, etc.

Start Soldering Wires to Header.jpg
Solder the wires one at a time as you insert them into the header strip, paying close attention so that you don’t short any adjacent pins together.

Header - Back View.jpg
When done the solder side will look like this.

Connector - Front View.jpg
And the header pin side will look like this.

Test for continuity and shorts.jpg
Next you need to check the entire assembly for opens and shorts with an ohm-meter.

Expansion Cable plugged into GPIO Port.JPG
And only after the cable tests out OK, plug your new expansion cable into your Raspberry Pi GPIO port and power back on. Just make sure your Pi power is unplugged first.

Expansion Cable Plugged into breadboard.JPG
And plug the other end into your breadboard.

Completed GPIO Expansion Cable.JPG
And here’s my final set-up. The pins are conveniently numbered from 1 to 26 straight down the header and it’s going to be easy to mock-up designs on my breadboard!

Just don’t forget that your Pi’s logic levels are 3.3V & not 5V and the outputs are not buffered! And this just means that any good design should start first with proper level translation and when needed, isolation to protect your Raspberry Pi.

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