Adafruit GPIO Expander Bonnet for Raspberry Pi User Guide

Adafruit's GPIO Expander Bonnet adds 16 digital I/O pins to a Raspberry Pi using the MCP23017 chip over I2C.


Adafruit GPIO Expander Bonnet for Raspberry Pi User Guide - cover page
Brand
Adafruit
Category
Other products
Document type
User Manual
Language
English
Pages
16
File format
PDF
File size
3 MB
Published
30 November, 2026
Updated
30 November, 2026
MD5 checksum
11F4387F2113AAA63FA4ECBEC052A858

About this manual

The Adafruit GPIO Expander Bonnet is a small board that plugs onto a Raspberry Pi and adds 16 more digital input/output pins, giving you 16 extra pins for LEDs, sensors, buttons and other devices. The MCP23017 chip converts Python commands into pin instructions, and the board connects to the Pi through the SDA/SCL I2C pins.

The guide covers the pinouts, the MCP23017 chip, the GPIO expansion headers, the STEMMA QT connector, the address select jumpers and the interrupt pins, plus Python usage with the Adafruit_Blinka library and example code for reading a button and lighting an LED.

What's inside

  • Overview
  • Pinouts
  • MCP23017 GPIO Expander Chip
  • GPIO Expansion Headers
  • STEMMA QT Connector
  • Address Select Jumpers
  • Interrupt Pins
  • 3V/5V Jumper
  • Python Usage
  • Python Installation of MCP23017 Library

Specifications

Digital I/O pins16
I2C address range0x20 to 0x27
Maximum total GPIO with 8 boards128
Output current per pinup to 20mA
Total chip current limitunder 125mA
Logic levels5V default, 3.3V optional
Interrupt pinsINTA and INTB
Default I2C address0x20

Frequently asked questions

How many extra GPIO pins does the bonnet add?

The bonnet adds 16 more digital input/output pins, giving you two 16-pin connectors with a matching ground pin.

How do I change the I2C address of the bonnet?

Solder closed the address select jumpers to change the address from 0x20 up to 0x27, which allows up to 8 bonnets for 128 total GPIO.

How do I switch the bonnet to 3.3V logic?

The board defaults to 5V logic. Cut the trace between the top two pads of the 3V/5V jumper and solder the bottom two pads to change it to 3V.

Which library do I need to use the bonnet with Python?

Install the Adafruit_Blinka library, which provides CircuitPython support in Python, then run sudo pip3 install adafruit-circuitpython-mcp230xx.

Download PDF (3 MB)

More Adafruit Manuals


View all Adafruit manuals →