I2C range extender

I2C range extender

The I2C bus is widely used for a range of sensors and devices. They are addressed using a 7 bit address space, see this overview of devices and addresses.

The I2C bus have very limited range as it's primarily designed to do chip to chip communication within a board. However, more than often would it be nice to extend the I2C bus to

tens of meters. The chip P82B715 I2C Bus Extender from Texas Instruments does just this. It's a very easy to use chip, essential just connect local SDC and SCL to the chip supply +5V and GND and the long distance wires to a similar setup at the other end. Using two simple integrated circuits the I2C bus can be extended

over tens of meters. Between a box containing sensors, in my case a magnetometer, accellerometer and a gyro, can be placed far away from any magnetic field and still connect easily to the yacht server via a four connector wire. I decided on wire connection as wireless might not update fast enough for this kind of sensor.

The picture of the right how the range extender is integrated to the Raspberry Pi using a prototyping development hat. The P82B715 chip and a temperature and pressure sensor are both fitted on the circuit board hat. This board is a simple type from Aliexpress which did not have the +3.3 and GND lanes connected. Two extra connections had to be made, one for the +3.3V and one for GND. Those are the black and red on the right. Apart from this the board works nicely. The 4-way screw terminal interfaces the cable connection to the remote box containing the sensors.

Connection is very simple SDA and SLC signals are conected to the correponding local pin while the extended SDA and SLC are connected to two others pins and +3.3V and GND are connected. In additon two 470 ohms resistors pull the extended lines signal up to +3.3V when it's not drawn to zero by the line drivers.

Using this prototype layout using a pressure sensor and a P82B715 chip to enable long distance (many meters) using I2C bus signals. The usage of the Texas Instruments chip is very easy to use as the layout demonstrates. The line pull up resistors are 470 ohm.

Early work

The pull up resistors are needed to pull the long transfer lines. The local SLC and SDA have internal pull up resistors and no need to consider it.

At the local end close to the Raspberry you'll need to set up a similar setup that reverse the line drivers SLC and SDA to local I2C but signals SLC and SDA that connects to the I2C on the Raspberry.

A nice example is show here : Active I2C Long Cable Extender P82B715 Module .