BASIC4MCU | 센서 | 자이로센서 | MPU9150 data log analysis
페이지 정보
작성자 키트 작성일2017-08-22 14:39 조회1,689회 댓글0건본문
MPU9150 data log analysis
July 3, 2013 — HariThis post is continuation of previous post on MPU9150. 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 . TheDMP 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. The first graph here shows how the DMP output converging & then starts drifting.
The Euler angles at 4th sec in the time line are Phi = -1.7398 Theta = -1.1055 Psi = -14.9286 & at 2 hrs 30 min are Phi = -1.5823 Theta = -1.1658 Psi = 27.6842. This shows us that the Phi drifted 0.1575 degrees, Theta drifted 0.0603 degrees & Psidrifted 42.6128 degrees. We can conclude, the average drift rate is0.0047348 degrees/sec ( 0.284085 degrees/min).
The graph below gives an insight to the above graph & shows that there is noise ( non-linearity) too in Psi during the drift.
As of now, the eMPL inside MotionDriver5.1 has capability to produce only 6-axis DMP quaternion & it doesn’t uses magnetometer data. This preliminary analysis results also show that MPU9150 DMP quaternion produces heading drift using eMPL. The 9-axis fusion that is DMP quaternion + magnetometer data left for users ( whatever, they did not release source). Currently this is a bottleneck in using the DMP quaternion as it is. For improved heading stability, users have to find their own way of fusion.
The following are the possibilities for 9-axes orientation:
- Tweak the DMP part related to magnetometer ( may not be possible until InvenSense provides a solution).
- (i) Get the DMP quaterion, read only magnetometer data in bypass mode. Implement effective 9-axis fusion ( DMP quaterion+mag ) method on microcontroller platform.
(ii) Configure MPU9150 to populate DMP quaternion into FIFO, magnetometer data into EXT_SENS_DATA_xx ( adress 0x49 ) & read it. Implement effective 9-axis fusion ( DMP quaterion+mag ) method on microcontroller platform.
(iii) Configure MPU9150 to populate DMP quaternion & the magnetometer data into FIFO, then read it. Implement effective 9-axis fusion ( DMP quaterion+mag ) method on microcontroller platform.- Just get the sensors ( Accel, Gyro, Mag) raw data & implement any stable 9-axis AHRS fusion algorithm ( DCM or EKF).
I was able to get magnetometer data using the method 2(ii) ( have a look at my GitHub repository). Next job is 9-axis fusion, stay tuned it will be done soon.
MPU9150 IMU I2C Library for 32-bit ARM STM32f103xx family
June 25, 2013 — HariIf you are looking for a I2C library for the MPU9150 for STM32 family of microcontrollers, you may like to visit my opensource GitHub repository. There seems to be a decent library MPU9150Lib for Arduino by pansenti, but not available for ARM Cortex-M3 based STM32F103xx micros. Hence, I thought to share it for open community out there. It has been tested on Olimex STM32-P103 development board using only 5 pins of Sparkfun MPU9150 breakout board. The dev board has STM32F103RB micro. Unlike my other libraries for MPU6050 & HMC5883L, this library make use of latest ST’s 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.
For testing the data coming from the board, you can download MPU9150gui. This software application developed using C# .NET & replicates the functionality of Python based client application provided by Invensense for evaluating MPU6050/MPU9150. In addition, it prints Compass data ( command invc) & also you can log the orientation data into .csv file for further use. You just select the COM port allocated for your board, then Click Open Port button. For sending commands to the board, just type the commands in the text box, they will be received by the board. I hope to extend the functionality of MPU9150gui over time.
Doxygen html documentation will come soon. For the library source files & updates visit : GitHub MPU9150 RepositoryIf you find it useful in your application, Just say thanks & use it. I appreciate any comments/contributions for improving it further. That’s it, that’s all I have for this week. Thanks for reading.Note: This library is working successfully on STM32F103RB with Sparkfun MPU9150 breakout board. It should work on other microcontrollers of the same family too.Posted in Embedded systems, MEMS Sensors. Tags: MPU9150, MPU9150 DMP,MPU9150 I2C library, MPU9150gui. 33 Comments ≫
댓글 0
조회수 1,689등록된 댓글이 없습니다.