ERROR_CURRENT_UNSTABLE and strange offset_float with hall sensors

Hello,

We are using a 24 volt ODrive with this motor:


We were following this guide: https://docs.odriverobotics.com/hoverboard.html. After encoder calibration, we got an encoder.offset_float of about 1.3 (should be 0.5?) Velocity control worked up to about 1000 (42 counts per revolution) before we got ERROR_MOTOR_FAILED and ERROR_CURRENT_UNSTABLE. Position control couldn’t go more than a couple revolutions before failing with the same errors. Increasing the current_limit_tolerance (to about 3), as suggested here: https:// discourse.odriverobotics .com/t/motor-failed-current-unstable/3194/2
did not seem to have an effect. (I added a space to the URL because I can’t post more than two links) Increasing the current limit did though, but the error would still occur at higher speeds. Sometimes we would get an over speed error too.

We tried another of the same motor and it produced the same offset_float after calibration (1.3). We switched the sensor wires around and re-calibrated, this time getting an offset_float of -0.3. We switched the sensor wires again and got 0.7. This is closer, but it didn’t seem to make a difference. We still got the errors around a velocity of 1000. We don’t have any other motors to test yet, and this is our first time using an ODrive.

This post:
https:// discourse.odriverobotics .com/t/motor-failed-current-unstable/3194/4
(Can’t have more than two links)
suggests that it may be related to encoder/hall sensor misalignment which could also be why we have a weird offset_float. We opened up one of the motors to look, and here is a picture:

It’s easier to see in person, but the hall sensors are slightly offset from directly between two coils.

My questions:

  1. What is offset_float and why should it be close to 0.5?
  2. Could the slight offset of the hall sensors seen in the picture be the reason for a bad offset_float?
  3. Is the value of offset_float related to the errors we are seeing?
  4. If this is a result of the hall sensor offset, is there a way to fix it aside from physically adjusting it or using a different motor?
  5. If this isn’t a result of the hall sensor offset, what could be causing it?

Thanks!
Levi

UPDATE.
I learned from Oskar through the Discord that offset_float is a mod 1 value, and the difference from 0.5 is the error, so the values we got all show an error of 0.2. He suggested to keep a low value for encoder.config.bandwidth as a high value may cause the current unstable error if the sensors do not trigger at the perfect spot. We initially had an encoder.config.bandwidth of 100 and did not see any difference after decreasing it to 50. Decreasing the bandwidth to 20 caused the velocity to oscillate. The lowest bandwidth we could get without oscillation was 35, but would still get the current unstable error at this bandwidth.