BLDC Motor getting hot - SimpleFOC Low RPM

Hi All,

First time poster and complete newbie to Arduino & SimpleFOC.

I am trying to put together a drive mechanism for a Turntable (record player), and am stuck ironing out a couple of bugs which are causing the motor to get hot, after a short period of time.

A guy called Andy kindly shared his code with me, albeit for a different motor. The motor I am using was one of his original suggestions, as he had already used it previously.

The code has a toggle switch, to switch between 33.3 and 45rpm, a start button and a stop button.

It is currently running with a simpleFOC mini, but I have a SimpleFOC shield on the way, so I can power the Arduino directly from the Shield (I think). The main board is an Arduino Uno (Elgoo) and have everything wired up correctly. but I already knew that I had to mess with some values to get the speed right for my motor.

My issue is that the motor seems to get hot quickly - beyond what I think it potentially should. Admittedly, I am new to all of this, so some of the explanations I have read may have flown over me in some ways, so was looking for a bit of guidance on what I could be doing wrong, or what is necessary or not in the code (as there seem to be some optional parameters, but unsure what omitting them results in).

Below is the code I have. don’t pay too much attention to the voltage and current values, as I have just been messing around with them, to see what happens if I do x, y, and z.

The values at the bottom for the RPM get me the speeds I need, but the heat is the issue. I have read lots about this being from incorrect voltage, or current, so was just looking for some guidance. Unfortunately, I can’t find the Kv value of the motor I have (iPower 5208-24), but know that it has 11 pole pairs.

In the BLDCMotor motor = BLDCMotor (11); bit, I have only set the pole pairs. Adding other values seems to create issues - probably because I’m doing it wrong. Measuring the resistance between the motor connectors, it looked to have been around 17Ohms, but the specs say 13.7.

I’m not sure how hot is ok for this motor. The temperature based of a couple of minutes spinning seems excessive, particularly for the speed. Any help would be very much appreciated!

/// Open loop motor control example
#include <SimpleFOC.h>
bool doonce = 1;
int debouncetime = 10000;

const int BUTTON_PIN = 10;

int input4Pin = 13;
int input3Pin = 12;
int input2Pin = 11;
int input1Pin = 10;
// this declares each of our buttons and their pins
// make sure that you use the pins your buttons are wired to

// BLDC motor & driver instance
// BLDCMotor motor = BLDCMotor(pole pair number);
BLDCMotor motor = BLDCMotor (11);
// BLDCDriver3PWM driver = BLDCDriver3PWM(pwmA, pwmB, pwmC, Enable(optional));
BLDCDriver3PWM driver = BLDCDriver3PWM(9, 5, 6, 8);

// Stepper motor & driver instance
//StepperMotor motor = StepperMotor(50);
//StepperDriver4PWM driver = StepperDriver4PWM(9, 5, 10, 6, 8);

void setup() {
pinMode(input4Pin, INPUT_PULLUP);
pinMode(input3Pin, INPUT_PULLUP);
pinMode(input2Pin, INPUT_PULLUP);
pinMode(input1Pin, INPUT_PULLUP); // these lines declare each of the buttons as an input

// driver config
// power supply voltage [V]
driver.voltage_power_supply = 2.7; //12
// limit the maximal dc voltage the driver can set
// as a protection measure for the low-resistance motors
// this value is fixed on startup
driver.voltage_limit = 2.7; //12
driver.init();
// link the motor and the driver
motor.linkDriver(&driver);

// limiting motor current (provided resistance)
motor.current_limit = 0.01; // [Amps was 0.35]

// open loop control config
motor.controller = MotionControlType::velocity_openloop;

// init motor hardware
motor.init();

Serial.begin(115200);
Serial.println(“Motor ready!”);
Serial.println(“Set target velocity [rad/s]”);
_delay(1000);

motor.disable(); // stops motor
}

void loop() {

 // read the state of the switch/button:

int buttonState = digitalRead(BUTTON_PIN);

// print out the button’s state
Serial.println(buttonState);

// button on pin 10
if (digitalRead(10)==LOW) { // high state means on
motor.disable(); // stops motor
}
// button on pin 11
if (digitalRead(11)==LOW) { // high state means on
motor.move(3.479); // this button sets the speed to 33.3rpm
}

// button on pin 12
if (digitalRead(12)==LOW) { // high state means on
motor.move(4.709); // this button sets the speed to 45rpm 39.071
}
// button on pin 13
if (digitalRead(13)==LOW) { // high state means on
motor.enable(); // starts motor
doonce = 1;
delay(debouncetime);
}

}

Probably the driver.voltage_power_supply line. If the real power supply voltage is 12V, that should be 12. Setting it to 2.7 means your applied voltage is 12/2.7=4.4x higher than intended, which is almost 20x the expected heating (current squared).

Whatever the case, voltage_power_supply should be equal to the real power supply voltage to avoid confusion.

The current limit is not used since you haven’t set the resistance, but you don’t need it at such low speed.

Try setting motor.voltage_limit to 1 or lower and see if it still has enough torque. Open loop is generally only useful for testing. You’ll probably need a sensor to get enough torque with that motor.

You could use a larger overkill motor if you don’t care about cost or weight. Hoverboards are a cheap source of extremely overkill motors, but probably too coggy for a turntable.