BMP180 and mpu6050 together i2c

Hi I am using mpu6050 to get gyro and accel data into my arduino. Now I bought a BMP180 to get pressure but it also uses I2C and requires pins A4 and A5, the same that mpu6050 is using.

I know the I2C protocol allows many modules to use the same pins but I want to know this: can I just connect the SDA and SCL lines of mpu6050 and BMP180 to the pins A4 and A5? I will solder the wires together, but will it work?

In the programming side, I just need to keep different addresses for each module, right? I heard there are some pull up resistor problems that could cause me issues keeping the 2 modules using the same analog pins. Can someone tell me if I am right?

can I just connect the SDA and SCL lines of mpu6050 and BMP180 to the pins A4 and A5?

Yes

@UKHeliBob many posts on the internet says that I need to remove the solder from 2 wires of the bmp in order to release its pull up resistor and if I dont do that I can damage my board but NO post says how to do that. Have you any idea?

Many posts on the internet are wrong :confused:

If you've bought separate modules with the devices on, and both modules have pull ups on them, then you will need to remove the pull ups from one of the modules

@AWOL yes they are separated modules, so I guess I will have to remove the pull up resistor of all of the modules and keep only one with pull up resistor, right?

Can you tell me if mpu6050 uses pull up resistors? Cause if it doesnt, I know BMP180 has pull up resistors, so this would not create any problem to me, right? If only one module has pull up resistor, right?

The bare devices don’t have any pull ups, but the modules they are fitted to (you haven’t told us anything about them) may do.

If they both are 10k pullup resistors, you don't have to remove them.
However, if both modules have 2k2 pullup resistors, you better remove one set of them. Most modules have 10k pullup resistors.

Thank you all, but how do I know if the mpu6050 module (bare module) has pull up resistor? The bmp180 is also bare, does it have resistor?

Can you give links to those modules ? or make photos of them ?
Just use them as they are. Nothing will be damaged.

Thank you! My sensors are:

Do they have pullup resistor?

Yes they do, and they are indeed low in value.
It is no problem to connect both modules and run the i2c_scanner : http://playground.arduino.cc/Main/I2cScanner

If you look at the SDA and SCL and see what resistors are connected to the 3.3V, you can see the pullup resistors.
BMP180 module : those two "472" are pullup resistors of 4k7.
MPU-6050 module : those two "222" are pullup resistors of 2k2

4k7 // 2k2 = 1k5, that is close to the limit of 3mA for the I2C bus.

So here it is : Check if you can read the labels "472" and "222". If they are indeed that low value, it is better to remove the 2k2 resistors from the MPU-6050 module. Use a big blob of solder to heat both ends of the smd resistor and the resistor should fall off.

Big blob of solder?
I just rest the edge of the soldering iron against the SMD in question, so it's heating both ends, then push it away with the tip of the iron.

DrAzzy:
Big blob of solder?
I just rest the edge of the soldering iron against the SMD in question, so it's heating both ends, then push it away with the tip of the iron.

I do that too. But it's a little tricky for a novice solderer. It's easy to overheat if you get frustrated and try to just hold it on until it burns. A little extra solder helps the heat get right to the join, quickly. The little bit of flux that goes with it helps, too.

Thank you so much! I tried to remove the 222 resistors and something not good happened, the melted iron shorted the both ends and when I tried to remove it I think I burned the mpu6050 cause it does not work anymore :frowning: The LED does not light up when I connect it to arduino...

I will but another one and I will do as DrAzzy said, I will heat the resistor body and hopefully the ends will release together.

I just cant understand why having more pull up resistors than necessary would not make more than one module connected to I2C work properly. Why?

I just cant understand why having more pull up resistors than necessary would not make more than one module connected to I2C work properly. Why?

Ohm’s.
It’s the law.

The I2C devices have a maxium current of 3mA on the SDA and SCL lines. But every I2C devices has its own limits and its own voltage levels. A single 4k7 pullup resistor is best, or a few 10k is no problem either.

Ok, but if I have several modules with pull up resistors, why do I have to remove all the modules resistor and keep only one with pull up resistor?

That is what I do for my own project with a number of I2C devices (for example modules from Ebay), but most others don't do that. I prefer the Master to have 4k7 pullup resistors and nothing else. However, I also prefer to use a I2C level shifter to create a 5V and 3.3V I2C bus. The level shifter has a total of four 10k pullup resistors, and I just keep those and nothing else.

For up to 5 modules, and each with 10k pullup resistors, it is no problem.

batata004:
Ok, but if I have several modules with pull up resistors, why do I have to remove all the modules resistor and keep only one with pull up resistor?

Because with several resistors in parallel the overall value can become too low. See the example in reply #11