K002 - Slice of PI/O

 

1. Overview

2. Power Options

3. Interrupt Pins

4. Address Selection

5. I2C Extenstion header

6. Build Steps

7. Testing It

 

1 Overview

Slice of PI/O is an MCP23017 breakout, adding 16 I/O pins to the Raspberry Pi via the I2C bus.
Each I/O pin is capable of sourcing or sinking 25mA and they are 5v tolerant.
Data-sheet for the MCP23017 chip can be found here.
Special mention should go to Nathan for coming up with the original idea, see his blog post here

Silk Screen Error

There was a mistake on the silk screen for the first batch of boards. Port B is numbered incorrectly.
The port number should from top to bottom read A0->A7 then B7->B0

 

2 Power Options

The slice of PI/O has 3 power options 3v3, 5v or external. Use the red jumper to select between 3v3 and 5v direct from the Raspberry Pi's GPIO headers or remove the jumper and wire a power source to the "EXT POWER" pad.

 

3 Interrupt Pins

Two Interrupt Pins A & B have been broken out to pads, these can be wired back the Raspberry Pi's normal GPIO's.
Interrupts can be configured to trigger on input pin changes, for more info please refer to the MCP23017 data-sheet.

 

4 Address Selection

On the underside of the PI/O there are 6 solder pads used for the 3 address selection pins on the MPC23017.
You need to tie the 3 pins either high(to PWR) or low(to GND) in order to select the I2C address,

Soldering all 3 pins low as shown will give an address of 0x20. More details can be found in the MCP23017 data-sheet

 

5 I2C Extenstion header

There are an optional 4 pads to allow extenion of the I2C bus, this could allow daisy chaining of multiple MCP23017 or any other I2C device

 

6 Build Steps

Parts laid Out


Solder the IC Socket


Solder the IO and GND headers


Solder the capacitor and jumper


Solder the Raspberry Pi GPIO header to the other side of the board


Add the required power jumper and go

 

7 Testing It

Using the latest Raspbian image is recommended as it already has I2C support built into the kernel and just needs the i2c enabling and i2c-tools installing before you can start playing.

Enable i2c by editing the following files

/etc/modprobe.d/raspi-blacklist.conf

Comment out the line

blacklist i2c-bcm2708


 

/etc/modules

Add a new line

i2c-dev

Installing i2c-tools requires two commands, replace 'your-userid' with your login name (the default is pi)


$ sudo apt-get install i2c-tools
    $ sudo adduser your-userid i2c

Once everything is installed and rebooted, you should be able to detect the MCP23017 using the following command.


$ i2cdetect -y 0

It should show up on the address you selected