The preassembled 40-pin Pi Wedge is the newest member in our Pi Wedge family. It’s an excellent way to get those pesky Pi pins broken out to a breadboard so that they can easily be used.
The Pi Wedge in a breadboard
This Pi Wedge is compatible with members of the Pi family with 40-pin GPIO headers, including
- The Raspberry Pi Model A+
- The Raspberry Pi Model B+
- The Raspberry Pi 2 Model B
It adapts the 40-pin GPIO connector on recent Pis to a breadboard-friendly form factor and rearranges the pins by similar function. Also, the GPIO pins are arranged in ascending order.
This version also comes fully assembled – no soldering is required!
The Pi Wedge, shown with a Pi B+.
Covered in This Tutorial
- Background – How the Pi Wedge came to be
- Assembly – How to connect the FTDI, ribbon cable, and breadboard
- Pin Mapping – What the silkscreen on the Wedge represents
- Logic Levels and Power – Electrical information about connecting to the Pi
- Some additional resources
In the process of developing projects like the Twitter Monitor and Great American Tweet Race around the Raspberry Pi, we found that we were experiencing some growing pains when trying to expand the Pi into a prototype that involved external hardware.
There’s a Pi somewhere in this ratsnest
The Raspberry Pi Model B+ has a 40-pin connector that provides access to several communication interfaces, plus GPIO and power. But the connector doesn’t have detailed labeling, and the native pin arrangement is somewhat scattershot. Pins used for similar functions aren’t always grouped together, and power and ground pins are interspersed with no obvious pattern.
The pins also don’t translate to a solderless breadboard very easily. Our first projects used a bunch of F-M jumper wiresthat we just plugged into the header. They involved a lot of “ratsnest jiggling” when things stopped working.
In addition to the physical issues of using the I/O connector, getting started with a brand new Raspberry Pi B+ always seems to involve a chicken-and-egg situation. We just want to SSH into it, so we can use the command line. But in order to SSH to it, we need to know it’s IP address…and of course, the IP address is most easily learned by running ifconfig on the command line.
Meet the 40-Pin Pi Wedge
The Pi Wedge B+ connects to the 40-pin GPIO connector, and breaks out the pins in a breadboard-friendly arrangement and spacing. It adds a pair of decoupling capacitors on the power supply lines, and it makes the initial bringup process easier – you can plug an FTDI Basic module into the serial port.
The Preassembleed Pi Wedge comes with the Wedge PCB, and a 40-pin ribbon cable.
The 40-pin ribbon cable is used to connect the wedge to the Pi. This cable is polarized. On the Pi Wedge PCB end, the tooth on the cable will interface with the notch in the shrouded header.
Inserting the ribbon cable
The header on the Pi B+ itself doesn’t have anything to help guarantee the alignment. You’ll need to take care that it gets connected properly. Pin 1 on the Pi is marked with a dog-eared corner on the silkscreened rectangle. The ribbon cable connector is embossed with (a barely visible) small triangle that marks pin 1. The first pin is also coded on the wire, such as the red markings in the photo below (though it may also be another color, such as black or dark blue).
Proper pin-1 orientation
The FTDI connector also needs to be aligned correctly. Be sure to match up the “grn” and “blk” markings on both boards.
Proper 3.3V FTDI-Basic orientation
In the next section, we’ll explore how the signals from the Pi are mapped to the Wedge.
Changes With the B+
When the Raspberry Pi foundation introduced the B+, they expanded the GPIO header from 26 to 40 pins. These changes have been carried forward by the A+ and Pi 2 Model B. The connector adds nine more GPIO pins plus the ID_SC and ID_SD pins to identify external peripherals, which you can learn more about in our SPI and I2C tutorial.
The Pi Wedge reorganizes the I/O pins on the Pi, putting similar functions on adjacent pins. The SPI, I2C and UART signals are all grouped near each other.
The pins are labeled, though the labels are short, to fit the space available on the PCB. The UART, SPI and I2C pins are marked with their communication bus functions, but they are also available as GPIO pins when configured in that mode.
The following table denotes the assignment of signals on the Pi Wedge, including the peripheral and alternate GPIO assignments where appropriate.
|Wedge Silk||Python (BCM)||WiringPi GPIO||Name||Name||WiringPi GPIO||Python (BCM)||Wedge Silk|
|G17||17||0||GPIO17 (GPIO_GEN0)||GPIO18 (GPIO_GEN1)||1||18||G18|
|G4||4||7||GPIO04 (GPIO_GCLK)||GPIO24 (GPIO_GEN5)||5||24||G24|
|CE1||11||GPIO7 (SPI_CE1_N)||GPIO25 (GPIO_GEN6)||6||25||G25|
|MOSI||12||GPIO10 (SPI_MOSI)||GPIO27 (GPIO_GEN2)||2||27||G27|
|MISO||13||GPIO09 (SPI_MISO)||GPIO03 (SCL1, I2C)||9||SCL|
|SCK||(no worky 14)||GPIO11 (SPI_CLK)||GPIO02 (SDA1, I2C)||8||SDA|
|RXI||16||GPIO15 (UART_RXD0)||GPIO0, ID_SC (I2C ID SC EEPROM)||31||IDSC|
|TXO||15||GPIO14 (UART_TXDO)||GPIO1, ID_SD (I2C ID SD EEPROM)||30||IDSD|
Pi Wedge B+ Pin-Function mapping
Logic Levels And Power
The Pi uses 3.3V logic levels, which are not 5V tolerant. Many peripheral devices are capable of running at 3.3V, but in the case that you need to interface with 5V devices, use a level shifter, such as the TXB0104 breakout.
The signals on the 6-pin FTDI header are also limited to 3.3V logic levels. Be sure to use it with a 3.3V FTDI module, and not a 5V one.
Understanding the Pi’s power supply is critical to using it successfully, particularly when building it into a larger system.
The Raspberry Pi B+ is more efficient than it’s predecessors, as it replaces the former chain of linear power regulators with switching regulators.
The most recently published schematics are for the Raspberry Pi B+, and we’re assuming that the Pi2 model B and A+ are similar. Inspecting those schematics, we see that 5V comes into the the board via connector J1 – it’s a micro USB connector, but only the power and ground pins are connected. The 5V coming from this connector passes through a fuse and a transistor circuit that protects against power polarity mishaps, then continues around the board without any further regulation. The 5V connections on the Pi Wedge come straight from this line.
On the B+, the 5V goes to a dual switching regulator that further reduces it to 3.3V, and 1.8V. The regulated 3.3V is present on the I/O connector.
There are several power strategies that can be applied in a Pi deployment, depending on the overall needs and availability.