SparkFun Qwiic GPIO Hookup Guide

Pages
Contributors: El Duderino, Englandsaurus
Favorited Favorite 2

Introduction

The SparkFun Qwiic GPIO is an I2C device aimed at simplifying adding extra GPIO pins to a microcontroller. The board uses the TCA9534U I/O Expander IC from Texas Instruments to add up to 8 digital inputs and outputs controlled via an I2C interface. The TCA9534U features three address select pins that can be set to configure eight unique addresses meaning you can have up to 64 I/O pins controlled from a single I2C bus!

SparkFun Qwiic GPIO

SparkFun Qwiic GPIO

DEV-17047
$6.50
4

To simplify wiring everything up, we've broken out all eight of the general-purpose I/O pins on the TCA9534U along with several power rail pins to latch terminals and, as you would expect from a Qwiic board, the I2C interface is broken out to a pair of Qwiic connectors.

Controlling the TCA9534 is relatively straightforward but to make things even easier, we've written an Arduino Library and a Python Package for the Qwiic GPIO to make writing code for it as easy as possible.

In this guide we'll go over everything you need to know about the Qwiic GPIO so you can add those extra I/O pins to your circuit with ease!

Required Materials

In order to follow along with this tutorial you'll need a few items along with your Qwiic GPIO. First, you'll need a microcontroller to communicate with the board. Below are a few options that come Qwiic-enabled out of the box:

SparkFun Thing Plus - ESP32 WROOM (Micro-B)

SparkFun Thing Plus - ESP32 WROOM (Micro-B)

WRL-15663
$22.50
14
SparkFun RedBoard Qwiic

SparkFun RedBoard Qwiic

DEV-15123
$21.50
20
SparkFun RedBoard Artemis

SparkFun RedBoard Artemis

DEV-15444
$21.50
10
SparkFun Qwiic Micro - SAMD21 Development Board

SparkFun Qwiic Micro - SAMD21 Development Board

DEV-15423
$22.50
5

If your preferred microcontroller does not have a Qwiic connector, you can add one using one of the following products:

SparkFun Qwiic Adapter

SparkFun Qwiic Adapter

DEV-14495
$1.60
5
SparkFun Qwiic Shield for Arduino

SparkFun Qwiic Shield for Arduino

DEV-14352
$7.50
9
SparkFun Qwiic Shield for Thing Plus

SparkFun Qwiic Shield for Thing Plus

DEV-16790
$4.95
SparkFun Qwiic Shield for Arduino Nano

SparkFun Qwiic Shield for Arduino Nano

DEV-16789
$4.95

Finally, you'll need at least one Qwiic cable and possibly some hook up wire or jumper cables. Below are a few options for each of those cable types:

Qwiic Cable - 100mm

Qwiic Cable - 100mm

PRT-14427
$1.50
Hook-Up Wire - Assortment (Stranded, 22 AWG)

Hook-Up Wire - Assortment (Stranded, 22 AWG)

PRT-11375
$22.50
19
Jumper Wires Standard 7" M/M - 30 AWG (30 Pack)

Jumper Wires Standard 7" M/M - 30 AWG (30 Pack)

PRT-11026
$2.45
20

Qwiic Cable - 200mm

PRT-14428
Retired

Suggested Reading

If you aren't familiar with the Qwiic system, we recommend reading here for an overview:

Qwiic Connect System

We would also recommend taking a look at the following tutorials if you aren't familiar with the concepts covered in them:

Polarity

An introduction to polarity in electronic components. Discover what polarity is, which parts have it, and how to identify it.

Serial Terminal Basics

This tutorial will show you how to communicate with your serial devices using a variety of terminal emulator applications.

Processor Interrupts with Arduino

What is an interrupt? In a nutshell, there is a method by which a processor can execute its normal program while continuously monitoring for some kind of event, or interrupt. There are two types of interrupts: hardware and software interrupts. For the purposes of this tutorial, we will focus on hardware interrupts.

How to Work with Jumper Pads and PCB Traces

Handling PCB jumper pads and traces is an essential skill. Learn how to cut a PCB trace, add a solder jumper between pads to reroute connections, and repair a trace with the green wire method if a trace is damaged.