Extend i2c bus with PCA9615

Hello

My name is Roberto I am working on a home automation project. It handles all possible blinds, heating, automatic doors, …) as well as a set of sensors (temperature, humidity, light level, wind, …). All the development is done with the raspberry pi control board, in python, and for the wiring, cat 6 ethernet cable is used. The sensors to be installed communicate with the i2c protocol and this would be a small installation scheme (annex scheme 1) .

The problem I have is to reach the distances indicated since the i2c protocol does not reach the ones I indicated. That is why I had planned to use the product “Qwiic Differential I2C Bus Extender (PCA9615)” but I have several questions about it before deciding:

  • given the configuration indicated, I don’t know if the solution would be to rely on an ethernet switch (for example, TP-Link Switch 5 Ports 10/100/1000 (TL-SG105)) (annex scheme 2). But that would force me to use excessive wiring which is not optimal. Also, I don’t know if the PCA9615 device could work this way.

  • Perhaps the most suitable could be a configuration like the one indicated in the annex scheme 3, but I do not know if they have devices that allow to do this (in the scheme I have represented it as “?”). Do you have them? If you manufacture them, can you indicate their characteristics? Do you use some kind of python library or are they transparent and do I just have to handle the i2c protocol completely ignoring the ethernet interface?

  • Finally, in case you have no choice but to use the ethernet switch together with the PCA9615, do you use any kind of python library?

Thank you very much and greetings

Hello Roberto, and thanks for posting.

The PCA9615 uses CAT5 cable for it’s link, but this isn’t Ethernet and it won’t work over an Ethernet network or switch. Sadly, none of the three schemes you’re thinking about will work if you’re wanting to use an IP network.

If you’re just using CAT5 cable that’s not being used for Ethernet, scheme 1 might work if you parallel the RJ45 connectors somehow. (You’d need to build your own paralleling ‘hub’ for each node.) We’ve not tested that scenario but figure 8 on page 12 in the [datasheet for the PCA9615 seems to indicate it would work if you terminate the end of the CAT5 bus. We haven’t checked to see if it works with our board though. That might be cost prohibitive since you need two PCA9615 boards per node and one piece of CAT5 per node.

What I can tell you will work is if you have one PCA9615 on each end of your link like the pictures in [this post. I’ve tried that over a 50’ long CAT5 cable and had no issues.](Daisy Chaining Differential I2C Breakout - SparkFun Electronics Forum)](https://cdn.sparkfun.com/assets/a/5/1/3/6/PCA9615.pdf)

Hello and thanks for your quick response

I see that I am not the only one looking for this type of cinfigurations, and unfortunately I do not find in the information indicated a confirmation of correct operation in “Figure 8 on page 12” which I would consider the most suitable for my need.

I will continue working on it and if I get it I will let you know.

best regards