Hello every one, I have a problem in simplefoc. It is ok when I use 3PWM mode to driver motor, but it is wrong when I use 6PWM. UVW of driver is always 0V. I don’t know why.
// program
#include <Arduino.h>
#include “SimpleFOC.h”
//BLDCDriver3PWM driver = BLDCDriver3PWM(PA8, PA9, PA10); // good running
BLDCDriver6PWM driver = BLDCDriver6PWM(PA8, PA9, PA10, PA7, PB0, PB1, PA11); // bad running
//BLDCDriver6PWM driver = BLDCDriver6PWM(PA8, PA9, PA10, PB13, PB14, PB15, PA11); // bad running
void setup() {
// power supply voltage [V]
driver.voltage_power_supply = 12;
// Max DC voltage allowed - default voltage_power_supply
driver.voltage_limit = 12;
// driver config
driver.init();
}
void loop() {
driver.setPwm(3, 1, 5);
}
platformio.ini
[env:genericSTM32F103CB]
platform = ststm32
board = genericSTM32F103CB
framework = arduino
lib_archive = false
lib_deps = askuric/Simple FOC@^2.3.4