Notes #2: Connecting to the Arduino

Now, the MPU-6050 is a 3.3V device and the Arduino is a 5V device, so there is that recipe for trouble. You can power the MPU-6050 by using the Arduinos regulated 3.3V pin, but the data communication lines for I2C (SCL and SDA) and the interrupt signal (INT) are still 5V logic on the Arduino’s side.

This issue is easily solved by using a level shifter for the data communication lines. However, connecting the devices directly also seems to work despite what the manual says. (For example, take a look at Geeetech MPU-6050 wiki’s page – the usage section.) Altough, I must say, that if you attempt to do this, you do so at your own risk as this may damage the device!

So, I strongly advise the use of a level shifter. You can buy breakout boards for those too. SparkFun sells 2-channel boards and Adafruit has 4-channel and 8-channel boards. Make sure the level shifter works with bi-directional signals (ie. I2C). For example, this one does not.

Another solution would be using an Arduino variant that works at 3.3V. However, most of these run at a lower clock speed (usually 8 MHz) and this in turn affects the maximum baud rate for the serial port, which may be quite important when transmitting data collected from the MPU-6050. For hacking your Arduino to work at 3.3V, take a look at this article by Adafruit.

Other 3.3V development platforms worth mentioning:

One more thing: I think it’s necessary to set the MPU-6050’s VIO to 3.3V (regardless if you have a level shifter or not. Only if you use lower voltages than 3.3V for the communication lines, you may want to adjust to that using the VIO pin).

Notes #1: The MPU-6050

Ok, what is the MPU-6050?

In short, it’s a gyroscope, accelerometer and temperature sensor all in one package. It’s a 3.3V device and uses I2C to communicate. (The device also has a second I2C bus for slave devices.) The device can do some filtering, store selected measurements into a FIFO buffer, detect simple stuff like free fall, motion and zero motion and it has a built in “DMP” not covered by the device’s documentation.

Where can you get one?

SparkFun sells breakout boards: https://www.sparkfun.com/products/11028 Check out the reseller page, if you don’t live in the USA, to find a more local vendor. Also DX (in China) sells very inexpensive breakout boards. Just type “6050” into the search bar.

The Arduino playground has a good short descritpion of the MPU-6050, a list of different breakout boards and example code you can copy and paste directly into the Arduino IDE.

How to undestand the operation of the MPU-6050?

I don’t think there is any other way than reading the manuals in order to understand what can be done with this device. You’ll need to read the Product Specification (PS) and the Register Map and Descriptions (RM) documents for the MPU-6050. Both can be found at Invensense’s website. In my opinion, the PS seems to be written by the marketing department. It gives you a general overview. The RM is the real deal, except it currently does not cover the much advertised DMP-functionality. However, it will explain the basic functionality of the registers.

1st post

Creating this blog to document a project (currently) using the MPU-6050 gyro/accelerometer and Arduino hardware. Hopefully this will prove to be useful somehow. The goal is to build a data glove and document it well enough for others to undestand, too.