CPR_POLE_PAIR_MISMATCH when calibrating

Hi all,

I am currently trying to calibrate my Eaglepower KV90 motor with the Web GUI using the onboard encoder on my ODrive S1 and I am continually getting the error of POLE_PAIR_CPR_MISMATCH with differing values each time I try to run the calibration (values have ranged from 0 to 78 and everything in between). I have ensured that the encoder magnet is centered and at a short enough distance to be readable. The encoder is outputting reasonable position values on the dashboard, so I am fairly certain that the problem is not in the encoder magnet.

I have attempted changing what seems like everything to no avail. This includes but is not limited to changing the brake resistor value slightly, the current limit, the motor calibration current, motor calibration voltage, and lock-in spin current. It beeps, is able to make it past the motor calibration seemingly but begins the next process and fails after rotating less than one rotation but at different values via the dashboard plot with interesting inflections at some points.

I am building a robotic actuator designed by Aaed Musa via [OpenQDD V1 - 3D Printed Robotic Actuator] (https://www.instructables.com/OpenQDD-V1-3D-Printed-Robotic-Actuator/). The values I am using for the motor parameters are at the bottom of this page but I will list the values below as well:

  • Type: High Current
  • Pole Pairs: 20
  • Current limit: 36A
  • Motor Calib. Current: 18A
  • Motor Calib. Voltage: 5V
  • Lock-in Spin Current: 18A

Any insight into what might be wrong here I am open to. The only other issue that I can imagine is that the power supply which I am using can provide a maximum of 16V at 8A, however I don’t imagine that this would be a problem for simply calibrating the motor as I am not getting errors related to this and my current draw is ~3A when calibrating. I have attached images of the error as well as the plots provided by the GUI and my setup.

Thanks!




Hi! This still sounds like an issue with magnet-encoder alignment. Where’d you get the magnet, and how far is it from the S1 sensor? For high pole count motors like these, even small magnet alignment issues is definitely enough to screw up calibration. You can also try upgrading to the devel firmware branch and running harmonic compensation – it’s designed for stuff like this. Note this could also be magnet eccentricity – magnet offset from the shaft axis, due to 3D printing tolerances.

Hi there. Thanks for the quick response and apologies for the delay.

I purchased a bulk pack of magnets from Amazon to use in other projects as well. It is about 2-3 mm away from the onboard encoder. I have tried shifting it closer and received the same result.

I will try upgrading to the devel firmware and running harmonic compensation and update. Thanks.

Could you link the magnets you got?

Amazon.com: eokoaiee 70pcs 8x2.5mm Industry Science Office Magnet DIY Art Building Scientific Magnetic Disc Craft Decorative Fridge Magnets : Home & Kitchen

Its the magnets, huh.

Yeah it’s totally the magnets. You need to specifically have diametrically polarized magnets, which are polarized radially instead of axially:
image

I’m actually shocked you had any position readout whatsoever in the GUI, those magnets must have a bit of skew in their magnetization that results in a tiny tiny bit of radial component to the field that the ODrive was able to pick up :slight_smile:

We generally recommend the encoder magnets from our shop: Set of 5 Encoder Magnets – ODrive Robotics, they’re really nice and strong, so you don’t have to worry about distortion, and you have more tolerance in your mounting. However, you can also grab some nice ones from McMaster-Carr: McMaster-Carr

Haha okay! I will get these ordered as soon as possible and let you know if (when) they work!

Thanks for your help.

No worries, please let me know how it goes!

Works like a charm! Thank you again @solomondg!

Glad to hear!