8 GPIO I2C Extender Board Pure Python Drivers Released for Raspberry Pi

8 GPIO I2C Extender Board Pure Python Drivers ReleasedIMG_5055 copy for Raspberry Pi

This board is an inexpensive I2C GPIO Extender Board. It allows you to add 8 pins of GPIO, with interrupts allowed on all pins, to any Arduino or Raspberry Pi design. It works with 5V and 3.3V and in fact you can have 4 pins at 5.0V while having 4 pins at 3.3V at the same time. It is based upon the Semtech SX1502 and it has some really excellent features. Here is the block diagram for the board:

bd0d61f71bb11e9414848c51131e34cf_original

 

What are some of the applications for this 8 GPIO Extender board? Anytime you need additional GPIO pins. This happens all the time with the Raspberry Pi and with some of the newer, smaller Arduino boards. Do you want more interrupts on your Arduino or Raspberry Pi? You can use this board to generate interrupts that can then be read by the Arduino or Raspberry Pi.

The other advantage is that you can set each bank of four GPIOs to a different power supply, anywhere from 1.2V to 5.5V. Very flexible in mixed voltage systems.

Of course, the board is both 3.3V and 5.0V tolerant meaning your I2C bus can be at either of those voltages.

Another more subtle advantage of this board is that you can create logic gates (PLD – Programmable Logic Device). Do you need a couple of logic gates in your design? You can build XOR, Inverters, AND, NAND, OR, NOR, etc., etc. using this chip. Your choice!

 

Raspberry Pi Pure Python Drivers

Raspberry Pi Pure Python Software Drivers are available here at https://github.com/switchdoclabs/SDL_Pi_SX1502

Hooking up the 8 GPIO I2C Extender Board to the Raspberry Pi

Signal Name

Raspberry Pi A/B/A+/B+/Pi 2

8 GPIO I2C Extender Board

Power

3.3V (GPIO/1)

VDDM (JP1/1)

GND

GND (GPIO/6)

GND (JP1/2)

SCL

I2C1_SCL (GPIO/5)

SCL (JP1/3)

SDA

I2C1_SDA (GPIO/3)

SDA (JP1/4)

Running the Test Software

The first test on the Raspberry Pi should always be “i2cdetect -y 1” which should show you the 8GPIOB at the default address of 0x21.

Running the test gives these results from the 8 GPIO I2C Extender board are below on the Raspberry Pi, as well as blinking the IO0 LED on the board:

Test SDL_Pi_SX1502 Version 1.0 - SwitchDoc Labs
Sample uses 0x21 I2C Address

Blinks IO0 once every second
Program Started at:2015-08-04 03:45:27

----------------- 
---------------- 
++++++++++++++ 
('GPIO Value =', 1) 
---------------- 
---------------- 
---------------- 
++++++++++++++ 
('GPIO Value =', 1) 
---------------- 
---------------- 
---------------- 
++++++++++++++ 
('GPIO Value =', 1) 
---------------- 
----------------