Tag Archives: MPU6050

Add an MPU6050 Accelerometer to your Arduino Project

In this video lesson we will show you how to incorporate accelerometers into your Arduino projects. Your Sunfounder kit includes the GY-87 IMU module. This module contains a BMP180 pressure sensor, which we have already used in earlier lessons, and an MPU6050 6 axis IMU. The MPU6050 includes 3 accelerometers and 3 gyros. In today’s lesson, we learn how to use the MPU6050 accelerometers. I will explain how these MEMS bases accelerometers work, and how we can use them in our project.

This is the schematic we use in todays lesson.

Schematic for connecting the GY-87 module to the Arduino

For your convenience, the code developed in the lesson is presented below:

 

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.

Schematic for Creating a Tilt Meter

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

 

Improving Accuracy of MPU6050 Data Using a Complimentary Filter

In this video lesson we show how to create a complimentary filter such we get pitch and roll data from the MPU6050 which is quick and responsive, accurate, and low noise. We are using the following schematic:

Schematic for Creating a Tilt Meter

This is the code we developed in the video.

 

Measuring Roll, Pitch, and Yaw Using 3-Axis Gyro on the MPU6050

In this video lesson we describe how to measure roll, pitch, and yaw using the MPU6050. We describe the issues associated with drift in these gyros and will propose a path forward in dealing with the drift issue.

We are using the following circuit for this project:

Schematic for Creating a Tilt Meter

And this is the code we develop in today’s lesson.

 

Two Axis Tilt Meter Displaying Pitch and Roll Using an MPU6050 on the Raspberry Pi Pico W

In this video lesson, we demonstrate how to create a two-axis tilt meter. The device displays both the pitch and roll on an OLED. In addition to this quantitative display of tilt and roll, it also shows a carpenter’s level type visual, where a circle, or bubble moves to indicate tilt. When the circle is centered on the crosshairs, the device is flat in both axis.

For your convenience, this is the schematic we are using:

Schematic for Creating a Tilt Meter

And we also include the code we developed in this lesson.