MBDT : Calculate motor speed with hall sensor

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

MBDT : Calculate motor speed with hall sensor

985 次查看
KiteSurfer
Contributor I

I'm using NXPS32K144.

On the DC motor, we have two hall sensors and I want to calculate the motor speed and the motor position.

We need to use the interruption function. What kind of block should I use ? ISR blocks ? FTM blocks ?  Have you got an example to show me ?

Best regards,

Kitesurfer

0 项奖励
1 回复

906 次查看
adriantudor
NXP Employee
NXP Employee

Hello @KiteSurfer ,

As a starting point to measure speed and motor position using hall sensors, you can use the "BLDC_ClosedLoop_s32k144" model that is part of the S32K1xx MBDT. This example uses GPIO read to get the default hall sensor state, then it uses the GPI ISR to get the updated hall sensor state. And besides that, we use a PIT interrupt to count the time between two hall sensor transitions.

Another example that you can use is the "mcb_pmsm_foc_hall_MCSPTE1AK144" model that is part of the "Field-Oriented Control of PMSM Using NXP™ S32K144 Kit" addon that you can find in Matlab addons. This example uses GPIO read and FTM as time counter, but the hall sensors and FTM are read in an ADC interrupt that is triggered at a periodic time.

 

Best regards,

Adrian