Link

Stm32 Bluepill using the Arduino SimpleFOCShield

The SimpleFOCShield, being a BLDC driver, can be used not just with boards with Arduino UNO headers but also as a stand alone driver board.

Here is an example how to connect Stm32 Bluepill with the Arduino SimpleFOCShield :

More information about the Arduino Simple FOC Shield.

Bluepill pinout

Make sure to consult the pinout before you assign the BLDC driver pins. They have to be PWM capable.

Encoder

  • Channels A and B are connected to PB9 and PB8.
  • If your encoder has index signal you can connect it to the boards as well, for example on PB7.

NOTE

Any digital pin can be external interrupt pin on STM32 boards.

SimpleFOCShield connection

  • Connect PWMa, PWMb and PWMc signal to PA10, PA9 and PA8 of the Bluepill.
  • Connect the enable pin to any digital pin such as PA11
  • Connect the common ground GND
  • Connect the power-supply cable

Motor

  • Motor phases a, b and c are connected directly the motor terminal connector TB_M1

Example connection