cancel
Showing results for 
Search instead for 
Did you mean: 

Issues with Motor Control SDK

CRadn.1
Associate II

I have a BLDC 24v 2.7 v/kprm 1.5 ohm 2.1mH device with a 200 CPR 2 channel single ended incremental encoder. I am using a NUCLEO-L476RG and X-NUCLEO-IHM08M1.

I seem to have an issue with some of the terminology used. First the motor control SDK mentions Pole Pairs. The motor datasheet says 8 poles. I assume the SDK wants 4 pole pairs. Would this be correct? Second, the SDK states Pulses per mechanical revolution. Since the encoder datasheet states CPR (counts per revolution), I am assuming the SDK wants 50 PPR since it is a 2 channel encoder with 4 state transitions. Is this correct?

The Motor Profiler states that the measurement is taking too long. I have adjusted the speed both up and down and left it blank with the same result each time. What is going on here? Also the electrical model usually has low values for the resistance and inductance. These always seem to be 50% or lower compared to the datasheet of the motor. I have followed the proper configuration of the boards that the Motor Profiler points to. I have played around with the Max Speed, lowering it, increasing it and leaving it blank. Nothing seems to work there. The motor does move and sounds smooth.

The Motor Control Workbench adds another variable into the equation. Whenever I attempt to get the motor running after generating code using the Motor Control Workbench, the motor either sounds like the windings are not correctly installed or the RPM reported back in the Motor Pilot GUI jumps all over the place. Note, I have the exact same connections as when I am using the Motor Profiler. The Motor Profiler is able to move the motor and it sounds like a BLDC. The code generated from Workbench either makes it sound like a chaotic vibration device or reports wildly swing RPM values. I have not been able to get a consistent movement experience with the Motor Control Workbench.

I have assumed that my issues with the Motor Control Workbench are related to timing or encoder setup. My board is configured to use the ST-LINK MCO as the clock per the documentation, so I have configured the clock to be external. As I mentioned above, I was having terminology issues. I found that PPR means CPR/4 which I was able to confirm in the code. I played around with the Input Capture filter duration which does not seem to improve anything. I did learn that my encoder counts in the reverse direction. I also attempted to use different sensor selection like one of the sensorless profiles. I have confirmed several times that my connections are correct. Further confirmation from the Motor Profiler moving the motor and it sounding smooth. I was able to get the motor moving both with a controller from the manufacturer as well as a controller from Haydon Kerk Pittman. Does anyone have any ideas where else I should look? I am going to attempt to look into the signals with an oscope and dive into the code in the meantime.

5 REPLIES 5
Laurent Ca...
Lead II

Dear @CRadn.1​ 

I am sorry but SDK does not able to manage stepper motors.

I had "Motor Control HW" topic, in case of...

Best regards

CRadn.1
Associate II

@Laurent Ca...​ 

I am using a brushless motor. It is a 24-volt brushless DC motor.

What does the following mean "I had 'Motor Control HW' topic, in case of..."?

THA.1
Associate II

(Encoder resolution)

PPR or CPR usually means "pulse per each channel". It should be double-checked at motor specification. By the way, SDK needs this value (not x4 count)

(Pole pairs)

4 pole pairs = 8 poles

(Encoder direction)

With sensorless configuration, the (+)direction can be found. Then with encoder, when moving manually to (+)direction, encoder angle should increase.

CRadn.1
Associate II

@THA.1​ ,

Thank you for the response!

It sounds like I have everything configured correctly, but the motor will not run correctly using any type of feedback. I looked at the encoder signals using a scope. They are not clean square waves when plugged into the IHM08, however, they are clear boundaries from logic low to logic high. If the encoder is not connected to the IHM08, the square waves look perfect.

I was able to get the Motor Profiler to work. I had to increase the max speed value to 15,000 RPM and the Profiler was able to get a model for the motor. So I know the SDK, in some configuration, can run the motor. It appears the SDK has some issue with feedback and how I configure it, encoder or sensorless.

I was able to get the motor to run with a Pittman PBL4850E BLDC controller and an Anaheim Automation MDC020-024031 controller. I just have not been able to get the motor to run with the SDK as configured from the Motor Control Workbench.

THA.1
Associate II

I would like to recommend to run the motor with sensorless configuration, then verify everything(SDK, Hardware, etc) working well except for sensor feedback. Once done. encoder configuration can be tested one by one (direction, resolution, noise filter, etc). ​