SparkFun 16 Output I/O Expander Breakout - SX1509

Are you low on I/O? No problem! The SX1509 can leverage your I2C interface for 16 extra channels of GPIO. And that's not all! This handy device also contains a fully programmable LED driver and a keypad scanning engine which enables continuous keypad monitoring of up to 64 keys! Since the I/O banks can operate between 1.2V and 3.6V (5.5V tolerant) independent of both the core and each other, this device can also work as a level-shifter.

This breakout board makes it easy to prototype using the SX1509 so you can add more I/O onto your Arduino or I/O limited controller. We've even spun up an Arduino Library to get you started!

  • Enable Direct Level Shifting Between I/O Banks and Host Controller
  • 5.5V Tolerant I/Os, Up to 15mA Output Sink on All I/Os
  • Integrated LED Driver with Intensity Control
  • On-Chip Keypad Scanning Engine Supports Up to 8x8 Matrix (64 Keys)
  • 16 Channels of True Bi-directional Style I/O
  • 400kHz I2C Compatible Slave Interface

SparkFun 16 Output I/O Expander Breakout - SX1509 Product Help and Resources

Core Skill: Soldering

This skill defines how difficult the soldering is on a particular product. It might be a couple simple solder joints, or require special reflow tools.

2 Soldering

Skill Level: Rookie - The number of pins increases, and you will have to determine polarity of components and some of the components might be a bit trickier or close together. You might need solder wick or flux.
See all skill levels


Core Skill: Programming

If a board needs code or communicates somehow, you're going to need to know how to program or interface with it. The programming skill is all about communication and code.

3 Programming

Skill Level: Competent - The toolchain for programming is a bit more complex and will examples may not be explicitly provided for you. You will be required to have a fundamental knowledge of programming and be required to provide your own code. You may need to modify existing libraries or code to work with your specific hardware. Sensor and hardware interfaces will be SPI or I2C.
See all skill levels


Core Skill: Electrical Prototyping

If it requires power, you need to know how much, what all the pins do, and how to hook it up. You may need to reference datasheets, schematics, and know the ins and outs of electronics.

2 Electrical Prototyping

Skill Level: Rookie - You may be required to know a bit more about the component, such as orientation, or how to hook it up, in addition to power requirements. You will need to understand polarized components.
See all skill levels


Comments

Looking for answers to technical questions?

We welcome your comments and suggestions below. However, if you are looking for solutions to technical questions please see our Technical Assistance page.

  • Steps how to use Sparkfun SX1509 C++ Library on raspberry pi

    you might be facing compilation errors when compiling SX1509 C++ library. Below are the few errors which i faced when compiling and steps to fix them.

    Prerequisites

    • Install wiringPi on raspberry Pi

    • Download the Sparkfun library from github

    ** To compile **

    • g++ -c sx1509_registers.h SparkFunSX1509.h SparkFunSX1509.cpp -std=gnu++11 -lwiringPi -lpthread

    ERRORS

    sx1509_registers.h:142:1: error: ‘uint8_t’ does not name a type uint8_t REG_I_ON[16] = {REG_I_ON_0, REG_I_ON_1, REG_I_ON_2, REG_I_ON_3, ^ sx1509_registers.h:147:1: error: ‘byte’ does not name a type byte REG_T_ON[16] = {REG_T_ON_0, REG_T_ON_1, REG_T_ON_2, REG_T_ON_3, ^

    * Open the file sx1509_registers.h and replace "byte" with "unsigned char"
    * and execute the command above.
    * It should compile successfully and generate an object file "SparkFunSX1509.o" for you.
    

    **Generate an archive library using "SparkFunSX1509.o" **

    • ar rvs SparkFunSX1509.a SparkFunSX1509.o

    ** Compile the demo file available in the ** github

    * g++ main.cpp -o demo SparkFunSX1509.a -lwiringPi -lpthread -std=gnu++11
    

    Demo executable is generated now successfully. Now you can run it on raspberry pi and explore more capabilities of SX1509 I/O Expander Breakout board

  • bluenic / about 10 years ago / 2

    Great device, great library!

    Succeeded in running the ledDriver example (IDE v1.0.6) right from start (don't forget to set SX1509_ADDRESS accordingly).

    Attention: by all means keep in mind, that the device is running independently, i.e. it keeps doing what it's told to even when your program crashes. That might be desirable on some occasions, but if, for example, you are controlling a motor via this device, it will continue running without control by your program. Imagine! So take appropriate precautions. At least connect the reset pin of the SX to the reset pin of your arduino. I stumbled over this effect wondering, why the LEDs kept blinking while uploading a new sketch.

    I agree to the thoughts of member #322759 regarding the layout.

  • Member #354867 / about 10 years ago / 1

    Has anyone got the Arduino Library for this to work recently? I'm using v1.0.5.

  • rootScript / about 10 years ago * / 1

    Could you do a breakout for the SX1508 (8 channel version) please. The SX1509 Breakout is way bigger than my Teensy 3.1. Doing a 8 channel version would also bring the breakout board price down too, and give you the opportunity to do a smaller revised board :o)

  • Member #322759 / about 11 years ago / 1

    This is a fantastic i2c 16 channel io port expander with level shifting. The only things I would suggest is to re-layout the boards i2c pins and add thru holes on the corners so standoffs could be used if wanted.

    The i2c pin layout I am most familiar with is VCC, GND, SCL, SDA then you can have the Int, RST, and the oscillator on another 3 pins. This way a 4 pin and a 3 pin right angle headers could be used for use on a breadboard or with standoffs. (just cut down the 6 pin rt angle header that sparkfun sells)

    If you also add the 4 pin 12c pads to the other side of the board it can be used in a chain of i2c devices.

    Please consider re-laying out this board, So far I have not found any i2c port expander that comes close to the SX1509 functionality and features.

  • Spark007 / about 11 years ago * / 1

    The SX1509 Output I/O Expander Breakout is one slick board and it would be better if Sparkfun could do the following re-design and make a 2 wire I2C Universal LCD and tact joystick interface controller board with the following features:

    1/2 SX1509 8 bit port bank controls a 2x16 or 4x20 LCD with ST7077/HD44780 controller. Note: Liquid crystal library would need to be ported to drive your "off the shelf" character LCDs with the I2C SX1509.

    The other 1/2 SX1509 8 bit port bank would poll your remote mounted 5 position tact navigation joystick BOB. To add robustness to the universal LCD controller, an NMI interrupt is also used to detect any joystick changes.

    The Universal LCD and tact joystick interface controller would need to operate with dual 3 V or 5 V systems.

    Spare GPIO I/O bits from the SX1509 would PWM the backlight on the LCD displays for energy savings and a digital pot or PWM to control the contrast, if possible.

    Imagine having only two wires (plus vcc and gnd) driving a LCD and receiving joystick inputs for LCD character navigation.

    If you produce this board, I would be the very first to buy it from Sparkfun!

  • Member #278726 / about 11 years ago / 1

    some one should make a Ardunio shield with 3 of these and have tons of I/Os

  • tdeagan / about 11 years ago / 1

    Has anybody gotten the keypad example to work? I'm using a Duemilanove w/ATmega328, commented out the Leonardo parts, but still can't get the keypad engine to scan. I got the digitalReadWrite example to work, even tried merging it into the keypad example where it still works. With the keypad example, watching the various SX1509 pins on a logic analyzer is showing no activity across IO0...IO7, nRST, nINT, SCL or SDA (keypad setup per pg.16 in the datasheet.)

    • tdeagan / about 11 years ago / 1

      Figured out my problem with the keypad. I was using the wiring laid out in the datasheet, the actual wiring for the keypad is in the example code:"The four rows of the button matrix should be connected to the SX1509's 0:3 pins. The columns of the button matrix should be connected to the SX1509's 8:11 pins."

  • Member #403888 / about 11 years ago / 1

    Would be really great if it could take inputs up to 10v. I need to a DAC with 0-10v and it would be killer if I could just use a single board for it.

  • um the thing needs 5 pins (data;clock;int;reset;osc) in addition to power and ground so total 7 connections to the Arduino? Standard 2 i2c would have been ideal but even as it is the IC is pretty cool with its independent LED blinking engine and keyboard matrix

    • jimblom / about 11 years ago / 1

      You can definitely use it with just the two I2C pins. The other three control pins are optional - it's got an internal 2MHz oscillator, software reset, and the interrupt's not critical (especially for LED driving). Yup, it's a pretty nifty chip.

  • CodeMaven / about 11 years ago / 1

    Hmm... This would be great as a digispark shield. I wonder if it could be squeezed down a few MM and re-arranged to mate directly to the digispark and make a nice compact microcontroller with lots of IO.

    • DHowett / about 11 years ago / 1

      Imagine a digispark-shield-sized board with a thin flex ribbon socket/cable, attached to an auxiliary 16-I/O-breakout board. Yessss.

Customer Reviews

No reviews yet.