SX1509 I/O Expander Breakout Hookup Guide

Pages
Contributors: jimblom
Favorited Favorite 12

Introduction

Is your Arduino running low on GPIO? Looking to control the brightness of 16 LEDs individually? Maybe blink or breathe a few autonomously? Want to delegate scanning an 8x8 matrix of 64 buttons to another controller? These are all tasks the for which the SX1509 16-IO Expander was made!

SparkFun 16 Output I/O Expander Breakout - SX1509

SparkFun 16 Output I/O Expander Breakout - SX1509

BOB-13601
$6.95
11

The SX1509 is a 16-channel GPIO expander with an I2C interface -- that means with just two wires, your microcontroller can interface with 16 fully configurable digital input/output pins.

But, the SX1509 can do so much more than just simple digital pin control. It can produce PWM signals, so you can dim LEDs. It can be set to blink or even breathe pins at varying rates. And, with a built-in keypad engine, it can interface with up to 64 buttons set up in an 8x8 matrix.

SX1509 Demo circuit

An SX1509 controlling three LEDs, monitoring three buttons and a 12-button keypad, and producing SPI signals to drive a Serial 7-Segment Display.

It's a really cool chip and a great tool for expanding the capability of your Arduino or any other I2C-capable microcontroller.

Covered In this Tutorial

This tutorial will serve to familiarize you with all things SX1509 and the SparkFun Breakout. Then we'll demonstrate how take advantage of all of the I/O expander's features using an Arduino-compatible microcontroller and our SX1509 Arduino Library.

The tutorial is split into the following sections:

Suggested Reading

Before delving into this tutorial, there are a few concepts you should already be somewhat familiar with. Check out these related tutorials:

  • I2C Communication -- The SX1509 is controlled over an I2C interface. Learn all about this powerful 2-wire interface.
  • Logic Levels -- While most Arduino's operate at 5V, the SX1509 works at 3.3V. The GPIO are, at least, 5V tolerant!
  • Pulse-Width Modulation (PWM) -- All of the SX1509's output pins are capable of producing a PWM signal. That means you can control the brightness of LEDs!

Pulse Width Modulation

An introduction to the concept of Pulse Width Modulation.

Logic Levels

Learn the difference between 3.3V and 5V devices and logic levels.

Light-Emitting Diodes (LEDs)

Learn the basics about LEDs as well as some more advanced topics to help you calculate requirements for projects containing many LEDs.

I2C

An introduction to I2C, one of the main embedded communications protocols in use today.