I want to use Cat 5 UTP to connect 2 P82B715 bus extenders.
I have LCL, LDA, Gnd and a 5v supply (to power the remote P82B715).
What would be the best pairing to minimise interference?
I provisionally have:
LCL - Gnd
LDA - Gnd
5v - Gnd
5v - Gnd
I want to use Cat 5 UTP to connect 2 P82B715 bus extenders.
I have LCL, LDA, Gnd and a 5v supply (to power the remote P82B715).
What would be the best pairing to minimise interference?
I provisionally have:
LCL - Gnd
LDA - Gnd
5v - Gnd
5v - Gnd
That should work, that's how I would do it. A shielded Cat5 cable is even better.
The P82B715 is an old chip. It keeps the SDA and SCL as they are, and amplifies them for a stronger I2C bus. The extra capacitance of the longer cable can be compensated with lower values of the pullup resistors. For example 100Ω or less.
You need pullup resistors in three places. Between the Arduino and the P82B715 (for example 10k) and for the stronger part of the I2C bus (for example 100Ω).
How long is the cable ?
Can you give us a broader view ? Why do you need that long cable ?
The Arduino Uno has already a I2C bus which is stronger than the standard (but not as strong as with the P82B715). By lowering the clock speed, with the right pullup resistors and with nothing else connected to the I2C bus, then a few meters cable should be possible. Some can go even further than a few meters.
Today, there is a better solution with chips that make a twisted pair signal. For example modules with the PCA9615 chip. It uses a twisted pair for SDA and another twisted pair for SCL.
This became a long reply to a simple question ![]()
Thanks for your reply!
The application is a sensor network publishing data to a MQTT broker. I use ESP8266 and various I2C sensors.
In most locations if I need to extend the I2C bus I use flat (untwisted) 4P4C telephone handset cables (up to 2 meters).
One location is inside a steel container with a lot of machinery and EMI. I want to extend the I2C bus from an ESP8266 (located outside the container for WiFi) by about 3-5 meters to the area I want to monitor. This is unreliable with the handset cables.
This is what I'm going to try:
Wemos D1 mini pro, I2C master.
Power the P82B715 cable bus at 5v (from the D1 mini).
Bi-directional level shifters (3V3 <-> 5V) on the I2C bus.
The level shifters have 10k pull-up resistors on both sides (so 5k).
The cable bus pull-ups are 470R at each end.
3V3 LDO regulator at slave end.
Diodes and zener for ESD protection.
If that doesn't work I'll try PCA9615 differential extenders.
I want to use flat Cat5 UTP patch cables but I have some shielded Cat5 I can try. Should the shield only be grounded at one end?
The ESP8266 has not such strong SDA and SCL as the Arduino Uno, so you need indeed a driver for the cable. Is there something from 3.3V-signals to cable-signals ? That would be easier. Note that a level shifter makes the signals weaker.
The Zener could leak a few µA at 5V, I assume that is not a problem.
When powering something with twisted pair, use GND and VCC in a twisted pair. Then they are inductively coupled and if they have exactly the same current (inclusive high frequency components) in opposite direction, then they give very little noise to other wires.
Therefor I would let the shield-ground open at the end.
I guess you have not read page 60 of UM10204.
Because the inductive coupling of GND with VCC is so good to reduce noise, they need to be next to each other in a flat cable.
You probably know almost everything here: How to make a reliable I2C bus, except page 60 of UM10204, which I also mention there.
Your 4-wire flat phone cable needs to have GND and VCC in the middle.
There are three kinds of people: Those who do not know page 60, those who do but deliberately ignore it, and those who do and understand it. The last group is the smallest.
For 3 to 5 meters, a RS-485 signal over a shielded Cat5 is also good. With a software protocol that can take a punch would be very reliable. There are also isolated RS-485 chips. When there is heavy machinery, then wireless can be a good option, or via optical communication.
Thanks again for your very helpful comments!
I hadn't read UM10204. I'll change the flat cable configuration accordingly.
When you say 'I would let the shield-ground open at the end', are you just referring to a shielded Cat5 cable shield? Should all ground wires in the twisted pairs be connected both ends?
Where you ask 'Is there something from 3.3V-signals to cable-signals ? That would be easier', I assumed SDA and SCL from the ESP8266 would be strong enough to drive the P82B715, even with the level shifters. If that's not correct how could I fix it?
I'm using 5V from the ESP8266 for the cable bus and to power sensors at the slave end (via 3V3 LDO) because I thought the higher voltage would be more efficient and I didn't want to load the ESP8266 3V3 rail. I'm not sure if the Polyfuse on the 5V line is a good idea because of the voltage drop across it. I'll use a solder jumper to short it out if I need to.
I'll try PCA9615 or RS-485 if I can't get the P82B715 to work reliably.
I would leave the shield-ground of a shielded Cat5 cable open at the end. I don't think it will disturb the ground currents, but it might, so I would leave it open at the end.
When the GND current has to decide which wire to prefer to return, it will choose the wire with the opposite current that is inductively coupled. That is the VCC. The VCC will actually pull the ground current in opposite direction through the cable.
See the VCC/GND twisted pair as a transformer. The AC current that goes in at the VCC side generates the same current at the GND side and vice versa. Make one signal go in opposite direction and they perfectly match and nullify the AC noise. That is the beauty of a twisted pair.
The GND in the SDA and SCL pairs can be connected or left open. I would connect them to GND at both sides.
Because of the driver chips, the current through SDA and SCL are larger than normal. So the VCC/GND pair would not be a perfect match when the GND with SDA and SCL would be open.
The ESP8266 to level shifters to P82B715 is no problem at all.
But you need all those components to make it work. A single driver chip would be easier.
I was just giving some background information. Suppose you add a OLED and more wires and more sensors, then you have to know that the I2C level shifters do a good job, but have a disadvantage.
Is there another ESP8266 in Slave mode at the end of the cable ? Does the ESP8266 work well in Slave mode ? Or only I2C sensors ? Which ones ? Can you give a schematic or links to all the sensor modules ?
I think I understand how to configure the cables and ground now. Thanks ![]()
There is no ESP8266 at the end of the cable, only I2C sensors and perhaps a 4-channel I2C bus multiplexer, an 8-bit I/O expander and an I2C to 1-Wire bridge.
The sensor(s) will be SHT30 temperature and humidity sensors using the break-off modules on this SHT30 Shield.
I see that the pinout of the JST-SH1.0-4 connector on the Wemos SHT30 Shield does not comply with page 60 of UM10204:

If I use a multiplexer, an I/O expander or a 1-Wire bridge I will try PCA9544, MCP23008 and DS2482-100.
The pcb I'm designing will have a dual function, acting as a shield for the ESP8266 at one end of the cable and a stand-alone pcb (no ESP8266) at the other end.
The schematic is as shown in my last reply with some components omitted for each function (the LDO regulator and 4P4C sockets omitted at the ESP8266 end and the ESP8266 and polyfuse omitted at the stand-alone pcb end).
This: How to make a reliable I2C bus is really helpful. I missed it when I read your earlier reply.
Great!
Nothing ever does.
We should have a secret handshake or something, for people who have read page 60 and understand it.
The I2C bus was made by Philips to be used inside televisions. Part of that company became NXP. The UM10204 document is made by NXP. It really is a official document by the makers of the I2C bus.
I decided to use PCA9615 differential I2C-bus buffers, as suggested in your original reply.
So far great results, tested with 10 meter Cat5 UTP with a reliable connection.
Thanks again for all your help. Much appreciated.
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.