cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to spin the motor using Speed Sensing Mode - Hall Sensor

AkhilDP
Associate II

Hello,

We have a 5 pole pair magnet rotor and we have been using STEVAL-CTM009V1 development kit along with NUCLEO-G474RE development board.

First, we did a preliminary testing with a sensorless control (observer+PLL) and after understanding the aspects of the Start-up Profile under Sensorless Startup Parameters in Workbench we got the motor to spin smoothly although the start was a little jerky and the direction of rotation wasn't consistent but took of quite well after 50rpm all the way upto the defined speed.

Second, we now tried to spin the motor with Hall sensor as Speed Sensing Mode and clicked "Start" button under the Control from Motor Pilot. While there was about 0.14A of current drawn from the power supply when we started the control, absolutely no action in the Motor. Waited for a while, before stopping or resetting the operation, and rotated the rotor manually by hand and now Speed Feedback Error showed up. Obvious to note, the motor still didn't spin. Just so you know, we got the Hall angle placement right (mechanically and electrically). Got each of the sensor checked and they are working fine too. They are also connected to appropriate 2,3 & 4 Pins respectively of CON8 on STEVAL-006V1. Also to note, this exact motor was spun using a different controller to validate and verify the unknowns from the Motor side and resolve if any. Motor is fine.

Few observations and settings that remained constant during both of the above 2 operations:

1. A constant whirring sound in the motor as soon as the control was started from the Motor Pilot irrespective of sensored or sensorless control.

2. Open loop was unchecked.

3. Modulation Flags: None.

4. Control Mode: Speed Control

What are we missing? How do we get it running with Hall Sensors? Let me know if you need any info from our end to understand the issue better.

Thanks.

15 REPLIES 15
AkhilDP
Associate II

We followed the steps as mentioned in the documentation mentioned below suspecting an issue with the hall sensor displacement angle.

(Launch Workbench 6.1.2 -> About -> Documentations -> User Manual -> Hall sensor feedback processing)

Upon following the given instructions, we found the waveforms from the hall sensor and the BEMF conforming to the correct sequence as per the documentation. (Refer image "Phase Bemf vs Hall 1")

Further, we tried the run motor from the controller and the outputs of the U, V, W phases were observed from the power board and it was found that all the PWM waveforms generated from the three phases weren't modulating as observed in sensorless mode. (Refer images "PWM-Sensorless" and "PWM-Sensored" for sensorless and Hall Sensor Mode respectively)

Additionally, the motor failed to run in the other two 'Modulation Flag' settings i.e. Over Modulation and Discontinuous PWM.

The motor being run just fine in sensorless mode fails to run in Hall Sensor Mode. Please let us know what needs to be done to correct this issue.

Thank you.

Hello @AkhilDP and welcome to ST community,

First do U, V, W phases and H1, H2, and H3 Hall sensor output are correctly connected?
You can check the HALL signals output with your scope spinning the shaft by hand.
If signals are all active and with a good dynamic, could you generate a project with STO-PLL Sensor Less as main speed sensor and Hall sensor as auxiliary sensor, and when motor is spinning, verify that both STO-PLL and HALL ELectrical ANGLE are aligned (Motor Pilot "Graph&Record" display).

If they are not in phase, you can use Motor Pilot HALL profiler to compute HALL sensor parameters ("5.2.5. Start Hall sensor profiling" chapter in STM32 MC Motor Pilot Start-up guide).

If you agree with the answer, please accept it by clicking on 'Accept as solution'.
Best regards.
GMA

Hello @GMA.

We have verified phases U, V, W and Hall Sensors H1, H2, H3 are correctly connected. We did check hall Signal output while spinning it by hand and found them to be correct according to the requisites mentioned in this documentation (Launch Workbench 6.1.2 -> About -> Documentations -> User Manual -> Hall sensor feedback processing). Refer image "Phase Bemf vs Hall 1" (in previous post). The Yellow waveform represents Phase U and Red waveform represents Hall 1 signal outputs.

We proceeded with generating a project with STO-PLL as the main and Hall sensor being the auxillary sensor as you suggested. The graph generated using Motor Pilot "Graph & Record" is displayed below.

STO-PLL vs HALL.png

 

But to configure and run the motor pilot HALL profiler, the workbench doesn't show any option to change the current sensing topology to 'Three shunt resistor mode' from Insulated Current Sensors.

Current Sense Topology.pngProfiler Option.png

What are we missing?

GMA
ST Employee

Hello @AkhilDP,

According to the electrical angle graph, HALL sensor signals are not connected as expected: angle is increasing for STO-PLL and decreasing for HALL sensor then it means that HALL does not report the same rotation direction.

Motor Profiler tool does not support ICS Curernt sensing topology.

If you agree with the answer, please accept it by clicking on 'Accept as solution'.
Best regards.
GMA

Hello @GMA ,

Did a few trials and upon changing the Hall Sensor sequence and repeating the same exercise and below is the graph attached.

AkhilDP_0-1732173654038.png This is reporting the same rotation direction.

Also, agreed that Motor Profiler tool doesn't support ICS topology. The Workbench itself doesn't have that drop-down to select Shunt while we followed the steps as you suggested (5.2.5. Start Hall sensor profiling" chapter in STM32 MC Motor Pilot Start-up guide). Now, what is the solution to this? Are there any workarounds?

Just so you, know we are using STEVAL-CTM009V1 kit of which the Power Board is STEVAL-CTM004V1. This is enabled with Shunt as per the datasheet and schematics.

 

Hello @AkhilDP,

You can align both Angles with a debugger and tunning HALL_M1.PhaseShift parameter that is defined in mc_config.c file and equal:
.PhaseShift = (int16_t)(HALL_PHASE_SHIFT * 65536 / 360),
HALL_PHASE_SHIFT will be the value to set in motor.json file "placementElectricalAngle".


If you agree with the answer, please accept it by clicking on 'Accept as solution'.
Best regards.
GMA

Hello @GMA,

Now by mentioning the variable "HALL_PHASE_SHIFT" is nothing but "Placement electrical angle" as mentioned in Workbench. Placement El angle.png

Anyways, we did implement your approach into getting the STO-PLL and Hall EL angles to coincide by changing the value of "HALL_PHASE_SHIFT" in "pmsm_motor_parameters.h" and upon tuning below is the graph we obtained. Placement El Angle 124.pngPlease note, 124° is the value at which these two waveforms coincided. We incorporated this value into the code using HALL Mode as main sensor alone. But the motor didn't budge.

Few Observations:

The Phase firing sequences were observed on the scope in Sensorless mode but the during Hall Sensor mode the waveforms showed no firing sequence or modulation in the PWM same as images "PWM-Sensorless" and "PWM-Sensored" for sensorless and Hall Sensor Mode respectively in my second post.

 

Regards.

Hello @AkhilDP,

Using HALL as main speed sensor, connecting the motor pilot, do you have a reported error when starting the motor (speed feedback for example)?
Does status state change?
After connecting the MC Pilot, spinning motor by hand, do you have a reported "Mechanical Speed" change?

If you agree with the answer, please accept it by clicking on 'Accept as solution'.
Best regards.
GMA

Hello @GMA ,

Yes, I anticipated that would be the outcome if my HALL sensors are misaligned. So I did observe if there are any changes in the "Mechanical Speed" and yes, I do get to see the speed changes in the mechanical speed without any Speed Feedback error.

On another note, to check if that is the actual cause, I did a trial by changing the "Driving Algorithm" from FOC to 6-step and to my surprise the motor spun smoothly (of course with some trial and error in the Placement Electrical Angle value). Over and above that, I could change the speed too using the Speed reference slider.

After all this, I'm assuming that the controller isn't firing correct PWMs in sensorless mode. Maybe it is spinning out of luck. Because as long as the controller fires correct PWMs in sensorless mode, I don't see any reason why it should struggle spinning the motor in HALL sensor mode.

As I mentioned earlier that the rotation is inconsistent. Upon starting the control, the rotation, although the same direction every time, is jerky and sometimes stalls while ramping up in the initial phase. In this case, through Motor Pilot, I stop the control --> Rotate the shaft manually --> Start the control again until the motor starts spinning or ramping up.

Let me know if you need any data on any points.