30

Raspberry's GPIO connector looks very similar to the old Parallel-ATA connectors. I do have several spare floppy/hdd PATA ribbon cables. Can I use these cables for GPIO? I know that GPIO has 26 pins, floppy has 34, hdd has 40, but the GPIO connector is at the edge of the board, so the connector may just overlap.

Can I use these cables, or a special cable ( like this one ) is a must?

asalamon74
  • 4,108
  • 4
  • 31
  • 31

6 Answers6

19

A 40-pin HDD cable will probably not fit. They often have pin 20 obstructed (so it must be absent from the male connector) to prevent the connector from being plugged in the wrong way round.

You can usually use a 34-pin floppy cable. But remember that a group of seven wires is usually twisted (i.e. connected in the opposite order from one end of the cable to the other.) (further explained here.) Don't forget to adjust the pinout on the slave board to compensate!

But you can always make your own cable instead.

finnw
  • 5,790
  • 3
  • 34
  • 42
8

The short answer is NO you cannot use 40 pin ATA/IDE cables for GPIO on the PI.

While it is easy to get cables without the blocked pin, the main issue is that each connector internally shorts seven of the pins together. This is because in the ATA spec they are all ground, but it could be terminal for your pi.

I have verified this with a standard (80 wire) cable bought from Maplin.

The shorted pins are 2,19,22,24,26,30 and 40 which, if you are not careful will connect the 3V3 to several of the GPIO lines and a DNC (Do-Not-Connect), which is likely to fry you pi as soon as you turn it on.

If you are careful (or lucky) you can orientate it so that it only connects GPIO lines together, in which case as long as you keep all those lines at the same level (e.g. all low) then you might get away with it.

5

Since I know this will come up in the future. I wanted to do the same thing and used a floppy drive cable from an old computer. I have labeled what pins on the Pi correspond to what pins on the other end of the cable. Hope this helps someone in the future!

Labeled pins on the Pi

Here's a pinout of a floppy cable for reference.

Floppy Cable Pinout

Willem Ellis
  • 263
  • 3
  • 9
4

Floppy cables used to always look like this

MB==========B=><=A

Where >< is the group of twisted wires. With a sharp knife you can trim off the wires just past the B connector and keep the MB======B part

I think some of the later ones only had two connectors, ie. no plug for the B drive. In that case you could carefully pry the connector off and move it down past the twist. This can be difficult as the locking clips are very brittle

John La Rooy
  • 12,005
  • 9
  • 48
  • 77
2

I think the best way is use a lpt (Sub-D25 ) cable from an old PC it fits perfectly end you can find it in all old computer store

https://www.facebook.com/photo.php?fbid=302451366533276&set=a.302451336533279.59880.300644370047309&type=3

http://shop.intos.de/ieos/images/produkte/closeup/33225.jpg

1

Yes you can, but it is a bit bigger.

I use flex to cut my IDE cable for the 26 pin GPIO and connect it to my motor controller based on a L9110.

It is very simple and works very well.

Scissors, Solder gun, Angle grinder and ribbon cables

Greenonline
  • 2,969
  • 5
  • 27
  • 38