Connect with us

To get absolute angle readings from an MPU6050?

Discussion in 'Sensors and Actuators' started by Kevin713H, Sep 6, 2021.

Scroll to continue with content
  1. Kevin713H


    Feb 28, 2019
    Hi there, :)
    I'm building an automatic leveling system for our RV, and I need very precise angle readings to figure out where level is for system.
    The I2Cdevlib MPU6050 using the DMP gives readings that are precise enough, but the sensor resets to showing "level" whenever it's powered on.
    Could someone please point me in the right direction to get absolute (not relative to the power-on position) measurements from the MPU6050? o_O

    Thank you in advance!
  2. Nanren888


    Nov 8, 2015
    Any chance of just keeping it running, powered up?
    At some point you have to set it, calibrate it, after that, keep power on it?
    Is your use case static, non-moving?
    If so, you could mount it so that it is suspended, allowed to settle, that is mechanically auto-leveling, then lock it to the structure for leveling the structure.
    Last edited: Sep 6, 2021
  3. Bluejets


    Oct 5, 2014
    Ah the days when a couple of $2 bubble levels were enough.
    Now one has to impress the neighbours.:)
  4. Harald Kapp

    Harald Kapp Moderator Moderator

    Nov 17, 2011
    The issue is probably related to the gyroscope and the processing of gyroscope data by the integrated DMP. When you power up the chip the gyroscope/DMP take the actual position as zero, followed by motion processing of the gyroscope data by the DMP.
    You may get away by using accelerometer data only (example). Assuming the chip is mounted such that x and y measure the horizontal plane and z is the vertical, then the chip is level with x = y = 0 and z <> 0.


    May 20, 2017
    Could you not write the calibration data into non volatile memory and read at power up?
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day