How to Spin a Motor with NPX's MOTORGD, S32K and MPC5744P

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Spin a Motor with NPX's MOTORGD, S32K and MPC5744P

4,374 Views
NXP Employee
NXP Employee

DISCLAIMER: Applications shown here are just some examples . They were developed and tested with standard NXP development kits and a LINIX 45ZWN24-90-B BLDC motor. Other combinations of DevKits and motors will probably require additional tuning and setup. Please see these applications only as examples not as official NXP solutions.

While these examples were developed with Motor Control Development Toolboxes for S32K144 and MPC5744 with the HW setup described below, binaries are also made available for users who want to try these setups quickly without developing themselves the complete solutions. Details on how to load the binaries are offered below.

 

 

This is a short and simple HOW TO SPIN a motor with NXP's latest development kit: DEVKIT-MOTORGD

Code is provided as binaries so no building is required.

Steps below describe:

  • how to load the binaries on the target to spin the motor
  • how to control the speed of the motor and the direction of the spinning using two switches available on the boards.

193960_193960.pngpastedImage_2.png

HARDWARE: Two setups from NXP's low-cost evaluation boards are available:

 

- S32K144EVB-Q100 development kit based on ARM technology

194009_194009.pngpastedImage_4.png

- DEVKIT-MPC5744P development kit based on NXP's Power Architecture technology

194010_194010.pngpastedImage_5.png

 

SOFTWARE: Binaries already built files for the motor control application are available:

  • BLDC_S32K.mot (to be flashed on S32K platform)
  • BLDC_MPC5744.mot  (to be flashed on MPC5744 platform)

Both applications do the same thing:

  • spin the motor
  • allow increase and decrease of the speed with direction change with the control of two switches.

 

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

 

S32K - MOTORGD SETUP

 

For S32K Setup following are the steps to prepare the S32K144EVB-Q100 to work with DEVKIT-MOTORGD:

  • Place R168 and remove R167
  • Place R166 and remove R165
  • Short 1-2 of J107 (S32K144 powered by 12V power source)
  • Short 2-3 of J104 (Reset signal direct to the MCU, use to reset S32K144)
  • Plug in the microUSB cable between S32K144EVB-Q100 and your PC

 

194054_194054.pngpastedImage_5.png

 

  • Copy and Paste the BLDC_S32K.mot file into the EVB-S32K144 Mass Storage Drive mapped on your PC

 

194044_194044.pngpastedImage_3.png

 

 

194060_194060.pngpastedImage_37.png

 

  • Power up the DEVKIT-MOTORGD via J7 with a 10-18Vdc and you should have the motor spinning
  • Use SW2 to increase the motor speed or SW3 to decrease it or to change direction

 

194061_194061.pngpastedImage_419.png

 

 

 

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

 

MPC5744 - MOTORGD SETUP

 

For MPC5744 Setup following are the steps to prepare the DEVKIT-MPC5744P to work with DEVKIT-MOTORGD:

 

194066_194066.pngpastedImage_449.png

 

  • Follow the procedure shown here to program the BLDC_MPC5744.mot file into the DEVKIT-MPC5744P

 

194067_194067.pngpastedImage_508.png

 

  • After the BLDC_MPC5744.mot file is programmed into the DEVKIT-MPC5744P flash memory, change the J13 to position 1-2 for external power supply.

 

194068_194068.pngpastedImage_509.png

 

 

194069_194069.pngpastedImage_545.png

 

  • Power up the DEVKIT-MOTORGD via J7 with a 10-18Vdc and you should have the motor spinning
  • Use SW1 to increase the motor speed or SW2 to decrease it or to change direction

 

194070_194070.pngpastedImage_547.png

 

Leave a comment below if you have any issues.

Best regards,
Daniel

Original Attachment has been moved to: BLDC_S32K.mot.zip

Original Attachment has been moved to: BLDC_MPC5744.mot.zip

15 Replies

70 Views
Contributor III
0 Kudos

70 Views
NXP Employee
NXP Employee

Hi Steven, 

Please check this topic here: https://community.nxp.com/thread/455356#comment-925154 

I think it is the same issues - with the same resolution.

FYI the RBF file needed is attached here. You need to flash it via the S32 Design Studio for POWER ARCHITECTURE as described in the reference.

Hope this helps!

Daniel

70 Views
Contributor III

It works when I used S32DS V1.2 to download the MPC5744P_DEVKIT.rbf . I can spin my linix motor now.

but where can i download the source code of  BLDC_MPC5744.mot

0 Kudos

70 Views
Contributor III

Dear Dumitru,

I'v programed  the BLDC_MPC5744.mot file into the mpc5744p devkit, but I found the GD3000 chip was very hot, and could not drive bldc motor. I'm sure my mpc5744p devkit and the motorgd devkit setups was the same as your above pictures. I used 12V dc power, and the current was 0.2 A, was the GD3000 chip broken?

0 Kudos

70 Views
NXP Employee
NXP Employee

Hi Steven, 

That is strange. The GD3000 chip itself is just a pre-driver for the MOSFETs. It should not be hot since there is only logic signals passing thru. 

If the MOSFETs are how, then that would suggest a mismatch between the motor hall sensors setup and the ones expected by the SW or a possible issues with the phase vs hall order. In that case, only 2 motor phases will be power on, but the DC bus current should be high - limited only by the 2xphase resistance.

In normal operation the temperatures should be similar with the ones captured with the FLIR camera above.

Do you have MATLAB/Simulink License ? If so, then you can open a Simulink model and do additional testing without power on the MOSFET just to see if the GD3000 is still alive.

Best regards,

Daniel

0 Kudos

70 Views
Contributor I

Dear Daniel,

Do you schedule to RELEASE the source code for  MOTORGD and MPC5744P ,thanks !

Best regards,

Peter

0 Kudos

70 Views
NXP Employee
NXP Employee

Hi peter.wu‌,

This topic has been created back in the days when there was no solution available yet to drive this combinations of boards and we thought it might be useful to some of the users to have a quick way to test the setup using just a binary.

In general, we provide the Simulink Models but since some of the users might not have the appropriate licenses to generate the code we were asked by Marketing to provide such binaries.

Anyhow, to answer your question - it is not this team responsibility to provide the C reference code for such devices. In fact, what are you looking for is part of another tool scope - it is called MCAT and it contains a reference code for running on MPC5744P and also a UI control to configure the motor parameters. More information can be found here: MPC5744P 3-phase PMSM Development Kit|NXP 

Hope this helps!

Daniel

0 Kudos

70 Views
Contributor I

Thank you for this!

0 Kudos

70 Views
Contributor II

I Daniel,

I found the " freemaster  " control page following this discussion : 

" FreeMaster not connecting over CAN"

 Thanks again

Gianmarco

70 Views
Contributor II

Thanks Daniel !

I have the one provided by NXP, type FRDM-MC-LVMTR. On the motor label is written LINIX 45ZWN24-40

The one you used is LINIX 45ZWN24-90-B BLDC

I guess the difference is only related to watts ( 40 or 90 ) 

Kind regards,

Gianmarco

0 Kudos

70 Views
NXP Employee
NXP Employee

Hi Gianmarco, 

I do not have such a motor to test with. Have you checked the wire colors order connection for both motor phases and hall sensors?

Best regards,

Daniel

0 Kudos

70 Views
Contributor II

HI Daniel,

finally I got the motor running !

Regarding freemaster have you available a "control page " to play with the motor ?

Kind regards, thanks

Gianmarco

0 Kudos

70 Views
NXP Employee
NXP Employee

Just recently at MATLAB Expo US we had the chance to inspect the boards with a professional FLIR IR camera. Here are a few interesting snapshots:

pastedImage_1.png

pastedImage_2.png

pastedImage_3.png

Note: the demo runs non-stop all day long. These are the captures at the end of the day. The hottest temperature on the MotorGD recorded was on the MOSFETs: 42 deg C

70 Views
Contributor II

Dear Dumitru,

I tried your example code, after having completed all the requested steps but it's not working.

I downloaded the BLDC_S32K.mot file version. I'm using a S32K144EVB with DEVKIT-MOTORGD ans  LINIX motor. I see the hall effect signals moving correctly when rotating manually the motor but I have no phase voltages on motor.

On the S32K EVB the led is always red. Is this correct ? Can you provide some hints ?

 Kind regards,

Gianmarco 

0 Kudos

70 Views
NXP Employee
NXP Employee

Hi Gianmarco, 

Do you have the exact BLDC motor as the one shown in the DISCLAIMER? Any other motor might have a different hall pattern switching relative to the motor phase connection and therefore it might not work. In case you do not have the same motor you need to go thru all the steps shown in BLDC Motor Control with Model Based Design in order to build the application.

Best regards,

Daniel

0 Kudos