Jump to content
I2Cdevlib Forums

Search the Community

Showing results for tags 'Quaternions'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • I2Cdevlib Web Tools
    • I2C Protocol Analyzer
    • I2C Device Entry Interface
    • I2C Device Library API
  • I2Cdev Platform Discussion
    • Arduino (ATmega)
    • Arduino Due (ARM Cortex M3)
    • MSP430
    • Other Platforms
  • I2C Device Discussion
    • AD7746 capacitance-to-digital converter (Analog Devices)
    • ADS1115 16-bit A/D converter (Texas Instruments)
    • ADXL345 3-axis accelerometer (Analog Devices)
    • AK8975 3-axis magnetometer (AKM Semiconductor)
    • BMA150 3-axis accelerometer (Bosch Sensortec)
    • BMP085 pressure sensor (Bosch Sensortec)
    • DS1307 real-time clock (Maxim)
    • HMC5843 3-axis magnetometer (Honeywell)
    • HMC5883L 3-axis magnetometer (Honeywell)
    • iAQ-2000 indoor air quality sensor (AppliedSensor)
    • IQS156 ProxSense capacitive touch sensor (Azoteq)
    • ITG-3200 3-axis gyroscope (InvenSense)
    • L3G4200D 3-axis accelerometer (STMicroelectronics)
    • MPL3115A2 Xtrinsic Smart Pressure Sensor (Freescale)
    • MPR121 12-bit capacitive touch sensor (Freescale)
    • MPU-6050 6-axis accelerometer/gyroscope (InvenSense)
    • MPU-9150 9-axis accelerometer/gyroscope/magnetometer (InvenSense)
    • PanelPilot multi-screen digital meter (Lascar Electronics)
    • SSD1308 128x64 OLED/PLED driver (Solomon Systech)
    • TCA6424A 24-bit I/O expander (Texas Instruments)

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL







Found 2 results

  1. Would anyone be able to explain these general terms about the library? 1. How does the Digital Motion Processing (DPM) within the chip work? What does it do?2. How does the interrupt work? What is it caused by? I have a heavy sketch going on in the meantime (SD card, display, heart rate sensor.etc) in the background. Can it still be used with all these modules without delaying other functions?3. How does the library incorporate quaternions? Thanks Daniel
  2. I was hoping someone in this forum could help me understand the quaternion data output from the MPU-6050 when using the MPU6050-DMP6 code by Jeff Rowberg. I'm working on a project that contiuously records 3D positioning. Previously I had been recording euler angles, however, I ran into problems with Gimbal lock. Now I've started recording quaternions to avoid Gimbal lock, but the math involved is a little beyond me at the moment. I'm having a hard time making sense of the quaternion values I get from the device and relating them to real world dimensions. I want to be able to tilt the device sensor 90 degrees and confirm in the device data that this was accurately recorded. Here is some recorded quaternion data using the Arduino Pro Mini 3.3V, 8MHz ATmega 328 board: MPU-6050 at baseline pointing straight (after waiting 10 seconds) quaternion_straight: .4337, .2398, -.4392, -.7495 MPU-6050 pointing 90 degrees downward (attitude/pitch =-90 degrees) quaternion_down: -.1815, .4730, -.1089, -.8553 MPU-6050 pointing 90 degrees upward (attitude/pitch =+90 degrees) quaternion_up: .8190, -.1508, -.4704, -.2919 MPU-6050 tilted 90 degrees right (banking/roll =+90 degrees)quaternion_right: .0665, .5426, -.8361, -.0451MPU-6050 tilted -90 degrees left (banking/roll =-90 degrees)quaternion_left: .5125, -.0204, -.0079, -.8584 In an attempt to make sense of the data I have tried to convert the quaternion values to euler angles by using the following formula (http://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles): When I apply this formula I get euler values. As I believe the formula above gives me radian values all euler values below are already *(180/pi) to convert radian -> degrees. MPU-6050 at baseline pointing straight (after waiting 10 seconds) euler_straight: .60.04, -1.23, -120.61 MPU-6050 pointing 90 degrees downward (attitude/pitch =-90 degrees) euler_down: 1.58, 58.06, 156.92 MPU-6050 pointing 90 degrees upward (attitude/pitch =+90 degrees) euler_up: 3.087, -59.15, -40.98 MPU-6050 tilted 90 degrees right (banking/roll =+90 degrees) euler_right: 171.50, -3.57, -113.77 MPU-6050 tilted -90 degrees left (banking/roll =-90 degrees)euler_left: -0.42, -2.47, -118.31 The above values do not seem to correlate with the movements of the sensor described - e.g. the calculated euler values report movement in >1 dimensions (φ pitch -1.23 -> 58.06 and ψ roll -120.61 -> 156.92) In an attempt to calibrate the device to match up with real world dimensions I've tried: quaternion_straight*inverse(quaternion_straight)= 1, 0, 0, 0 quaternion_down*inverse(quaternion_straight)= 0.7236, 0.5427, -0.2764, -0.3254 euler conversion(quaternion_down*inverse(quaternion_straight))= 75.02, -2.68, -50.49 Once again 75.02, -2.68, -50.49 does not correspond to a 90 tilt in one direction/dimension. And I've also tried: euler_straight-euler_straight= 0, 0, 0 euler_down-euler_straight= -58.47, 59.30, 277.53 -58.47, 59.30, 277.53 does not correspond to a 90 tilt in one direction and does not match with the above mentioned 75.02, -2.68, -50.49 which I might have expected. As you might be able to see from what I have tried above, I have so far been unsuccessful in demonstrating that the device data is recorded accurately when I move the device 90 degrees in one direction. Do you have any suggestions of things to try and/or read up on? Does anyone see any obvious mistakes in my calculations above or how I'm approaching the problem? Let me know if my explanations above need further elaboration. I know everyone is very busy but any ideas or help would be greatly appreciated if you have time.
  • Create New...