← Back to Projects
Master's Thesis

BLDC Motor Controller

Multi-layer PCB for BLDC power stage and logic controller. FOC-ready firmware on STM32 with FreeRTOS, UART bootloader (XModem), and Hall sensor commutation.

STM32FreeRTOSPCBBLDCFOC
GitHub Repository

Overview

This project was developed as part of my Master’s thesis at the Cracow University of Technology. The goal was to design, build, and validate a complete BLDC motor controller for an anthropomorphic robot arm.

Hardware

The controller consists of a multi-layer PCB with:

  • Power stage: 3-phase inverter with gate drivers, current sensing, and overcurrent protection
  • Logic section: STM32 microcontroller, Hall sensor inputs, encoder interface, communication ports
  • Power supply: Integrated DC-DC converters for logic and gate driver supply

Firmware

The firmware runs on FreeRTOS and implements:

  • Hall sensor-based commutation
  • Speed measurement and filtering
  • UART bootloader with XModem protocol for field updates
  • Prepared architecture for closed-loop FOC control

Results

The controller was validated on a test bench with a 1-DOF robot arm joint, demonstrating reliable commutation and smooth speed transitions.