I usually get asked this by clients, “We want to use I2C to communicate with our sensors X meters away” where X is usually a large number. Please understand that this is usually a bad practice. You can do it but it’s not designed for it.

I2C or Inter-Integrated Circuit, when Philips Semiconductors invented it in the 1980s, it was meant to be used as a method to connect and send data between ICs inside a single PCB. It is intended for small distances inside the area of a PCB. Its goal was to reduce the number of parallel lines needed for talking between multiple chips dropping the required connection to just 2 lines. It was never meant for inter-PCB or long-distance communication.
Now for the cases you really want to use it for long ranges, here are 3 options I know of(If you know of any other tricks, drop them in the comments)
1. Use I2C repeaters like TIs P82B715, or LTC4311 or NXPs PCA95 series of chips. These act as buffers and can potentially drive signals to a distance of 50m when used as a twisted pair with individual return GND wires
2. Reduce I2C clock speed. The usual default speed is around 400KHz, you can keep dropping that to small speeds to increase the distance slightly but it will be in the 1-3m range
3. Have a strong I2C pullup on the lines(meaning lower resistance and pulled up to Vcc), this means that the RC time constant will be smaller and faster rise time. Search my older posts on the website on how to select the pullups for I2C. But this is not a great solution as you will increase your idle system power draw.
So the point is you can use I2C for longer lengths but look into it if you really want to, other serial protocols are designed specifically for long-range like CAN, Ethernet, Serial with RS485, etc. The next-gen of I2C, which is I3C, is looking to address this long-wire approach in the future specs of I3C.
0 Comments
Comments are closed.