Tag Archives: Tilt

Remove Long Term Steady State Errors from MPU6050 Tilt Measurements

In this video lesson I show you how to remove long term steady state error from the tilt values calculated from the MPU6050 IMU. We are using the following schematic for our prototype.

MPU 6050
Schematic for Creating a Tilt Meter

For your convenience, this is the code we developed in the video.

 

9-Axis IMU LESSON 6: Determine Tilt From 3-axis Accelerometer

BNO055
Adafruit BNO055 9-axis Sensor Connected to an Arduino Nano

This lesson shows you some of the simple math, that will allow you to approximate tilt angle from a three axis accelerometer. In this entire series of lessons, we are using the BNO055 9-axis sensor connected to an Arduino Nano. It is possible to approximate tilt along the x-axis and tilt along the y-axis. These could roughly be considered to be like the Euler Angles of Pitch and Roll. It should be noted that the approximations are reasonable for tilt angles less than 45 degrees. Also note, that in this simple demonstration, real acceleration will be interpreted as tilt, hence the system will incorrectly interpret motion as tilt. Because of this, this approach should not be used on things like drones or other moving systems. It is just for simple demonstration purposes.

The code developed in the video above is included below for your convenience.

The code below is for demo purposes only, and should not be used in any real applications. It just demonstrates how to work with this sensor in benchtop presentations.