BLDC Motor FOC Control
Back to Gallery
Project
December 2024 - April 2025

BLDC Motor FOC Control

Advanced Motor Control with STM32 and Field-Oriented Control

View Repository
8 technologies used

System Overview

Developed a sophisticated Brushless DC (BLDC) motor control system centered on an STM32 microcontroller, integrating the Modbus protocol over RS485 for real-time communication and control. This system implements both open-loop and closed-loop Field-Oriented Control (FOC), with the closed-loop implementation featuring precise PID tuning and relying on SPI-based encoder feedback managed via timer interrupts. The Modbus processing itself was executed using UART interrupt-driven logic. For user interaction and safety, the system featured an OLED screen to display the current motor speed and an emergency stop button. All components, including the custom control circuitry, were integrated onto a single, custom-designed and fabricated PCB.

Tech Stack

STM32ModbusFOCRS485BLDC MotorUARTPCB DesignPID Control
Build StatusStable

FOC Algorithm

Industry-standard Field-Oriented Control

Real-Time Control

High-frequency PWM and feedback control

Industrial Protocol

Modbus RS485 communication

Project Demo

Engineering Features

Developed a BLDC motor control system using the Modbus protocol over RS485, with an STM32 microcontroller handling real-time communication and speed control.

Implemented closed-loop Field-Oriented Control (FOC) with PID tuning, using timer interrupts, SPI-based encoder feedback, and UART interrupt-driven Modbus processing.

Designed and fabricated a custom PCB to house all the components into a single board.

CAD & Mechanical Models

BLDC Motor
STL
Housing Top
STL
Housing Bottom
STL
PCB
STL

Project Resources

📄
PCB Schematics
Resource
🎪
Presentation Slides
Resource
📚
Detailed Report
Resource
🛠️
3D CADs
Resource

Want to see more work?

I have more projects across robotics, embedded systems, and software engineering.

View All Projects