BLDC motor control

cancel
Showing results for 
Search instead for 
Did you mean: 

BLDC motor control

465 Views
Contributor I

Dear Sir/Madam,

I am R&D a project based on S32K_BLDC_Sensorless platform and the software platform is "MTRDEVKSBNK144_S32DS".

I have a question now:

When my application starts running a motor, It always run in "stall" status. I found that the condition to enter stall status is : timer FTM2 overflow. It means if there is no any hall sensor signal changes within FTM2 timer, the app will enter stall status.

FTM2 timer period is fixed(longest period), my application want to more time to enter stall status. So how to make it?

Thanks.

Alex

Tags (1)
0 Kudos
11 Replies

13 Views
NXP Employee
NXP Employee

Hi Alex Wu

Sorry for the late response on this issue. Are you using the FreeMaster GUI interface? If so, please verify that you have connected the 12 V power supply to the power supply terminals on DEVKITMOTORGD board before connecting the USB in the S32K EVB board.

If you connect first the USB to the board, the software will start and it will detect an error in the sensor.  Also, In case of pending faults, click the Clear FAULT on the FreeMASTER MCAT Control Page, or alternatively press and hold SW2 and SW3 buttons on S32K144EVB board simultaneously, This will reset the board to the initial state and start the program with all the connections correctly detected.

Hope this helps
Have a great day,
TIC

-------------------------------------------------------------------------------
- If this post answers your question, please click the "Mark Correct" button. Thank you!

-------------------------------------------------------------------------------

0 Kudos

13 Views
Contributor I

Dear Jorge,

My project is working well. It's also well connecting with freeMaster tools and with demo board.

My question is about the source code design of MTRDEVKSBNK144 about BLDC control.

When my application starts running a motor, It always run in "stall" status. I found that the condition to enter stall status is : timer FTM2 overflow. It means if there is no any hall sensor signal changes within FTM2 timer, the app will enter stall status.

FTM2 timer period is fixed(longest period), my application want to more time to enter stall status. So how to make it?

Thanks 

Alex

0 Kudos

13 Views
NXP Employee
NXP Employee

Hi Alex Wu

I'm not able to reproduce your issue, the demo doesn't run in "stall". Actually, FTM2 is not used by the Sensorless Demo, so you shouldn't see that FTM2 is initialized.

Are you modifying the default example code?

Did you modify the Parameters tab of the GUI? Those parameters are set for the Motor of the kit, so they should not be modified.

Did you attach something to the rotor that avoids the movement? this could also trigger a stall status.

Please consider that for scenarios 2 and 3, you should not see anything related to the FTM2


Have a great day,
TIC

0 Kudos

13 Views
Contributor I

Dear Jorge,

Can you teach me :

For FTM2, How to close counter over flow interrupt? Only enable capture interrupt.

Thanks

Alex

0 Kudos

13 Views
NXP Employee
NXP Employee

Hi Alex Wu

MTRDEVKSBNK144 is a sensorless demo, If you want a demo based on the sensor hall I would recommend modifying this demo, you can check the MTRDEVKSPNK144 demo, this is a sensor motor control demo and you will have a different project (using sensor) and a different project of FreeMASTER.

Best regards

Jorge Alcala

0 Kudos

13 Views
Contributor I

Dear Jorge,

You can check the latest code on your official website.

This demo already updated, with both HALL and sensorless based.

--

Thanks.

Alex

0 Kudos

13 Views
NXP Employee
NXP Employee

Hi Alex Wu

Thanks, I know that demo includes some code to work with Hall and sensorless, but I would recommend using MTRDEVKSPNK144.

https://www.nxp.com/webapp/Download?colCode=MTRDEVKSPNK144_SW&appType=license

This demo already works with sensor Hall, so you don't need to modify anything on the code.

Regards

Jorge Alcala

0 Kudos

13 Views
Contributor I

Dear Jorge,

The code you recommended MTRDEVKSPNK144 is a sensorless FOC demo. Not a hall sensor based.

What's new in 1.5:

==================

- FOC control based on Single Shunt current sensing and three phase stator current reconstruction using double switching pattern was added as a new SW project to this installation package.

--

Thanks.

Alex

0 Kudos

13 Views
NXP Employee
NXP Employee

Hi Alex Wu

Sorry for the misunderstanding, you are correct, the MTRDEVKSBNK144 is the one that includes the Sensor based example. You need to change the Macro definition #define HALL_SENSOR to "1". I have tried compiled and download the code with this define, and everything works correctly, I don't fall in a stalled status if I connect first the power supply and then the USB cable.

3. The motor should be run success even with load to start.

If the motor has a great load in the rotor, it should not be able to measure the start position and it will give a Stall error.

Regards

Jorge Alcala

0 Kudos

13 Views
Contributor I

Dear Jorge,

1. I am design based on Hall Sensor demo code.

2. I have already modify the GUI and code to run a motor normally.

3. The motor should be run success even with load to start. The question is the stall time is too short.

Thanks

Alex

0 Kudos

13 Views
NXP TechSupport
NXP TechSupport

Hi Alex 

we are working on your questions

please give us some time

Thanks

0 Kudos