2022-03-24 10:58 AM
Hello,
I am trying to use an LSM6DSOX through SPI communication, but I am having some problems due to the length of the cable. I'm using a cable about 2 m long but the sensor is not working well. I have tried using different LSM6DSOX chips but the result is always the same, sometimes information is lost in the sensor response and other times it generates interference with another sensor that is connected to the same SPI bus (a MAX30003 ECG sensor).
I suspect that the problem is caused by the cable length because I have also tried using a shorter cable (about 30 cm) and there is not problem with that configuration. Therefore, I want to know what is the maximum distance supported by the SPI bus to connect this sensor and also what could you suggest me to avoid the communication problems when using a long cable to connect the sensor to the master device.
Additional information:
Solved! Go to Solution.
2022-03-24 01:30 PM
You will find a lot of discussion on this topic on the net if you search for "spi cable length". Developed for short-distance communication, SPI does not use differential, but single ended signalling, also with quite a high frequency and must also comply with timings so that it can synchronise. All this becomes more and more susceptible to interference and unreliable as the cable length increases. If there are other high-speed lines nearby or even in parallel, this is further exacerbated.
You could experiment by using a different cable to the sensor, e.g. a shielded one, to at least minimise the interference. Unfortunately, such a shielding, especially if it is realised per wire, increases the delays due to its capacitive effect.
As you can see, it is not an easy task to route SPI over long distances.
Does it answer your question?
Good luck!
Regards
/Peter
2022-03-24 01:30 PM
You will find a lot of discussion on this topic on the net if you search for "spi cable length". Developed for short-distance communication, SPI does not use differential, but single ended signalling, also with quite a high frequency and must also comply with timings so that it can synchronise. All this becomes more and more susceptible to interference and unreliable as the cable length increases. If there are other high-speed lines nearby or even in parallel, this is further exacerbated.
You could experiment by using a different cable to the sensor, e.g. a shielded one, to at least minimise the interference. Unfortunately, such a shielding, especially if it is realised per wire, increases the delays due to its capacitive effect.
As you can see, it is not an easy task to route SPI over long distances.
Does it answer your question?
Good luck!
Regards
/Peter
2022-03-25 04:56 AM
Paul