[TriEmbed] More About The RPi and Port Expanders

Rodney Radford ncgadgetry at gmail.com
Thu Sep 18 08:07:20 CDT 2014


There are two parts to this - the port expander, and the voltage change, so
let's take each individually, and then together.

For just a port expander, you can tie the SCL/SDA and GND/3.3 volt lines
back to the RPI as shown in that article you provided.

If you want to use an external 3.3v supply, you can connect the external
3.3v to the port expander and then tie the GND of the RPi to the GND of the
external 3.3v supply.

Now to go to 5v, you have to be very careful as if you just replace the
3.3v supply in the previous example with a 5v supply, you will exceed the
voltage allowable on the RPIs SCL/SDA lines.

So you will need to isolate the (now) 5v port expander from the 3.3v RPi.
You can do that with a level converter.  The level converter takes two
power supplies (the 3.3v and 5v) supplies as input and IO lines from the
3.3v side (RPi's SCL/SDA) and IO lines from the 5v side (port expander's
SCL/SDA) and it will do the voltage conversion.  The software will work the
same way as in the very first and second example as the RPi does not know
(nor does it care) that the voltages are being converted before you get to
the port expander.

Here is a Sparkfun example of using the logic converter - there is even an
example for I2C on the page:

https://learn.sparkfun.com/tutorials/using-the-logic-level-converter

So to summarize:
* port expander with RPi - connect as in the URL you sent
* port expander with external 3.3v - external supply, just tie the GNDs
together
* port expander with external 5v - must use a level converter



On Thu, Sep 18, 2014 at 8:50 AM, Grawburg <grawburg at myglnc.com> wrote:

> I'd like some comments on this Web article, since it describes exactly
> what I want to do.
>
>
>
> http://nathan.chantrell.net/20120610/raspberry-pi-and-i2c-devices-of-different-voltage/
>
>
> I want to use ONLY the SLC and SDA pin on the Pi and power the I/O
> expander, and hence the LEDs connected to it,
> with an external 5VDC or even a 3.3 --- but the 5 is more easily
> available.  I'm going to test this today.
>
>
>
>
> Brian Grawburg
>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> Triangle, NC Embedded Computing mailing list
> TriEmbed at triembed.org
> http://mail.triembed.org/mailman/listinfo/triembed_triembed.org
> TriEmbed web site: http://TriEmbed.org
>


On Thu, Sep 18, 2014 at 8:50 AM, Grawburg <grawburg at myglnc.com> wrote:

> I'd like some comments on this Web article, since it describes exactly
> what I want to do.
>
>
>
> http://nathan.chantrell.net/20120610/raspberry-pi-and-i2c-devices-of-different-voltage/
>
>
> I want to use ONLY the SLC and SDA pin on the Pi and power the I/O
> expander, and hence the LEDs connected to it,
> with an external 5VDC or even a 3.3 --- but the 5 is more easily
> available.  I'm going to test this today.
>
>
>
>
> Brian Grawburg
>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> Triangle, NC Embedded Computing mailing list
> TriEmbed at triembed.org
> http://mail.triembed.org/mailman/listinfo/triembed_triembed.org
> TriEmbed web site: http://TriEmbed.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.triembed.org/pipermail/triembed_triembed.org/attachments/20140918/9074c659/attachment.htm>


More information about the TriEmbed mailing list