1

I am working on a project that interfaces two IMU sensors to one microprocessor (NXP LPCxpresso). The purpose is to read both of gyro and accelero at two different place on the bodies. I have foolishly rushed to buy this product: http://www.pololu.com/catalog/product/1268

The sad thing about it is that "The accelerometer’s slave address is fixed to 0011001b", so I cant use two different I2C addresses for two IMUs. (but it is possible in version 1 of this sensor!).

Is there anyways I can overcome this dilemma? I am also thinking about switching to MPU-6050, but sadly, I cant find a library for MPU-6050 for LPCxpresso.

Could you please giving me some suggestions?

Gustavo Litovsky
  • 7,619
  • 3
  • 25
  • 44
Josh Vo
  • 285
  • 3
  • 15
  • 1
    Bit-banged I2C using GPIO pins for the second sensor? –  Mar 04 '13 at 16:13
  • dear Brian Drummond, would you please giving me more details? So you suggest me to bit-banged the MPU-6050 to GPIO of arduino? – Josh Vo Mar 04 '13 at 16:29
  • 1
    @JoshVo: He's suggesting you use a multiplexer I2C device that can enable you to have multiple busses. This eliminates the issues but you'd need such a multiplexer board as an intermediary. I was trying to find you a quicker solution to the issue that might be lower cost, but his solution is perfectly valid. – Gustavo Litovsky Mar 04 '13 at 17:29

2 Answers2

1

You can use an I2C Multiplexer to divide your I2C bus and put the conflicting addresses on different sub-buses. Alternatively, you can use a controller with multiple independent I2C interfaces (which unfortunately the ATMega2560 does not).

vicatcu
  • 22,499
  • 13
  • 79
  • 155
0

The least significant bit of the slave address is set by the SA0 pin. The last bit of the address reflects this bit. In the schematic you can see that this pin is pulled up via 4.7k to VCC. You can ground this pin to change the last bit of the address.

Look at page 23 of the L3GD20 datasheet for information on this. So in your case you will need to depopulate R6 and connect the pin to ground.

This doesn't solve the issue completely since LSM303 doesn't seem to have the same capability. The easiest way here is to connect it to a separate I2C bus if you have another one available.

An interesting option is that there are two transistors Q1 and Q2 on the board. You could disconnnect them from VCC by cutting the traces and routing to a GPIO that will select the IMU you want to talk to.

Gustavo Litovsky
  • 7,619
  • 3
  • 25
  • 44
  • Dear Gustavo Litovsky, thank you for your response. Sorry again for an amateurish question, but how can I do depopulate R6? Version 2 of minimu doesnt have SA0s like version 1 :( – Josh Vo Mar 04 '13 at 16:28
  • @JoshVo: One way is to use two soldering irons at the same time, touch R6 on both sides and remove it. Hot Air would also work but would be overkill. – Gustavo Litovsky Mar 04 '13 at 16:50
  • @JoshVo: Perhaps it's easiest to manipulate Q1 and Q2. It would effectively disconnect the devices from the I2C bus. You just have to make sure to end transactions properly. – Gustavo Litovsky Mar 04 '13 at 17:24