MPU 6050 Breakout board [HELP]

Howdie guys,

Recieved my mpu board today, so Im trying to make it work right now but without any luck.

Here is the board:
https://www.sparkfun.com/products/11028?

Here is the schematics:

As you can see on the schematic pullup resistors are connected to SCL and SDA.

Wirings:
VDD - 3.3V
GND - GND
SCL - A5
SDA - A4
VI0 - 3.3V

The I2C scanner was from here
http://arduino.cc/playground/Main/I2cScanner

This is the result when running the code

I2C Scanner
Scanning...
No I2C devices found

What am I doing wrong?

freak174:
What am I doing wrong?

Nothing, as far as I can tell.

Can you measure the voltages on the board. Perhaps some connection is not good.
Which Arduino board are you using (I'm guessing an Arduino Uno).
You could upload a photo of how it is connected.

Here are some readings from the voltmeter:
GND - VDD ~ 3.3V
GND - VI0 ~ 3.3v
GND - SCL ~ -5V
GND - SDA ~ -5V

And here is a photo of the wirings,
Red > VDD, VI0 - 3.3V
White > GND - GND
Green > SCL - A5
Blue > SDA - A4

Edit:
My bad, my bad! I soldered em. I was so sure that everything was connected and solid without the soldering.

Scanning...
I2C device found at address 0x68 !
done

Atleast ppl can learn from my misstake, DO NOT TAKE THINGS FOR GRANTED! hehe

Nice!

There is one thing with the I2C, the SCL and SDA should be high 3.3V.
A 4k7 pull-up resistor is normal, so you could add two 4k7 pull-up resistors to the 3.3V.
But since there is already 10k on the breakout board, you could add two 10k pull-up resistors to the 3.3V.

What could happen if Id skip that part?

Do you mean that one 10k pullup res for the VI0 and one for VDD ?

-And do you know any page I can read about the values that it outputs?

  • Are these 6 axis enough to stabilize a rc plane, or do you need all the 9 axis with the magnetometer?

Cheers

I ment a resistor from the SDA to 3.3V, and a resistor from SCL to 3.3V.
If you choose 10k resistors, they will be parallel to the resistors on the breakout board. So the result will be 5k on both I2C lines.

In this page is some information about it: Arduino Playground - I2CBi-directionalLevelShifter

The magnetometer is needed for earth location/orientation.
For balancing, the 6 axis (3 gyro, 3 accel) are good.

Hello,

Yesterday I took my time to make some readings from the sensor. I made a notice, the x value increases or decreases (one of them only). It keeps changing by decimal only, but it doesnt stop. Why? (raw values, sketch from Krodal).

I also tried out a sketch from Jeff Rowberg, getting the values in degrees instead (yaw, pitch,roll).
The yaw value doesnt even start at zero, and also does the same as described above (and yes, i use the interrupt pin with this sketch).

Also the pitch and roll isnt at zero degrees even its laid to be like that.

Cheers

Can you show a number of values ?
The sensor is 16-bit and very sensitive. If I put it on the table, the computer on my table causes vibrations (which I don't feel) that makes the values noisy/jitter. If I place the sensor on concreet, the values still do that, but not as much.

There is absolutely something wrong!

Krodals sketch (RAW VALUES):

Jeff Rowbers sketch (degrees, YAW PITCH ROLL):

The raw values of my sketch look good.
The raw values do change, that's why some filtering or averaging is always needed.
So I guess that Jeff Rowbergs values are also good.

The gyro drifts, the accellerator jitters, it's all normal. Remember they are 16-bits values, a change of 50 is very little.

But the Jeff Rowberg library needs an interrupt.
The FIFO of the sensor is only read by the Arduino if the sensor signals an interrupt to the Arduino.
I think that the library uses INT0, pin 2.
http://arduino.cc/it/Hacking/PinMapping168
So you have to connect the 'INT' of the sensor breakout board to pin 2 of the Arduino.

So nothing is wrong, you are getting there.

I see, well it seems to be working out. I just have to let it for like 10 seconds and the values goes to the way they are supposed to be.

However, I tried to add this line (just for testing) but god damn it freaks out.
The value jumps up and down, and then getting stuck at last. From like 60 degrees to 30, then to 0 and so on.
Im using Jeffs sketch, just took the parts I was interrested in.
Any clue why this is happening? Is it cause its using interrupts?

 if(yaw > 1){
      YawServo.write(180);
      //delay(15);
    }
    else{
      YawServo.write(0);
      //delay(15);
    }

Could I use your sketch to convert the values into degrees?

Cheers

To test it, you could use delays of 500ms.
Without the delays the servo gets the jitter, and the jitter is positioning it between 0 and 180.

Use my libraries? I don't know.
You need this guide, but that's still too complicated for me : http://arduino.cc/forum/index.php/topic,58048.0.html

You could reduce the sensitivity. In my sketch with writing to a register of the sensor, or with the functions of the Jeff Rowberg library.

You are not the only one that wondered about the raw values, so I added my own measurements from my sketch to the page about the MPU-6050: http://arduino.cc/playground/Main/MPU-6050 (in the "Measurements" section).

Thanks for the link provided, Ill take a deeper look at it when Im back from work.

However, about the servos. I made it very unclear what I actually meant. The degrees from the sensor is jumping, and then the script totally stops.

Cheers

I think you need to edit the wire library to remove the use of internal pullups.

comment out lines 76 and 77 in twi.c

// activate internal pullups for twi.
digitalWrite(SDA, 1);
digitalWrite(SCL, 1);

then you should see the pin voltage closer to 3.3v.