
Bldc motor cntroller
azmat-bilal/bldc_motor_controller_pcb
A Brushless DC Motor controller board. The design is inspired and is compatible with Odrive project (https://github.com/madcowswe/ODriveHardware) except that this one has a single channel.

Design, simulation and optimization-assisted digital control of a 12 V to 5 V synchronous buck converter using MATLAB/Simulink, STM32 and KiCad.
STM32 Buck Converter is an open-source printed circuit board by MAC-75, from the MAC-75/STM32-Synchronous-Buck-Converter repository on GitHub, published under the MIT licence. It is a 2-layer board of 100 × 70 mm with 31 parts on 18 nets, routed with 121 tracks and 26 vias.
It is built around the STM32G431RBT6, LM5109BSD and TPS7A1633DGN, with the CSD18540Q5B, BAS316 and SMBJ18A among its other parts. Its parts include 9 capacitors, 4 resistors, 4 ICs, 3 connectors and 2 diodes. It belongs with the power boards and the STM32 boards of this library.
MATLAB and Simulink models of a 12 V to 5 V synchronous buck converter. The project includes averaged and PWM switching power-stage models, a digital PI-controlled averaged model, and a reproducible load-transient test. The digital-control target is an STM32G431RB.
Project status: This is a design-only project validated with MATLAB, Simulink, and automated error-level KiCad ERC/DRC checks. No physical converter prototype has been built or hardware-tested. All waveforms, plots, and performance values in this repository are simulation results, not bench measurements.
| Parameter | Value |
|---|---|
| Input | 10 to 14 V |
| Nominal input | 12 V |
| Output | 5 V |
| Maximum current | 2 A |
| Switching frequency | 100 kHz |
| Inductor | 47 µH |
| Output capacitor | 100 µF |
| Output-capacitor ESR | 20 mΩ |
| Nominal duty cycle | 41.67% |
At 12 V input with a 5 Ω load, the open-loop models settle close to 5 V and 1 A. The startup ringing is from the LC output filter.




Three closed-loop switching cases were checked independently from the averaged model. Their steady-state inductor-current ranges are 0.5970-1.4357 A at 12 V/5 ohm, 1.7332-2.2652 A at 10 V/2.5 ohm, and 1.4900-2.5089 A at 14 V/2.5 ohm. The 2.5089 A value is the simulated worst-case peak. Exported waveforms are restricted to the common time support of every source signal; the validation rejects nonfinite data, extrapolation, or current magnitude of 10 A or more.
The averaged closed-loop model commands 5 Ω from 0–15 ms, 2.5 Ω from 15–35 ms, and 5 Ω from 35–50 ms. The settled operating points are approximately 5 V/1 A, 5 V/2 A, and 5 V/1 A. Maximum load current is 2.105 A.

Measured voltage response:
| Transition | Undershoot | Overshoot | 1% settling time | Steady-state error |
|---|---|---|---|---|
| Load increase at 15 ms | 0.497 V | 0.263 V | 0.928 ms | 0.000000434 V |
| Load removal at 35 ms | 0.357 V | 0.541 V | 1.320 ms | 0.00000744 V |
See
Documentation/load_transient_validation.md
for the measurement method and detailed results.
The averaged duty-to-output plant has a complex pole pair at
−1739.849 ± j14526.197 rad/s and an ESR zero at −500000 rad/s. With the
manual PI gains Kp = 0.02 and Ki = 60, the nominal averaged loop has
73.877° phase margin and a 2359.620 Hz gain crossover frequency.

See
Documentation/control_analysis.md
for the derivation, limitations, and generated numerical data.
The manual averaged controller's deliberately severe line test produces a 1.144 V undershoot for 12 V to 10 V and a 2.597 V overshoot for 10 V to 14 V. Both responses remain finite and settle, but they show that line feedforward or a different large-signal control strategy would be needed for a hardware-oriented design.
KiCad CLI 10.0.4 reports zero schematic ERC errors, zero PCB DRC errors, and
zero PCB unconnected items. The full PCB report intentionally retains warning
findings for missing courtyards, silkscreen over copper, installed-library
comparison, and schematic/PCB field or flat-net-name parity. No DRC category
is ignored. See
Documentation/kicad_design_notes.md
for exact counts and limitations.
MATLAB/buck_parameters.m.Simulink folder.To reproduce the configured load profile and validate every Simulink model:
addpath('MATLAB')
run('MATLAB/buck_parameters.m')
configure_load_transient_model
report = validate_project(true);validate_project(true) updates and simulates every .slx model, checks
recorded signals for finite values, validates the three load operating
points, measures both voltage transitions, and regenerates
Results/load_transient_response.png. Simulink cache and code-generation
files are redirected to the system temporary directory.
To run the complete project validation—including control analysis, every Simulink model, averaged and switching closed-loop operating cases, transient tests, and optimization-assisted PI tuning—start a clean MATLAB session and run:
addpath('MATLAB')
report = run_all_validations();For one persistent, uninterrupted MATLAB R2025b record, run this command from the repository root in PowerShell:
& 'C:\Program Files\MATLAB\R2025b\bin\matlab.exe' -logfile 'Results\full_validation_log.txt' -batch "addpath('MATLAB'); report = run_all_validations();"A successful run exits normally and ends the log with
FULL_VALIDATION_PASS. The checked-in log is a software-validation record,
not a hardware test log.
The models were made in MATLAB R2025b using Simulink and Simscape Electrical.
MATLAB/buck_parameters.m: design calculations and workspace valuesMATLAB/configure_load_transient_model.m: reproducible load-profile setupMATLAB/control_analysis.m: averaged plant and manual-PI loop analysisMATLAB/validate_project.m: all-model simulation and result generationMATLAB/run_all_validations.m: one-command complete validationMATLAB/run_switching_validations.m: switching cases and export sanity checksSimulink/buck_average_open_loop.slx: averaged converter modelSimulink/buck_average_closed_loop.slx: PI-controlled averaged modelSimulink/buck_average_load_transient.slx: validated load-step modelSimulink/buck_switching_open_loop.slx: PWM switching modelFirmware: portable STM32G431RB control core and integration notesKiCad: editable schematic/PCB, BOM, reports, and viewable exportsDocumentation: specifications and test notesResults: calculated values, CSV datasets, plots, and full validation log| Qty | Value | Footprint | References |
|---|---|---|---|
| 2 | 100nF | Capacitor_SMD:C_0603_1608Metric | C4, C5 |
| 2 | 100uF 25V | Buck:CP_Elec_7.3x4.3 | C1, C8 |
| 2 | 1uF 25V | Capacitor_SMD:C_1210_3225Metric | C2, C9 |
| 2 | CSD18540Q5B | Package_SON:VSONP-8-1EP_5x6_P1.27mm | Q1, Q2 |
| 1 | 10-14V INPUT | TerminalBlock_Phoenix:TerminalBlock_Phoenix_MKDS-1,5-2_1x02_P5.00mm_Horizontal | J1 |
| 1 | 100nF BOOT | Capacitor_SMD:C_0603_1608Metric | C7 |
| 1 | 10k BOOT0 | Resistor_SMD:R_0603_1608Metric | R4 |
| 1 | 10k VFB BOT | Resistor_SMD:R_0603_1608Metric | R2 |
| 1 | 10k VFB TOP | Resistor_SMD:R_0603_1608Metric | R1 |
| 1 | 1uF | Capacitor_SMD:C_0603_1608Metric | C3 |
| 1 | 1uF DRIVER | Capacitor_SMD:C_0805_2012Metric | C6 |
| 1 | 20mR 2W | Resistor_SMD:R_2512_6332Metric | R3 |
| 1 | 3A PTC | Fuse:Fuse_1812_4532Metric | F1 |
| 1 | 47uH 4.4A | Inductor_SMD:L_Wuerth_HCI-7050 | L1 |
| 1 | 5V OUTPUT | TerminalBlock_Phoenix:TerminalBlock_Phoenix_MKDS-1,5-2_1x02_P5.00mm_Horizontal | J2 |
| 1 | BAS316 | Diode_SMD:D_SOD-323 | D2 |
| 1 | INA180A1 | Package_TO_SOT_SMD:SOT-23-5 | U4 |
| 1 | ISENSE | Buck:TestPoint_Loop_D2.60mm_Drill1.0mm | TP5 |
| 1 | LM5109B | Package_SO:SOIC-8_3.9x4.9mm_P1.27mm | U3 |
| 1 | SMBJ18A | Diode_SMD:D_SMB | D1 |
| 1 | STM32G431RBT6 | Package_QFP:LQFP-64_10x10mm_P0.5mm | U1 |
| 1 | SW | Buck:TestPoint_Loop_D2.60mm_Drill1.0mm | TP2 |
| 1 | SWD | Buck:ARM_JTAG_SWD_10 | J3 |
| 1 | TPS7A1633 | Package_SO:VSSOP-8_3x3mm_P0.65mm | U2 |
| 1 | VFB | Buck:TestPoint_Loop_D2.60mm_Drill1.0mm | TP4 |
| 1 | VIN | Buck:TestPoint_Loop_D2.60mm_Drill1.0mm | TP1 |
| 1 | VOUT | Buck:TestPoint_Loop_D2.60mm_Drill1.0mm | TP3 |

azmat-bilal/bldc_motor_controller_pcb
A Brushless DC Motor controller board. The design is inspired and is compatible with Odrive project (https://github.com/madcowswe/ODriveHardware) except that this one has a single channel.


HeyPCB/kestrel-esc
Kestrel 4in1: 6S 4-in-1 ESC running stock AM32 on four STM32G071s, with 24 CSD18540 FETs, LM5109B drivers and battery current sensing. 48 x 52 mm 6-layer KiCad 10 board, DRC clean, with gerbers, BOM, CPL and STEP.

virtual-fly/VF_MOTOR_DRIVER
VF_Motor_Driver is an open hardware power distribution board, designed to be part of a larger modular system. This design is based in part on the OpenFFBoard TMC4671 driver board, licensed under the GNU General Public…


Gokasimov/STM32-FOC-Control
A completely from-scratch, bare-metal implementation of Field-Oriented Control (FOC) tailored for ultra-low inductance (3 µH) drone motors (e.g., A2212).

AhmedAbo-Eita/BLDC_Motor_Driver
BLDC Motor Driver hardware and firmware project including power stage, gate driver, protection circuits, and control firmware for sensor-based and/or sensorless BLDC motors.

DylanLockyer/Black_Body
Electrical system for black body MKID tester
It measures 100 × 70 mm and has 2 copper layers, 1.6 mm thick.
31 parts, built around the STM32G431RBT6, LM5109BSD, TPS7A1633DGN and CSD18540Q5B. 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.
From the MAC-75/STM32-Synchronous-Buck-Converter repository on GitHub, at the commit this page was made from: the board is KiCad/STM32_Buck_Converter.kicad_pcb and its schematic KiCad/STM32_Buck_Converter.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
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).