cancel
Showing results for 
Search instead for 
Did you mean: 

can not disable encoder alignment

llm
Associate III

The generated codes are same when check or not check the button 'Encoder Alignment'.0693W00000GYXDPQA5.png

62 REPLIES 62
cedric H
ST Employee

Hello @llm​ ,

Could you tell us why do you want to disable the encoder alignement ?

I will check the effect of the check box in the generated code.

Regards

Cedric

llm
Associate III

Hi.

My board is used to drive the motor on the wheeled robot with increamental encoder and hall sensor.I think there is no need to align the encoder when robot powered on. I just want to get the motor precise position to calculate the odometry of the robot. The encoder is used to speed close-loop control.

Hi.

My board is used to drive the motor on the wheeled robot with increamental encoder and hall sensor.I think there is no need to align the encoder when robot powered on. I just want to get the motor precise position to calculate the odometry of the robot. The encoder is used to speed close-loop control.

msingh
Senior

I've notice if the box is unticked you still have to call the align function however this doesn't mean the encoder needs to move to be aligned. When the box in unticked it is still necessary to call the function to align it however there will not be any movements necessary. Or another option would be to manually trigger the pin where you have allocated the encoder channel I.

Hello @llm​ ,

When you power on your robot, your motor shaft is at a random electrical angle. As you use an incremental encoder, the angle is given by a timer that counts the number of tick. But this timer is reset at 0. It means that the angle given by the encoder is not aligned with the real electrical angle. The Alignment procedure is there to align the shaft to a known electrical angle, 0 by default. Once this position is achieved, the encoder timer is reset, and the electrical angle of the shaft and the encoder timer are both aligned.

Skipping the encoder alignment means that you have to always know which is the electrical angle when you power on your robot. Is it something you plan to do ?

Regards

Cedric

llm
Associate III

I have compared these generated code, I found they are same whenever tick or untick the box.

I do not care about the electrical angle. I can just use the delta ticks of the encoder and wheel diameter to calculate the robot's odometry. The odometry is accumulated value.I have used other motor driver without the encoder alignment on my robot.

Dear @llm​ ,

What you are asking from the SDK is an implementation of an FOC algorithm.

When you use the encoder as main sensor, you ask the SDK to use the electrical angle coming from the encoder in order to drive your motor.

Electrical angle information is mandatory to run FOC algorithm.

If electrical angle is not aligned with encoder angle, encoder can not be used by the FOC algo to control your motor.

So if you do not want to use information coming from the encoder as an input to the FOC to drive your motor you can't use it as main sensor.

If you use it as auxiliary sensor you will have the delta ticks without the alignement procedure, but then what will be your angle and speed information source for the FOC algo ?

In your past experience, did you use FOC motor driver or 6 steps ?

Regards

Cedric

Hello Zwb

Do you speak Chinese? I will firstly make clear what your problems are.

Thank you.

Best regards,

**** RD