The Keybow was designed to use power, ground, twelve IO pins for the switches, and the two SPI clock and data lines (for the DotStar LEDs) from the Raspberry Pi Zero.

To use the Keybow with the ItsyBitsy M4 or M0, we will redirect those Keybow pins from the 2x20 connector to an ItsyBitsy's layout. The Adafruit ProtoBonnet works well for adapting the Keybow's switch and DotStar pinout to the ItsyBitsy M4/M0.

Here's how the pins are mapped:

Pi GPIO Pi Physical Pin ItsyBitsy M4
5V 2 Vhi
GPIO17 11 A2
GPIO27 13 A1
GPIO22 15 A5
GPIO23 16 A0
GPIO24 18 A4
MOSI 19 MO
SCLCK 23 SCK
GPIO5 29 A3
GPIO6 31 D10
GPIO12 32 D9
GPIO13 33 D7
GPIO16 36 D12
GPIO26 37 D2
GPIO20 38 D11
GND (many) GND

The Keybow to ItsyBitsy pin mapping looks like this:

Here is the same circuit diagrammed on the PermaBonnet:

Alternately, here's what a PCB for the adapter looks like. It's included here as it may make the connections a bit clearer to follow than the wire diagram above.

Cable Testing

Initially, I tested the connections using M/F jumper cables and an ItsyBitsy M4 with male header pins soldered on (the final build required a fresh ItsyBitsy due to the different header pin orientation used).

This was good for proving out the pin assignments, but not entirely as ergonomic a package as desired.

Adapter Board Build

Now, we'll build the adapter board to use the ItsyBitsy seamlessly with the Keybow.

ProtoBonnet Headers

To build the proper adapter board, we'll use the ProtoBonnet. To it, solder the 2x20 male header pins and the two 14 pin, single-row headers spaced for the ItsyBitsy as shown here.

A good way to align the single-row pins is to tape the ItsyBitsy to the board as shown, then flip the board over for soldering.

Wait until the end to solder the ItsyBitsy itself onto the male headers, so that you can have room to solder the wiring in place.

Wiring

Carefully follow the wiring diagrams and begin soldering short lengths of wire to make the connections between the Pi pin breakout row on the ProtoBonnet and the associated pins of the ItsyBitsy.

I found it easier to tack-solder some of the wires from the bottom side before flipping over to fully solder.

You'll notice there is one Pi pin we need to use that isn't broken out to the ProtoBonnet -- GPIO 26, which runs to D2 on the ItsyBitsy. For this one, we'll solder the wire directly to the header pin as shown.

This type of wiring can be exacting and requires a lot of concentration. Be sure to double check your work and take breaks!

Circuit Check

Once you're done soldering the circuit, use your multimeter in continuity mode to check each connection. Set one probe on a GPIO header pin and the other one on the associated ItsyBitsy header pin to make sure you have continuity.

Additionally, check to make sure all ground connections are shared, and that there are no shorts between power and ground.

Solder the ItsyBitsy to the Board

Now you can place the ItsyBitsy M4/M0 back onto the header pins and solder them all in place.

Trim the Excess Pin Lengths

While wearing eye protection, use diagonal flush cutters to trim the excess lengths of the ItsyBitsy header pins ONLY! Do not trim the 2x20 Raspberry Pi Bonnet headers!!

Fit Check

Before connecting the ItsyBitsy adapter board to the acrylic base, do a test fit to make sure the board connects properly to the Keybow.

Enclosure

Now, you can connect the ItsyBitsy adapter board to the Keybow base and fully assemble the board using M2.5 nylon standoffs and screws.

Follow the original Keybow instructions for this, substituting the ItsyBitsy adapter board for the Pi Zero. Since the wiring and header pins make this board a bit taller than the Pi Zero you may need an extra bit of room to fit it by adding a longer screws in a couple of spots. The nylon M2.5 screw and standoff kit is great for this.

PCB Adapter Build

If you choose to order a PCB adapter instead, here's how you'll assemble it.

Pi Headers

Place the 2x20 male Pi header pins into the board as shown.

You can use the Keybow to hold the pins in place as you solder them from the back side of the board.

Itsy Headers

Next, fit the two ItsyBitsy male header pin rows into the board as shown.

You can hold them in place with some poster putty or tape and then flip the board over and solder the pins in from the back. Push the pins flush with the board with the soldering iron as you go for the best fit, or trim the extra points off later with some flush cutters. (The Pi Zero we're replacing has a totally flat back.)

If you want to go the extra mile, do not solder the ItsyBitsy in place yet! We're going to remove the headers' black plastic spacers to get a super low profile so the ItsyBitsy will fit neatly in the case.

Alternately, you can solder the ItsyBitsy to the unmodified pins, but you may need some extra spacers for the acrylic case.

Carefully pry up the black plastic spacers, you'll be left with bare pins (or a very tiny bed of nails depending on your perspective).

Now, solder the ItsyBitsy M4 to the pins, and then trim off the excess.

Mounting

You can now mount the Itsy/Pi adapter to the acrylic case -- it has the same dimensions as the Pi Zero it is replacing.

Affix the Keybow to the board and off we go!

Next, we'll code the ItsyBitsy Keybow in CircuitPython so it can be customized to send HID USB keyboard commands and light the DotStar LEDs.

This guide was first published on Jun 10, 2020. It was last updated on Jun 10, 2020.
This page (Assemble the Bonnet) was last updated on Oct 24, 2020.