Electronic – Are all I2C sensors interoperable

i2csensor

I have a quadcopter flight controller (RTFQ Flip MWC) that supports I2C sensors for adding thing like a barometer, magnetometer, and GPS system. The officially supported sensor block (BMP180, HMC5883L on one board) is discontinued, as far as I can tell.

I have found other I2C barometer and magnetometer sensors, (BMP280, LSM303) but I am not even sure if all I2C devices of the same type are interoperable. Do they all look the same (at least interface-wise) to the flight controller?

I'm also new to I2C in general; the sensors I need come on two separate boards. Do I just stack the boards, directly connecting the I2C bus between each?

Thanks in advance,
Neil

EDIT:
I was able to find the datasheets for the discontinued and proposed sensors:

All are compatible with the 3.3v output of the Flip MWC, which is good.

I was quickly able to find what I believe to be the register map for the BMP180 and HMC5883L, but the table I found for the LSM303 was very confusing and I wasn't able to find one in the BMP280 datasheet.

Best Answer

The only way to know if two IIC devices are compatible in this context is to compare their IIC interface in the two datasheets very carefully. IIC may be largely standard, but it says nothing about the payload data carried over IIC.

If a particular product becomes popular, competitors will often make theirs compatible. However, there is no guarantee that any two devices are compatible. Each could use a different format for sending the data, require different settings in different registers that are accessed differently to select features, etc.

Unless you know they are compatible, assume they are not.

Related Topic