Thanks to the great documentation resources I have our ODrive V3.6, D5065-270KV motor and CUI AMT102 encoder working well. Now that I’m preparing for use beyond the test bench, I just want to ensure I’ve distilled the boot-up options correctly.
Given we have a non-absolute encoder with an index signal, I’ve concluded that we can store both the motor and encoder calibrations between reboots, but must still perform ENCODER_INDEX_SEARCH
on boot before entering closed loop control (and therefore use a velocity setpoint). Is that right?
If so, then I see two alternatives. In protocol terms for clarity:
odrv0.axis0.encoder.config.use_index = True
odrv0.axis0.encoder.config.pre_calibrated = True
odrv0.axis0.motor.config.pre_calibrated = True
odrv0.axis0.config.startup_motor_calibration = False
odrv0.axis0.config.startup_encoder_index_search = True
odrv0.axis0.config.startup_encoder_offset_calibration = False
Or:
odrv0.axis0.encoder.config.use_index = True # entirely optional
odrv0.axis0.encoder.config.pre_calibrated = False
odrv0.axis0.motor.config.pre_calibrated = False
odrv0.axis0.config.startup_motor_calibration = True
odrv0.axis0.config.startup_encoder_index_search = odrv0.axis0.encoder.config.use_index
odrv0.axis0.config.startup_encoder_offset_calibration = True
In other words, we can store the motor and encoder calibrations and just run the index search, or not store anything and do a full calibration.
In my mind, both scenarios require the motor to move freely during boot. So I’m inclined to just do the full calibration each time, in case the parameters drift over time. Is this a sensible strategy?
I see there’s interest in having a movement free boot sequence, even if it compromises on accuracy. This is also of interest to us since absolute position is not particularly important, but not so interesting that we’d want to modify the firmware to do it.