cancel
Showing results for 
Search instead for 
Did you mean: 

Motor + encoder not spinning in Motor Control Workbench Monitor

Jay1
Associate II

Hello,

tl;dr

Using a Hoverboard hub motor and Nucleo-F303RE + X-Nucleo-IHM08M1 combo the motor spins sensorless but not with an attached encoder as speed sensor.

What I did so far.

Used motor profiler to get hub motor parameters.

Although the values for friction, inertia and Ke could be quite different for successive profiler runs Rs (0.16 Ohm), Ls (0.36 mH) and Imax (15.25 A) were stable. I was able to get a decent parameter set. When using Play mode in profiler motor, speed was following the slider value. Except for the range below 50 rpm where the motor would stop spinning (Error: Speed Feedback). Parameters were saved.

Creating a new project in workbench.

Using the Nucleo-F303RE + X-Nucleo-IHM08M1 combo I generated a new project with the hub motor.

The first attempt was to use sensorless mode. Left settings as given by control and power board templates. Generated the project, build with TrueStudio, downloaded to control board. With Workbench Monitor I could start the motor and control speed in both directions. That went well!

For the second attempt I connected a quadratur encoder to the power board. I used the same Workbench project. The motor configuration was changed to use a 2000 P/R encoder and Speed Sensing set to use the encoder as main source. Project saved with different name and generated, compiled, downloaded as above. Dialing about 50% of max rpm.

When hitting "Encoder Align" in Workbench Monitor the motor twitches shortly. The States change from "Idle -> Alignment -> Stop -> Idle". But the motor barely moves an inch. No error is reported. "Measured Speed" briefly shows some rpm value.

When hitting "Start Motor" the motor twitches again shortly but does not spin. "Measured Speed" briefly shows some rpm value. Motor Power gauge now shows about 15W. Bus Voltage is the expected 12V (or 36V when using the battery pack). State is "Run". The motor does not spin, is stalled and can hardly been turned. Again no error is reported. After hitting "Stop Motor" state changes to "Idle" and the motor can be manually turned again. While manually turning, "Measured Speed" shows an rpm reading.

Used tool chain:

- ST Motor Control Workbench 5.3.2.18569

- ST CubeMX 5.0.1

- STM32FW 1.10.0

- TrueStudio 9.2.0

Used evaluation boards:

- Nucleo-F303RE

- X-Nucleo-IHM08M1 (without C3, C5, C7)

 - 3 shunt configuration (JP5, JP6)

  - FOC mode (JP1 closed, J2 closed)

 - JP3 closed, JP9 open

Used motor:

- Hoverboard 6.5 Inch hub motor

- 15 pole pairs

- 36V 250W

- Rs:0.16 Ohm

- Ls: 0.36 mH

- Imax: 15.25 A

- max rpm 170 @12V

- max rpm 510 @36V

Used encoder:

- Omron E6B2-CWZ6C

- 2000 P/R

- 5V-24V DC

Used power supplies:

- 12V 65A Server power supply

 or

- 36V battery pack

After reading a lot of documentation + posts, trying different power supplies, fidling with Startup duration and other parameters I am stuck.

Any help would be appreciated.

-Jay

2 REPLIES 2
Jay1
Associate II

The answer to my question:

I had to tick "Reverse counting direction" in "Speed Sensing". Now the motor is spinning. Speed and torque control modes are up and running.

Laurent Ca...
Lead II

The question has been moved from the section "Motor Control Hardware" to the "STM32 Motor Control" section (the question is about the STM32 MC SDK). 

Best regards