I2C communication between MCU and sensor with few meters distance

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

I2C communication between MCU and sensor with few meters distance

1,679 Views
andreasbaldur
Contributor I

Hi,


In short, what I try to achieve is to connect a sensor to a MCU via I2C where the distance between the two is in the range 2-3 meters. I want to do this in the cheapest and simplest way i.e. with as little added hardware as possible. I'm considering the approach illustrated in the attached image where I both feed the sensor with power and SDA/SCL wires in a single cable. The sensor draws 1.25 mA during conversion. The only component that is put at the sensor-side is a decoupling capacitor of 100 nF. At the MCU-side I intend to place two pull-up resistors of 10k.

I'm aware that I2C is made for inter-circuit communication (probably with distances in the cm-range), but how far is it possible to stretch the distance without facing too many issues due to noise and too much capacitance caused by the long wires. I'm not a very experienced hardware designer (which my circuit might show) so I would like to hear your recommendations and experiences with this.

Best Regards,
Andreas

Labels (1)
Tags (3)
0 Kudos
Reply
3 Replies

1,452 Views
atillametetured
Contributor V

Hello Andreas,

You may want to consider adding a bidirectional I2C bus buffer in between. Following product might serve you;

Hot swappable I2C-bus and SMBus bus buffer|NXP 

PCA9511A provides bidirectional buffering, keeping the backplane and card capacitances isolated.

However you will obviously need to carry the pull up rail and the ground along the path as well. Also I do not know how many of these in series will work without raising problems.

Regards,

Mete

0 Kudos
Reply

1,452 Views
JackITB
NXP Employee
NXP Employee

One factor you can play with is the SCL clock frequency: you can lower it to get a more robust and longer link.

Also keep in mind that the pull-up resistor and the capacitive load will dictate the rising edge of you SDA/SCL signals (RC time constant). By the way, 10kohm is definitely not helping... you may choose a lower resistance value.
Regards,   Jacques.

0 Kudos
Reply

1,453 Views
reyes
NXP TechSupport
NXP TechSupport

Hi Andreas,

We typically have the recommended wiring pattern as below for cases where the length of the bus lines on a PCB or ribbon cable is too long to avoid crosstalk or interference, but this is if it exceeds 10cm

 

As you properly mentioned, I2C is made for inter-circuit communication (with distances in the cm-range) therefor we cannot give an estimated maximum distance to properly work because it do not depend on this, but it depends on the capacitance of the buses, each I2C line (SDA and SCL) should not exceed a capacitance of 400pF in order to properly work.

Have a great day,
Jose

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply