Search code examples
i2c

i2c address conflict between MPU6050 and DS3231


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.


Solution

  • Looking at the GY-86 schematic I found, the AD0 pin is hard grounded on the board. This means that unless you can find a trace on the board to cut (unlikely), there is no way to change the MPU6050 slave address. As far as I can see, the DS2321 cannot change its address either.

    This leaves you with a few choices:

    1. Change out on of the devices to a different model with a different address. I expect you really don't want to do this.
    2. If your master device (which you did not specify) has multiple I2C bus controllers, hook each device to a different bus.
    3. Use an I2C multiplexer to put the devices on different "virtual" busses. Here's a module with a 1-8 multiplexer which should do the job (though only a 1-2 is really necessary).