cancel
Showing results for 
Search instead for 
Did you mean: 

STEVAL-MKI208V1K cable length

FCook.1
Associate III

Hi, I've been using the STEVAL-MKI208V1K for a year now, without problem, but now I tried to connect the two parts using a longer cable (twice the length of the one provided with the kit). While my microcontroller says the sensor is connected, when capturing the acceleration data it fails (sometimes at the first data, sometime at the third or fourth).

Any idea of the maximum allowable length of the cable conecting the two parts?

3 REPLIES 3
Peter BENSCH
ST Employee

On the STEVAL-MKI208V1K is the IIS3DWB, which is connected to the controlling MCU via I2C. I2C is known for not supporting long line lengths because of its operating principle (open drain + pull-up resistor), because it was developed for interboard communication, which is where the abbreviation Inter-Integrated Circuit comes from. Therefore, try to keep the connection line as short as possible.

With special drivers it may be possible to achieve longer line lengths.

Does it answer your question?

Regards

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
FCook.1
Associate III

Hi Peter, I've some doubts about the I2C reference in your answer.

The STEVAL-MKI208V1K is composed by STEVAL-MKI208V1 (which has the IIS3DWB) and the STEVAL-MKIGIBV2 (which only serves the purpose to be compatible with common boards and connect to a MCU).

The STEVAL-MKI208V1 and STEVAL-MKIGIBV2 are connected between them by a 12 wire cable, originally 30 cm.

The STEVAL-MKIGIBV2 is connected to the MCU, in my case an ESP32.

But the communication in my code is SPI, not I2C.

Everything worked fine, but when I tried to double the cable 12 wire cable length to 60 cm, it fails.

Does your answer is still valid for SPI communication between the IIS3DWB and the MCU? It is interesting to know because it gives a limit to the distance that is possible to use this sensor from the MCU.

Regards,

Peter BENSCH
ST Employee

OK, you are of course right, the IIS3DWB can be controlled via I2C as well as via SPI. SPI is somewhat less sensitive to interference, but typically operates at a much higher frequency, which compensates somewhat for the lower immunity to interference.

In general, the following applies to non-differential data transmission and especially to high data rates: the shorter the line, the less influenced the operation. There are more influencing factors, but as a rough statement it still applies. Very often, a small MCU is flanged to the sensor for data acquisition when the required distance is large, and then work is carried out via differential transmission (CAN, RS485, etc), for example.

But you can also test lowering the SPI frequency considerably, which should result in a clear improvement.

Regards

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.