background preloader

MPU9150

Facebook Twitter

Gee!Design »  Arduino sketch for connection with MPU-9150. I recently managed to connect an MPU-9150 breakout board to a Unity3D application, using a Teensy2.0 as an interface (also got it working with Teensy++ 2.0 and Arduino Uno).

Gee!Design »  Arduino sketch for connection with MPU-9150

With this combination I can easily rotate an object in the real world and have a counterpart in a virtual world do the same in real time. I chose the MPU-9150 because its”sensor fusion” functions make this possible without much mathematics. I quite like the result, and I want to share my experiences and code! On this page, I go into the details of the Arduino (Teensy) sketch. What did I add/change in my Arduino sketch, relative to the standard MPU6050_DMP6 example? Arduino sketch details The Arduino sketch that I use is basically a combination of the standard MPU6050_DMP6 example, by Jeff Rowberg and RGSteele, and the “Unity Arduino Serial Connection” by Tiuri de Jong.

Step 1: setup a connection to Unity Serial.begin(57600); Step 2: Acquire quaternion data #define OUTPUT_READABLE_QUATERNION //#define OUTPUT_TEAPOT. MPU9150 IMU I2C Library for 32-bit ARM STM32f103xx family. If you are looking for a decent I2C library for the MPU9150 for STM32 family of microcontrollers, you may have a look at my opensource git hub repository.

MPU9150 IMU I2C Library for 32-bit ARM STM32f103xx family

There seems to be a decent library (MPU9150Lib) for Arduino by pansenti, but not available for ARM Cortex-M3 based STM32 family of controllers. Hence, I released it for open community out there. It has been tested on STM32F103RB (Olimex STM32-P103 development board) & using only 5 pins of MPU9150. Unlike my other libraries for MPU6050 & HMC5883L, this library make use of latest CPAL ( Communication Peripheral Application Library) & handles communication errors. I also provided a complete project source based on IAR EWARM along with pre-compiled binary image which you can directly download to FLASH memory of your STM32 board.

Download the USB Virtual COM port drivers here. Now, If you are worrying about Software for testing the data, you can download my software application. HadokenIMU: 9DoF IMU w/LiPo charger & radio header from Propane and Electrons. We recognize our top users by making them a Tindarian.

hadokenIMU: 9DoF IMU w/LiPo charger & radio header from Propane and Electrons

Tindarians have access to secret & unreleased features. Their product listings are automatically approved, and do not have to wait for our approval process. How does one become a Tindarian? We look for the most active & best members of the Tindie community, and invite them to join. There isn't a selection process or form to fill out. What benefits do Tindarians get? Because of their hard work in supporting the Tindie community, we go out of our way to make sure they are treated well. Tindie T-Shirt & Sticker Badge on your Tindie profile Invitations to top secret Tindie events around the world. Accéléromètre-Gyroscope-Boussole 9 axes MPU-9150 - Wiki Arobose. Le MPU-9150, proposé par InvenSense, est un module permettant de détecter l'orientation sur 9 degré de liberté.

Accéléromètre-Gyroscope-Boussole 9 axes MPU-9150 - Wiki Arobose

Il est composé du MPU-6050 qui contient un gyroscope 3 axes et un accéléromètre 3 axes et du AK8975 qui est une boussole numérique 3 axes. L'accéléromètre 3 axes mesure l'accélération linéaire suivant x, y et z. La mesure est en g. Le gyromètre 3 axes mesure la vitesse angulaire autour des 3 axes x, y et z. La mesure est en °/s. La boussole 3 axes mesure le champs magnétique sur x, y et z. La communication avec le MPU-9150 se fait par liaison i2c.

Les nombreux registres accessibles permettent de configurer le MPU-9150 au besoin du système (précision du gyroscope et de l'accéléromètre...). Tests Nous utilisons une carte ARDUINO UNO et le MPU-9150 monté sur la carte d'évaluation de Sparkfun. Le câblage est très simple : Nous allons décrire quelques fonctions permettant de récupérer les données en x, y et z de l'accéléromètre, du gyroscope et la température. MPU9150 data log analysis. This post is continuation of previous post on MPU9150.

MPU9150 data log analysis

Using MPU9150gui utility program, orientation data has been logged for 2 hours 30 minutes. Note that the MPU9150 DMP initialized with default settings according to the Invensense library eMPL & I did not do any calibration. You may be interested in the logged data . The DMP quaternion data has been logged at every second after dev board power up & DMP configuration. The quaternion data converted into Euler angles ( degrees ) to analyze the drift when the MPU9150 is at rest ( no motion) for 2 hr 30 min.

Euler angles during first 20sec. HadokenIMU: 9DoF IMU w/LiPo charger & radio header from Propane and Electrons.