Go Down

Topic: Breakout - MPU-6050 SEN-11028 wiring (Read 9663 times) previous topic - next topic


Aug 23, 2012, 07:59 pm Last Edit: Aug 23, 2012, 08:37 pm by barnamah Reason: 1
I have the Triple Axis Accelerometer & Gyro Breakout - MPU-6050

something similar to this:

I have download the zip file from here:
Opened the example file MPU605_DMP6 which is 6axis gyroscope and Accelerometer.
the code is uploaded to the board without any error.

the board has following pins

Used the following code but did not find any guide about the board on how to connect it to arduino.
Would someone please tell me except 5v, 3.3v and GND I don't know which Arduino pin to connect to?
I have soldered the board to the

The system didn't allow me to post the code (too long) so here is the code.
Text file: http://equaser.com/arduino/images/MPU6050_DMP6.txt

I am thinking to be connect the MPU-6050 board to Arduino and then read the x, y,z orientation and acceleration.
so Questions are :

  • How to connect the pin from the gyro board to Arduino uno?

  • Then where do I get the values for the x, y, z for orientation and acceleration?


you only need to connect either 5v or 3.3v, and not both. then gnd, sdc and scl. you also need to disable the use of internal pullup in wire library.


Aug 24, 2012, 12:48 am Last Edit: Aug 24, 2012, 12:59 am by Krodal Reason: 1
I didn't know this breakout board.
They seem to be the cheapest ones on Ebay.
R1 and R2 are the pull-up resistors, but I don't know what the value is.

I have made this page : http://arduino.cc/playground/Main/MPU-6050
It is easier to start with that sketch.
I have added your breakout board as "no name breakout board".
But first you should have the I2C connected, and run the i2c_scanner : http://arduino.cc/playground/Main/I2cScanner

Your board has a 3.3V voltage regulator on the breakout board, so if you connect the +5V of the Arduino to the +5V of the breakout board, it will make its own 3.3V.
Connect the ground.
Connect SDA to Arduino A4 (analog input 4 is Arduino's SDA).
Connect SCL to Arduion A5 (analog input 5 is Arduino's SCL).
Run the i2c_scanner and see if it can be found.


Aug 24, 2012, 05:53 pm Last Edit: Aug 24, 2012, 06:16 pm by barnamah Reason: 1
Thank you Krodal,
I did run the I2C scanner and it found the device

------------------ result ---------------
I2C Scanner
I2C device found at address 0x68 !
--------------------- result end ------------

and then I run the code from the playground: http://arduino.cc/playground/Main/MPU-6050#boards

and here is the readout:

--------------------- serial port monitor start -------------
Read accel, temp and gyro, error = 0
accel x,y,z: -200, -2188, 16080
temperature: 27.471 degrees Celsius
gyro x,y,z : 129, 42, -206,

Read accel, temp and gyro, error = 0
accel x,y,z: -88, -2256, 16012
temperature: 27.329 degrees Celsius
gyro x,y,z : 119, 61, -198,
--------------------- serial port monitor end -------------

and every time it shows different values.

so what is wrong and and how can I correct it.

thank you


Read the section "Measurements" on that page : http://arduino.cc/playground/Main/MPU-6050#measurements
So your values are okay. But you need some filtering or averaging in software.

For the libraries of Jeff Rowberg, you have to connect 'INT' to pin 2 (INT0).


Thank you Krodal,
I did connect the pin INT to A2. Is it correct?

I read the "measurement". do you mean to read for an interval of let's say 500ms 10 times and average it?

Also I tried this code: https://github.com/jrowberg/i2cdevlib/blob/master/Arduino/MPU6050/Examples/MPU6050_DMP6/MPU6050_DMP6.ino
and  undocumented the two lines:
Code: [Select]

// uncomment "OUTPUT_READABLE_EULER" if you want to see Euler angles
// (in degrees) calculated from the quaternions coming from the FIFO.
// Note that Euler angles suffer from gimbal lock (for more info, see
// http://en.wikipedia.org/wiki/Gimbal_lock)

and I get this "Pÿò[$" this code which seems unreadable by the monitor or it is a binary code.

thank you


INT0 is digital pin 2.

About filtering, you should read this : http://arduino.cc/forum/index.php/topic,58048.0.html
But that's only for raw values. I haven't tried that myself.

But Jeff Rowberg's library uses filtering I think.
I don't undestand your question, it looks like this:


What I meant was when I run the above sketch, the serial monitor shows this:


which is unreadable.

Any ways is there a shield or breakout board to have just x, y,z pins for gyro and  x, y,z pins for acceleration?



That looks as if the baudrate is wrong.

There are analog sensors. With those you connect x,y,z to three analog inputs. With an analog gyro and an analog accelerator you need 6 analog input.
But that would not change anything.......



I followed all the instruction but still have no success connecting Sparkfun MPU 6050 breakout board with Arduino Uno R3.
Steps I followed-
Copied "I2Cdev" and "MPU6050" folder form  https://github.com/jrowberg/i2cdevlib into libraries
VDD --> 3.3V
VIO -->  3.3V
SDA  --> A4
SCL --> A5

then copy pasted the http://playground.arduino.cc/Main/I2cScanner#.Uxhpp3Wx0yB   i2c scanner script but it says no connection found..
could someone tell what am I doing wrong?

Go Up