Skip to the content
4 layers30.2 × 20.5 mmBLDCM MCU, the printed circuit board in 3D

High-precision BLDC motor and controller development from scratch (in progress...)

Size
30.2 × 20.5 mm
Copper layers
4
Thickness
1.6 mm
Parts
91
Nets
87
Pads
301
Tracks, vias
823, 147
Pours
5
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
7 Sep 2023
Updated
11 Sep 2025

Overview

BLDCM MCU is an open-source printed circuit board by brenocq, from the brenocq/bldc-motor repository on GitHub, published under the MIT licence. It is a 4-layer board of 30.2 × 20.5 mm with 91 parts on 87 nets, routed with 823 tracks and 147 vias.

It is built around the STM32F446RET6, SK6805E-J and AS5048A, with the ISM330DHCX, SN74LV1T34DBVR-TP and ECS-3225MVLC-240-CN-TR among its other parts. Its parts include 28 capacitors, 20 ICs, 3 resistors, 1 connector and 1 switch. It belongs with the robots and motor control boards and the STM32 boards of this library.

Main components

7

README

README.md

BLDC Motor Controller

[!NOTE] This project is currently in active development. Features and documentation are subject to change.

Table of Contents


Project Overview

This project aims to develop a high-precision Brushless DC (BLDC) motor controller from scratch, covering both hardware and firmware aspects. The controller is designed for advanced motor control applications, leveraging a powerful STM32 microcontroller, a dedicated motor driver IC, and comprehensive sensing capabilities for precise operation and rotor position estimation.

The core of the system is a custom two-board stack: an MCU board housing the main control logic and a power board managing motor drive and sensing.

Folder Structure

The project is organized into logical directories to enhance maintainability and readability:

  • simulation/: Contains code and files related to motor control simulation.
  • mechanical/: Houses all mechanical design files (CAD models, part designs).
  • electronics/: Stores KiCad project files for both the MCU and Power PCBs, including schematics and PCB layouts.
  • firmware/: Contains all the embedded software for the STM32 microcontroller.
  • controller/: Specific implementations of motor control algorithms (trapezoidal, FOC).
  • common/: Shared utilities and communication definitions across different parts of the project.

Mechanical

The mechanical aspects of this project are centered around integrating the custom electronics with an off-the-shelf EM3215 BLDC motor. It's important to note that, for this specific project, the motor's original windings are being utilized, and there are no plans to re-wrap the wire around the coils. The mechanical folder contains various CAD files (FreeCAD) for components like the rotor adapter, chassis, and PCB cutouts, ensuring a perfect fit and robust assembly.


Electronics

The electronics consist of two interconnected custom-designed Printed Circuit Boards (PCBs), designed using KiCad. Both boards are 4-layer designs to facilitate efficient signal routing and power integrity. A Molex PCB stack connector is used to establish a robust electrical connection between the MCU and Power PCBs.

MCU PCB (Top Board)

The top PCB serves as the brain of the controller, housing the main microcontroller and various sensors and interfaces for user interaction and precise feedback.

Top LayerLayer 1Layer 2Bottom Layer3D Top View3D Bottom View
Layer 1 (Top Copper)Layer 2 (Inner 1)Layer 3 (Inner 2)Layer 4 (Bottom Copper)3D Top View3D Bottom View

MCU PCB Key Components:

  • STM32F4 Microcontroller: The central processing unit for control algorithms, sensor data acquisition, and communication.
  • AS5048A Angle Position Encoder: Provides 14-bit absolute rotor position feedback for precise commutation and control.
  • SK6805 LED Ring: A customizable visual indicator for status and debugging.
  • Reset Button: For convenient system resets.
  • ISM330DHCX IMU (Inertial Measurement Unit): Provides acceleration and angular velocity data, useful for advanced motion control or system stabilization.

MCU PCB v1.0 Release Package:

Power PCB (Bottom Board)

The bottom PCB handles the high-current motor driving functions and essential power monitoring.

Top LayerLayer 1Layer 2Bottom Layer3D Top View3D Bottom View
Power PCB Layer 1 (Top Copper)Power PCB Layer 2 (Inner 1)Power PCB Layer 3 (Inner 2)Power PCB Layer 4 (Bottom Copper)Power PCB 3D Top ViewPower PCB 3D Bottom View

Power PCB Key Components:

  • TMC6300 Motor Driver: A 3-phase motor driver that translates the MCU's PWM and control signals into high-current outputs for the motor phases.
  • TCAN1462 CAN Transceiver: Enables robust CAN FD communication for daisy-chaining motors in series.
  • J-Link Connector: Provides easy SWD debugging and programming for the STM32 microcontroller.
  • USB Connector: Facilitates direct USB Full-Speed communication for data logging, control, and power input.
  • Micro-Lock Plus Connectors: Robust 4-pin Molex connectors that provide a vibration-resistant link for power delivery and CAN bus communications.
  • Voltage Sensors (x4): One monitors the DC bus voltage, while three dedicated sensors measure filtered phase voltages for safe operation and FOC.
  • INA240 Current Sensors (x3): Three precision analog-output current sensors enable high-speed, accurate phase current measurement for FOC.

Power PCB v1.0 Release Package:


Firmware

The firmware, developed for the STM32F4 microcontroller, is the intelligence behind the motor control. It includes:

  • Low-level Peripheral Drivers: Custom drivers for ADC, timers, GPIO, SPI, I2C, UART, USB, and DMA to efficiently manage hardware resources.
  • Motor Control Algorithms: Implementation of both trapezoidal and Field-Oriented Control (FOC) algorithms, located in the controller directory, to provide flexible and high-performance motor driving capabilities.
  • Sensor Integration: Code to interface with the MT6701 encoder, INA239-Q1 current sensors, voltage sensor, and ISM330DHCX IMU for comprehensive feedback.
  • System Utilities: Logging, error handling, and platform-specific configurations for the STM32 environment.

The firmware architecture and design decisions will be documented in the future.


Simulation

The simulation directory contains resources for simulating the BLDC motor system and visualizing the sensor data in real time. This allows for testing and validating control algorithms and system behavior in a virtual environment before deployment on the hardware. The bldc.atta file can be opened with Atta, and it implements a basic motor model simulation and plotting of sensor data.

Instructions on how to run the BLDCM simulation with Atta will be added in the future


Results

Below are some pictures/videos taken during the development. The controller design and calibration procedures will be explained in depth in the future :)

https://github.com/user-attachments/assets/e86b0316-7ecf-4e15-9d3b-c0315d690438

License

This project is licensed under the MIT License - check LICENSE for details.

Parts

91
QtyValueFootprintReferences
37Test point 0.5mmBrenoCQ:TP_0.5mmTP1, TP2, TP10, TP11, TP12, TP13, TP14, TP15, TP16, TP17, TP18, TP19, TP20, TP21, TP22, TP23 +21
25100nFBrenoCQ:C_0402C2, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19, C20, C21, C22, C23, C24 +9
16SK6805BrenoCQ:LED-1515U4, U5, U6, U7, U8, U9, U10, U11, U12, U13, U14, U15, U16, U17, U18, U19
210KBrenoCQ:R_0402R1, R4
110uFBrenoCQ:C_0805C28
11uFBrenoCQ:C_0402C1
14.7uFBrenoCQ:C_0603C6
1500BrenoCQ:R_0402R5
152991-0308BrenoCQ:52991-0308J1
1AS5048ABrenoCQ:TSSOP-14U20
1ECS-3225MVLC-240-CNBrenoCQ:Crystal_3225Y1
1EVPAKE31ABrenoCQ:EVPAKE31AK1
1ISM330DHCXBrenoCQ:LGA-14LU3
1SN74LV1T34DBVRBrenoCQ:SOT-23-5U2
1STM32F446REBrenoCQ:LQFP64U1

More from brenocq/bldc-motor

1
  • 4 layersBLDCM Power, the printed circuit board in 3D

    BLDCM Power

    brenocq/bldc-motor

    High-precision BLDC motor and controller development from scratch (in progress...)

    60 parts13MIT

Similar boards

  • 4 layers116 × 106 mmCard, the printed circuit board in 3D

    Card

    increpare/PuzzleScript-labs

    firehose of mostly ai-written puzzlescript projects. main project is https://github.com/increpare/puzzlescript/

    48 parts1MIT
  • 2 layers33.6 × 29.3 mmKeyChain, the printed circuit board in 3D

    KeyChain

    Brammert42/EPKeychain

    A keychain equipped with a RP2040 and a E-ink

    71 parts
  • 6 layers98 × 27.5 mmOvio core, the printed circuit board in 3D

    Ovio core

    korken89/ovio_core

    Work in progress. PCB have arrived for v1.0 of the board and bring-up has started.

    196 parts30
  • 2 layers38.2 × 50.1 mmIMU module, the printed circuit board in 3D

    IMU module

    MohamadAminGhanoum/IMU-board

    planning to make a module that has small sensors on the pcbs, which will give me motion data, which i will track and recieve on either my phone or computer using the usb-c

    21 parts1
  • 4 layers68.8 × 68.6 mmGMWM Analysis Board, the printed circuit board in 3D

    GMWM Analysis Board

    thejamesrhodes/IMU-Quantisation-research-project

    Research into quantisation effects in MEMS gyroscopes using custom STM32 hardware.

    163 parts1MIT
  • 2 layers80 × 80 mmVECTRON V1, the printed circuit board in 3D

    VECTRON V1

    arudhranpk/VECTRON_V1

    This is a custom made flight computer designed for sounding rockets.

    161 parts
  • 2 layers101.6 × 53.3 mmArduinoMega Ethernet, the printed circuit board in 3D

    ArduinoMega Ethernet

    dmanla/SecureConnectivityDevelopmentPlatform

    A development platform which provides secure connectivity and data logging support while maintaining compatibility with Arduino-Mega hardware and software.

    116 parts
  • 4 layers11.2 × 18 mmImu board, the printed circuit board in 3D

    Imu board

    eshazen/ninjanirs-imu

    IMU and multiplexer designs for ninjaNIRS

    10 parts

Questions

How big is the BLDCM MCU PCB?

It measures 30.2 × 20.5 mm and has 4 copper layers, 1.6 mm thick.

What parts does the BLDCM MCU use?

91 parts, built around the STM32F446RET6, SK6805E-J, AS5048A and ISM330DHCX. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the BLDCM MCU KiCad files?

From the brenocq/bldc-motor repository on GitHub, at the commit this page was made from: the board is electronics/BLDCM-MCU/BLDCM-MCU.kicad_pcb and its schematic electronics/BLDCM-MCU/BLDCM-MCU.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the BLDCM MCU design in my own project?

Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).