Hall Effect Counts Per Revolution Error

Hello all,

I’m trying to get a 24V odrive to work with a Maxon 500269 Brushless Motor with embedded hall effect sensors. As was detailed in another forum post about getting hoverboard motors to work with hall effect sensors, I set the encoder to hall effect mode, and the CPR to 66 (6 * 11 pole pairs). However, every time I try to calibrate the motor, it stops after the forward rotation, and throws a CPR out of range error. I experimented with numerous other CPR combinations just to check (11, 6, 33, 3), but all of them kept throwing the same error. Can anyone help me with this?

One way to solve this is to increase the calibration range (config_.calib_range) until it passes without throwing the CPR error. Then work back from there to find the correct CPR value.

 if(fabsf(actual_encoder_delta_abs - expected_encoder_delta)/expected_encoder_delta > config_.calib_range)
    {
        set_error(ERROR_CPR_OUT_OF_RANGE);
        return false;
    }
1 Like