Hall-sensored motor jumps around during calibration and then produces error

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.axis0.requested_state = AXIS_STATE_FULL_CALIBRATION_SEQUENCE

Running dump_errors after the calibration shows:

axis: Error(s):
motor: no error
encoder: Error(s):
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.


I ended up just taking the setup apart and making all new connection cables, and it works great now.

I guess it was something connection-related that I missed. I’m not sure what was wrong before, but a guess would be that one of my motor lead connections was unreliable or accidentally shorted to one of the other motor leads. (Since the encoder connections were easily verifiable, but the motor characteristics are harder for me to check by hand)

For future reference and general BLDC curiosity, if anyone has an idea of a specific cause for that behavior, I’d be interested to know.

1 Like