https://www.aliexpress.com/item/1005002058458786.html?spm=a2g2w.orderdetail.0.0.e0284aa6QiLV3g&sku_id=12000018589530076 I am running a 260kv motor with the simpleFOC mini, but whatever I try, the motor seems to “lock” to a pole, its stuck in one position and then I can physically push it to a next pole. Im sure that there is 7PP, but perhaps the phase resistance is wrong, Its not written anywhere. I am running using pico 2 and a usb c stepped up to 9v. The code is the edited example code to suit my pins and motor:
// Open loop motor control example
#include <SimpleFOC.h>
// BLDC motor & driver instance
// BLDCMotor( pp number , phase resistance, KV rating)
BLDCMotor motor = BLDCMotor(7 , 12.5, 260);
BLDCDriver3PWM driver = BLDCDriver3PWM(0, 1, 2, 3);
// instantiate the commander
Commander command = Commander(Serial);
void doTarget(char* cmd) { command.scalar(&motor.target, cmd); }
void doLimitCurrent(char* cmd) { command.scalar(&motor.current_limit, cmd); }
void setup() {
// driver config
// power supply voltage [V]
driver.voltage_power_supply = 12;
driver.init();
// link the motor and the driver
motor.linkDriver(&driver);
// limiting motor current (provided resistance)
motor.current_limit = 0.5; // [Amps]
// open loop control config
motor.controller = MotionControlType::velocity_openloop;
// init motor hardware
motor.init();
motor.initFOC();
// add target command T
command.add('T', doTarget, "target velocity");
command.add('C', doLimitCurrent, "current limit");
Serial.begin(115200);
Serial.println("Motor ready!");
Serial.println("Set target velocity [rad/s]");
_delay(1000);
}
void loop() {
motor.loopFOC();
// open loop velocity movement
// using motor.current_limit and motor.velocity_limit
motor.move();
// user communication
command.run();
}