How to control two motors with a new project generated code by using Arduino IDE?
- April 10, 2026
- 2 replies
- 856 views
Hello,
I use the STM32 Motor Control Software Development Kit (MCSDK version 6.4.1). I created a new project with the STM32G474E-EVAL microcontroller board, the two IHM07M1 motor-drivers (power boards), the two modified X-NUCLEO-IHM09M1 adapter (connector) boards, and two gimbal 12V 3-Phase BLDC motors with encoder AS5048A. The project code was generated. By the way, I have not bought all the hardware yet.
Our project is specific. For all microcontroller boards and their software, which I know, it is true that setting zero speed holds a motor's rotor in a fixed position. We need to accelerate two motors' rotors for 180 degrees and let them rotate by inertia for next 180 degrees. In this way, a rotor makes one full 360-degree circle path. It seems that the MCSDK Motor Pilot makes a rotor in a fixed position if the motor speed is set zero. Hence, we need to depower the motors while the rotors make the 180-degree path by their inertia. I doubt that the MCSDK Motor Pilot can completely depower the motors.
Could you please tell whether or not the motor-driver boards can depower the motors while the rotors rotate for 180 degrees by inertia? If it is possible, we would like to edit and execute the new project generated code by using Arduino IDE. Could you please specify what files and from where we should take? After watching the ST video tutorial https://www.youtube.com/watch?v=iTnj0DT3lBM&list=PLnMKNibPkDnGTAifVExzpTJjmF2b-SAw5&index=2 , I tried to find a main.c file, please see the screenshot attached, but failed to do it.
Thank you.
