Hi everyone,
I tried the B-G431B-ESC1 board but it doesnāt work⦠I tested the example provided with the library, but it doesnāt function ā the motor doesnāt even initialize.
Then I tried the code suggested by Valentine⦠that doesnāt work either.
If I try reading the potentiometer on pin PB12, it works⦠it also reads an AMT103 encoder on pins hall1 and hall2.
But with Valentineās code, the motor shows no signs of life.
What could be the cause?
this is the code
#include <SimpleFOC.h>
// NUMBER OF POLE PAIRS, NOT POLES
BLDCMotor motor = BLDCMotor(14);
// MUST USE 6PWM FOR B-G431 DRIVER
BLDCDriver6PWM driver = BLDCDriver6PWM(A_PHASE_UH, A_PHASE_UL, A_PHASE_VH, A_PHASE_VL, A_PHASE_WH, A_PHASE_WL);
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 movements
motor.voltage_limit = 3; // [V]
motor.velocity_limit = 1024; // [rad/s]
// open loop control config
motor.controller = MotionControlType::velocity_openloop;
// init motor hardware
motor.init();
}
void loop() {
motor.move(analogRead(PB12));
}
The motor is a 5010 360 KV with a 1.2 Ohm phase to phase resistance. I use a power supply with 12 V.. the motor is free to move.