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

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.

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.

• sometimes, the working module is actually the defective one ... perhaps, both modules are supposed to fail – jsotola Aug 22 '20 at 20:43
• @jsotola interesting point :) – muyustan Aug 22 '20 at 20:45

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?

• no, I don't have another one, unfortunately. – muyustan Aug 22 '20 at 18:58
• I know it's so hard to get a hand on these sensors. I had to buy already made boards from ebay and desolder the chips because they are not produced anymore. If you have experience with electronics I would highly encourage you to walk away from chips that are no longer produced. If not, bmp180 is a cool thing to learn. – bem22 Aug 22 '20 at 19:03
• @bem22 these parts come from china in almost a month or even longer, it is so sad if the sensor is damaged – muyustan Aug 22 '20 at 19:05
• It depends where you buy them from. Check Mouser/Digikey/Farnell. I know bmp180 is hard to find (from experience) :( – bem22 Aug 22 '20 at 19:06

I have used this exact schematic in my project. It is possible that one of your i2c devices responds to 3V3 and the other one to 5V. I have never ended up using the N_MOS 5V to 3V3 signal converter (not worth it). All devices will work on 3V3 bus with no problem. I highly recommend simplifying the circuit and using the 3V3 only.

Also, make sure you have the right resistors for your microcontroller on the SDA/SCL busses (see SCL_R/SDA_R in picture 2)

Take a look at my schematic: I decided to eliminate the N_MOS'es for both SCL and SDA.

And here is the power supply: Have a look at my project here: https://easyeda.com/be.mihai22/project-hawk

Btw, here's a demonstration that the drone actually works.

• hey, thanks for the answer. I also am working on doing a flight controller, I will check your project. Did you buy 3 sensors as discrete parts and connected them on your own? I am not using +5V anywhere, all my powerings etc. are 3.3V. I also don't think there is a problem related to pull up resistors because MPU6050 works just fine. – muyustan Aug 22 '20 at 19:02
• If you used that schematic with all the parts in there, you should have (in theory) used 5V somewhere. Yes, this was my disertation project (a drone and flight controller). I have both the GY-88 chip (from ebay or amazon something) and I have also soldered all the components from 0 to a new PCB. Look at the project on easyeda. Also I would highly recommend you check out the datasheets of the two sensors – bem22 Aug 22 '20 at 19:05
• I don't know the board I have is exactly wired as in that schematic, but probably. I don't connect +5V to VCC_5V pin of the GY-86 board, so I don't think I have +5V at anywhere. I power it through VCC_3.3 pin – muyustan Aug 22 '20 at 19:07
• Post a picture of your circuit (real circuit). – bem22 Aug 22 '20 at 23:11