Hello,
I require some assistance, please. I am attempting to control a BLDC motor using an STM32F446RE and a DRV8302 driver. I am using the SimpleFOC library to achieve this. Specifically, I am attempting to control the torque using the TorqueControlType::FOC_CURRENT method. Additionally, I am utilizing a low-side current sensor within the DRV8302.
I am encountering issues when attempting to control the motor’s current components (Iq = desired torque) and (Id = 0). When I make adjustments to the PI controller for Iq and Id, the motor starts rotating rapidly in both the clockwise (CW) and counterclockwise (CCW) directions. I would greatly appreciate any suggestions you may have to address this issue.
“I also have the following data from the serial port. When trying to align the sensor, why does it give me ‘success 2’? According to what I’ve read, I should reconfigure the pins, but I don’t know which ones.”
MOT: Monitor enabled!
MOT: Init
MOT: Enable driver.
MOT: Align sensor.
MOT: Index search…
MOT: Success!
MOT: sensor_direction==CW
MOT: PP check: OK!
MOT: Zero elec. angle: 4.06
MOT: Align current sense.
MOT: Success: 2
MOT: Ready.