Page 1 of 1

MPU-6050 is not being displayed in i2c address table

Posted: Tue Dec 31, 2013 6:11 pm
by 0x0000
Hello,

I am trying to interface MPU-6050 with the Raspberry Pi,
Since it require i2c connections so I have connected using the following pins,

3.3V connect to VCC
SDA connect to SDA
SCL connect to SCL
Ground connect to GND

but when I am checking if the device is detected using,

Code: Select all

i2cdetect -y 1 
, nothing is displayed beside the empty i2c address table.

On the other hand, the MPU-6050's yellow light is turned on when i have connected it.

I am sure that i have done everything correct because other sensor (BMP085) is being normally displaying in the i2c address table when i am trying to connect it, ADC Pi is also normally showing in the i2c table.

I have tried to connect MPU6050 with and without BMP085, but in either case , its memory address is not displaying in the i2c address table.

What could be the problem here ?
beside, VCC, SDA, SCL and GND, am i supposed to connect any other pins too ?
the other pins are,
XDA, XCL, ADD and INT

Kindly help me with that

Re: MPU-6050 is not being displayed in i2c address table

Posted: Tue Dec 31, 2013 9:33 pm
by Hove
I assume you using a breakout board for you MPU6050? If so, which one? Post a photo if you can.

Some breakouts need a 5V supply and include a 3.3V regulator for the MPU6050 itself. If that's what you have, then you need need 5V for Vcc.

You will need to set the ADD to either 0v or 3.3V to choose between the i2c addresses 0x68 or 0x69.

You can leave XDA, XCL and INT unconnected - XDA / XCL provide a master i2c interface for adding (say) a compass, INT provides an interrupt to let the RPi know when there is fresh sensor data to be read, but you can just poll for the data instead.

Re: MPU-6050 is not being displayed in i2c address table

Posted: Tue Dec 31, 2013 9:50 pm
by 0x0000
Hove wrote:I assume you using a breakout board for you MPU6050? If so, which one? Post a photo if you can.

Some breakouts need a 5V supply and include a 3.3V regulator for the MPU6050 itself. If that's what you have, then you need need 5V for Vcc.

You will need to set the ADD to either 0v or 3.3V to choose between the i2c addresses 0x68 or 0x69.

You can leave XDA, XCL and INT unconnected - XDA / XCL provide a master i2c interface for adding (say) a compass, INT provides an interrupt to let the RPi know when there is fresh sensor data to be read, but you can just poll for the data instead.
I am using this one,
http://1.bp.blogspot.com/-VD4tnn3Towo/U ... u-6050.jpg
and this guy has done it with the 3v3 volts,
http://blog.bitify.co.uk/2013/11/interf ... -6050.html

Should I still follow your steps ? because the guy above has made it work with just 3.3V

Re: MPU-6050 is not being displayed in i2c address table

Posted: Tue Dec 31, 2013 9:59 pm
by Richard-TX
you have not indicated if you have the address line tied high or low. The address line should not be left floating unless the manufacturer says it is ok to do so.

Re: MPU-6050 is not being displayed in i2c address table

Posted: Wed Jan 01, 2014 7:19 am
by Hove
As RichardTX says, you need to add pull-up or pull-down resistor from ADD to Vcc / ground to select the i2c address. I see the link doesn't do this, but there's nothing visible on the PCB indicating it will choose the address if you don't - better to be safe.

Although it says you can use 5 or 3.3v, with the regulator there, I think Vcc needs to be 5v. Just use GPIO pin 2 rather than 1.

Re: MPU-6050 is not being displayed in i2c address table

Posted: Wed Jan 01, 2014 7:40 am
by Richard-TX
"For power supply flexibility, the MPU-60X0 operates from VDD power supply voltage range of 2.375V-3.46V. Additionally, the MPU-6050 provides a VLOGIC reference pin (in addition to its analog supply pin: VDD), which sets the logic levels of its I2C interface. The VLOGIC voltage may be 1.8V±5% or VDD."*


* page 7 of the document at http://invensense.com/mems/gyro/documen ... 00v3.4.pdf

Yet the maximum VDD is +6 volts according to page 20.

What all this means is the you can supply the chip with +5 volts yet maintain a +3 I2C interface voltage. The same sort of thing happens with the PCA9685.

I think I would power it from +3 volts. I have no idea how they have that chip configured on the board.

Re: MPU-6050 is not being displayed in i2c address table

Posted: Wed Jan 01, 2014 10:13 am
by 0x0000
Hove wrote:I assume you using a breakout board for you MPU6050? If so, which one? Post a photo if you can.

Some breakouts need a 5V supply and include a 3.3V regulator for the MPU6050 itself. If that's what you have, then you need need 5V for Vcc.

You will need to set the ADD to either 0v or 3.3V to choose between the i2c addresses 0x68 or 0x69.

You can leave XDA, XCL and INT unconnected - XDA / XCL provide a master i2c interface for adding (say) a compass, INT provides an interrupt to let the RPi know when there is fresh sensor data to be read, but you can just poll for the data instead.
It Worked !!!
Thanks a ton.
I switched AD0 from ground to 3.3Volts and the VCC to 5volts and suddenly , the i2c device as started showing up in the i2c address Table at 0x69.
However, Connecting AD0 to the Ground or simply leaving it flowing doesn't displaying it at 0x68.

Anyway, the point is, it is working :)
Thank you very much.