Tag Archives: Calibration

Calibrating a 3-Axis Magnetometer

In this video lesson we show you how to calibrate the QMC5883L 3-axis magnetometer. The lesson is geared toward this specific magnetometer, but the procedure will be the same for any 3-axis magnetometer. We then use the calibrated reading to measure and calculate the magnetic heading of the device. With this, we have created a calibrated digital compass. In this lesson we are using the GY-87 module, which contains the QMC5883L magnetometer. We are connecting the module to the arduino using the following schematic:

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

In the video we develop two programs. The first program determines your sensor’s calibration constants. Then the second program uses those calibration constants to calculate heading, or yaw. The second program uses the offsets and scale parameters for MY PARTICULAR SENSOR. These values were determined using the first program. You must determine these values for your sensor, and then edit the second program to use your particular calibration parameters.

Program to determine your calibration parameters:

Once you get your calibration parameters, then put them into this program. This program will then calculate your compass heading:

 

Robotics Training LESSON 9: Calibrate Robot Car Turn Angles with Linear Regression

Guys in this lesson we show how you can use linear regression to more accurately calibrate turns for our robot car. We will take you through the math step-by-step, and then show how to code up the results. If you want to play along at home, you can get your Elegoo Robot Car HERE.

For your convenience, the code we developed in the lesson is included below.

 

9-Axis IMU LESSON 5: Calibrating the BNO055 9-axis Inertial Measurement Sensor

BNO055 IMU
Our 9-axis BNO055 9-axis sensor connected to our Aurduino Nano

In this lesson we show you how to get a clean calibration on your BNO055 9-axis sensorIn the video below we take you through the coded needed to calibrate the sensor, and a simple technique to quickly get the system properly calibrated.

The code developed in this video will be used in future lessons, and is included below:

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.