

BLDC Control
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.mdThis 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:
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:
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| Qty | Value | Footprint | References |
|---|---|---|---|
| 6 | 0.1 uF | Capacitor_SMD:C_0805_2012Metric | C1, C2, C3, C4, C6, C7 |
| 6 | Q_NMOS_GDS | Package_TO_SOT_SMD:TO-252-3_TabPin2 | Q1, Q2, Q3, Q4, Q5, Q6 |
| 5 | 2.6k | Resistor_SMD:R_0805_2012Metric | R5, R6, R7, R8, R9 |
| 4 | MountingHole | MountingHole:MountingHole_2.5mm_Pad | H1, H2, H3, H4 |
| 3 | 10k | Resistor_SMD:R_0805_2012Metric | R2, R3, R4 |
| 2 | 1 uF | Capacitor_SMD:C_0805_2012Metric | C5, C8 |
| 1 | +24V Power | Connector_BarrelJack:BarrelJack_Wuerth_694108106102_2.5x5.5mm | J5 |
| 1 | 0.125 | Resistor_SMD:R_2512_6332Metric | R1 |
| 1 | 3.3k | Resistor_SMD:R_0805_2012Metric | R10 |
| 1 | 47 uF | Capacitor_THT:CP_Radial_D8.0mm_P3.50mm | C9 |
| 1 | 470 uF | Capacitor_THT:CP_Radial_D16.0mm_P7.50mm | C37 |
| 1 | BLDC Motor ZIF Connection | Connector_FFC-FPC:JUSHUO_AFA07-S11FCA-00_1x11-1MP_P1.0mm_Horizontal | J1 |
| 1 | DRV8308 | Package_DFN_QFN:Texas_RHA0040E_VQFN-40-1EP_6x6mm_P0.5mm_EP3.52x2.62mm | U2 |
| 1 | ~ | ME507:FireBeetle-ESP32 | U3 |
Similar boards
- 2 layers142.5 × 106.4 mm

- 2 layers26 × 30 mm

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 mm

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 mm

Led matrix
hackclub/OnBoard
💡 Join 1,000 teenagers and make your first PCB with a $100 grant!
34 parts915 - 2 layers45 × 26 mm

- 2 layers41.7 × 25.7 mm

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 mm

- 2 layers127 × 69.9 mm

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.