MPU-9150 + Leonardo Not Working

Hi,

I'm very new to the forum and pretty new to Arduino. I am trying to connect the MPU-9150 (https://www.sparkfun.com/products/11486) to a Leonardo board. I followed the instructions listed in this topic (http://forum.arduino.cc/index.php?action=sendtopic;topic=154023.0). Once I connected the INT to D2 nothing displays in the Serial Monitor. When I don't have it connected it runs through the loop and tells me "No I2C devices found."

Is this something particular to the Leonardo or am I doing something wrong?

Thanks, Josh

The first thing to do is find the sketch "i2c_scanner", which scans the possible i2c addresses and reports if it finds any devices.

Make sure you have connected the device to the correct pins for your kind of arduino. Many advises say to connect to analog pins 4 and 5. That is for Uno. Others are different. I don't know about Leonardo, you can check it.

Make sure you consider issues with 5v and 3.3v devices.

The MPU-9150 and 6050 require you to send them some configuration data. It's not like other sensors which will just start to spit out data as soon as you power them on.

I followed the instructions listed in this topic (http://forum.arduino.cc/index.php?action=sendtopic;topic=154023.0).

Did you connect it like described in this topic? That's for an UNO and is wrong for a Leonardo. You have to connect SDA to the pin labeled "SDA" on the Leonardo and not to A4 as written there. The same is true for SCL.

The board does have pull-ups installed but very weak ones so the cabling between the Arduino and the board has to be very short or you have to install additional pull-ups to 3V3 (3k3 should be a good value).

Thank you for both of the responses. I did have the SDA and SCL connected to A4 and A5 so I switched them to the SDA and SCL respectively. I have attached an image of the configuration I now have setup. Below is the response I’m receiving in the Serial Monitor.

Unknow error at address 0x01
Unknow error at address 0x18
Unknow error at address 0x34
Unknow error at address 0x35
No I2C devices found

Scanning…
Unknow error at address 0x01
Unknow error at address 0x02
Unknow error at address 0x03
Unknow error at address 0x04
Unknow error at address 0x05

I cannot see it on the picture. Is Vcc connected to 3V3?

I hope you never turn on the LED because you will destroy your Leonardo with that circuit. The LED needs a current-limiting resistor, otherwise you get a too high current.

Remove the connection to pin 2 because that is SDA on the Leonardo. Pins 0 and 1 are external interrupts 2 and 3 on the Leonardo, you might use one of them.

VCC is connected to 3.3V.

LED has been removed.

When I remove the 2 <-> INT connection I get the response below.

Scanning…
No I2C devices found

Try the 3k3 pullups to 3V3, maybe this helps.

Ok, I will give this a try.

I'm traveling out of town in a couple of hours and won't be back to give this a go until next week but I will post my results at that point. Thanks for all the help so far!!

Good news! It's all working well now. I didn't need the pull up resistor. In fact, all I had to do was solder the 4 connections (probably would've saved everyone some time by trying this before posting to the forum, whoops).

Anyway, now that step 1 is complete I need to figure out what to do with it next! If any has seen any cool demos or has suggestions I'd be interested in taking a look. Thanks again for all the assistance!