Tag Archives: MPU6050

Applying a Low Pass Filter to Roll and Pitch Calculations on the MPU6050

In today’s video lesson we show how you can remove the vibration noise from your roll and pitch values using a low pass filter. The filter removes the high frequency noise resulting from vibrations.

MPU6050
Schematic for connecting the GY-87 module to the Arduino

Below is the code we developed in this lesson.

 

Using Arduino to Calculate Roll and Pitch from MPU6050 3-axis Accelerometers

In this video lesson we show you how to take the calibrated accelerometer data from the MPU6050 and use it to calculate the tilt of the board. We can calculate tilt in two axis, or the roll and the pitch. This is the schematic for the project:

MPU6050
Schematic for connecting the GY-87 module to the Arduino

This is the code we developed in the video to calculate the roll and pitch from the three axis accelerometer data.

 

Using Arduino to Calibrate the MPU6050 Accelerometers

In this video lesson we show you how to calibrate the accelerometers on the MPU6050. You will have to find the min and max accelerometer numbers for your particular board, but I show you how in the video. Below, we show the schematic of how our circuit is connected.

MPU6050
Schematic for connecting the GY-87 module to the Arduino

In the lesson we developed the following code. Measure your min and max values of the three accelerometers according to the instructions in the video. Then enter those numbers in the code below, and un-comment out the commented lines. If you run the code as-is below, it should work, but the results will be uncalibrated and not as accurate as possible.

 

Measure 3 Axis Acceleration on an Arduino with the MPU6050 IMU

In this video tutorial we show how the MPU6050 can be used to measure acceleration in the x, y, and z directions, that is, Ax, Ay, and Az. We also introduce the idea of plotting the data to the Arduino Serial Plotter to make visualization of the data easier.

Below is the schematic we are using to access the MPU6050 on the GY-87 module.

MPU6050
Schematic for connecting the GY-87 module to the Arduino

Below is the code which we developed in the lesson to measure acceleration in all three axis.

 

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.

MPU6050
Schematic for connecting the GY-87 module to the Arduino

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