Zero angle calibration issues

Hi, I am working with a GM4108: I am noticing a really “steppy” motion (there is something wrong cause it can not be that bad). I am doing the aligning with a voltage between 3V and 5V (drawing up to 0.5A). The zero angle seems consistent if I repeat the calibration multiple times (I just reset the micro controller), however if I manually move the motor to a new position by hand and then repeat the calibration measurements, the new “cluster of measurements” is consistent only within itself and different from the other(s). These are 2 clusters (if I got it right the numbers are radians):

  • Cluster1:
    2.43443
    2.43443
    2.43021
    2.43021
    2.43443
  • Move the rotor by hand to another position
  • Cluster2:
    2.67948
    2.68792
    2.67948

Foc runs at 10KHz, PWM is set to 25KHz and the encoder is a AS5048A

To be honest I do not like the encoder mounting that is provided as it has some play with the screws but I wonder if there is something else I should take into account

Thanks
/M.

2 Answers

2

Most likely your two clusters depend on which direction it approaches the zero position from. Try setting it half way between the two values. We need to update the calibration procedure to automatically approach from both directions and average the result.

I always finetune it by adjusting until speed for a given voltage in torque mode is the same in both directions (or maximum achievable speed in velocity mode works too).

Steppy motion is typical in velocity mode at low speed, so if that’s what you’re doing, try angle_nocascade and incrementing the target like velocity_openloop does.

Thanks, I need to test it more extensively. Here in the meantime just some more measurements that I logged with the previous ones from other positions. Would it be useful to have a parameter in the calibration function that allows to run the motion multiple times and from different locations? Or normally that should not be necessary?

2.56175
2.54488
2.57862

2.68370 → seems an outlier
2.43443
2.43443
2.45130
2.43865

2.43443
2.43443
2.43021
2.43021
2.43443

2.67948
2.68792
2.67948