2020-07-24 08:10 AM
I am using the MC Workbench tool to drive a 3-Phase BLDC Motor with Hall Sensors. I have enabled the hall sensors in the workbench, downloaded the code and flashed my board. How do I actually use the Hall sensor to control the speed? No matter what speed I set, the motor will always go to its max.
Solved! Go to Solution.
2020-07-27 03:42 AM
By default the board is configured for the sensorless driving.
Before using the Hall sensors you have to close JP5-JP6-JP7 solder bridges and open the JP9-JP10-JP11 ones.
If you are using the 6STEP algorithm, check the configuration of JP8, J11 and J12 jumpers too:
2020-07-27 03:42 AM
By default the board is configured for the sensorless driving.
Before using the Hall sensors you have to close JP5-JP6-JP7 solder bridges and open the JP9-JP10-JP11 ones.
If you are using the 6STEP algorithm, check the configuration of JP8, J11 and J12 jumpers too:
2020-07-27 07:17 AM
Hello Enrico,
Thank you for assisting me again. I have configured all the jumpers for FOC with Hall Sensor. I also have close the necessary solder bridges and opened the other ones like you mentioned. I can tell in code that the Hall Sensor is being read, and it is being read correctly! When I run the motor it doesn't seem to actually do anything with that values it gets from the Hall Sensor. Is there any example code for Hall Sensor that I can use for reference?
2020-07-28 02:42 AM
I attached a project based on the SDK5.4.4
In this project I also enabled the virtual DAC feature that could be very useful for real time monitoring internal variables.
The virtual DAC generates a 20kHz PWM on PA7 with a duty-cycle proportional to the value of the monitored variable (e.g. electrical angle). Low-pass filtering it you can plot on your oscilloscope any FOC variable ant put it in relation with other electrical signals.
The monitored variablke can be selected through the MC Workbench Monitor in the "Advances" tab
In order to use it you must make some minor change on the board:
2020-07-31 07:14 AM
Enrico,
My issue ended up not being quite what I thought it was. My electrical angle was in motor parameters was incorrect. Your solution made me realize this, and I adjusted it to match your value and now I can control it! When adjusting the motor to low speeds I find that it oscillates, is this something I should adjust with the parameters for PID?
Thanks for the help,
Nick
2020-07-31 12:54 PM
Glad to know you found the issue Nick :)
The oscillation issue could be caused by PID instability as you said, but when you run the motor at very low speed you have two other issues:
If you are in the second case, try adding some direct current to the control (Id in the advanced tab of the monitor). In this way you slightly reduce the efficiency, but the system returns working with higher output voltages.
2021-06-21 09:54 PM
The question has been moved from the section "Motor Control Hardware" to the "STM32 Motor Control" section (the question is about the STM32 MC SDK).
Best regards