FXLS8471Q maximum I2C bus length

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

FXLS8471Q maximum I2C bus length

2,832件の閲覧回数
omartriki
Contributor I

The accelerometer FXLS8471Q can communicate with a microcontroller through I2C or SPI bus. I am working with I2C bus and an arduino platform to measure acceleration. A basic test for communication is to read WHO_AM_I register (0x0D).

Actually I use Wire library of Arduino to communicate with the FXLS8471Q accelerometer (Normal I2C is used 100 KHz). In the accelerometer datasheet, page1 (Features section) they claim that it "supports 4-wire SPI interface at up to 1 MHz; I2C Normal (100 kHz) and Fast Modes (400 kHz)". Well, I try it and I the communication test is OK!

But, when I use a twisted cable of 0.8m length (CAT5e), the communication test fail :smileysad: . In the datasheet page 17, they confirm that "External pullup resistors connected to VDDIO are required for SDA and SCL". Unfortunately, I didn't find any value of these pull up resistor. I use 10K, 4.7K and even an adjustable resistance but I can't get a correct communication with this 0.8m cable.

I need a 12m cable for my application, (this is why I try to make cable longer every time). I found this information:

The size of the pull-up will be defined by the total bus capacitance and the pull-down capabilities of the devices on the bus:

Rp ≥ (Vdd−VOL) / IOL               and        Rp ≤ 300ns / (0.847298 × Cbus)

Where VOL is the logic low voltage needed, IOL is the sinking current, and Cbus is the bus capacitance.

Any help for selecting the correct resistance value or any suggestion is welcome

0 件の賞賛
返信
3 返答(返信)

2,051件の閲覧回数
omartriki
Contributor I

I try to compute the pull up resistor value according to the proposed formula. I am using an Arduino platform, FXLS8471Q accelerometer and 5e UTP cable. I expect a confirmation from a moderator or any expert :smileywink:

In one hand:

Vdd = 3.3v , VOL= 10% of Vdd = 0.33v and IOL = 500 uA (according to the datasheet in case of Vdd=2.5v : may be it's incorrect)

Rp > 5940Ohms

and in the other hand:

according to http://www.belkin.com/support/dl/A7L504.pdf , there are two types : mutual capacitance 56.1 pF/m and capacitance unbalance pair to ground 3.3 pF/m

I use C bus = 56.1 pF/m therefore maximum bus length is 1.06m only when Rp = 5940 Ohms.

Thanks Tomas , I will check these application notes and I will go back

0 件の賞賛
返信

2,051件の閲覧回数
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi Omar,

Please refer to the UM10204. This manual is most helpful and gives the wiring pattern for the extended bus lines, together with the details of the appropriate pull-up resistors etc. needed for proper operation. The manual advises that if the bus lines are twisted pairs, each bus line must be twisted with a Vss return. Alternatively, the SCL line can be twisted with a Vss return and the SDA line twisted with a Vdd return. With the second option capacitors are needed to decouple the Vdd line to the Vss line at BOTH ends of the twisted pairs. Interference can be minimised by using shielded cable with the shield connected to Vss, but there must be low capacitive coupling between the SDA and SCL lines to minimise crosstalk.

You might also consider using I2C buffers as recommended in the AN11075.

I hope it helps.

Regards,

Tomas

PS: If my answer helps to solve your question, please mark it as "Correct". Thank you.

0 件の賞賛
返信

2,049件の閲覧回数
anthonyduhamel
NXP Employee
NXP Employee

Hello Omar,

That's totally normal, I²C bus length is limited by the bus capacitance. I²C protocol was not really deployed for long-distance communication. I suggest you to take a look at the I²C-bus specification (I attached a manual about it).

For pull-up resistors, 10K or 4.7K are typical values. Check section 7 of the document for resistor sizing:

Capture.PNG

But, 12m cable looks a very long distance for I²C... I'm not sure a well pull-resistor sizing will make it works...

Fortunately, it exists I²C bus extender to increase the wire length. We have a large panel of I²C bus extender. You can check at the  I²C Bus Repeaters/Hub/Extenders webpage. For example, the P82B715 can drive IC- signal up to 50meters at 100/400KHz.

Have a good day,

Anthony

0 件の賞賛
返信