Calibration returns "no response"

I’m trying to calibrate a motor using an ODrive S1 with an AMS 5048A encoder. When calibrating, the motor starts running for about 5 seconds and then stops. The LED on the S1 goes from fast blinking green (while running) to slow cycling blue/cyan (after stopping). The web interface (which I’m using to do the calibration) shows procedure result: NO_RESPONSE.

This issue sounds similar to one posted earlier today with a power supply issue (causing a reset). I have the S1 connected to a 24V 40A power supply, which I presume should be sufficient for this calibration.

The motor is a Leopard 5055-16T 250kv. I’m not certain of the number of pole pairs, but similar motors appear to have 7 pole pairs. I tried decreasing the calibration current and tried a few values for the calibration voltage, but got the same results each time.

I checked the encoder magnet distance. I’m guessing that the encoder is probably working, since I can go to the dashboard tab of the web interface and see the velocity change as I manually spin the motor shaft.

Here are the settings:

odrv = odrv0
odrv.config.dc_bus_overvoltage_trip_level = 30
odrv.config.dc_max_positive_current = 40
odrv.config.dc_max_negative_current = -10
odrv.config.brake_resistor0.enable = True
odrv.config.brake_resistor0.resistance = 2
odrv.axis0.config.motor.motor_type = MotorType.HIGH_CURRENT
odrv.axis0.config.motor.torque_constant = 0.03308
odrv.axis0.config.motor.pole_pairs = 7
odrv.axis0.config.motor.current_soft_max = 20
odrv.axis0.config.motor.current_hard_max = 36
odrv.axis0.config.motor.calibration_current = 5
odrv.axis0.config.motor.resistance_calib_max_voltage = 2
odrv.axis0.config.calibration_lockin.current = 5
odrv.axis0.controller.config.input_mode = InputMode.PASSTHROUGH
odrv.axis0.controller.config.control_mode = ControlMode.POSITION_CONTROL
odrv.axis0.config.torque_soft_min = -0.13232
odrv.axis0.config.torque_soft_max = 0.13232
odrv.spi_encoder0.config.mode = SpiEncoderMode.AMS
odrv.spi_encoder0.config.ncs_gpio = 12
odrv.axis0.config.load_encoder = EncoderId.SPI_ENCODER0
odrv.axis0.config.commutation_encoder = EncoderId.SPI_ENCODER0

The full error is:

  "fw_version": "0.6.4",
  "commit_hash": 2614717557,
  "product": "5.2.0",
  "active_errors": 0,
  "active_errors_str": "NONE",
  "disarm_reason": 0,
  "disarm_reason_str": "NONE",
  "procedure_result": 4,
  "procedure_result_str": "NO_RESPONSE",
  "last_drv_fault": 0,
  "internal_issues": 0

I appreciate any help!

I confirmed that the motor has 7 pole pairs. I can run the calibration successfully using the built-in encoder, but the external encoder is still not working.

I confirmed that the encoder is providing reasonable values (by plotting pos_rel in the web interface). It detects both clockwise and counter-clockwise rotation and appears to be consistent (rotating the motor back to the same position shows the same pos_rel value). Any ideas for why the encoder doesn’t work for calibration?

Hi @modsci, “No Response” means the encoder is not sending good data, and is unrelated to the Pole Pairs on the motor. Can you watch pos_rel as the calibration occurs? Is it showing a reasonable value during calibration?

@Wetmelon, thank you for the reply. I’ll check on that. I’ll be out of town for a few days, so I’ll follow up next week. Thank you again.

I’m back in town and did another test. The behavior is the same. I made special attention to make sure the encoder wires don’t pass too close to the motor or power wires (for EMI isolation). I looked at the pos_rel plot while running calibration from the dashboard (by setting requested_state to FULL_CALIBRATION_SEQUENCE). Here’s a sample plot:

I first moved the motor by hand (a fraction of a full rotation) then ran calibration (at label 1), which ran until label 2. One thing I noticed is that during calibration (while the motor was spinning under odrive control), the position was stuck at exactly 0.0, while after calibration stopped (with NO_RESPONSE), the signal resumed with slight variation around 0.0 (which is what the sensor seems to normally do). So it looks like the encoder sensor data is not being received at all while calibration is running (and resumes as soon as it stops).

Here’s another test run, illustrating the stuck sensor value during calibration.

The drop to zero is the start of calibration and the rise from zero is the end of calibration. The variation before/after calibration appears to be natural noise of the sensor.

Hi @Wetmelon. Just following this. Do you know if there’s any possibility of getting this fixed?

AMS 5048A gives some trouble. It has both a CRC and an error flag, I suspect what’s happening is the error flag is being set and the encoder is zeroing out. Digging into it more would probably require a logic analyzer.

Honestly I recommend just not using the 5048A, it’s a bit sensitive. Mount the S1 to the back of the motor if you can, and use the onboard MA702 absolute encoder instead :slight_smile:

That makes sense. With this particular system, there isn’t room for the odrive board at the end of the motor. I’ll use the CUI encoder for now. Thanks for the help.