2020-09-11 07:43 AM
Hi,
I am trying to use motor profiler 5.4.4 with B-G431B-ESC1. Every time, Electric model reaches 30 percent quickly and then gradually reaches 38 percent to get the 'too much time' warning after which process fails.
I tried different BLDC motors (12 pair-400KV, 7 pair-1900kv)and also tried different supply voltage(12V, 16V, 25V). However result is same.
I can also see few other posts which mentions about similar issue, however, they have not been answered.
Any help to resolve this is much appreciated.
Solved! Go to Solution.
2020-09-25 01:12 AM
Hi again @DB.7ERGANTIN
Are you sure that no other hack is needed than replacing the r3_2_g4xx_pwm_curr_fdbk.c file and moving the RCM_ReadOngoingConv() function call up?
The new firmware with the motor profiler works for me, but using the setup with MotorControlWorkbench generated code (and applied hacks) is not working. I cannot change the speed of the motor, it will always rotate with same speed no matter the value in MC_ProgramSpeedRampMotor1()...
2020-09-25 01:46 AM
Hello,
The hacks should solve a problem that appears when the motor is started for the first time after a MCU reset or at run time due to ADC issue. But here it seems to be something else as your motor is spinning. I just did the experiment on my side and I can change the speed with MC_ProgramSpeedRampMotor1() routine. do you have the same issue if you use the MC workbench monitor? Which toolchain do you use?
Best regards
2020-09-25 02:01 AM
Thanks for getting back @DB.7ERGANTIN . The following is the steps I've taken:
What am I missing here?
Thanks
2020-09-25 02:52 AM
Hello,
The fact that you are using Hall sensors for speed sensing and that the motor does not move but draws lot of current (3.1.2) or spins without being able to control the speed makes me think that there is perhaps an issue on the Hall sensors settings in the project. Could you please verify that the sensor displacement and the placement electrical angle are correct in the "motor parameters->sensors" panel in MC Workbench? Please verify also that the motor phase U,V and W are connected to OUT1, OUT2 and OUT3 respectively to the board. The fact that Motor Profiler is working fine as you said, seems to confirm this hypothesis as Motor Profiler does not use the Hall sensors.
Best regards
2020-09-25 03:32 AM
Connecting the motor correctly with the phases solved this issue... :confounded_face:
Thank you very much for fast and precise support! Appreciate it. Have a nice day.
2020-09-25 04:30 AM
You are welcome.
By the way, I realized that line 1033: LL_ADC_REG_StartConversion(ADCx_2); in the r3_2_g4xx_pwm_curr_fdbk.c file I sent should be removed. This was for debugging purpose.
Best regards
2020-09-25 05:30 AM
I've removed the line from the file. Thanks.
While having you here, I also have another matter to solve:
I the MC setup, the OPAMP1, 2 and 3 outputs are set to pin A2, A6 and B1. These output pins are then fed to the ADC: ADC1_IN3 (A2), ADC2_IN3 (A6) and ADC1_IN12 (B1).
In my setup, I need to use these pins A2, A6 and B1 for other GPIO purposes (already used all the other pins). I am having a hard find figuring out whether it is possible to route the OPAMP outputs internally to the corresponding ADC without wasting uC pins. Do you know if this is possible? I am using the B-G431B-ESC1 board.
2020-09-25 06:12 AM
Dear @EGran.2
As you can see in the following posts that is done:
only 2 days after the MC-SDK team has been informed, a patch has been produced.
Do not hesitate to open other posts if you have issues with MC-SDK.
Please note that for any HW bugs on this evaluation board, you should better contact the service providing this board.
Best regards
Laurent Ca...
2020-09-25 06:20 AM
Dear @DB.7ERGANTIN
Many thanks for your support and for your reactivity!
That is impressive!
As this post can help many people, I am coming to pin this post on top of "STM32 Motor Control" forum.
Best regards
Laurent Ca...
2020-09-25 06:32 AM
Dear all
Since this thread seems very important and in order to keep its efficiency and its usefulness for the whole "STM32 Motor Control" community, I ask to everyone to not adding any new comments on this thread.
This thread is now pinned on top on "STM32 Motor Control" forum.
Even in case of your problem is very similar to this ones, please therefor open a new post about your issues.
Please note that for any HW bugs on this evaluation board, you should better contact the service providing this board.
Best regards
Laurent Ca...