Monday, September 9, 2013

Homemade GPIO breakout for the Raspberry Pi / PiFace!


My home made adapter allows access to all the GPIO pins while using the PiFace! 

Problem: I have a Raspberry Pi with a Pi Camera.  I would like to install a PiFace to control some of the robot's parts direct from  the Raspberry Pi, but I would also like access to the GPIO pins so I  could also add an arduino via I2C or even SPI.  The Piface does not have a pass-through port or any access to individual GPIO pins (even though you can use 4 PiFace boards together, there is no way to connect them to each other or add any additional hardware.)  I would love to use the PiFace with any other GPIO hardware! 
  My solution: a few inches of ribbon cable,  2x 26 pin (2x13) female plugs and 1x 26 pin (2x13) male plug. A couple dollars and the PiFace is shifted up and a little to the left,  no longer crushing the Pi Camera's cable.  It also allows me to use my original Pi case (can't be used with the stock PiFace) and now I have full access to all 26 pins of the Pi's GPIO port. 
 Tomorrow I will need to mount the board with a couple well placed plastic bolts since the PiFace does not have mounting holes (relied on pin and socket electrical connection of the GPIO to hold it in place!)  This arrangement is so much better than the original configuration!  One added benefit is the space between boards.  I think I will take advantage of it to mount a cooling fan to provide airflow between both boards. 
 You can modify this in many ways,  you could run several male or female plugs to make several GPIO sockets or you could terminate it on a circuit board as I am and build a custom circuit/controller for the Pi.  Make your own sensor shield or just relocate add-on boards.  Very easy and very inexpensive! 

 Tomorrow I plan to assemble a level shifter onto the board shown connected to the GPIO cable.  This will connect an arduino board. I will also start designing a power supply to power the 3 different boards (Raspberry Pi, Arduino 328p and even a Mosfet h-bridge motor controller that is on a slow boat from China.. Literally!  4-6 weeks delivery from China!!!) 
  If it isn't clear what I am doing,  I have some grand plans for a remote robot using both the Raspberry Pi and Arduino.  The build gets bigger with each piece I complete,  so I am going to try and slow it down and get the test platform working well (via Radio Control) and then I  will move on to sensors, communication and automation. 
  
 As always,  if you have any questions on any part of this build, or you have any info that you think will make this easier (or any suggestions), please feel free to comment.