STM32 MC Motor Pilot - Start-up guide

Revision as of 07:36, 14 September 2021 by Jean-michel Lagoutte (talk | contribs)


Based on STM32 MC Motor Pilot 5.Y.2 V0.9.7 (included in STM32 MC-SDK 5.Y.2).

1 Overview of the STM32 MC motor-pilot tool

STM32 MC Motor Pilot is a monitoring tool for STM32 motor-control applications:

  • Connects to MC applications built with the UI module through the serial port
  • Uses the same protocol as the current monitor
  • Allows for controlling, monitoring, and tuning MC applications
  • Will replace the monitor part of STM32 MC workbench
    • Current available version is an already usable preview
STM32 MC MotorPilot slide3.png

STM32 MC Motor Pilot added values:

  • Enhanced plotting feature: the user can now plot most registers
  • The user can easily customize GUI at run time
    • To fit specific needs or to experiment with new firmware features
  • Solid foundation to support future firmware features
    • ACIM, 6-Step, Sensorless Zero speed, enhanced debug features
  • Runs on all three MCD target platforms: Windows, Mac, and Linux

2 STM32 MC Motor Pilot Quick Guide

2.1 Installation and Run

STM32 MC Motor Pilot is now automatically installed with STM32 MC SDK.

A shortcut is now created in Windows menus to run it.

2.2 Quick Start-up

2.2.1 Quick step 1

  1. MotorPilot:
    • Starts unconnected
      STM32 MC MotorPilot slide6 1.png
    • Lists available serial ports
      STM32 MC MotorPilot slide6 2.png
    • Displays the default UI
  2. Connect a Motor Pilot board to the PC
  3. Click on Connect
STM32 MC MotorPilot slide6 3.png

2.2.2 Quick step 2

  1. MotorPilot is connected:
    • Displays version of embedded firmware
      STM32 MC MotorPilot slide7 1.png
    • Shows the current state and the errors
      STM32 MC MotorPilot slide7 3.png
  2. Spin the motor:
    • Click on the Start button
      STM32 MC MotorPilot slide7 2.png
  3. Motors starts and the monitor displays the speed
    STM32 MC MotorPilot slide7 4.png
    • And the currents
    • And other information

2.2.3 Quick step 3

  • Control the motor
    • Slide the knob to set the speed
      STM32 MC MotorPilot slide8 1.png
    • Set Target Speed, Duration and Click to apply a ramp
      STM32 MC MotorPilot slide8 2.png
STM32 MC MotorPilot slide8 3.png
    • Click Stop Ramp to stop it before end
      STM32 MC MotorPilot slide9 1.png
    • Click Stop to stop spinning the motor
      STM32 MC MotorPilot slide9 2.png
STM32 MC MotorPilot slide9 3.png

3 MC application parameters

STM32 MC Motor Pilot gets MC application parameters from the board and adapts widgets to them.

4 MC application advanced settings

4.1 Speed PID, Toque PID, Flux PID and Flux reference

  1. Click Advanced Configuration
    • Displays additional panel with more settings
      STM32 MC MotorPilot slide11.png
  2. As in the current monitor, customizes:
    • Speed PID
    • Toque PID
    • Flux PID
    • Set Flux reference

4.2 State Observer, PLL parameters, CORDIC parameters and DAC settings

  1. Click Advanced Configuration
    • Displays additional panel with more settings
  2. As in the current monitor, customizes:
    • State Observer + PLL parameters
    • State Observer + CORDIC parameters
  3. Missing from the current monitor:
    • Revup phases configuration
      • Will be present in future versions of the tool
  4. DAC settings are at the bottom left
STM32 MC MotorPilot slide12.png

4.3 Handling Errors

4.3.1 Control Board disconnection

Board freeze due to firmware critical error or breakpoint trigger:

  • Resume execution or reset the board, and the connection will resume
STM32 MC MotorPilot slide13.png

4.3.2 Firmware errors

  • As with the current monitor, current and past errors are indicated.
  • Clicking the Ack Faults button has no effect in the FAULT_NOW state
STM32 MC MotorPilot slide14.png
  • Wait for the fault conditions to vanish to enter the FAULT_OVER state
  • Then click on Ack Faults to go back to IDLE
    STM32 MC MotorPilot slide15 1.png


STM32 MC MotorPilot slide15 2.png

4.4 Viewing and plotting registers by pooling (low-speed plotting)

  1. Clicking the Registers tab displays the list of all registers
    STM32 MC MotorPilot slide16 1.png
  2. Clicking a Click to Plot button
  3. Opens a plot window the first time
    • Lets the user decide where to plot the other times
      STM32 MC MotorPilot slide16 2.png
    • Lets the user choose to stop showing the already pointed register.

4.4.1 And soon in this start-up guide:

  • Viewing and plotting registers by pooling for high-speed plotting
  • frame logger and decoder

4.5 UI is changeable at run-time

  • Click on menu item File => Load
    • Search for a .qml file and open it.
    • For instance, GUI\PositionControlApp.qml found in the release
  • This will load a new GUI with other features
    • In the case of PositionControlApp.qml, a position control enabled monitoring application.
  • Future versions of the tool will let users change this UI themselves
STM32 MC MotorPilot slide19.png

5 Current limitations and future plans

5.1 Missing features to be added soon

  • Revup configuration UI
  • Dual Drive support
  • Filtering and sorting registers’ view
  • UI API description and development guide
    • To let users customize the UI for their own needs