PP Check always fails


I am running a small gimbal motor with the FOC shield on an Ardunio Mega, The encoder is set to 500 ppr. When it runs through the initialisation process I always fails the PP check. the estimated pp comes up as 8.47. I have set the pole pairs to 7 and I am pretty sure that is the correct value.

What am I doing wrong?

Small update.

If I define the Pole pairs to 8 it passes the PP check but the motor does not run.

Very confusing ???

Hey @Rollmop,
This check is more a debuging message. If you’re sure what your people pair number is you can discard the error messages.
The issue might be in your motor’s cogging or something similar.
In my experience, 500ppr is not too low of a resolution and results is a good estimation of the pp number.
Did you try the library example code in the utils > find_pole_pairs_number

Can you run your motor in velocity mode for longer periods of time whole continuously turning?
Which library version are you using?

1 Like

Hi @Antun_Skuric ,

Thanks for the reply,

Yes it runs in velocity mode (with PP set to 7) what do you call a long period of time?

I have run the find pole pairs code before and was get 7 consistantly. But…
I have recently started using an Arudunio Due board and ran the pole pairs test again with this board and got an answer of 21 consistanly.

Mega Board:
Est PP:7
Electrical angle =1080
Encoder angle = 156.96

Due Board:
Est PP:21
Electrical angle = 1080
Encoder angle = 50.76

This is running the same code with the same motor/encoder setup with both board

Just adding to the confusion.

Generally, things are working better with the Due board ( I guess because it is a lot faster)

In velocity mode the motor runs Ok but is very lumpy under 5 rad/s

Hey @Rollmop
I am snot sure, maybe there are some varibales that are not initialized well and add to the confusion, I’ll look into it.

For lower velocities, you’ll need higher ppr number and in general higher gains in your PID controllers. :smiley: