How To Calibrate And Setup The EIMU
Learn how to calibrate the Easy IMU (EIMU) and setup its madgwick filter via its GUI Application
Last updated
Learn how to calibrate the Easy IMU (EIMU) and setup its madgwick filter via its GUI Application
Last updated
The Easy IMU (EIMU) is an easy-to-use open-source advanced IMU compute system for the MPU9250 IMU, with configurable and ready-to-use orientation readings.
It has a GUI application that allows one to easily calibrate and setup its Madgwick filter. It also has libraries for easy interfacing with your preferred project (whether ROS2, Arduino, Python, or Cpp robotics projects).
It can easily be used by hobbyists, students, learners, researchers, etc.
But before you can use it in your preferred project, calibration and some filter setup needs to be done.
This tutorial aims to teach you how to calibrate and setup the EIMU so you can start using it in your preferred project.
Here are the steps we would be following to setup and calibrate the EIMU Module:
Ensure your PC is capable of communicating with Arduino boards - specifically Arduino Nano -(both code upload and serial communication) as the EIMU Module uses a super-mini arduino nano microcontroller.
Ensure to have the EIMU Module and a USB Cable for serial communication.
Start the application
Once you start the application and connect to the EIMU module to your PC, you will see a page that allows you to choose the USB port, select the right port, and click connect. Wait for about 10 seconds (you should see a green-blue LED sequence on the EIMU during this time) and you should have a successful connect dialog appear, click ok to continue. If not, refresh and try again to ensure you select the right port.
You should now see a menu on the left-hand side. If you’re setting up for the first time, reset all parameters by selecting the RESET PARAMS menu option and clicking the RESET ALL PARAMS button to start the setup process with a clean slate. Once the reset is completed, close the application, disconnect and reconnect the EIMU Module, and start the application again.
Once that is done, let’s get into the real deal – calibrating, testing visualization, and computing covariances.
This is the first step in the calibration process and the only calibration process that requires you to move and rotate the EIMU Module.
Select the CALIBRATE MAG menu and click the START button. You should see a Matplotlib plot appear plotting points of different colors – red, blue, and green. Start rotating the IMU (or the container – e.g. robot – on which the IMU is mounted) slowly about the different (x, y, z) axis and see the plot update of the uncalibrated magnetometer data. Continue doing this until you see something like three balls not aligned with each other.
After this, click on the plot and the plot will be paused (please do not close the plot). On the terminal, you would see some values printed out which are the calibration parameters for the magnetometer. These values are automatically saved to the microcontroller on the EIMU module (but you can copy the values somewhere else – e.g. a text editor – for reference or report purposes).
Then click on the plot again and it will begin to plot the calibrated magnetometer data. Rotate the EIMU Module about the different axis again and you should see three balls forming which are aligned with each other.
With this, I say congratulations because the magnetometer has successfully been calibrated. You can now close the plot (not the app).
Calibrating the gyroscope is very easy. Firstly, ensure the IMU is stationary – i.e. not being moved or disturbed – on a flat surface (If the IMU is mounted on a robot for example, just place the robot on a flat surface – e.g. on the floor, or on a flat table).
Now select the CALIBRATE GYR menu and click the START button. You should see progress bar, wait until it is finished.
Once it is completed, you should see a Matplotlib graph showing the uncalibrated and calibrated gyroscope data. Also, the calibration offset parameters would be printed on the terminal.
Remember that the gyroscope calibration offset values are automatically saved on the microcontroller on the EIMU module (but you can copy the values somewhere else – e.g. a text editor – for reference or report purposes).
With this, I say congratulations because the gyroscope has successfully been calibrated. You can now close the plot (not the app).
Calibrating the accelerometer is also easy. Just follow the same steps as the gyroscope calibration above.
You just need to select the CALIBRATE ACC menu and click the START button.
Don’t forget to ensure the IMU is stationary – i.e. not being moved or disturbed – on a flat surface (If the IMU is mounted on a robot for example, place the robot on a flat surface – e.g. on the floor, or on a flat table).
With this, I say congratulations because the accelerometer has successfully been calibrated. You can now close the plot (not the app).
You need to do this step before going to the computing variances steps.
Select the VIZUALIZE RPY menu. You should now see a page with option for changing Filter Gain and Reference Frame. Also, you'll the Roll, Pitch, and Yaw values displayed.
Click the VIZUALIZE IMU button, you should see a Matplotlib plot appear showing the IMU visual
Rotate the IMU (or your robot if it is mounted on it) and see the IMU visual transforms. Check if you are okay with the orientation convergence and noise. If you are not okay with it, adjust the Filter Gain value till you are satisfied.
The default gain value (1.0) is generally okay for most applications but feel free to adjust as you see fit for your application.
Change the reference frame based on your application.
Once you are done, you can close the plot.
The variences are the sensor noise in the orientation, gyroscope, and accelerometer readings. This is important when using the EIMU with sensor fusion algorithms like EKF.
First, ensure the IMU is stationary – i.e. not being moved or disturbed – on a flat surface (If the IMU is mounted on a robot for example, place the robot on a flat surface – e.g. on the floor, or on a flat table).
Select any of the RPY VARIANCE, GYR VARIANCE, and ACC VARIANCE menu button and click the START button. You should see the progress bar, wait until it is finished.
Once it is completed, you should see variance values printed on the terminal.
Remember that these variance values are automatically saved on the microcontroller on the EIMU Module (but you can copy the values somewhere else – e.g. a text editor – for reference or report purposes).
Do this for computing the orientation (RPY), rate (GYR), and acceleration (ACC) variance.
You can also set its i2c address for communication with Arduino microcontrollers.
Select the I2C SETUP menu and set your preferred address value (between 1 – 127). The default address value is 104 (i.e. 0x68).
Download the EIMU Setup Application executable and extract it.
NOTE: if you don't find the application for your operating system, you'll need to run the eimu setup application python code via a python virtual environment. check the github repo for that (Windows, Linux [Ubuntu], and MacOS)
facing any issues,
– Tesla Labs
– Adafruit
– Adafruit
– Bolder Flight
– Paul McWhorter
– CCNYRoboticsLab [Here’s a link to the Arduino Library I created from it – ]