[WIKI] IMU Calibration Wizard - a beginner's tutorial (with VESC tool 6.2 beta)

:warning: WARNING: The guide is still work in progress! There are still a few gaps to be filled. This is a wiki post, so feel free to make additions or leave a comment if you find any mistakes. For example videos or screenshots would be helpful. if anyone could provide those, that would be great!

When do you need an IMU calibration with 6.2

To my understanding, the current VESC Tool 6.0 stable has bugs in IMU Calibration wizard which can lead to faulty settings or simply a bad calibration.

For example, if your controller is not level (in RT data) while your board is set flat, you should recalibrate.

What you need

INFO: Make sure to download the file from the VESC website directly from your device. Don’t use dropbox or Wifi Sharing since it can corrupt the file and won’t install.

The whole process consists of three parts: A) Going through the wizard; B) Manual adjustments; C) Checking settings in RT Data

A) Going through the IMU calibration wizard

  1. Back up up config via both VESC tool 6.0 (and 6.2 beta if you have a second device)
  2. Put your board into a crate so it’s flat. :warning: DO NOT ENGAGE THE BOARD, DO NOT TOUCH THE FOOTPADS during the next steps!!!
  3. Switch to VESC tool 6.2 beta
  4. Disable Float Paackge by toggling the button in floatcfg > spec and hit WRITE. It seems triggering your adc is bad, disabling floatpck prevents this.
  5. Go to: Start > Setup IMU. Here you just have to follow the Wizard instructions for each Calibration
    1. IMU Configurator:
      IMU Detected: should say true. If not the case, hit “Search for IMU”
      In IMU Profile Selector choose Balance Skateboard
      For “Frequency” it should say 832 (if you experience behavioral issues, change “Sample Rate” to 416 under App CFG → IMU
      The other values should be set correctly, e.g. for my Lfoc 3.1 it read for me: AHRS: Mahony, Acc Decay 0.020, Mahony kp 2.0, Accel Z Filter 1.0, Gyro Filter 0.0
      If all values check out, hit “Save”

    2. Gyroscope Calibration
      make sure the board is flat
      wait for XYZ offset values to stabilize. jumping ±0.02 is acceptable
      Once stabilized, hit “Save”

    3. Accelerometer Calibration
      For now, if you’re not sure how to do this one, skip it, @NicoAleman will make a video on that soon. It’s good to do, but most boards can get by fine without, so no huge deal putting it off for now

    4. Orientation Calibration
      Roll offset: wait for value to stabilize. jumping ±0.02 is acceptable. if value is jumping between -2.25 and 357.25 or similar fashion, then … tbc. Hit SAVE
      Pitch Offset: wait for value to stabilize. jumping ±0.02 is acceptable. if value is jumping between -2.25 and 357.25 or similar fashion, then … tbc. Hit SAVE
      Yaw Offset: Lift your nose, the value should say something like 90 or -90. While the nose is lifted, hit SAVE
      Even if this value is set up wrong, it can fixed later during the manual adjustment part.

  6. Now you should be back in IMU Wizard
  7. Hit “cancel” to go back

B) Manual adjustments after all calibration steps were performed

  1. Yaw Offset: Go to App Cfg > IMU > Yaw Offset. For Lfoc 3.1 it should be 90. For Lfoc 3.0 should be 0. BUT In the end go to RT Data to verify the right value (Part C below)
    [More values for other controllers coming soon]

  2. Sample Rate: If you experience behavioral issues with the Sample Rate set the Wizard (Frequency value from “IMU Configurator” and while on default Float package settings, try to set Sample Rate to 416. Go to App CFG > IMU and set Sample Rate to 416, hit WRITE.

    [tbc] for more controller models
    @NicoAleman can you add here what behavioural issues are common here?

C) Double-check everything in RT Data

  1. Go to RT Data and follow the instructions from 3:16 in the video here: IMU Wizard Rough Guide - VESC Tool 6.0 - YouTube

D) Before you do first test ride…

  1. Re-enable Float Package by toggle button in floatcfg > spec > WRITE
  2. Go to AppUI > Controls and hit Reverse. the wheel should spin backwards. Then hit Forward, the Wheel should spin forward
    If that’s not the case, then something went wrong or was overlooked.

Troubleshooting

[tbc]

1 Like

Looking forward for Accelerometer Calibration guide !