MTRCKTSBNG128 Dev kit

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MTRCKTSBNG128 Dev kit

1,066 Views
yaletron
Contributor II

How do  I run MTRCKTSBNG128 Dev kit by Free Master 2.0 in Hall Sensor mode?   I can only run it in Sensorless mode.  Is there any set up changes between Hall sensor mode and Sensorless mode ?  I download MC9S12G128_BLDC_Hall software and use Freemaster 2.0.   Thanks for you help in advance

 

Best Regards

 

John

Labels (1)
0 Kudos
8 Replies

902 Views
xiangjunrong
Contributor IV

Hi, John,

Do you use AN4558SW.zip code to control BLDC? If you use it, after you unzip the compressed  file, you will get two directory:

one is ...\BLDCHall9S08\MC9S12G128_BLDC_Hall, another is .....\BLDCHall9S08\MC9S12G128_BLDC_Sensorless.

In conclusion, if you use Hall sensor to detect the rotor position, pls use the example code in

........\BLDCHall9S08\MC9S12G128_BLDC_Hall

If you use sensorless, pls use the second one:........\BLDCHall9S08\MC9S12G128_BLDC_Sensorless.

I attach the example code:

Hope it can help you.

BR

Xiangjun Rong

0 Kudos

902 Views
yaletron
Contributor II

Hi JiangJun,

Thanks for the advice.  I did use Free Master and select BLDCHall9S08\MC9S12G128_BLDC_Hall to run the motor. But motor didn't run.  Do I need to change any setting in hardware if I run Hall sensor mode?  Or do I need re-write software code to micro controller?  I feel the hardware and software of this dev kit may be set sensorless mode as a default mode.  Is that possible? 

Thanks

John

0 Kudos

902 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, John,

From motor control theory, if you use the hall sensor, at standstill stage, the MC9S08 can check the 3 Hall sensor logic to determine the rotor position, then switch the stator based on rotor position, in other words, the BLDC motor can spin if you use Hall sensor and corresponding code.

Pls check the schematics, and confirm you have connected the hall signals to timer pins of MC9S08, press button so that it can set up the "set speed".  you can also use Freemaster tools to set the speed.

Unfortunately, I have not the kit to have a test.

BR

Xiangjun Rong

0 Kudos

902 Views
yaletron
Contributor II

Hi Xiangjun,

Thanks for your quick response.

We did connect the hall sensor connector to JP1 of this development kid MTRCKTSBNG128.  We use Free Master and go File/open project, select BLDCHall9S08\MC9S12G128_BLDC_Hall.  We pressed the rotary switch to start the motor, but motor didn't start, the motor is originally included in this development kid MTRCKTSBNG128 (see second picture below).  Please also see Hall sensor Connector and Rotary switch cycled in the first picture below.   In Freemaster screen, we click On/Off button, the motor didn't spin.  We noticed on Freemaster screen, requiredSpeed showed 30,000+ rpm as a default speed, then i changed it to 3000 rpm, motor still does not spin. 

pastedImage_5.png

pastedImage_6.png

However, We use Free Master and go File/open project, select \BLDCHall9S08\MC9S12G128_BLDC_Sensorless, We pressed the rotary switch to start the motor, then motor starts, requiredSpeed showed 3000 rpm as a default speed, actual speed is also 3000 rpm, very thing works beautifully.  we can also use Freemaster screen to control the motor, we clicked On/Off button, the motor spined.  requiredSpeed showed 3000 rpm as a default speed, actualSpeed is also 3000 rpm, I can change requiredSpeed and then actualSpeed follows the requiredSpeed.  In Freemaster screen, we can also measure DCbus Voltage in real time.  

But in Hall sensor mode, it was very strange in Freemaster screen, DCbus Voltage showed 0 V and DCbus Voltage can not be measured for some reasons.  also, requiredSpeed showed 30,000+ rpm as a default speed. 

Therefore, as a result, it seems that the dev kid works in Sensorless mode, but it didn't work in Hall sensor mode for some reasons.  I checked Hall signal by scope, waveform seems normal.   what did I do wrong?  Do I need to re-write code with Hall Sensor to S12 microcontroller?    How do I do some things to make the kid working in Hall sensor mode.   Please advise.

Thanks you so much!

John

0 Kudos

902 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, John,

Can you use debugger and check the code why the DC bus voltage is zero if you use Hall code. Generally, the Hall sensor can provide the rotor position inf, the processor can read the 3 hall logic and determine which stator will be swiched in the initial stage.

Hope it can help you.

BR

Xiangjun Rong

0 Kudos

902 Views
yaletron
Contributor II

Hi Xiangjun,

How do I use debugger and check the code why the DC bus voltage is zero in Hall mode?  Should I simply re-write the code the microcontroller?  If yes, which file I should use to write code to controller? 

Thanks

John

0 Kudos

902 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,  John,

I do not know if I understand you well. I suupse that the default code in the flash is \BLDCHall9S08\MC9S12G128_BLDC_Sensorless project. If you want to run hall code, you have to download CodeWarrior for mcu tools, and load the example code BLDCHall9S08\MC9S12G128_BLDC_Hal project to CW tools, compile it and download it to 9S08 flash with debugger and run it, check the voltage variable, 3 hall logic..., in this way, the hall code is running.

If you know above contents, I am sorry.

BR

Xiangjun Rong

0 Kudos

902 Views
yaletron
Contributor II

Hi Xiangjun,

I didn't know the default code in the flash is\BLDCHall9S08\MC9S12G128_BLDC_Sensorless project.  I thought the default code is good for both sensorless and hall.  I think you have found the reason why motor didn't run at Hall mode.  It was simply I didn't replace the default Sensorless code by Hall code in the micro controller of this dev kid. 

Now I know, The default code is only for sensorless, for Hall mode, I have to write BLDCHall9S08\MC9S12G128_BLDC_Hal project to the micro controller and then run the motor.   We will try. 

Thank you so much for your help and patience. 

John

0 Kudos