Hi everyone,
I’m trying to setup a Maxon EC45 hall sensored motor (datasheet here) with ODrive. When I run the full calibration sequence, the motor beeps and then jumps back and forth very quickly by about 30 degrees several times (I know this behavior isn’t correct as it should turn slowly).
I did successfully set up one of these motors previously, so I know it can work, but I guess something is off with how I’m using this one.
This is my setup process:
odrv0.axis0.motor.config.current_lim = 5
odrv0.axis0.motor.config.calibration_current = 2
odrv0.axis0.motor.config.pole_pairs = 8
odrv0.axis0.encoder.config.mode = ENCODER_MODE_HALL
odrv0.axis0.encoder.config.cpr = 48
odrv0.axis0.encoder.config.bandwidth = 100
odrv0.save_configuration()
odrv0.reboot()
odrv0.axis0.requested_state = AXIS_STATE_FULL_CALIBRATION_SEQUENCE
Running dump_errors after the calibration shows:
axis0
axis: Error(s):
ERROR_ENCODER_FAILED
motor: no error
encoder: Error(s):
ERROR_NO_RESPONSE
controller: no error
I’ve checked as much as I am able to that the encoder is wired correctly:
+5V -> Motor Pin 3 (Vhall)
A -> Motor Pin 1 (Hall sensor 1)
B -> Motor Pin 2 (Hall sensor 2)
Z -> Motor Pin 5 (Hall sensor 3)
GND -> Motor Pin 6 (GND)
I tested with a short detector on a multimeter to make sure that the pins on the ODrive are connected to the sensor outputs in the motor. I tried switching the encoder pin connections around to a few different combinations, but I’m not sure that that matters? (Am I right in thinking the sensors are like the 3 phases of the motor, switching any of them only changes directionality, which is accounted for in calibration?)
I checked the encoder signals using an Arduino, and they seem to look as they should (high value is a solid 5V):
Additionally, turning the motor one “step” at a time while repeatedly checking odrv0.axis0.encoder.hall_state shows the hall state cycling between 1 - 6.
What else could I try to debug this? Thanks for your help.