Electronic – Two slaves on the same I2C bus, both response to address check, one working properly but the other is not

communicationi2csensor

Ok, I will try to keep it as short as possible.

I have a GY-86 breakout board, the schematic is added below. As seen, MPU6050 and BMP180 are connected on the same I2C bus.

enter image description here

I do also have an Arduino. So, master is Arduino and the slaves are MPU6050 and BMP180.

I have used a premade I2C scan sketch with my Arduino, and the output is:

13:50:00.731 -> Scanning...
13:50:00.731 -> I2C device found at address 0x68  !
13:50:00.764 -> I2C device found at address 0x77  !
13:50:00.797 -> done

This is fine, since 0x68 is MPU6050 and 0x77 is BMP180. So, both slaves respond to address check. However, while MPU6050 is fully functional, i.e I can get data from it, BMP180 is not responding. I have used several premade "get BMP180 data Arduino code" from the internet, and none of them worked.

I also have an STM32 MCU, when I use it as master insted of Arduino, same story happens. Despite using the same I2C read/write functions, MPU6050 readings/writings are totally fine, but I cannot write to or read from BMP180. By debugging, I found that AF(acknowledge failure) flag is set when the MCU stucks while trying to write/read BMP180.

I also examined datasheets of both sensors several times, they seem to have the same I2C read/write pattern.

In short, somehow, BMP180 is found on I2C line by the I2C scanner, but data read/write cannot be done. What could be the reason for that? I could assume I somehow dameged BMP180, but it replies to its address. So, I could not understand what is going on. Any idea would be appreciated.

Best Answer

The fact the BMP180 is responding to address check does not indicate it is working properly. Before using the chip, did you check the max voltage allowed on the pins? It looks be a hardware problem. Did you try to use other BMP180?