Board Configuration:
odrv0.axis0.controller.config.vel_limit = 3000
odrv0.axis0.motor.config.calibration_current= 10
odrv0.config.brake_resistance = 0.47
odrv0.axis0.motor.config.pole_pairs = 14 (We have tried 7 as well)
odrv0.axis0.motor.config.motor_type = 2 = MOTOR_TYPE_GIMBAL
odrv0.axis0.encoder.config.cpr = 600
odrv0.axis0.motor.config.resistance_calib_max_voltage = 14.8 (This resets to 1 after board reboot)
Problem:
Upon executing odrv0.axis0.requested_state = AXIS_STATE_FULL_CALIBRATION_SEQUENCE motor moves slightly and stops. Subsequent attempts fail to move the motor.
Request:
What did we do wrong, or what additional options must we set to get a proper full calibration?
Thanks in advance. Any help is much appreciated.
EDIT: When launching odrivetool, it takes about 30 seconds to connect tothe odrive board. Is this normal? This is the readout after that ~30 seconds:
ODrive control utility v0.4.1
Please connect your ODrive.
You can also type help() or quit().
Please set odrv0.axis0.encoder.config.cpr = 2400 (4x your encoder ppr)
Count the # of magnets in the motor and divide by two. That should be your Pole Pair value (odrv0.axis0.motor.config.pole_pairs). If you count 28 magnets, use 14. If you count 14 magnets, use 7.
Thanks for providing a detailed readout of your setup and configuration, itās very helpful.
A high resistance motor (which gimbal motors are) together with ERROR_MODULATION_MAGNITUDE usually means that the resistance measurement failed because the motor was too high resistance to push calibration_current = 10A through it. However when motor type is MOTOR_TYPE_GIMBAL, this measurement should be skipped, because we know it will likely fail, and in gimbal motor mode we donāt use the motor resistance/inductance. See here.
So my primary suggestion would be to double check that you have written odrv0.axis0.motor.config.motor_type = 2 = MOTOR_TYPE_GIMBAL before you call odrv0.axis0.requested_state = AXIS_STATE_FULL_CALIBRATION_SEQUENCE.
I am certain we set odrv0.axis0.motor.config.motor_type = MOTOR_TYPE_GIMBAL. We attempted to set odrv0.axis0.encoder.config.cpr = 2400 but we had a motor error before we set it. We couldnāt seem to clear the axis error (it always sets to 1 even we say 0) and when this happens I usually just quit odrivetool, unplug the board, reconnect it, and try again. Wanting to start fresh, I did an odrv0.erase_configuration() before unplugging the board and now I can no longer connect to the board. The computer doesnāt even see it (doesnāt make the normal sound when a USB device is plugged in). I canāt select it in the zadig utility and so right now weāre a bit stuck. Iām hesitant to say the board is bricked, but it sure seems that way.
I canāt see the magnets in the motor, but if I spin it manually, it likes to rest in certain positions due to the magnets. I count 14 different rest positions per revolution. I would suspect that thatās 14 magnets and thus 7 pairs. Correct me if Iām wrong.
With ODrive v3.5 and newer you donāt need an ST-Link to flash it, you can do it over USB in DFU Mode (@wetmelon FYI). With a bricked ODrive you will need to do the step that says āHow to force DFU mode (ODrive v3.5)ā.
If you get issues or get stuck, you can find me on the #support channel on the ODrive discord.