Hello, I am currently attempting to build a reaction wheel based attitude control system for a project. Therefore, my first objective is to establish velocity control for my BLDC motor, ideally in closed loop. However, my FOC driver keeps overheating and smoking when trying even open loop control (the motor either doesn’t spin or doesn’t generate enough torque for my needs), and after attempting to fix the problem myself and even switching drivers I have not been successful. I would greatly appreciate any help, tips, or pointers to steer me in the right direction as I am a complete beginner and am learning as I go.
Here is the hardware I am using (pictures attached):
-
Motor: 42BLS40-24-01 from StepperOnline, 24V 3-phase BLDC with 3 channel hall sensor, has a 1.8A rated current
-
Driver: MKS Dual FOC v3.2
-
Power Supply: 2 12V LIPO batteries wired in series
Here is the code for the open loop control:
#include <SimpleFOC.h>
BLDCMotor motor = BLDCMotor(4);
BLDCDriver3PWM driver = BLDCDriver3PWM(26, 25, 33, 27);
float target_velocity = 5.0;
Commander command = Commander(Serial);
void doTarget(char* cmd) { command.scalar(&target_velocity, cmd); }
void setup() {
Serial.begin(115200);
driver.voltage_power_supply = 24;
driver.init();
motor.linkDriver(&driver);
motor.controller = MotionControlType::velocity_openloop;
motor.voltage_limit = 10.0;
motor.velocity_limit = 100.0;
// Init motor
motor.init();
command.add('T', doTarget, "target velocity");
Serial.println("Motor ready. Target velocity: 5 rad/s");
_delay(1000);
}
void loop() {
motor.move(target_velocity);
command.run();
}
Thank you in advance for all the help!
