motor control closed loop
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-15 1:05 PM
hi I was using STM32CubeExpansion_SPN7_V1.1.0 with f401re and IHM071M1 the motor with the potentiometer runs well without problems, but what I wanted to do and control the motor direction of rotation, speed and finally stop motor, I wanted to do it via software in order to control each cycle in the while (1), starting with small speeds
thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-16 1:38 AM
Hi @SDall​,
you can find all details in the user manual UM1946
In the Projects directory of X-CUBE-SPN7 package you can find an example application using the X-NUCLEO-IHM07M1 expansion board with NUCLEO-F401RE boards. Ready to build projects are available for multiple IDEs.
In this application, a low voltage 3ph motor is driven by the L6230 device. The firmware implements a 6-Step MC algorithm. The current measured in single shunt mode is compared with a reference generated by a digital speed loop for current control.
Inside the Documentation folder you can find a compiled HTML file generated from the source code and documents the software component and API details.
The L6230.c file implements all the API functions to manage the motor driver; in particular, it is possible to start/stop PWM signals, enable/disable each inverter leg, etc. At the user level, MC_SixStep_param.h contains all the motor driving parameters like the number of pole pairs, target speed, PI parameters for speed regulation, etc.
An alternative option to program the X-NUCLEO-IHM07M1 with the NUCLEO-F401RE is use the last release of STM32 Motor Control SDK (X-CUBE-MCSDK-Y).
Here you can find some examples for reference.
Let me know if this info is useful to you, if yes please "Select as Best" button to close the topic.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-20 5:13 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-22 3:27 AM
Please someone answer me!​
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-24 12:46 AM
Hi @SDall​,
for your purpose I suggest to use the high level functions listed in the 6Step_Lib.c :
- MC_StartMotor() --> Send Start motor command:
- MC_StopMotor() --> Send Stop motor command
- MC_SetSpeed(value) --> Send change motor speed (positive value for clockwise, negative value for counterclockwise)
In any case remember to set the motor parameters in the MC_SixStep_param.h
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-07-07 4:02 AM
Hi @SDall​ ,
any updates about your progress?
Have a nice day.
