Cpr error with correct input

hi everybody, recently I used an odrive 3.6 to drive a hall sensored motor in position mode, after setup everything seemed ok but an error appeared as topic, said the CPR setting was not right, but my motor is 2 pair pole and I input correspond 12 CPR , it should be wrong, can anybody tell me what happened?
any feedback will be appreciated

Chances are your ODrive wasn’t currently set up in hall mode, or there was load on the motor while calibrating.

1 Like

thanks for replying me first of all, and I think the reason was the equivalent load, means my motor was a worm geared reduction combo as the gearbox as a unique part of the motor, how can I solve this problem pl?
regards
cyrus
“or there was load on the motor while calibrating.”

What’s the specific motor you’re using? What’s the max current? Increasing axis.config.calibration_lockin.current should help.


this kind of motor, used in electric door.
I tested with dual motor, after reading your feedback, I had notice that 2 motors were not the same in mechanical resistance that’s why I would agree of what you said the problem was caused by load
what was weird the calibration was through when doing setup in odrive tool, error appears after restarting
could you pl offer any more idea?

regards
cyrus

Hmm. Do you know exactly the current limit of the motor? I’d increase axis.config.calibration_lockin.current to the motor’s continuous current limit.

Alternatively, is it possible to disconnect the gearhead during calibration?

this motor is rating at 6amp max, but only about 0.5amp of no load

Can you run odrivetool backup-config config.json and upload config.json here?

I fixed this problem by rising the calibration current, and also calibrate the motor 1 by 1
now the odrive is not exporting the cpr error tho.
but I have another important question, back oin the topic of braking function
if my motor has to be set into hall sensor position mode, how can I input pure speed/ torque command during running ?
this question is for my skateboard, for example, position mode is a must for climbing mode, but it also be able to run in speed mode, for example,if I am going to run this motor at a certain speed level(I did tried to send this velocity command but had no response) then how can I input a command to produce pure torque to brake?

any reference link or material will be good

regards
cyrus

another question, are commands via uart and can providing the same function?
coz I think I would prefer to use uart for control due to it’s simplicity, thanks.

You’d need to change the input and control mode on the fly. Typically for EV applications like this I just recommend keeping it in torque mode all the time (with an additional velocity limit), and just running an external loop on your Arduino/whatever external controller to make it behave as desired. You don’t necessarily want full closed loop velocity feedback since that would cause you to stop very very fast :slight_smile:

Why would you need position mode for climbing?

Unfortunately not too much reference on this - it’s likely going to come down to you deciding what functionality and feel you want, and implementing it. Though - I might make an ODrive powered esk8 myself some time in the next few months, would document everything then - don’t know timelines though, so don’t rely on it.

CAN is much more robust and generally faster, for any robotics application it’s the strong recommendation. That being said, they’re generally equivalent in featuresets.

thank you bro, for position mode on odrive for climbing mode is mostly for virtual differential lock, I don’t find any alternative so fat.

and that’s weird for me as on the tutorial from makerbase video, velocity command was acceptable in position mode, and also torque(current mode). but I don’t know why I don’t get it, maybe something wrong I have done.

could you pl share your experience in this manner?

appreciate
cyrus

Which video specifically?

this one bro

I do the same way, the commands begin with t p q can work normally, other had no response, particularly I would need the velocity command to run the skateboard in normal mode and torque mode for brake.

if you can help me out it would be extremly appreciateful

regards
cyrus

There was a bugfix - you should run 0.5.6. Also - feel free to join the ODrive Discord, might be faster to communicate there: ODrive

I tried the t, p, q commands, they responsed well, but no response for the command begins with c, v, also f motor

still no idea yet, is there any thing to do with the firware version or type of motor?
my version was 0.5.1, 2 pair pole hall sensor motor.

almost forgot my regards
cyrus :sweat_smile: :sweat_smile:

There was a bugfix - you should run 0.5.6. Also - feel free to join the ODrive Discord, might be faster to communicate there: ODrive

thank you for introducing the dicord, but I was not able to accept the invitation some how
image

any alternative pl?
regards
cyrus