Skip to the content
2 layers64.3 × 11 mmBLDC Control, the printed circuit board in 3D

ME 507 Term Project

Size
64.3 × 11 mm
Copper layers
2
Thickness
1.6 mm
Parts
34
Nets
60
Pads
198
Tracks, vias
601, 350
Pours
17
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
17 Oct 2025
Updated
10 Dec 2025

Overview

BLDC Control is an open-source printed circuit board by flamingmangoes, from the flamingmangoes/ME-507-Term-Project repository on GitHub. It is a 2-layer board of 64.3 × 11 mm with 34 parts on 60 nets, routed with 601 tracks and 350 vias.

Its parts include 10 capacitors, 10 resistors, 6 transistors, 2 ICs and 2 connectors. It belongs with the robots and motor control boards of this library.

README

README.md

This project is a 1 rotational degree of freedom prototype for an autonomously controlled momentum exchange device. It includes a reaction flywheel driven by a brushless DC motor, a printed circuit board schematic and layout for the motor controller, and a software architecture to interact with the ESP32 microcontroller.

The hardware consists of a reaction flywheel, its housing, the brushless DC motor, a frictionless air spindle, a test stand, an air compressor, and the PCB with its necessary components. More information can be found in the README.md in the hardware folder: (https://github.com/flamingmangoes/ME-507-Term-Project/blob/main/hardware/README.md)

The software relies on a FreeRTOS-based task architecture, and it has functionality for wireless speed and torque command of the motor, live speed readout, live gain tuning, and downloading a CSV of test data. The task diagram is as follows: taskdia

The interrupt service handler in the Driver class sends a timestamp to the edge_time queue when it detects a rising edge on the FGOUT pin. The readActual task takes each rising edge and uses the previous rising edge to calculate the electrical frequency of the motor. It then uses that with the direction to calculate the signed speed in RPM, and places that into the speed_actual share. This task runs whenever it detects a value in edge_time, with a latency of 1ms since it uses an ISR.

This share is then read by the webserver task with a period of 10ms, which plots it on a live readout. It is also read by the speedControl task, which then uses the embedded finite state machine (discussed in the next subsection) to decide how to command the motor. It calls the command_speed_PWM method shown earlier to command the motor speed.

The webserver can command speeds and torques. When a value is input to the form, it places the command in its respective queue. When a speed is commanded, the speedControl task reads it directly. When a torque is commanded, the calcSetpoint task calls the Euler integrator method from the Controller class to convert that into a speed, then sends that to the speedControl task.

The state diagram for the speedControl task is as follows: statedia

The task starts in idle state. Once a value is placed in the speed_cmd queue, the state machine compares the magnitudes and signs of speed_cmd and the current value of speed_actual and decides in what state to place the motor. In the acceleration state, the motor is using its internal control loop to accelerate to the desired speed, then returns to IDLE once it reaches a deadband of 20rpm. In the deceleration state, the BRAKE pin is set to HIGH and the motor decelerates. (Right now, we cannot control the deceleration torque, but we are planning to implement a bang-bang controller to do so). In zero crossing states, once the motor reaches a deadband of 20 rpm around zero, the DIR pin switches polarity and starts accelerating to the desired speed.

When not in IDLE state, the task compares speed_cmd to speed_actual at a period of 10ms. When in IDLE state, the task blocks until another value is placed in the speed_cmd queue.

Software documentation is included as a Doxygen-generated HTML file structure in the docs folder. The code itself is also well commented and defines all functions, classes, and variables.

Parts

34
QtyValueFootprintReferences
60.1 uFCapacitor_SMD:C_0805_2012MetricC1, C2, C3, C4, C6, C7
6Q_NMOS_GDSPackage_TO_SOT_SMD:TO-252-3_TabPin2Q1, Q2, Q3, Q4, Q5, Q6
52.6kResistor_SMD:R_0805_2012MetricR5, R6, R7, R8, R9
4MountingHoleMountingHole:MountingHole_2.5mm_PadH1, H2, H3, H4
310kResistor_SMD:R_0805_2012MetricR2, R3, R4
21 uFCapacitor_SMD:C_0805_2012MetricC5, C8
1+24V PowerConnector_BarrelJack:BarrelJack_Wuerth_694108106102_2.5x5.5mmJ5
10.125Resistor_SMD:R_2512_6332MetricR1
13.3kResistor_SMD:R_0805_2012MetricR10
147 uFCapacitor_THT:CP_Radial_D8.0mm_P3.50mmC9
1470 uFCapacitor_THT:CP_Radial_D16.0mm_P7.50mmC37
1BLDC Motor ZIF ConnectionConnector_FFC-FPC:JUSHUO_AFA07-S11FCA-00_1x11-1MP_P1.0mm_HorizontalJ1
1DRV8308Package_DFN_QFN:Texas_RHA0040E_VQFN-40-1EP_6x6mm_P0.5mm_EP3.52x2.62mmU2
1~ME507:FireBeetle-ESP32U3

Similar boards

  • 2 layers26 × 30 mmMicrocontroller, the printed circuit board in 3D

    Microcontroller

    FrameworkComputer/ExpansionCards

    Reference designs and documentation to create Expansion Cards for the Framework Laptop

    34 parts1.1kCC-BY-4.0
  • 2 layers171.2 × 72.9 mmAmiga gfxcard old, the printed circuit board in 3D

    Amiga gfxcard old

    mntmn/amiga2000-gfxcard

    MNT VA2000, an Open Source Amiga 2/3/4000 Graphics Card (Zorro II/III), written in Verilog

    34 parts1k
  • 2 layers53.5 × 62.5 mmLed matrix, the printed circuit board in 3D

    Led matrix

    hackclub/OnBoard

    💡 Join 1,000 teenagers and make your first PCB with a $100 grant!

    34 parts915
  • 2 layers45 × 26 mmESP32-HELP Button, the printed circuit board in 3D

    ESP32-HELP Button

    pcbreflux/espressif

    all espressif stuff will committed here

    34 parts608GPL-3.0
  • 2 layers41.7 × 25.7 mmHeadphones flex pcb rigid, the printed circuit board in 3D

    Headphones flex pcb rigid

    strangeparts/niubi-headphones

    Flexible circuit board design for adding a headphone jack to an iPhone 7

    34 parts493MIT
  • 2 layers18.8 × 16.3 mmAmoeba, the printed circuit board in 3D

    Amoeba

    mtl/keyboard-pcbs

    Keyboard PCBs

    34 parts485
  • 2 layers127 × 69.9 mmEzcgi, the printed circuit board in 3D

    Ezcgi

    baldengineer/bit-preserve

    Project for capturing vintage, classic, aka old computer schematics in KiCad.

    34 parts446

Questions

How big is the BLDC Control PCB?

It measures 64.3 × 11 mm and has 2 copper layers, 1.6 mm thick.

What parts does the BLDC Control use?

34 parts. 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 BLDC Control KiCad files?

From the flamingmangoes/ME-507-Term-Project repository on GitHub, at the commit this page was made from: the board is hardware/board/BLDC-Control.kicad_pcb and its schematic hardware/board/BLDC-Control.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the BLDC Control design in my own project?

Its repository states no licence, so its author keeps all rights: ask flamingmangoes before reusing the design.