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.
SparkFun Pi Wedge BOB-13717This is the SparkFun Pi Wedge, a small board that connects to the 40-pin GPIO connector on the Raspberry Pi and breaks the pi…
Check out the Pi Wedge in the product showcase at 2:47!This Pi Wedge is compatible with members of the Pi family with 40-pin GPIO headers, including
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 TutorialBut before you begin, check out these links and brush up on topics you may not be familiar with:
Suggested Reading Suggested Viewing BackgroundIn 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 wires that we just plugged into the header. They involved a lot of "ratsnest jiggling" when things stopped working.
BootstrappingIn 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.
Assembly ContentsThe Preassembleed Pi Wedge comes with the Wedge PCB, and a 40-pin ribbon cable.
ConnectionThe 40-pin ribbon cable is used to connect the wedge to the Pi. This cable is polarized — notice that the pin 1 marking is very subtle. On the Pi Wedge PCB end, the tooth on the cable will interface with the notch in the shrouded header. Insert the IDC cable into the Pi Wedge's polarized connector so that the cable extends away from the breadboard connection.
Inserting the ribbon cable
Insert the Wedge into the center of the breadboard so that each pin has their own row.
Wedge inserted in breadboard.
The header on the Pi 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). Insert the IDC cable to the Pi so that the cable extends away from the Pi.
Proper pin-1 orientation
Note:If you are using an enclosure (like the Pi 4 heat sink case, you may want to consider using an extension header to properly connect the Pi Wedge's IDC cable to the Raspberry Pi's GPIO pins.
Extension headers are also useful when stacking HAT's with other single board computers that utilize the Pi's standard 2x20 GPIO header like the Google Coral and NVIDIA Jetson.
The extension header with 9.80mm pin length [ PRT-16764 ] is useful when sandwiching a PCB between a Pi and HAT. The header can also be used to sandwich a board betwen the Pi and Pi Wedge's IDC cable. The extension header with 7.30mm pin length [ PRT-16763 ] uses three plastic spacers which cover the pins more when using a HAT or the Pi Wedge's IDC cable.
The height of the enclosure and PCB varies depending on the design. The image below shows a Pi 3 in the enclosure. The overall height of the enclosure is lower than the Pi 4's heat sink enclosure, so one 2x20 extension header was needed when stacking the Qwiic pHAT v2.0 on the Pi. You may need to stack additional extension headers so that the boards have enough clearance when using other enclosures and PCBs sandwiched between the Pi and IDC cable.
If you decide to connect to the Pi using serial, you can insert a 3.3V FTDI to the Pi Wedge. The FTDI connector needs to be aligned correctly. Be sure to match up the "GRN" and "BLK" markings on both boards.
Proper 3.3V FTDI-Basic orientation
Your setup will look similar to the image below. In this case, we used a Pi 3 in an enclosure.
In the next section, we'll explore how the signals from the Pi are mapped to the Wedge.
Pin Mapping 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.
Signal LocationThe 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.
Functional Groupings
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 G16 16 27 GPIO16 GPIO19 24 19 G19 G13 13 23 GPIO13 GPIO20 28 20 G20 G12 12 26 GPIO12 GPIO21 29 21 G21 G6 6 22 GPIO06 GPIO22 (GPIO_GEN3) 3 22 G22 G5 5 21 GPIO05 GPIO23 (GPIO_GEN4) 4 23 G23 G4 4 7 GPIO04 (GPIO_GCLK) GPIO24 (GPIO_GEN5) 5 24 G24 CE1 11 GPIO7 (SPI_CE1_N) GPIO25 (GPIO_GEN6) 6 25 G25 CE0 10 GPIO8 (SPI_CE0_N) GPIO26 25 26 G26 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 5V 5V 3.3V 3.3V GROUND GROUNDPi Wedge B+ Pin-Function mapping
Heads up!The pinout is with respect to the Pi Wedge. If you are looking for the pinout with respect to the Pi's header, check out the table in the Raspberry gPIo tutorial.
Raspberry gPIo: GPIO Pinout Logic Levels And Power Logic LevelsThe 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.
CommunicationsThe 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.
PowerUnderstanding 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.
Power Through the GPIO ConnectorThe most obvious strategy for powering small external circuits is to get power directly from the GPIO connector. To power small circuits on your breadboard, you can run jumpers from the 5V or 3.3V and Ground pins on the wedge to the power rails on the breadboard.
Jumpering power to the breadboard rails
While this is the most immediate way to access power, it only extends to small circuits. The B+ itself is limited to 2A total from the 5V line, most of which is needed by the B+ itself. The stated limit for the 3.3V pins is 50 mA.
If you're developing external circuitry, and the Pi resets when you're testing it, you may be exceeding the current limits. We saw this exact situation arise as we added SPI controlled 7-segment LED displays - if we illuminated one too many segments, the system crashed. For circuits with higher power draw, we'll need to explore some alternatives.
Daisy ChainingThe next power option is to connect each section of the circuit directly to the power supply. This means that the peripherals aren't constrained by the current limits of the fuses and regulators on the Pi itself.
The peripherals are powered directly by the supply directly
For peripherals that use 5V logic, they should also include 3.3V/5V logic level translation.
Back Power Through J8As described above, a simple deployment can power peripherals via the 5V and 3.3V pins of J8, but it's also possible to apply power to the Pi via those lines. The Pi Foundation call this "back powering", and they have a number of recommendations for it's implementation.
The first recommendation is to duplicate the fuse and MOSFET + BJT power protection circuit as seen on the Pi itself. This circuit is a variant on the "ideal diode" circuit.
It serves several purposes:
The other recommendation is that the HAT needs to be able to provide 5V, +/- 5%, with at least 1.3 A available for the Pi.
Resources and Going FurtherIf you want more detailed information about the Wedge and the interfaces it breaks out, check out the following materials:
How to use either Python or C++ to drive the I/O lines on a Raspberry Pi.
Raspberry Pi SPI and I2C TutorialLearn how to use serial I2C and SPI buses on your Raspberry Pi using the wiringPi I/O library for C/C++ and spidev/smbus for Python.
Python GUI Guide: Introduction to TkinterTkinter is the standard graphical user interface package that comes with Python. This tutorial will show you how to create basic windowed applications as well as complete full-screen dashboard examples complete with live graph updates from matplotlib.
Looking for more inspiration? Check out these other Rasperry Pi tutorials:
Serial Terminal BasicsThis tutorial will show you how to communicate with your serial devices using a variety of terminal emulator applications.
Setting up Raspbian (and DOOM!)How to load a Raspberry Pi up with Raspbian -- the most popular Pi Linux distribution. Then download, compile, install and run the classic: Doom.
Raspberry Pi Stand-Alone ProgrammerThis tutorial will show you how to use a headless Raspberry Pi to flash hex files onto AVR microcontrollers as a stand-alone programmer. It also tells the story about production programming challenges, how SparkFun came to this solution, and all the lessons learned along the way.
For more information about the Raspberry Pi B+ and the software described here, please visit their sites.
If you have any problems or questions, our technical support department can help. Please don’t hesitate to contact us. We also love to hear about your projects!
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4