Thursday, April 20, 2017

The InvenSense MPU-6050 sensor contains a MEMS accelerometer and a MEMS gyro in a single chip. It is very accurate, as it contains 16-bits analog to digital conversion hardware for each channel. Therefor it captures the x, y, and z channel at the same time. The sensor uses the I2C-bus to interface with the Arduino.
The MPU-6050 is not expensive, especially given the fact that it combines both an accelerometer and a gyro.

Photo: GY-521 breakout board
Also note that Invensense has combined the MPU-6050 with a magnetometer (compass) in a single chip called MPU-9150.

Reading raw values is easy, the rest is not

Reading the raw values for the accelerometer and gyro is easy. The sleep mode has to be disabled, and then the registers for the accelerometer and gyro can be read.
But the sensor also contains a 1024 byte FIFO buffer. The sensor values can be programmed to be placed in the FIFO buffer. And the buffer can be read by the Arduino.
The FIFO buffer is used together with the interrupt signal. If the MPU-6050 places data in the FIFO buffer, it signals the Arduino with the interrupt signal so the Arduino knows that there is data in the FIFO buffer waiting to be read.
A little more complicated is the ability to control a second I2C-device. The MPU-6050 always acts as a slave to the Arduino with the SDA and SCL pins connected to the I2C-bus. But beside the normal I2C-bus, it has it's own I2C controller to be a master on a second (sub)-I2C-bus. It uses the pins AUX_DA and AUX_CL for that second (sub)-I2C-bus. It can control, for example, a magnetometer. The values of the magnetometer can be passed on to the Arduino.

Things get really complex with the "DMP". The sensor has a "Digital Motion Processor" (DMP), also called a "Digital Motion Processing Unit". This DMP can be programmed with firmware and is able to do complex calculations with the sensor values.

For this DMP, InvenSense has a discouragement policy, by not supplying enough information how to program the DMP. However, some have used reverse engineering to capture firmware.

The DMP ("Digital Motion Processor") can do fast calculations directly on the chip. This reduces the load for the microcontroller (like the Arduino). The DMP is even able to do calculations with the sensor values of another chip, for example a magnetometer connected to the second (sub)-I2C-bus.

Download Newest Library in button below


6 komentar:

  1. there is not button to download

  2. there is no download button available.

  3. where must we click?

  4. Have you ever thought about publishing an ebook or guest authoring on other sites? I have a blog centered on the same topics you discuss and would love to have you share some stories/information. I know my readers would appreciate your work. If you're even remotely interested, feel free to send me an e-mail. netflix login