How to use simplefoc with dfrobot Romeo mini BLE

I am building a 2 wheel robot using:

  • Romeo mini ble board → Romeo_BLE_mini_V2.0_SKU_DFR0351-DFRobot
  • 2 CHIHAI motor 6V 100/210/300RPM Encoder Motor DC Gear Motor
  • 6 VL53L0x
  • a Classic OLED 128x64
    The oled device and the 6 sensors are on I2C, and I use 6 digital pin for the XSHUT signal. Pin 2 is supposed to be for encoder A-motor 1 and pin 3 for encoder A-motor 2. I plan to use A0 and A1 for encoder B (Motor 1 and 2).
    First question : does my design make sense?
    2nd question : could I use and How can I use simplefoc to facilitate my writing code ?

I hope I am clear, if not question me


Hey @Laurent,

Are you interested in using it for Steppers of BLDCs?

The TB6612 chip on the board is not really suited for BLDCs unfortunately.
The reason why is this table:

When the PWM signals of one h-bridge are both in high (the output would need to be high on both outputs) the output is low.
And when the PWM signals are both low the outputs should be low, but they are in high-impedance mode for this controller.

So I would not suggest using this controller with BLDCs, unless you have 3 half bridges, one for each phase of the motor.

Thanks, I was expecting this kind of réponse after reading and experiments. Go back to basic.