I'm trying to make a tiny navigation system with 6 IMU sensors. The main requirment is accuracy and distance between sensor and master. Now in prototype I use I2C, but the length of wire connecting sensor and master shouldn't be long. So the question is which bus it is better to use for high-frequence data exchanging on long distance wires (appr. 1 meter)?
2 Answers
If you are going to be using six sensors, then it is better to use I2C, since using SPI would require six chip-selects, one for each sensor.
Of course this is valid only if you can get the sensors with an I2C interface, and you can configure them such that each has a different address. This is usually done by strapping low-order address pins either high or low. For six devices, this would mean three address pins A0-A2. Unfortunately, a lot of devices only provide two pins A0 and A1.
As far as length is concerned, the interface between the original wireless Nintendo Wii remote and its Nunchuck companion used I2C over a cable that was about 3 feet long. There were also 3-foot extensions cables that could extend the total length to about 6 feet. Newer versions may be using a different scheme, but at least it is an example of I2C over a longish cable in a widely-used consumer product.
Originally, I2C devices were limited to 100 kHz. Then they added 400 kHz and the dual 100/400 kHz standard was around for several years. More recently, the official spec for I2C was raised to 1 MHz.
SPI can go much faster; it starts at around 1MHz and can go up to 50 MHz or so.
Which you use is really dependent on the slave devices you choose to use more than anything else.
If I2C statisfies your speed requirements there is nothing wrong with using it, 1m is not that long.
One step up in speed could be SPI. But that makes sense only when the sensors can supply data faster than I2C can handle.