Advice for motor driver for T-Motor Gb54-2

I have the brushless gimbal T-Motor Gb54-2 motor, an encoder and an 511-STM32F407G-DISC1 board. I would like to implement a position controller. Which motor driver would you recommend for this setting?

The motor has a 15ohm resistance, and whilst the voltage can go quite high (24v) - you are still looking at only a couple of Amps max. I think you could use any motor driver you like as most can do 2A. As you are familiar with stm, you might even want to consider a combined mcu/driver like the B-G431B-ESC1 (I personally find it too small and fiddly to solder and SPI sensors are near impossible to use).

Or you could use the simplefoc mini board or standard boards.

I guess you’ve seen:

Dear Owen,

thank you for your fast reply. I will try the B-G431B-ESC1.

1 Like

If you have one, I’d use a current limiting power supply (perhaps set to 250ma) whilst doing early stage motor tuning. You can increase that as you gain confidence.

Have you decided on a sensor? (I assume you want closed loop). From memory that board has hall/enc pins but no spi. I think some people have reused pins for i2c too.

I have an encoder that I will use. However, I think that I will start with open loop and see.

I will of course use a limiting power supply to make sure that nothing breaks.

Hi,
I have included the following code to try to test the driver:

#include <SimpleFOC.h>
// BLDC driver instance
BLDCDriver3PWM driver = BLDCDriver3PWM(9, 5, 6, 8);
void setup() {
// pwm frequency to be used [Hz]
driver.pwm_frequency = 20000;
// power supply voltage [V]
driver.voltage_power_supply = 12;
// Max DC voltage allowed - default voltage_power_supply
driver.voltage_limit = 12;
// driver init
driver.init();
// enable driver
driver.enable();
_delay(1000);
}
void loop() {
// setting pwm (A: 3V, B: 1V, C: 5V)
driver.setPwm(3,1,5);
}

The platform.io file used in visual studio contains:

[env:disco_b_g431b_esc1]
platform = ststm32
board = disco_b_g431b_esc1
framework = arduino
monitor_speed = 115200
build_flags =
-D PIO_FRAMEWORK_ARDUINO_ENABLE_CDC
-D PIO_FRAMEWORK_ARDUINO_NANOLIB_FLOAT_PRINTF
-D PIO_FRAMEWORK_ARDUINO_USB_HIGHSPEED_FULLMODE
lib_deps=
askuric/Simple FOC @ ^2.3.2
SPI
Wire

Unfortunately, when I connect an oscilloscope I man not able to see any signal. Do you have any Idea where the problem could be?

Those pins look like they are for an arduino uno, not for a stm32g4.
Have you looked at this example?

Sorry, I have made a copy past error. I used as in the example the following code:

BLDCDriver6PWM driver = BLDCDriver6PWM(A_PHASE_UH, A_PHASE_UL, A_PHASE_VH, A_PHASE_VL, A_PHASE_WH, A_PHASE_WL);

With this code it did not work. I have also figured out, that if I do not connect the board with the USB to the computer and I use only an external current limiting power supply (with voltage provided in the code and max current at 300 mA) no LED is turned on and there are no 5V on the supply pin for the encoder.