STM32G431, TMC6300, MA730 PCB Designing questions

Hi guys!
I am trying to design a simple FOC-based pcb for an extremely small spherical balancing robot, in which I have to control two gimbal motors (https://store.tmotor.com/product/gb2208-gimbal-type.html).
until now I have decided to go with the stm32g431 for the microcontrollerr, and ma730 spi absolute encoder for feedback, and TMC6300’s as motor drivers.
I am going to use two 18500 Panasonic cells in series to power the robot (voltage range 6V-8.4V).
I have a few questions,

  1. I want the best control possible and cost is not an issue, but space is,
    so will current sensing help me to control the motors better?
    I am planning to use low-side current sensing with external OPAMPS (LMV321 data sheet, product information and support | TI.com) one for each tmc6300.
    Also, I want to have the maximum torque possible at the lowest speed in my application, as the two wheels are very close in my design.

  2. Is it any better to have dedicated microcontrollers (G431) for each motor(both of them running independent FOC loops), and both of them controlled by a separate microcontroller via some kind of communication like CAN,SPI? I have seen the storm boards where one microcontroller can control 3 motors simultaneously but I think that affects performance. I tried mapping all the pinouts in one G431 on the stm32CubeMX and got all the pins required for controlling the two motors on a single stm32g431cbu6.

  3. The TMC 6300 is rated till 11v, and the 2s configuration range is only (6V-8.4V), I tested the motors with tmc6300 and the current draw for the motor only reaches 0.80 Amps max @11V(stalling condition), and the current draw and torque reduces when I decrease the voltage, should I design a boost-conveter within the PCB to get 11V supply for the motor drivers or directly supply the driver with the variable battery voltage.

1 Like

@Rem666 has lots of experience with balance bots, have you checked out his youtube:

I was trying to find the rpm on your motor to see if the loss of half it’s max speed (using 2s with a 3s/4s motor) will be a problem. Some of these gimbals are quite slow (60 rad/s). I don’t know how much speed a reaction wheel needs, i guess it could need weighted to increase inertia.

I think the g4 will be plenty fast enough for two gimbal motors. You’ll need to be careful in choice of pins, i think tim1 and tim8 can do 6pwm so need to choose pins associated with them.
My guess is that you’ll be able to do this without current sensing but I’m not an expert. The g4 has in chip opamp btw so you could explore whether you need external opamps.

1 Like