Okay this week I’ll find some time to test these
Okay so I have beene trying to test this board with the motors. One of the middle mosfets has been giving off a lot of smoke but the board still manages to drive the motor during startup. I have not managed to get it working though, it keeps on giving off a “failed to notice movement” error but I read and display the angle of the motor. ( it seems to output 3.14 when rotated a full revolution so I’m assuming its radians)
Am I doing anything wrong here:
#include <SimpleFOC.h>
BLDCMotor motor = BLDCMotor(2);
//MagneticSensorSPI sensor = MagneticSensorSPI( AS5147_SPI,53);
// BLDCDriver3PWM(pwmA, pwmB, pwmC, (en optional))
BLDCDriver3PWM driver = BLDCDriver3PWM(6, 10, 5, 8);
//BLDCDriver3PWM driver = BLDCDriver3PWM(7, 9, 6, 8);
HallSensor sensor = HallSensor(18, 19, 20, 2);
float target_angle = 0;
// instantiate the commander
void doA(){sensor.handleA();}
void doB(){sensor.handleB();}
void doC(){sensor.handleC();}
Commander command = Commander(Serial);
//void onTarget(char* cmd){ command.scalar(&target_angle, cmd); }
void onMotor(char* cmd){ command.motor(&motor, cmd); }
void setup() {
// use monitoring with serial
Serial.begin(115200);
SimpleFOCDebug::enable(&Serial);
driver.voltage_power_supply = 20;
driver.init();
motor.linkDriver(&driver);
sensor.init();
sensor.enableInterrupts(doA, doB, doC);
motor.linkSensor(&sensor);
//motor.controller = MotionControlType::velocity;
motor.controller = MotionControlType::torque;
motor.PID_velocity.P = 0.2;
motor.PID_velocity.I = 20;
motor.PID_velocity.D = 0;
// default voltage_power_supply
motor.voltage_limit = 6;
// velocity low pass filtering time constant
motor.LPF_velocity.Tf = 0.01;
// angle loop controller
motor.P_angle.P = 20;
// angle loop velocity limit
motor.velocity_limit = 50;
motor.init();
motor.initFOC();
motor.target = 2;
//Serial.begin(115200);
Serial.println("Motor ready.");
//Serial.println("Set the target angle using serial terminal:");
_delay(1000);
}
void loop() {
// main FOC algorithm function
motor.loopFOC();
// Motion control function
motor.move();
//sensor.update();
// display the angle and the angular velocity to the terminal
//Serial.print(sensor.getAngle());
//Serial.print("\t");
//Serial.println(sensor.getVelocity());
// user communication
command.run();
}
Oh wow! That is definitely not a good thing. Make sure that the init current is not too high!
motor.voltage_sensor_align = 0.5; //Volts
You motor has 0.1 Ohms phase resistance so with 0.5V alignment voltage you should have around 5A current.
This seems to be a sensor issue. You should have exactly 2pi radians for one rotation (2pi is around 6.28 radians).
But “failed to notice movement” arrives if the sensor reads almost zero movement during the initFOC
. So if your motor moves, this probably means that the sensor does not read its position properly (or is not read properly).
Okay I wired up a new board, added in the statement and checked the number of poles to get 6.28 radians per revolution.
I put the statement before the motor.init function.
void setup() {
// use monitoring with serial
Serial.begin(115200);
SimpleFOCDebug::enable(&Serial);
driver.voltage_power_supply = 20;
driver.init();
motor.linkDriver(&driver);
sensor.init();
sensor.enableInterrupts(doA, doB, doC);
motor.linkSensor(&sensor);
//motor.controller = MotionControlType::velocity;
motor.controller = MotionControlType::torque;
motor.PID_velocity.P = 0.2;
motor.PID_velocity.I = 20;
motor.PID_velocity.D = 0;
// default voltage_power_supply
motor.voltage_limit = 6;
// velocity low pass filtering time constant
motor.LPF_velocity.Tf = 0.01;
// angle loop controller
motor.P_angle.P = 20;
// angle loop velocity limit
motor.velocity_limit = 50;
motor.voltage_sensor_align = 0.5;
motor.init();
motor.initFOC();
motor.target = 2;
//Serial.begin(115200);
Serial.println("Motor ready.");
//Serial.println("Set the target angle using serial terminal:");
_delay(1000);
}
And it still gave off smoke and couldn’t see the sensor. I can get the sensors to display the position on the serial terminal no problem so they are definitely working. On one revolution the serial output goes from 0 to 6.28.
The smoke came from this mosfet on both boards,
As you can see it doesn’t looked burnt out. I’m sure it’s not doing so well though.
huh, this is strange
Just to confirm, you have already used these boards to run other motors with lower phase resistance right? Like gimbal motors?
What you could try is to limit the IDRIVE current to 30mA. The defualt value is 120mA and that might be to much. You can set this value using this soldering pad:
Could you also show a picture of your board from above?
In the images it seems like the mosfets are a bit shifted
Is this just an illusion due to the camera angle?
The smoking mosfet is different dimension. Compared to the one at the right the bottom edges are aligned and the upper aren’t… it seems like the size is different. Are they different version? Is there a problem in the soldering?
Is it maybe rotated? The picture provided isn’t very clear, and I can’t see the markings…
If you can take a high res picture from above where we can see the markings on the chips then we can compare and check for correct orientation…
Hey guys, sorry I’ve been away a while. I just started a new job. I am now an electronics engineer, moved on from mostly working mechanical stuff
Here’s more pics of the boards.
Here’s what the untested boards look like
I’m not sure how I feel about the tiny form factor topologies. Sure they are necessary for mobile devices but they are not exactly easy to work on if something goes wrong.
It seems to me, there’s was too much solder paste under the chip, which had caused shorts.
The burnt one clearly shows beads of solder squeezing out from under the chip.
Even the unused PCB shows a hint of abundant solder.
Better check all pins for continuity against GND with a multimeter.