Hello,
I try to install encoder (AS5047D via AB interface) on driven shaft of gearbox(14:1), for my project it will be very usuful. Motor is eX8108-105KV. Odrive 3.6, firmware 0.5.1 and latest odrivetool.
First I try to use encoder on rotor of my drive. I do init of odrive by next command sequences:
odrv0.erase_configuration()
odrv0.axis0.motor.config.current_lim = 15
odrv0.axis0.controller.config.vel_limit = 10000
odrv0.axis0.motor.config.calibration_current = 3
odrv0.config.brake_resistance = 2.0
odrv0.axis0.motor.config.pole_pairs=21
odrv0.axis0.motor.config.motor_type=MOTOR_TYPE_HIGH_CURRENT
odrv0.axis0.encoder.config.cpr = 2000
odrv0.save_configuration()
odrv0.axis0.requested_state = AXIS_STATE_FULL_CALIBRATION_SEQUENCE
work well, after I can run by
odrv0.axis0.controller.config.control_mode = CONTROL_MODE_VELOCITY_CONTROL
odrv0.axis0.requested_state = AXIS_STATE_CLOSED_LOOP_CONTROL
odrv0.axis0.controller.input_vel=5
Odrive and motor is OK
after I try to install encoder on shaft of gearbox (14:1 reduce speed ration) installed in motor
odrv0.axis0.motor.config.pole_pairs=273 // 21*14
odrv0.axis0.encoder.config.calib_range=0.1
odrv0.axis0.encoder.config.calib_scan_distance=100
odrv0.axis0.requested_state = AXIS_STATE_FULL_CALIBRATION_SEQUENCE
work well, after I check errors: no errors
but when I try to start
odrv0.axis0.controller.config.control_mode = CONTROL_MODE_VELOCITY_CONTROL
odrv0.axis0.requested_state = AXIS_STATE_CLOSED_LOOP_CONTROL
odrv0.axis0.controller.input_vel=0.5
current slowly increase up to 1.5 A, but no any movements of rotor or (seldom) high vibration of motor.
After
odrv0.axis0.requested_state = AXIS_STATE_IDLE
In [164]: dump_errors(odrv0)
axis0
axis: no error
motor: no error
fet_thermistor: no error
motor_thermistor: no error
encoder: no error
controller: no error
axis1
axis: no error
motor: no error
fet_thermistor: no error
motor_thermistor: no error
encoder: no error
controller: no error
I dont know what I should tune for run motor with encoder on shaft