Skip to main content
llm
Associate III
November 23, 2021
Question

can not disable encoder alignment

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

This topic has been closed for replies.

62 replies

cedric H
ST Technical Moderator
November 23, 2021

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
llmAuthor
Associate III
November 24, 2021

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.

llm
llmAuthor
Associate III
November 23, 2021

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.

cedric H
ST Technical Moderator
November 30, 2021

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
llmAuthor
Associate III
December 1, 2021

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.

msingh
Senior
November 30, 2021

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.

llm
llmAuthor
Associate III
December 1, 2021

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

WANG RENDONG
ST Employee
December 1, 2021

Hello Zwb

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

Thank you.

Best regards,

**** RD

WANG RENDONG
ST Employee
December 3, 2021

这个是用于Hall sensor 控制的。说明hall sensor 边沿对应的转�?相�?,一般在安装的时候有�??差,这个值�?一定是60的整�?数,需�?手动调整。

​

Because it's a global community, I will write to you in Chinese and English. This is for the case of motor control using Hall sensors as position sensors. It indicates the phase of rotor of hall sensor edge. In practical, it is not the integral times of 60-degree(elec.) and with some error, therefore, a manually adjustment is added here.​

llm
llmAuthor
Associate III
December 3, 2021

感觉这个�?�数有点难设置,电机厂家一般都�?会​给这个�?�数。而且有�?�能�?�一个型�?�的电机,因安装误差会导致这个值都会�?一样。难�?�需�?自己拆电机,自己�?�?�?

WANG RENDONG
ST Employee
December 3, 2021

如果对�?置精度�?求�?高,直接设定为300,�?��?�。如果希望微调,需�?测�?�?�电电压波形与�?尔信�?�边沿之间的对应关系。但其实,这个办法对批�?生产还是�?�?�行的,需�?�?外设计自动标定的方法。

​

if you don't want high accurate, just set it to 300. It requires for checking the waveform of BEMF and Hall sensor outputs, then to fine tune the value of it. However it is not practical for Mass production case. So additional auto tuning tools should be developed.

WANG RENDONG
ST Employee
December 27, 2021

您好,

这个问题属于应用个案,请您与当地的ST销售�?�系,申请相应的技术支�?。

谢谢。​