MCSDK 5.Y.1 G431RB/STDRIVE101 Motor Speed Control
- July 10, 2021
- 9 replies
- 3218 views
My desire is to find some detailed documentation on the MCSDK 5.Y.1 project generated and how to exercise the motor using the Motor Pilot. Specifically:
• Change the initial startup speed
• Change the speed of the motor (while the motor has already started up and is running)
• Detailed descriptions of the ‘speed reference’ and how to configure/use the ‘speed ramp’
• Tune the project parameters to make the motor rpm speed run steady at speed with less variance about the desired speed (currently the motor is +/- 500 rpm about 2500 rpm as configured in my project)
Details of my configuration and accomplishments so far …
• can successfully build/download/run the project using the STM32CubeIDE and then run the Motor Pilot application and connect to the MCU via 1.8432 MBaud on the VCom port.
• can start the motor but about 15% of the time I get a startup fault ‘speed feedback’
• can change the motor speed from positive to negative by adjusting the ‘speed reference’ but can only achieve two configurations -2500 rpm and + 2500 rpm with +/- 500 rpm variance about the mean speed
• speed ramp does not have any effect
• Using an X-NUCLEO-IHM16M1 on the NUCLEO-G431RB I was able to successfully run the MotorProfiler (5.Y.1). I’ve attached the profile results. With the ‘play’ interface I was able to control the speed of the motor within +/- 2920 rpm.
Software/Hardware Configuration
• Motor Control SDK 5.Y.1
• Motor Pilot V0.9.2 (5.Y.1)
• STM32CubIDE 1.6.1
• NUCLEO-G431RB (STM32 Nucleo-64 development board)
• EVALSTDRIVE101 (STDRIVE101 demonstration board for three-phase brushless motors)
• X-NUCLEO-IHM16M1 (Three-phase brushless DC motor driver expansion board)
• 6 inch 34-Pin 2x17-Pin 2.54-Pitch Female 34-Wire IDC Flat Ribbon Cable
• Anaheim Automation BLY172S-24V-4000 (BLDC Motor with Hall Sensors)
I have successfully used the MCSDK to create a new project as follows:
• Application Type: Fans
• System: Single Motor
• Control Board: (Power & Control) NUCLEO-G431RB (based on STM32G431RB)
• Power: EVALSTDRIVE101 3Sh (based on STDRIVE101)
• Motor: Generic Low voltage <= 50V
Project Configuration:
• Motor: Surface Mounted PMSM
o Motor: 4 pole pairs, Max App Speed 4000 rpm, Nom Current 3.5A, NomDC Voltage 24V, Rs 0.8 Ohms, Ls 1.2 mH, B-Emf constant 3.35
o Sensor: Hall Sensors
• Speed Sensing
o Main Sensor: Hall Sensors
• Firmware Drive Management
o FreeRTOS: enabled
