jimjulian
Posts: 54
Joined: Mon Apr 04, 2016 12:09 am

i2c pin availability

Sat Nov 12, 2016 6:15 pm

Hello,

I'm using the RPi 3B as a solar array monitor/controller. This requires that I uses several i2c devices. The issue is only one device can be connected to the RPi. This is a hardware problem. Has anyone found a suitable work around, other than the use of solder and wires? Is there a mechanical fastener product to allow multiple devices to access the two i2c pins?

Thank you,

User avatar
DougieLawson
Posts: 38883
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: i2c pin availability

Sat Nov 12, 2016 6:40 pm

Use a bit of strip board (Veroboard) with four strips.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

mfa298
Posts: 1387
Joined: Tue Apr 22, 2014 11:18 am

Re: i2c pin availability

Sun Nov 13, 2016 9:26 am

jimjulian wrote:Hello,

I'm using the RPi 3B as a solar array monitor/controller. This requires that I uses several i2c devices. The issue is only one device can be connected to the RPi. This is a hardware problem. Has anyone found a suitable work around, other than the use of solder and wires? Is there a mechanical fastener product to allow multiple devices to access the two i2c pins?

Thank you,
For anything that's supposed to be fairly permanent it's well worth soldering up something onto a suitable board. The likes of jumper wires (and breadboard) are really only designed for prototyping (and even then can introduce strange problems). There are a variety of proto boards designed to sit over the Pi which can make it easy to add sensors and keep a compact device.

tito-t
Posts: 298
Joined: Thu Jan 07, 2016 5:14 pm

Re: i2c pin availability

Sun Nov 13, 2016 12:24 pm

I'm using the RPi 3B as a solar array monitor/controller. This requires that I uses several i2c devices. The issue is only one device can be connected to the RPi. This is a hardware problem. Has anyone found a suitable work around, other than the use of solder and wires? Is there a mechanical fastener product to allow multiple devices to access the two i2c pins?
On the Pi you may have available both i2c-1 and i2c-0, either one running by 100 kHz (standard i2c speed) or 400kHz (Fast i2c speed) - admittedly not sure about Highspeed i2c (1MHz) though. Each i2c bus supports more than 100 i2c devices plugged to it, but they must have different unique device addresses then.
Faster than i2c by transmission speed is perhaps SPI (I used it on an Arduino Due at up to 84MHz), but it's only for SPI devices of course, not for i2c.

In case you have multiple i2c devices with identical i2c device addresses then an i2c multiplexer might help, eg. this one:
http://bitwizard.nl/shop/I2C-Splitter-S ... A-TCA9548A
It applies to the standard i2c protocol, I successfully used it also with 1 of my Arduinos (C++) so far.
- Tim

jimjulian
Posts: 54
Joined: Mon Apr 04, 2016 12:09 am

Re: i2c pin availability

Wed Nov 16, 2016 3:43 pm

tito-t wrote:
I'm using the RPi 3B as a solar array monitor/controller. This requires that I uses several i2c devices. The issue is only one device can be connected to the RPi. This is a hardware problem. Has anyone found a suitable work around, other than the use of solder and wires? Is there a mechanical fastener product to allow multiple devices to access the two i2c pins?
On the Pi you may have available both i2c-1 and i2c-0, either one running by 100 kHz (standard i2c speed) or 400kHz (Fast i2c speed) - admittedly not sure about Highspeed i2c (1MHz) though. Each i2c bus supports more than 100 i2c devices plugged to it, but they must have different unique device addresses then.
Faster than i2c by transmission speed is perhaps SPI (I used it on an Arduino Due at up to 84MHz), but it's only for SPI devices of course, not for i2c.

In case you have multiple i2c devices with identical i2c device addresses then an i2c multiplexer might help, eg. this one:
http://bitwizard.nl/shop/I2C-Splitter-S ... A-TCA9548A
It applies to the standard i2c protocol, I successfully used it also with 1 of my Arduinos (C++) so far.


Tim,

Could you expand on the i2c-0 and i2c-1 idea?

Thank you

tito-t
Posts: 298
Joined: Thu Jan 07, 2016 5:14 pm

Re: i2c pin availability

Wed Nov 16, 2016 4:03 pm

I followed a guide I found at a German forum's topic, called "Quick Guide" which I luckily found:
http://www.mindstormsforum.de/viewtopic ... =30#p67908

you can enable i2c-1 in raspi-config, but for i2c-0 you have to patch config.txt:

Code: Select all

sudo nano /boot/config.txt
# add at the end:
dtparam=i2c_vc=on
I hope it helps!
Last edited by tito-t on Wed Nov 16, 2016 4:15 pm, edited 2 times in total.
- Tim

User avatar
joan
Posts: 14887
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: i2c pin availability

Wed Nov 16, 2016 4:06 pm

You should not use I2C bus 0 (/dev/i2c-0) on the Pi3. It is reserved for system use.

tito-t
Posts: 298
Joined: Thu Jan 07, 2016 5:14 pm

Re: i2c pin availability

Wed Nov 16, 2016 4:11 pm

if one does not use the "system use", why not?
I have no cam and I have no HATs so far (there are not at least C drivers available for the HATs!!) , and as a display I use a HDMI.
But I also need the 2nd i2c-bus urgently (one for a couple of MCP230017 at 400kHz , the other one for 100kHz Arduinos and other slow devices e.g. PCF8591)
- Tim

User avatar
joan
Posts: 14887
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: i2c pin availability

Wed Nov 16, 2016 6:14 pm

tito-t wrote:if one does not use the "system use", why not?
...
The system use is by the system.

I'm told the GPU uses I2C bus 0 to control an internal GPIO port expander (for LEDs I think).

tito-t
Posts: 298
Joined: Thu Jan 07, 2016 5:14 pm

Re: i2c pin availability

Wed Nov 16, 2016 6:25 pm

what a pity for the Pi3 users, and what a waste - at least it must be optionally switchable.
And finally: why is it led out, when it's just internal?
I'll stay with my Pi2s then as long as possible, a Pi3 would actually be a downgrade then.... :|
- Tim

Return to “Beginners”