Overview of STM32-FOC
masterSTM32-FOC is a low-level implementation of Field-Oriented Control (FOC) for BLDC motors using an STM32F4 microcontroller. It is built from scratch using STM32 HAL/LL drivers and FreeRTOS, avoiding high-level motor control libraries to provide a platform for precision motor control experimentation.
Key capabilities include:
- Control Modes: Torque, Speed, and Position control.
- Feedback: Position feedback via AS5047 encoder and phase current sampling via ADC.
- Advanced Algorithms: Clarke & Park Transforms, SVPWM generation, and Sensorless mode (using Sliding Mode Observer & High Frequency Injection).
- Automation: Encoder auto-calibration and self-commissioning for PI gain auto-tuning.
- Interface: USB CDC for real-time tuning and monitoring.