// readme

BLDC-Driver: a compact FOC driver board

BLDC-Driver is an integrated brushless motor driver built around an STM32G431 microcontroller and a TI DRV8316 three-phase gate driver with integrated MOSFETs. It runs field-oriented control (FOC) with SimpleFOC and takes current (torque) commands over CAN. It suits gimbal motors and small direct-drive wheels.

The board includes an optional AS5048A magnetic encoder on a break-away tab. With the tab removed, the board measures just 39 mm Γ— 36 mm.

Features

MCUSTM32G431CBU6 (Cortex-M4F, 170 MHz max, run at 160 MHz; CORDIC used for fast trig)
Power stageDRV8316 with integrated FETs: 3 A continuous / 8 A peak, 6-PWM control over SPI
Supply5–35 V DC. The DRV8316 buck converter generates 5 V, and an XC6206 LDO generates 3.3 V
Current senseDRV8316 integrated low-side current-sense amplifiers on all three phases
Position sensorAS5048A 14-bit magnetic encoder (SPI1) on a break-away tab, or an external sensor via the SPI1 header
CommunicationCAN via a TJA1051T/3 transceiver (FDCAN capable up to 5 Mbit/s; the firmware…