Electronic – Any tips on using the Invensense ITG-3200 gyro

gyroi2c

I'm developing a gyro+accelerometer data logging device using the Invensense ITG3200 gyro device and I'm having a real struggle getting it to talk to me. I have tried 5 of them and none of them are responding to I2C commands. Has anyone had experience using these and had to overcome hurdles to make them work?

I have two other sensors on the same I2C bus and they are behaving as expected, so my I2C comms is working fine. The sole bus master is a PIC microcontroller. I have wired the chip up exactly as shown in the specs, and use a common 3.3V supply for Vdd and Vlogic. Pullup resistors are 4k7, but have tried reducing them to 1k5 with no effect.

The gyro chip is a bit odd electrically too – it is behaving as if it has a pullup on the SDA line to a voltage at 2/3 the supply voltage, but that ceases to supply current when the SDA voltage drops below about 0.6V. That behaviour kind of makes sense but is not documented in the spec sheet.

I am wondering if I have managed to damage all 5 chips in exactly the same way, but that seems unlikely. One of them I purchased on a breakout board and it behaves exactly the same as the others: 2 of those are reflow soldered onto a PCB, the other 2 I glued upside down and hand soldered fine wires to the pads (getting desperate there!).

It would be good to hear from anyone who has used this chip successfully – seems like a great device but I am getting a tad frustrated 😉

I did send a query to Invensense but haven't heard anything back from them.

Thanks for any clues.

Best Answer

I have one of these: http://www.sparkfun.com/commerce/product_info.php?products_id=9801

... and I've talked to it using one of these: http://dangerousprototypes.com/bus-pirate-manual/

... with these commands, ignore blank lines and lines starting with #, those aren't used by the BP, refer to the BP manual for info about the notation, but rest assured that all the I2C commands were found by reading the datasheet:

I2C mode

M 4 2 1

pull ups on

p 2

Power on

W

Read address:

[ 0b11010010 0x00 [ 0b11010011 r ]

Configure for high bandwidth:

[ 0b11010010 0x15 15 24 ]

Configure to use Z gyro as oscilator:

[ 0b11010010 0x3e 3 ]

Read data:

[ 0b11010010 0x1b [ 0b11010011 rr rr rr rr ]