TL;DR
When performing encoder calibration the motor does not spin (it does twitch though) and a TIMEOUT error is raised.
Full story
Motor: T-Motor GB2208 [Gimbal motor]
KV: 128 [data sheet]
Pole Pairs: 7 [12N14P]
Phase resistance: 13.6 [measured]
Phase inductance: - [unknown…]
Encoder: AS5048B
Scenario
-
Power supply is configured - max/min voltages and currents set.
-
Motor is not automatically configured since its a gimbal motor, following code:
odrv0.axis0.config.motor.motor_type= MOTOR_TYPE_GIMBAL
odrv0.axis0.config.motor.pole_pairs= 7
odrv0.axis0.config.motor.torque_constant= 8.27 / 128 # Datasheet
odrv0.axis0.config.motor.phase_resistance= 13.6 # Measured
odrv0.axis0.config.motor.phase_resistance_valid= True
odrv0.save_configuration()
The motor can be spun using LockIn Spin
- Encoder is wired properly and set up as follows
odrv0.spi_encoder0.config.mode = SpiEncoderMode.AMS
odrv0.spi_encoder0.config.ncs_gpio = 17 # Pin 7 on J14 (MISC IO)
odrv0.axis0.config.load_encoder = EncoderId.SPI_ENCODER0
odrv0.axis0.config.commutation_encoder = EncoderId.SPI_ENCODER0
The encoder generates values which can be seen in the odrivetool
ENCODER_OFFSET_CALIBRATION
During encoder offset calibration the motor locks into a specific position, it doesn’t move after this.
The green light flashes for approximately 2 seconds, current draw increases exponentially but never exceeds 1A and never comes close to the supply or board limits.
The green light stops flashing and returns to pale blue.
Current drops back to base line, the motor is not longer locked.
Error dump:
active_errors: no error
disarm_reason: no error
procedure_result: ProcedureResult.TIMEOUT
last_drv_fault: none
internal issues: none