gy-86 and ds3231 i2c address problem

hello..
I am using MPU6050 onboard a GY-86 module. I also have a DS3231 RTC module. when i searched each data sheet i found that DS3231 and MPU6050 have same i2c address which is 0x68. I have read in the MPU data sheet that if i connect the AD0 pin to 3.3 the the address becomes 0x69. but i can't find any AD0 on my module . i only have vcc-3.3v-SCL-SDA-INTa-FSYNC-DROY I think i have to change i2c address of mpu6050 or ds3231. so that they won't conflict . how can i change i2c dress of MPU or DS module.

Which DS3231 module do you have?

I had a look at some schematics supposedly for a GY-86 module. They all showed the AD0 pin on the MPU6050 as unconnected. If that's the case, you depending on your soldering skills, you may be able to get a wire into the AD0 pin and it to +V to alter the I2C address.

Another option is to use an I2C multiplexer with each device on a separate I2C bus.

A third option may be to use a software I2C library to communicate with the DS3231.

1 Like

Forth option id to power modules from output pin. This way you can select only one active device on I2C bus.

A0, A1 & A2 are address jumpers for the EEPROM.

EDIT: Huh! What happened to the message I was responding to? Somebody suggested solder jumpers on the A0, A1 & A2 pads on the DS3231 board but that message seems to have disappeared.

markd833:
I had a look at some schematics supposedly for a GY-86 module. They all showed the AD0 pin on the MPU6050 as unconnected. If that's the case, you depending on your soldering skills, you may be able to get a wire into the AD0 pin and it to +V to alter the I2C address.

Another option is to use an I2C multiplexer with each device on a separate I2C bus.

A third option may be to use a software I2C library to communicate with the DS3231.

thanks for your help, it looks like I'll go for option 2

This image of MPU6050 clearly shows a "AD0" connector.

From the OPs description, it sounds like they have a slightly different board to that one. I guess that's another option for the OP if they are looking into spending out on an I2C mux. Maybe a different MPU6050 module with AD0 broken out to the connector would be easier to work with as the I2C mux needs extra steps to keep track of which I2C bus is current selected.

1 Like

Erik_Baas:
This image of MPU6050 clearly shows a "AD0" connector.

If you don't need to access your DS3231 often (or quickly), then you may get away with a software based I2C interface using a couple of spare pins. That would leave the hardware I2C interface to handle the high speed comms to the MPU6050 (and other I2C chips on that module).

It may be worth investigating as you don't need to buy any additional hardware to try it.