Hi, I’m trying to make work the AMS AS5048A encoder with the ODrive Pro and motor (link). When I run the calibration sequence, the motor moves a bit and then stop, giving the NO_RESPONSE
error. I share my configuration and some photos of the connections:
odrv = odrv0
odrv.config.dc_bus_overvoltage_trip_level = 28
odrv.config.dc_bus_undervoltage_trip_level = 10.5
odrv.config.dc_max_positive_current = 4
odrv.config.dc_max_negative_current = -100
odrv.axis0.config.motor.motor_type = MotorType.HIGH_CURRENT
odrv.axis0.config.motor.pole_pairs = 2
odrv.axis0.config.motor.torque_constant = 0.056708701048459535
odrv.axis0.config.motor.current_soft_max = 5
odrv.axis0.config.motor.current_hard_max = 16.5
odrv.axis0.config.motor.calibration_current = 2
odrv.axis0.config.motor.resistance_calib_max_voltage = 10
odrv.axis0.config.calibration_lockin.current = 2
odrv.axis0.motor.motor_thermistor.config.enabled = False
odrv.axis0.controller.config.control_mode = ControlMode.VELOCITY_CONTROL
odrv.axis0.controller.config.input_mode = InputMode.PASSTHROUGH
odrv.axis0.controller.config.vel_limit = 50
odrv.axis0.controller.config.vel_limit_tolerance = 1
odrv.axis0.config.torque_soft_min = -math.inf
odrv.axis0.config.torque_soft_max = math.inf
odrv.can.config.protocol = Protocol.NONE
odrv.config.gpio15_mode = GpioMode.ANALOG_IN
odrv.config.gpio15_analog_mapping.min = 0
odrv.config.gpio15_analog_mapping.max = 25
odrv.config.gpio15_analog_mapping.endpoint = odrv.axis0.controller._input_vel_property
odrv.axis0.config.enable_watchdog = False
odrv.axis0.config.load_encoder = EncoderId.SPI_ENCODER0
odrv.axis0.config.commutation_encoder = EncoderId.SPI_ENCODER0
odrv.spi_encoder0.config.mode = SpiEncoderMode.AMS
odrv.spi_encoder0.config.ncs_gpio = 17
odrv.config.enable_uart_a = False
The encoder parameters are as follows:
When I run the calibration sequence, pos_rel
stays in zero. I tried reading with a multimeter the voltage on the PWM output of the AS5048A and I get readings when i move the motor’s rotor, so I guess the magnet is properly mounted and aligned. n_errors
continues to increase rapidly.
What could be the problem and how can I solve it? Thanks in advance!