Noob here - need help with wiring the MPU-9150 (gyro/accel) to the Uno

Erdin, thank you for your speedy help. I do have the Sparkfun breakout board that you've referenced. I have all I need now!

Thanks again! Here is the working link of the demo running: http://www.youtube.com/watch?v=74xL-VcRyjQ
Is there a point for me to create a graphical wire diagram for other noobs like myself?

Very nice. You have a result very fast! Maybe you can thank Jeff Rowberg with a link to your video, http://www.i2cdevlib.com/contact

Great idea! Just did.

Hello dmelamed,

Looks great, Im having difficulty getting the g values from my 9150 (they all return 0) any chance of a peek at your code… or any hints as to how you got yours working, there’s very little on the web to help…

Thanks

Read the posts above, about how to connect it and using the i2c scanner.

Hey, I used the Arduino code from the examples that are provided by the chip manufacturer. Do you have that URL or would you like me to post it?

Hi there,

I'm trying to do exactly what you've done in the video, but having trouble with getting it to display as a visualization. I've followed the instructions in the post above, so far this is what was done:

  • Connected everything correctly.
  • Run I2C successfully
  • Calculated roll pitch and yaw from the raw data (did you manually calculate or use another program)? All these values seem to be right.
  • Downloaded processing and FREEIMU, and placed the processing folder from FREEIMU into the processing libraries. Now what?

hi dmelamed! Can you guide me to the link for the processing code?

Thanks.

Hi, I also see that jrowberg has removed the mpu9150 example code from github. Any chance of someone knowing where I can find it?

https://github.com/jrowberg/i2cdevlib/tree/master/Arduino/MPU6050/Examples

I search the examplecode for the MPU9150. The original example von Jeff Rowbwerg used "MPU6050_6Axis_MotionApps20.h". I did not found an example with "...9Axis...". Am i blind?

MPU-9150 = MPU-6050 + compass.

You can use the MPU-6050 code, it is one of two chips inside. Jeff Rowberg started with code for the MPU-9150, but he removed it. I don't know why.

Ok thanks for the quick answer. :)

Kucky

Which option must be enabled to view the Teapotsketch? LG Kucky

Now i get this Errors.
Compiling ‘Quad102’ for ‘Arduino Mega 2560 or Mega ADK’
Quad102.ino : In file included from
MPU6050_9Axis_MotionApps41.h : : In member function ‘uint8_t MPU6050::dmpInitialize()’:
MPU6050_9Axis_MotionApps41.h : ‘setXGyroOffsetUser’ was not declared in this scope
MPU6050_9Axis_MotionApps41.h : ‘setYGyroOffsetUser’ was not declared in this scope
MPU6050_9Axis_MotionApps41.h : ‘setZGyroOffsetUser’ was not declared in this scope
Error compiling
LGK

The Mega 2560 board has onboard 10k pullup resistors to the 5V for the I2C. It is one of the very few boards with onboard pullup for the I2C. As a result, the I2C bus is a 5V bus.

If you connect the 3.3V MPU-9150 to it, the sensor might already be damaged (the sensor seems to allow up to 6V, but it is designed for 3.3V). You need a level shifter. I use these for my Mega board: http://www.ebay.com/sch/i.html?_sop=15&_osacat=0&_from=R40&LH_PrefLoc=2&_nkw=iic+i2c+level+module&_sacat=0

I think the Teapotsketch uses processing, but I have not tested that myself yet. Is the normal simple sketch running (the one without dmp) ?

I have that Levelshifter.

http://www.ebay.de/itm/IIC-UART-level-Conversion-Module-Two-Way-Power-Meter-Protector-For-Arduino-5V-3V-/130963951751?pt=UK_BOI_Electrical_Components_Supplies_ET&hash=item1e7e0f5087

Is that OK? Must I 3V or 5V connector use? Best Regards Willi

That is the level shifter I use on my Mega board. The 3V is an output, the board has a voltage regulator. It is actually 3.3V, which it should be.

From the Mega to one side of the level shifter: 5V, GND, SDA, SCL. The other side is output side of the level shifter for the 3.3V I2C bus to the sensor: 3V (3.3V), GND, and the 3.3V signals SDA and SCL.

It works. Thank you. :) :)

Hello Erdin, The MPU9150 works fine with libraries from Februar 2013.

I get the following error message when I use the current libraries.

Compiling 'Quad102' for 'Arduino Mega 2560 or Mega ADK' Quad102.ino : In file included from MPU6050_9Axis_MotionApps41.h : : In member function 'uint8_t MPU6050::dmpInitialize()': MPU6050_9Axis_MotionApps41.h : 'setXGyroOffsetUser' was not declared in this scope MPU6050_9Axis_MotionApps41.h : 'setYGyroOffsetUser' was not declared in this scope MPU6050_9Axis_MotionApps41.h : 'setZGyroOffsetUser' was not declared in this scope Error compiling

Your post dated "March 13, 2013, 07:08:29 pm".

I changed only the "MPU6050 6 Axis MotionApps 20.h" in "MPU6050 9Axis MotionApps4.h1" from the MPU6050 example. Isn´t that right?

Thank you for your patience. Willi