Hey everyone,
we have developed an stm32 based bldc driver board for running the simpleFoc library, But when the driver is initialized in this line:
driver.init();
there is a really large inrush current which seems like a dead short, and this does not occur when the board is powered through a series resistance of 2.5R or larger. And this does not occur frequently when powering with 12v. The board was actually intended for running on 36V.
What might be the issue here? What can we do to solve this issue?
Also, there is noise in the power rails when the motor is running we tried adding larger capacitors, LC filter, etc but nothing improves this situation.
we are currently using 6 Inch 250W 24V BLDC motor
The schematic is attached
Firmware running on STM32
#include <SimpleFOC.h>
BLDCMotor motor = BLDCMotor(15);
BLDCDriver6PWM driver = BLDCDriver6PWM(PA_10,PB_1, PA_9,PB_14, PA_8,PB_13);
HallSensor sensor = HallSensor(PA_6, PA_7, PB_0, 15);
InlineCurrentSense current_sense = InlineCurrentSense(0.01, 5.4, PB10, PB2);
// Interrupt routine intialisation
void doA(){sensor.handleA();}
void doB(){sensor.handleB();}
void doC(){sensor.handleC();}
void setup() {
Serial.begin(115200);
// initialize encoder sensor hardware
sensor.init();
sensor.enableInterrupts(doA, doB, doC);
motor.linkSensor(&sensor); // link the motor to the sensor
// init current sense
current_sense.init();
// link motor and current sense
motor.linkCurrentSense(¤t_sense);
driver.init();
motor.linkDriver(&driver); // link driver
motor.controller = MotionControlType::velocity;
motor.torque_controller = TorqueControlType::voltage;
motor.voltage_limit = 24;
driver.voltage_power_supply = 24;
current_sense.skip_align = true;
motor.init();
motor.initFOC(0, Direction::CW);
}
void loop() {
motor.loopFOC();
motor.target = 3;
motor.move();
}