2024-07-14 07:37 PM
Hi,
I can't manage to get my motor to work with the EVLDRIVE101-HPD board. I have generated the FOC firmware and uploaded it to the board through STM32CubeIDE. See attached for main.c
Is there something else I need to do? I have followed everything in the user manual for the board, but it is quite minimal in it's instructions.
I have done all of these steps.
"To start your project with the board:
1. Connect the brushless motor phases to J1, J2, and J3
2. Supply the board through J5 (positive) and J6 (ground)
3. Download the compiled code through the SWD interface connecting the STLINK programmer to J7
(STDC14 connector)"
After these steps, the board is powered up but there is no PWM signal on the phases. It is a constant 0V.
Any help will be appreciated,
Thanks!
2024-07-15 12:19 AM - edited 2024-07-15 02:01 AM
Hello mitch1,
Could you please tell me which version of the MCSDK you are using ?
Have you connected the MotorPilot to the board (refer to User Manual documentation available through "Workbench tool">About>Documentations>Documentation>"Getting Started with ST Motor Control SDK", "Motor pilot" chapter)? Is it returning any error, is the VBUS correctly asserted for example ?
In any case, there is no default start in the Main.c init procedure. You can also use APIs available in mc_api.c to start your motor.
2024-07-15 03:49 PM
Hi Gael,
I have not connected the MotorPilot to the board as it can't detect it, which I assume it is because it is not compatible with the STM32G0 IC on the EVLDRIVE101 board, stated in the MotorPilot document;
"It is not possible to generate a motor profiler binary with the STM32F0, STM32G0, STM32C0 families"
Is it possible to run the board without the MotorPilot step?
2024-07-15 05:23 PM - edited 2024-07-15 10:57 PM
I am using MCSDK 6.3.0
Update to this:
I added MC_StartMotor1(); in the code, in the while(1) loop:
And on power up, it starts the motor for a split second with the correct PWM output I have set.
So I guess everything is running ok? Just need to figure out how to code it correctly for the motor to run continuously?
Any ideas on how to do this?
2024-07-16 12:55 AM - edited 2024-07-16 12:56 AM
Hello mitch1,
The documentation line you are referring to is true for MotorProfiler, but not for MotorPilot, so an impossibility to connect seems weird to me. Could you send me your .stwb6 file as well as tell me which version of the MCSDK you are using please ?
I am glad that you managed to make your motor run (even briefly) using the api. While its true that ultimately the application will only need those to get things working, the MotorPilot is still a great tool for debugging, so I recommend to use it during the development phase. It will allow you for example to find the correct start-up parameters more easily. Don't hesitate to have a look at the MCSDK User Manual (Via WorkBench, you can find it by clicking on About -> Documentations -> Documentation -> in the newly open browser window, click on User Manual) and at our STM32 MC Wiki for more information on those points.
2024-07-16 04:53 PM - edited 2024-07-16 05:41 PM
Thanks for helping Gael,
I am using MCSDK 6.3.0.
Still unable to connect to MotorPilot, see attached screenshot for log info. It says "COM4 is not a STLINK VCP", which is where the board is connected with STLINK-V3MINIE. Odd that it can't connect to the MotorPilot but the IDE can connect to it, as uploading code to it works.
I have attached the .stwb6 file in the link:
https://drive.google.com/file/d/1h5LDbO9vDSlr_7XjVDyiE1joOTJHNc9e/view?usp=sharing
In the meantime, i am trying to startup with STOPLL/Cordic algorithm.
thanks,
Mitch
2024-07-22 08:47 PM
Update: I managed to connect to the MotorPilot. But the issue still remains. Where the motor does not turn, it tries to on start up, but all it does it a little jerk. Giving the following result:
"Driver protection fault", i couldnt find any info about this on the user manual, what could i do to troubleshoot this fault? On the phases outputs, the PWM signal appears to be in sync on start up, then turns off when in "fault_over" status.
After seeing this, i turn driver protection off to see what happens. And the motor does a similar thing, but remains in start status mode a bit longer. it produces the following profiles on the three phases profiles to the motor (see photo). This makes the motor jerk but not turn at all.
Any advice on what to do? Thanks,
2024-07-23 01:01 AM
Hello @mitch1,
"Driver protection" is the error generated by STDRIVE101 Driver, please refer to UM3257 documentation, 4.2 Current sensing chapter and check if your application current level e.g. corresponds to "default threshold".
You can also have a look to User Manual documentation available through "Workbench tool">About>Documentations>Documentation>"User manual", "Firmware errors" link, "2. Over Current" chapter.
2024-07-23 04:28 AM
Hello @mitch1
did you try to reduce the current target to a value below 15A during the open loop period to see whether the motor can be accelerated without incurring in a protection fault?
You can do it both in the motor pilot (rev-up secrtion) or in the workbench (Sensorless start-up parameters)
Alessio
2024-07-23 06:21 PM
Hi Alessio,
I reduced the current to 5A and it is giving me the same fault. See screenshot below.
It also produces no PWM signal during this unlike the previous tests.
However, it looks like the driver protection fault is caused by the over voltage in VBUS. i turned that off and the fault changed but the motor remains still.