Simple DIY hardware hack for address conflicting I2C devices

Recently I’m doing some experiments with beagle bone black SBC’s I2C bus and encountered some errors with devices that have the same address . One device is DS1307 with an eeprom( 24C32) and the MPU6050 DMP module that I’ve got from ebay.

d444a63a07bbf3b5080acf6133246edf-arduino-clocks

f04878-mpu-6050-module-3-axis-analog-gyro

Both DS1307 and MPU6050 hold the hexadecimal address 0x68 . So the beagle bone black’s I2C bus is confused when detecting the two devices. Then I’ve searched for the options . The DS1307 address can’t  be changed , it’s fixed one . So I have to choose the second option. Ground the AD0 pin of MPU6050 with VCC pin . So I soldered a little wire connecting both AD0 and VCC pins together shown as in below figure.

20072017396

So after doing this simple diy hack the MPU6050’s device address should be 0x69. OK , let’s test the addresses that connected to the I2C bus of the beagle bone black using the following command.

$ i2cdetect -r 2

So this is the result I’ve got 😀

i2c_address_changed

Aha 🙂 that diy hack worked well!.

That s it 🙂

So I’ve now ready to continue the experiment.

Important :- In this experiment I’ve used MPU6050 as a test device and it has AD0 pin. Here I’ve change the pin logic to 0 to 1 and that changed the  device address 0x68 to 0x69. Also keep in mind that this is a one method. Some I2C devices has software based address changing methods . In that type of devices we must read the manual and use a special firmware to change the I2C device address. We can use arduino like microcontroller to run that special firmware to do that task.  

Have a nice day!

Advertisements
Image

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s